commit stringlengths 40 40 | old_file stringlengths 4 237 | new_file stringlengths 4 237 | old_contents stringlengths 1 4.24k | new_contents stringlengths 5 4.84k | subject stringlengths 15 778 | message stringlengths 16 6.86k | lang stringlengths 1 30 | license stringclasses 13
values | repos stringlengths 5 116k | config stringlengths 1 30 | content stringlengths 105 8.72k |
|---|---|---|---|---|---|---|---|---|---|---|---|
437444d8572d6713f1b3036c9dc69641b452351f | code/type_null_true_false.rb | code/type_null_true_false.rb | def if_value(values)
puts '"if value":'
values.each { |k, v| puts "#{k} - #{v ? 'true' : 'false'}" }
puts ''
end
def nil_value(values)
puts '"if value.nil?":'
values.each { |k, v| puts "#{k} - #{v.nil? ? 'true' : 'false'}" }
puts ''
end
def empty_value(values)
puts '"if value.empty?":'
values.each do ... | def check(label, fn, values)
puts label
values.each do |value|
begin
result = fn.call(value) ? 'true' : 'false'
rescue => e
result = "error: #{e}"
end
printf(" %-9p - %s\n", value, result)
end
puts ''
end
values = ['string', '', [1, 2, 3], [], 5, 0, true, false, nil]
check('if val... | Refactor null-true-false example in Ruby to make it more readable | Refactor null-true-false example in Ruby to make it more readable
| Ruby | mit | Evmorov/ruby-coffeescript,evmorov/lang-compare,evmorov/lang-compare,Evmorov/ruby-coffeescript,evmorov/lang-compare,evmorov/lang-compare,Evmorov/ruby-coffeescript,evmorov/lang-compare,evmorov/lang-compare | ruby | ## Code Before:
def if_value(values)
puts '"if value":'
values.each { |k, v| puts "#{k} - #{v ? 'true' : 'false'}" }
puts ''
end
def nil_value(values)
puts '"if value.nil?":'
values.each { |k, v| puts "#{k} - #{v.nil? ? 'true' : 'false'}" }
puts ''
end
def empty_value(values)
puts '"if value.empty?":'
... |
81e2c3817acaea392af21c8b868c9c431106438c | build/scripts/modules/vulkan.lua | build/scripts/modules/vulkan.lua | MODULE.Name = "Vulkan"
MODULE.Defines = {
"VK_NO_PROTOTYPES"
}
MODULE.Libraries = {
"NazaraCore",
"NazaraUtility"
}
MODULE.OsDefines.Windows = {
"VK_USE_PLATFORM_WIN32_KHR"
}
MODULE.OsFiles.Windows = {
"../src/Nazara/Vulkan/Win32/**.hpp",
"../src/Nazara/Vulkan/Win32/**.cpp"
}
| MODULE.Name = "Vulkan"
MODULE.Defines = {
"VK_NO_PROTOTYPES"
}
MODULE.Libraries = {
"NazaraCore",
"NazaraUtility"
}
MODULE.OsDefines.Linux = {
"VK_USE_PLATFORM_MIR_KHR",
"VK_USE_PLATFORM_XCB_KHR",
"VK_USE_PLATFORM_XLIB_KHR",
"VK_USE_PLATFORM_WAYLAND_KHR"
}
MODULE.OsDefines.BSD = MODULE.OsDefines.Linux
MODULE... | Add support for Linux, BSD and Solaris | Build: Add support for Linux, BSD and Solaris
Former-commit-id: 2f7f1e74fd101d688977ceb5129027cb1fa4a67b | Lua | mit | DigitalPulseSoftware/NazaraEngine | lua | ## Code Before:
MODULE.Name = "Vulkan"
MODULE.Defines = {
"VK_NO_PROTOTYPES"
}
MODULE.Libraries = {
"NazaraCore",
"NazaraUtility"
}
MODULE.OsDefines.Windows = {
"VK_USE_PLATFORM_WIN32_KHR"
}
MODULE.OsFiles.Windows = {
"../src/Nazara/Vulkan/Win32/**.hpp",
"../src/Nazara/Vulkan/Win32/**.cpp"
}
## Instruction:
... |
0fca2f5a6ce9bf16a562d9a9ce2eb8914857be24 | app/code/community/ReeCreate/PageTitle/Model/Observer.php | app/code/community/ReeCreate/PageTitle/Model/Observer.php | <?php
class ReeCreate_PageTitle_Model_Observer
{
/**
* Change product or category page titles
*
* @pram Varien_Event_Observer $observer
* @return ReeCreate_PageTitle_Model_Observer
*/
public function controller_action_layout_generate_blocks_after(Varien_Event_Observer $observer)
{
... | <?php
class ReeCreate_PageTitle_Model_Observer
{
/**
* Change product or category page titles
*
* @pram Varien_Event_Observer $observer
* @return ReeCreate_PageTitle_Model_Observer
*/
public function controller_action_layout_generate_blocks_after(Varien_Event_Observer $observer)
{
... | Check For Empty String On Page Title Update | Check For Empty String On Page Title Update
This commit fixes #8
| PHP | mit | ReeCreate/magento-pagetitle | php | ## Code Before:
<?php
class ReeCreate_PageTitle_Model_Observer
{
/**
* Change product or category page titles
*
* @pram Varien_Event_Observer $observer
* @return ReeCreate_PageTitle_Model_Observer
*/
public function controller_action_layout_generate_blocks_after(Varien_Event_Observer $... |
652deed7d6996c8c87c1acfe21f8f8a0cfc1b0b1 | modules/ruby/spec/classes/ruby_spec.rb | modules/ruby/spec/classes/ruby_spec.rb | require_relative '../../../../spec_helper'
describe 'ruby', :type => :class do
let(:params) { {'version' => '1.2.3.4.5.6'} }
it do
should contain_package('ruby1.9.1').with({'ensure' => '1.2.3.4.5.6'})
should contain_package('ruby1.9.1-dev').with({'ensure' => '1.2.3.4.5.6'})
should contain_apt__reposi... | require_relative '../../../../spec_helper'
describe 'ruby', :type => :class do
let(:params) { {'version' => '1.2.3.4.5.6'} }
it do
should contain_package('ruby1.9.1').with({'ensure' => '1.2.3.4.5.6'})
should contain_package('ruby1.9.1-dev').with({'ensure' => '1.2.3.4.5.6'})
end
end
| Remove redundant test for brightbox repo | Remove redundant test for brightbox repo
| Ruby | mit | alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet | ruby | ## Code Before:
require_relative '../../../../spec_helper'
describe 'ruby', :type => :class do
let(:params) { {'version' => '1.2.3.4.5.6'} }
it do
should contain_package('ruby1.9.1').with({'ensure' => '1.2.3.4.5.6'})
should contain_package('ruby1.9.1-dev').with({'ensure' => '1.2.3.4.5.6'})
should con... |
589095a1637087e4c8dbaa15518e90c64d7eb4a3 | lib/elixir/macros.ex | lib/elixir/macros.ex | ns Elixir::Macros
defmacro unless: [clause, options] do
positive = Erlang.orddict.fetch(:do, options)
negative = Erlang.orddict.fetch(:else, options)
quote(if(unquote(clause), do: unquote(negative), else: unquote(positive)))
end
defmacro &&: [left, right] do
quote(
case unquote(left) do
match: false
... | ns Elixir::Macros
defmacro unless: [clause, options] do
quote(if(!unquote(clause), unquote(options)))
end
defmacro &&: [left, right] do
quote(
case unquote(left) do
match: false
false
match: nil
nil
match: _
unquote(right)
end
)
end
defmacro ||: [left, right] do
quote(
... | Simplify unless macro now that we have "!" | Simplify unless macro now that we have "!"
| Elixir | apache-2.0 | kimshrier/elixir,antipax/elixir,michalmuskala/elixir,gfvcastro/elixir,lexmag/elixir,beedub/elixir,kimshrier/elixir,elixir-lang/elixir,ggcampinho/elixir,pedrosnk/elixir,lexmag/elixir,pedrosnk/elixir,gfvcastro/elixir,ggcampinho/elixir,kelvinst/elixir,joshprice/elixir,antipax/elixir,beedub/elixir,kelvinst/elixir | elixir | ## Code Before:
ns Elixir::Macros
defmacro unless: [clause, options] do
positive = Erlang.orddict.fetch(:do, options)
negative = Erlang.orddict.fetch(:else, options)
quote(if(unquote(clause), do: unquote(negative), else: unquote(positive)))
end
defmacro &&: [left, right] do
quote(
case unquote(left) do
... |
1725d12e1820811033cd9a5f6040b09a08c9fa3e | deploy.sh | deploy.sh |
DEPLOY_RESOURCE=$1
echo "============================================================================="
echo "# deployment started:"
echo "# deploy repo file: '${DEPLOY_FILE}'"
echo "# deploy resource : '${DEPLOY_RESOURCE}'"
echo "# deploy host : '${DEPLOY_HOST}'"
echo "# deploy key : '${DEPLOY_KEY}'... |
DEPLOY_RESOURCE=$1
echo "============================================================================="
echo "# deployment started:"
echo "# deploy repo file: '${DEPLOY_FILE}'"
echo "# deploy resource : '${DEPLOY_RESOURCE}'"
echo "# deploy host : '${DEPLOY_HOST}'"
echo "# deploy key : '${DEPLOY_KEY}'... | Add some debugging to figure out where hex value is coming from | Add some debugging to figure out where hex value is coming from
| Shell | bsd-2-clause | wkoszek/travis_deploy | shell | ## Code Before:
DEPLOY_RESOURCE=$1
echo "============================================================================="
echo "# deployment started:"
echo "# deploy repo file: '${DEPLOY_FILE}'"
echo "# deploy resource : '${DEPLOY_RESOURCE}'"
echo "# deploy host : '${DEPLOY_HOST}'"
echo "# deploy key :... |
0bc404dc2bc1c7694dd4d88485075acc1bea3362 | README.md | README.md |
Census is a library to interface with Daybreak games API census. It is meant specifically for Planetside 2.
In it's current form it's very simple and doesn't give you a lot of options for querying data. It'll all come as I need it. |
Census is a library to interface with Daybreak games API census. It is meant specifically for Planetside 2.
The library is currently being written on an "as features needed" basis. Probably won't need every feature census provides.
| Change the readme a bit | Change the readme a bit
| Markdown | mit | THUNDERGROOVE/census | markdown | ## Code Before:
Census is a library to interface with Daybreak games API census. It is meant specifically for Planetside 2.
In it's current form it's very simple and doesn't give you a lot of options for querying data. It'll all come as I need it.
## Instruction:
Change the readme a bit
## Code After:
Census is a... |
b235ae762adb76fe9835d98f7e2a4fc3d92db251 | src/util/sortLargeFIs.py | src/util/sortLargeFIs.py | import os, sys
from operator import itemgetter
def errorExit(msg):
sys.stderr.write(msg)
sys.exit(1)
def main():
# Verify arguments
if len(sys.argv) != 2:
errorExit("Usage: {} FILE\n".format(os.path.basename(sys.argv[0])))
fileName = sys.argv[1]
if not os.path.isfile(fileName):
... | import os, sys
from operator import itemgetter
def errorExit(msg):
sys.stderr.write(msg)
sys.exit(1)
def main():
# Verify arguments
if len(sys.argv) != 2:
errorExit("Usage: {} FILE\n".format(os.path.basename(sys.argv[0])))
fileName = sys.argv[1]
if not os.path.isfile(fileName):
... | Modify to handle ARtool output | Modify to handle ARtool output
| Python | apache-2.0 | jdebrabant/parallel_arules,jdebrabant/parallel_arules,jdebrabant/parallel_arules,jdebrabant/parallel_arules | python | ## Code Before:
import os, sys
from operator import itemgetter
def errorExit(msg):
sys.stderr.write(msg)
sys.exit(1)
def main():
# Verify arguments
if len(sys.argv) != 2:
errorExit("Usage: {} FILE\n".format(os.path.basename(sys.argv[0])))
fileName = sys.argv[1]
if not os.path.isfile(f... |
6ef60d0b1815c7278615263e560e09aac9083d5c | src/controllers/Document/View.php | src/controllers/Document/View.php | <?php
namespace BNETDocs\Controllers\Document;
use \BNETDocs\Libraries\Authentication;
use \BNETDocs\Libraries\Comment;
use \BNETDocs\Libraries\Document;
use \BNETDocs\Libraries\Exceptions\DocumentNotFoundException;
use \BNETDocs\Models\Document\View as DocumentViewModel;
use \CarlBennett\MVC\Libraries\Common;
use \... | <?php
namespace BNETDocs\Controllers\Document;
use \BNETDocs\Libraries\Authentication;
use \BNETDocs\Libraries\Comment;
use \BNETDocs\Libraries\Document;
use \BNETDocs\Libraries\Exceptions\DocumentNotFoundException;
use \BNETDocs\Models\Document\View as DocumentViewModel;
use \CarlBennett\MVC\Libraries\Common;
use \... | Fix error handling for non-existent documents | Fix error handling for non-existent documents
| PHP | agpl-3.0 | BNETDocs/bnetdocs-web,BNETDocs/bnetdocs-web,BNETDocs/bnetdocs-web | php | ## Code Before:
<?php
namespace BNETDocs\Controllers\Document;
use \BNETDocs\Libraries\Authentication;
use \BNETDocs\Libraries\Comment;
use \BNETDocs\Libraries\Document;
use \BNETDocs\Libraries\Exceptions\DocumentNotFoundException;
use \BNETDocs\Models\Document\View as DocumentViewModel;
use \CarlBennett\MVC\Librari... |
69ddbe981f8e020a1e995b2caba54a1aa7f8bb23 | plugin/builder-amazon-ebsnoami/main.go | plugin/builder-amazon-ebsnoami/main.go | package main
import (
"github.com/mitchellh/packer/builder/amazon/ebsnoami"
"github.com/mitchellh/packer/packer/plugin"
)
func main() {
server, err := plugin.Server()
if err != nil {
panic(err)
}
server.RegisterBuilder(new(ebsnoami.Builder))
server.Serve()
}
| package main
import (
"github.com/emate/packer-ebsnoami/builder/amazon/ebsnoami"
"github.com/mitchellh/packer/packer/plugin"
)
func main() {
server, err := plugin.Server()
if err != nil {
panic(err)
}
server.RegisterBuilder(new(ebsnoami.Builder))
server.Serve()
}
| Fix import path for plugin | Fix import path for plugin
| Go | mpl-2.0 | emate/packer-ebsnoami,emate/packer-ebsnoami,emate/packer-ebsnoami,emate/packer-ebsnoami | go | ## Code Before:
package main
import (
"github.com/mitchellh/packer/builder/amazon/ebsnoami"
"github.com/mitchellh/packer/packer/plugin"
)
func main() {
server, err := plugin.Server()
if err != nil {
panic(err)
}
server.RegisterBuilder(new(ebsnoami.Builder))
server.Serve()
}
## Instruction:
Fix import path f... |
f271622758362c854cea3c173f58fcb669ea2878 | assets/scripts/lib/travis/expandable_record_array.coffee | assets/scripts/lib/travis/expandable_record_array.coffee | Travis.ExpandableRecordArray = DS.RecordArray.extend
isLoaded: false
isLoading: false
load: (array) ->
@set 'isLoading', true
self = this
observer = ->
if @get 'isLoaded'
content = self.get 'content'
array.removeObserver 'isLoaded', observer
array.forEach (record) ->
... | Travis.ExpandableRecordArray = Ember.RecordArray.extend
isLoaded: false
isLoading: false
load: (array) ->
@set 'isLoading', true
self = this
observer = ->
if @get 'isLoaded'
content = self.get 'content'
array.removeObserver 'isLoaded', observer
array.forEach (record) -... | Update ExpandableRecordArray to work correctly with Ember Model | Update ExpandableRecordArray to work correctly with Ember Model
| CoffeeScript | mit | fotinakis/travis-web,jlrigau/travis-web,jlrigau/travis-web,Tiger66639/travis-web,travis-ci/travis-web,travis-ci/travis-web,mjlambert/travis-web,fotinakis/travis-web,Tiger66639/travis-web,mjlambert/travis-web,mjlambert/travis-web,travis-ci/travis-web,Tiger66639/travis-web,mjlambert/travis-web,2947721120/travis-web,29477... | coffeescript | ## Code Before:
Travis.ExpandableRecordArray = DS.RecordArray.extend
isLoaded: false
isLoading: false
load: (array) ->
@set 'isLoading', true
self = this
observer = ->
if @get 'isLoaded'
content = self.get 'content'
array.removeObserver 'isLoaded', observer
array.forEa... |
018b1e17f7047a92959640a15bbf21d5decba700 | akismet.gemspec | akismet.gemspec | lib = File.expand_path( '../lib/', __FILE__ )
$:.unshift lib unless $:.include?( lib )
require 'akismet/version'
Gem::Specification.new do |s|
s.name = 'akismet'
s.version = Akismet::VERSION
s.platform = Gem::Platform::RUBY
s.authors = [ 'Jonah Burke' ]
s.email = [ 'jonah@bigthink.co... | lib = File.expand_path( '../lib/', __FILE__ )
$:.unshift lib unless $:.include?( lib )
require 'akismet/version'
Gem::Specification.new do |s|
s.name = 'akismet'
s.version = Akismet::VERSION
s.platform = Gem::Platform::RUBY
s.authors = [ 'Jonah Burke' ]
s.email = [ 'jonah@bigthink.co... | Add home page to gemspec | Add home page to gemspec | Ruby | mit | seanbehan/akismet | ruby | ## Code Before:
lib = File.expand_path( '../lib/', __FILE__ )
$:.unshift lib unless $:.include?( lib )
require 'akismet/version'
Gem::Specification.new do |s|
s.name = 'akismet'
s.version = Akismet::VERSION
s.platform = Gem::Platform::RUBY
s.authors = [ 'Jonah Burke' ]
s.email = [ 'j... |
de37fb6741a13f060bd4a25f4a48a672c3dae2d0 | app/assets/stylesheets/lib/_lib.scss | app/assets/stylesheets/lib/_lib.scss | @import 'grid';
@import 'variables/grid';
@import 'variables/buttons';
@import 'variables/colours';
@import 'functions';
@import 'mixins/links';
@import 'mixins/breakpoints';
@import 'mixins/mixins';
@import 'placeholders/typography';
@import 'placeholders/headings';
@import 'placeholders/links';
@import 'placeholders/... | @import 'lib/grid';
@import 'lib/variables/grid';
@import 'lib/variables/buttons';
@import 'lib/variables/colours';
@import 'lib/functions';
@import 'lib/mixins/links';
@import 'lib/mixins/breakpoints';
@import 'lib/mixins/mixins';
@import 'lib/placeholders/typography';
@import 'lib/placeholders/headings';
@import 'lib... | Add lib to file path in lib.scss | Add lib to file path in lib.scss
| SCSS | mit | moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend | scss | ## Code Before:
@import 'grid';
@import 'variables/grid';
@import 'variables/buttons';
@import 'variables/colours';
@import 'functions';
@import 'mixins/links';
@import 'mixins/breakpoints';
@import 'mixins/mixins';
@import 'placeholders/typography';
@import 'placeholders/headings';
@import 'placeholders/links';
@impor... |
70ac4865e1f2acfceddcbf505a1e39c84ae527fe | server/api/controllers/trello/trelloCtrl.spec.js | server/api/controllers/trello/trelloCtrl.spec.js | var request = require('../../../supertest.js');
var should = require('should');
describe('Trello controller tests', function() {
'use strict';
this.timeout(15000);
it('should get all trello boards', function(done) {
request.post('/v1/trello/me/boards')
.expect(200, function(err, res) {
if (err) { ... | var request = require('../../../supertest.js');
var should = require('should');
describe('Trello controller tests', function() {
'use strict';
this.timeout(15000);
var boardId;
it('should get all trello boards', function(done) {
request.post('/v1/trello/me/boards')
.expect(200, function(err, res) {
... | Add test for get trello lists | Add test for get trello lists
| JavaScript | mit | safv12/trello-metrics,safv12/trello-metrics | javascript | ## Code Before:
var request = require('../../../supertest.js');
var should = require('should');
describe('Trello controller tests', function() {
'use strict';
this.timeout(15000);
it('should get all trello boards', function(done) {
request.post('/v1/trello/me/boards')
.expect(200, function(err, res) {
... |
1aa71730f7bfd27c10dc255ab6ffe2e6ae39b665 | .travis.yml | .travis.yml | language: go
go:
- 1.2
- 1.3
- tip
install:
- go get github.com/stretchr/testify
- go get github.com/stvp/go-udp-testing
| language: go
go:
- 1.2
- 1.3
- tip
install:
- go get github.com/stretchr/testify
- go get github.com/stvp/go-udp-testing
- go get github.com/tobi/airbrake-go
| Include airbrake-go dependency in Travis install step. | Include airbrake-go dependency in Travis install step.
| YAML | mit | flowhealth/logrus,dradtke/logrus,marcosnils/logrus,nicescale/logrus,Arkan/logrus,penhauer-xiao/logrus,upstartmobile/logrus,noironetworks/logrus,yxd-hde/logrus,EmileVauge/logrus,weekface/logrus,gogap/logrus,hvnsweeting/logrus,cgag/logrus,zbindenren/logrus,freeformz/logrus,henrylee2cn/logrus,brandur/logrus,Barberrrry/log... | yaml | ## Code Before:
language: go
go:
- 1.2
- 1.3
- tip
install:
- go get github.com/stretchr/testify
- go get github.com/stvp/go-udp-testing
## Instruction:
Include airbrake-go dependency in Travis install step.
## Code After:
language: go
go:
- 1.2
- 1.3
- tip
install:
- go get github.com/stretchr/test... |
334fc798d2dabcf0816701c67137806de660c20a | README.md | README.md | exfil
=====
Modular tool to test exfiltration techniques.
| Exfil
=====
Overview
--------
Exfil is a tool designed to exfiltrate data using various techniques, which allows a security team to test whether its monitoring system can effectively catch the exfiltration. The idea for Exfil came from a Twitter conversation between @averagesecguy, @ChrisJohnRiley, and @Ben0xA and was... | Add overview and usage data. | Add overview and usage data.
| Markdown | bsd-3-clause | averagesecurityguy/exfil | markdown | ## Code Before:
exfil
=====
Modular tool to test exfiltration techniques.
## Instruction:
Add overview and usage data.
## Code After:
Exfil
=====
Overview
--------
Exfil is a tool designed to exfiltrate data using various techniques, which allows a security team to test whether its monitoring system can effectively... |
825e22c4e6679ff0af05ce6267f8c2568951a9dd | COMPLIANCE.md | COMPLIANCE.md |
3.21 Unix Requirements v1.2
+-------------+----------------------------------------------------------+
| Requirement | Configuration |
+=============+==========================================================+
| 6 | active by default ... |
See reference documentation [here](http://www.telekom.com/static/-/155996/7/technische-sicherheitsanforderungen-si)
#### 3.21 Unix Requirements v1.2
| Requirement | Configuration |
|-------------|----------------------------------------------------------|
| 6 | ... | Fix formatting for GitHub-flavored Markdown | Fix formatting for GitHub-flavored Markdown
Formatting didn't work well with GitHub. Fixed now. | Markdown | apache-2.0 | patcon/chef-os-hardening,creativemarket/chef-os-hardening,patcon/chef-os-hardening,8x8Cloud/chef-os-hardening,mikemoate/chef-os-hardening,rollbrettler/chef-os-hardening,dupuy/chef-os-hardening,8x8Cloud/chef-os-hardening,rollbrettler/chef-os-hardening,dupuy/chef-os-hardening,mikemoate/chef-os-hardening,creativemarket/ch... | markdown | ## Code Before:
3.21 Unix Requirements v1.2
+-------------+----------------------------------------------------------+
| Requirement | Configuration |
+=============+==========================================================+
| 6 | active by default ... |
2794b6a879e5915a853111c67398aecdc133e364 | src/Http/Controllers/Nova/UserController.php | src/Http/Controllers/Nova/UserController.php | <?php namespace GeneaLabs\LaravelGovernor\Http\Controllers\Nova;
use GeneaLabs\LaravelGovernor\Http\Controllers\Controller;
use Illuminate\Support\Collection;
class UserController extends Controller
{
public function __construct()
{
//
}
public function index() : Collection
{
$use... | <?php namespace GeneaLabs\LaravelGovernor\Http\Controllers\Nova;
use GeneaLabs\LaravelGovernor\Http\Controllers\Controller;
use Illuminate\Support\Collection;
class UserController extends Controller
{
public function __construct()
{
// prevent default construct
}
public function index() : Col... | Clarify use of empty construct method | Clarify use of empty construct method | PHP | mit | GeneaLabs/laravel-governor,GeneaLabs/laravel-governor | php | ## Code Before:
<?php namespace GeneaLabs\LaravelGovernor\Http\Controllers\Nova;
use GeneaLabs\LaravelGovernor\Http\Controllers\Controller;
use Illuminate\Support\Collection;
class UserController extends Controller
{
public function __construct()
{
//
}
public function index() : Collection
... |
1342f7be698ff1f2ae2a3c58dde9eeea628fbae7 | .travis.yml | .travis.yml | language: node_js
node_js:
- "8"
install: npm install
jobs:
include:
- stage: lint
script: npm run test:lint
- stage: coverage
script: bash ./scripts/.travis-coverage.sh
- stage: deploy
script: bash ./scripts/.travis-deploy.sh
cache:
directories:
- node_modules
| language: node_js
node_js:
- "8"
install: npm install
jobs:
include:
- stage: lint
script: npm run test:lint
- stage: coverage
script: bash ./scripts/.travis-coverage.sh
node_js: "9"
- stage: deploy
script: bash ./scripts/.travis-deploy.sh
cache:
directories:
- node_modules... | Add node 9 testing to coverage | Add node 9 testing to coverage | YAML | mit | bdistin/fs-nextra | yaml | ## Code Before:
language: node_js
node_js:
- "8"
install: npm install
jobs:
include:
- stage: lint
script: npm run test:lint
- stage: coverage
script: bash ./scripts/.travis-coverage.sh
- stage: deploy
script: bash ./scripts/.travis-deploy.sh
cache:
directories:
- node_modules
#... |
e84cab4c7efafbb0ae82ab905238eabd7a0fc2fc | bin/deploy.sh | bin/deploy.sh | set -e
SERVICE_NAME="weblab/fillo"
DOCKER_REGISTRY="$AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/$SERVICE_NAME"
# Get Docker Registry login token
eval "$(aws ecr get-login --region us-east-1)"
# Get new version
SERVICE_VERSION=`node -e 'console.log(require("./package.json").version)'`
# Export version
export SER... | set -e
SERVICE_NAME="weblab/fillo"
DOCKER_REGISTRY="$AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/$SERVICE_NAME"
# Get Docker Registry login token
eval "$(aws ecr get-login --region us-east-1)"
# Get new version
GIT_COMMIT_HASH=`git rev-parse --short HEAD`
SERVICE_VERSION=`node -e 'console.log(require("./package.j... | Add git commit version to build number | [INFRA] Add git commit version to build number
| Shell | mit | weblabhq/fillo,weblabhq/fillo | shell | ## Code Before:
set -e
SERVICE_NAME="weblab/fillo"
DOCKER_REGISTRY="$AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/$SERVICE_NAME"
# Get Docker Registry login token
eval "$(aws ecr get-login --region us-east-1)"
# Get new version
SERVICE_VERSION=`node -e 'console.log(require("./package.json").version)'`
# Export ve... |
58ac7515b0a44538849447d9d2b5cb56ee172fde | app/views/spree/devices/_output.html.erb | app/views/spree/devices/_output.html.erb | <h3><%= Output::INDEX_NAME[o.object.output_index].capitalize %> Output</h3>
<div class='form-group'>
<div class='col-sm-4'>
<%= o.label :sensor, class: 'col-sm-2 control-label' %>
</div>
<div class='col-sm-8'>
<%= o.select :sensor_id, @device.sensors.collect {|s| ["Sensor #{s.sensor_index+1}", s.id]}, {}... | <h3><%= Output::INDEX_NAME[o.object.output_index].capitalize %> Output</h3>
<div class='form-group'>
<div class='col-sm-4'>
<%= o.label :sensor, class: 'col-sm-2 control-label' %>
</div>
<div class='col-sm-8'>
<%= o.select :sensor_id, @device.sensors.collect {|s| ["Sensor #{s.sensor_index+1}", s.id]}, {}... | Add cycle delay input group hint. | Add cycle delay input group hint.
| HTML+ERB | bsd-2-clause | brewbit/brewbit-dashboard,brewbit/brewbit-dashboard,brewbit/brewbit-dashboard | html+erb | ## Code Before:
<h3><%= Output::INDEX_NAME[o.object.output_index].capitalize %> Output</h3>
<div class='form-group'>
<div class='col-sm-4'>
<%= o.label :sensor, class: 'col-sm-2 control-label' %>
</div>
<div class='col-sm-8'>
<%= o.select :sensor_id, @device.sensors.collect {|s| ["Sensor #{s.sensor_index... |
540493a69ff2e9a5e6cc93a75b34af3c9f79b808 | plugins/generic/syntax.py | plugins/generic/syntax.py |
import re
from lib.core.exception import SqlmapUndefinedMethod
class Syntax:
"""
This class defines generic syntax functionalities for plugins.
"""
def __init__(self):
pass
@staticmethod
def _escape(expression, quote=True, escaper=None):
retVal = expression
if quote... |
import re
from lib.core.exception import SqlmapUndefinedMethod
class Syntax:
"""
This class defines generic syntax functionalities for plugins.
"""
def __init__(self):
pass
@staticmethod
def _escape(expression, quote=True, escaper=None):
retVal = expression
if quote... | Fix for empty strings (previously '' was just removed) | Fix for empty strings (previously '' was just removed)
| Python | apache-2.0 | RexGene/monsu-server,RexGene/monsu-server,dtrip/.ubuntu,dtrip/.ubuntu | python | ## Code Before:
import re
from lib.core.exception import SqlmapUndefinedMethod
class Syntax:
"""
This class defines generic syntax functionalities for plugins.
"""
def __init__(self):
pass
@staticmethod
def _escape(expression, quote=True, escaper=None):
retVal = expression
... |
2c138c32fed3e31a15152e6a3f19447d75b5a188 | app/views/effective/orders/_my_purchases.html.haml | app/views/effective/orders/_my_purchases.html.haml | %table.table
%thead
%tr
%th Order
%th Date of Purchase
%th Description
%tbody
- orders.each do |order|
%tr
%td= link_to "##{order.to_param}", order_path.gsub(':id', order.to_param)
%td= order.purchased_at.strftime("%Y-%m-%d %H:%M")
%td= order_summary(order)
-... | %table.table
%thead
%tr
%th Order
%th Date of Purchase
%th Description
%th
%tbody
- orders.each do |order|
%tr
%td= order.to_param
%td= order.purchased_at.strftime("%Y-%m-%d %H:%M")
%td= order_summary(order)
%td= link_to 'View', order_path.gsub('... | Clean up order history partial | Clean up order history partial
| Haml | mit | code-and-effect/effective_orders,code-and-effect/effective_orders,code-and-effect/effective_orders | haml | ## Code Before:
%table.table
%thead
%tr
%th Order
%th Date of Purchase
%th Description
%tbody
- orders.each do |order|
%tr
%td= link_to "##{order.to_param}", order_path.gsub(':id', order.to_param)
%td= order.purchased_at.strftime("%Y-%m-%d %H:%M")
%td= order_s... |
8f4c995dbca3f97400bc817d47c88a2e063826cb | src/static/index.html | src/static/index.html | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css"
integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56r... | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css"
integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56r... | Load syntax coloring before runing elm | Load syntax coloring before runing elm
| HTML | mit | bitterjug/elm-wpc,bitterjug/elm-wpc | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css"
integrity="sha384-rwoIResjU2yc... |
e2d61f9029586dab905ba65fcaf402f3b57c23d2 | app/mailers/newsletter_mailer.rb | app/mailers/newsletter_mailer.rb | class NewsletterMailer
default :from => "noresponder@dealhunter.com"
def newsletter_email(client)
@offers = Offer.actual.take(6)
mail(:to => client.user.email, :subject => "Newsletter Dealhunter")
end
end | class NewsletterMailer < ActionMailer::Base
default :from => "noresponder@dealhunter.com"
default :to => "laura_lopez_bukovac@hotmail.com"
def newsletter_email()
@offers = Offer.actual.take(6)
mail(:subject => "Newsletter Dealhunter")
#mail(:to => client.user.email, :subject => "Newsletter Dealhunter... | Set newsletter mailer as action mailer | Set newsletter mailer as action mailer
| Ruby | apache-2.0 | kevstessens/dealhunter,kevstessens/dealhunter | ruby | ## Code Before:
class NewsletterMailer
default :from => "noresponder@dealhunter.com"
def newsletter_email(client)
@offers = Offer.actual.take(6)
mail(:to => client.user.email, :subject => "Newsletter Dealhunter")
end
end
## Instruction:
Set newsletter mailer as action mailer
## Code After:
class Newsle... |
31ce126a825e1957ffe1023fd31db6d8dd9d2056 | app/views/petitions/index.html.haml | app/views/petitions/index.html.haml | %h1
Listing petitions
%table.table.table-striped.table-condensed
%tr
%th.span3
Title
%th.span7
Description
%th.span1
%th.span1
- if current_user && (current_user.is_super_user || current_user.is_admin)
%th.span2
Petition to Send
- @petitions.each do |petition|
%... | %h1
Listing petitions
%table.table.table-striped.table-condensed
%tr
%th.span3
Title
%th.span7
Description
%th.span1
%th.span1
- if current_user && (current_user.is_super_user || current_user.is_admin)
%th.span2
Feature this Petition
- @petitions.each do |petition|
... | Change Petition to Send label to Petition to Feature | Change Petition to Send label to Petition to Feature
| Haml | agpl-3.0 | victorykit/victorykit,ChrisAntaki/victorykit,ChrisAntaki/victorykit,MayOneUS/victorykit,victorykit/victorykit,MayOneUS/victorykit,ChrisAntaki/victorykit,MayOneUS/victorykit,victorykit/victorykit,ChrisAntaki/victorykit | haml | ## Code Before:
%h1
Listing petitions
%table.table.table-striped.table-condensed
%tr
%th.span3
Title
%th.span7
Description
%th.span1
%th.span1
- if current_user && (current_user.is_super_user || current_user.is_admin)
%th.span2
Petition to Send
- @petitions.each do ... |
1a11f268a10afd0ea606c5f7f348eb87626cfd98 | lib/alternate_rails/view_helpers.rb | lib/alternate_rails/view_helpers.rb | module AlternateRails
module ViewHelpers
def alternate_url(new_params)
url_for params.merge(new_params)
end
def alternate_button(format)
icons = {
json: 'icon-list',
ics: 'icon-calendar'
}
format_translation = t("formats.#{format}", :default => h(format))
... | module AlternateRails
module ViewHelpers
def alternate_url(new_params)
url_for params.merge(new_params)
end
def alternate_button(format, options)
icons = {
json: 'icon-list',
ics: 'icon-calendar'
}
icon = options[:icon] || icons[format]
format_tran... | Add options for view helper | Add options for view helper
| Ruby | mit | theodi/alternate-rails | ruby | ## Code Before:
module AlternateRails
module ViewHelpers
def alternate_url(new_params)
url_for params.merge(new_params)
end
def alternate_button(format)
icons = {
json: 'icon-list',
ics: 'icon-calendar'
}
format_translation = t("formats.#{format}", :default => ... |
de5618a693eb77bb49732ad152eca0df4d20098b | generateDocs.ps1 | generateDocs.ps1 | param($username, $password, [switch]$Buildserver)
$PSScriptRoot = split-path -parent $MyInvocation.MyCommand.Definition
$module = "Keith"
Import-Module "$PSScriptRoot\src\$module" -Force
New-PsDoc -Module $module -Path "$PSScriptRoot\docs\" -OutputLocation "$PSScriptRoot\docs-generated"
New-GitBook "$PS... | $PSScriptRoot = split-path -parent $MyInvocation.MyCommand.Definition
$module = "Keith"
Import-Module "$PSScriptRoot\src\$module" -Force
New-PsDoc -Module $module -Path "$PSScriptRoot\docs\" -OutputLocation "$PSScriptRoot\docs-generated"
New-GitBook "$PSScriptRoot\docs-generated" "$PSScriptRoot\temp" | Remove auth params for doc generation Authentication and repo management should be moved to another script... | Remove auth params for doc generation
Authentication and repo management should be moved to another script...
| PowerShell | mit | unic/bob-keith | powershell | ## Code Before:
param($username, $password, [switch]$Buildserver)
$PSScriptRoot = split-path -parent $MyInvocation.MyCommand.Definition
$module = "Keith"
Import-Module "$PSScriptRoot\src\$module" -Force
New-PsDoc -Module $module -Path "$PSScriptRoot\docs\" -OutputLocation "$PSScriptRoot\docs-generated"
New-GitBoo... |
4cdb6388ddf1b7170fc6613c9858d36482e63519 | automation/harmony.yaml | automation/harmony.yaml | - alias: "Harmony Change Activity"
trigger:
- platform: state
entity_id: input_select.harmony
action:
- service: notify.ios_dphone
data:
message: '{{ states.input_select.harmony.state }}'
- service: remote.turn_on
data_template:
entity_id: remote.living_room_tv
activity: '{{ stat... | - alias: "Harmony Change Activity"
trigger:
- platform: state
entity_id: input_select.living_room_tv
action:
- service: notify.ios_dphone
data:
message: '{{ states.input_select.living_room_tv.state }}'
- service: remote.turn_on
data_template:
entity_id: remote.living_room_tv
acti... | Fix to harony update automation | Fix to harony update automation
| YAML | unlicense | danrspencer/hass-config,danrspencer/hass-config | yaml | ## Code Before:
- alias: "Harmony Change Activity"
trigger:
- platform: state
entity_id: input_select.harmony
action:
- service: notify.ios_dphone
data:
message: '{{ states.input_select.harmony.state }}'
- service: remote.turn_on
data_template:
entity_id: remote.living_room_tv
ac... |
865f3f3b21c67df4d1604dfacf3a2b6d3f039797 | run_scratchblocks.js | run_scratchblocks.js | scratchblocks.renderMatching("pre.blocks", {languages: ["en", "de", "es", "el", "nl", "pt", "zh_CN", "tr", "nb", "ko", "it", "id", "ru", "ca", "ja", "pl", "he", "fr"],});
scratchblocks.renderMatching("code.blocks", {languages: ["en", "de", "es", "el", "nl", "pt", "zh_CN", "tr", "nb", "ko", "it", "id", "ru", "ca", "ja",... | scratchblocks.renderMatching("pre.blocks, code.blocks", {languages: ["en", "de", "es", "el", "nl", "pt", "zh_CN", "tr", "nb", "ko", "it", "id", "ru", "ca", "ja", "pl", "he", "fr"],});
| Select all blocks with the same selector for speed | Select all blocks with the same selector for speed
| JavaScript | mit | LLK/mw-ScratchBlocks2,tjvr/wiki-scratchblocks,Choco31415/wiki-scratchblocks,tjvr/wiki-scratchblocks,Choco31415/wiki-scratchblocks,LLK/mw-ScratchBlocks2 | javascript | ## Code Before:
scratchblocks.renderMatching("pre.blocks", {languages: ["en", "de", "es", "el", "nl", "pt", "zh_CN", "tr", "nb", "ko", "it", "id", "ru", "ca", "ja", "pl", "he", "fr"],});
scratchblocks.renderMatching("code.blocks", {languages: ["en", "de", "es", "el", "nl", "pt", "zh_CN", "tr", "nb", "ko", "it", "id", "... |
ee62ff42807a0475c2e1caed73003e22a4495469 | attributes/default.rb | attributes/default.rb | if node['kernel']['machine'] == 'x86_64'
default['wkhtmltox']['arch'] = 'amd64'
else
default['wkhtmltox']['arch'] = 'i386'
end
# chef-sugar would be nice for this?
case node[:platform]
when "centos"
if node[:platform_version].start_with?('6.')
default['wkhtmltox']['release'] = "centos6"
end
if node[:platf... | if node['kernel']['machine'] == 'x86_64'
default['wkhtmltox']['arch'] = 'amd64'
else
default['wkhtmltox']['arch'] = 'i386'
end
# chef-sugar would be nice for this?
case node[:platform]
when "centos"
# I don't know if this will work on Amazon Linux
if node[:platform_version].start_with?('6.')
default['wkhtml... | Add comment about amazon linux | Add comment about amazon linux
| Ruby | mit | sportngin-cookbooks/wkhtmltopdf | ruby | ## Code Before:
if node['kernel']['machine'] == 'x86_64'
default['wkhtmltox']['arch'] = 'amd64'
else
default['wkhtmltox']['arch'] = 'i386'
end
# chef-sugar would be nice for this?
case node[:platform]
when "centos"
if node[:platform_version].start_with?('6.')
default['wkhtmltox']['release'] = "centos6"
end
... |
db6d32f9a670840bb0c366e236e50dfd687873a2 | .travis.yml | .travis.yml | language: rust
rust:
- nightly
- beta
- stable
script: cargo test
matrix:
include:
- rust: 1.34.0
script: cargo check
| language: rust
rust:
- nightly
- beta
- stable
script: cargo test
matrix:
include:
- rust: 1.34.0
script: cargo check
- rust: nightly
name: Clippy
script:
- rustup component add clippy || travis_terminate 0
- cargo clippy -- -Dclippy::all
| Add a Clippy builder in CI | Add a Clippy builder in CI
| YAML | apache-2.0 | dtolnay/anyhow | yaml | ## Code Before:
language: rust
rust:
- nightly
- beta
- stable
script: cargo test
matrix:
include:
- rust: 1.34.0
script: cargo check
## Instruction:
Add a Clippy builder in CI
## Code After:
language: rust
rust:
- nightly
- beta
- stable
script: cargo test
matrix:
include:
- rust:... |
c3e55377e4c58192432bbc327ddadc5ffd78875a | _layouts/engine-api.html | _layouts/engine-api.html | <!DOCTYPE html>
<html>
<head>
<title>Docker Engine API {{ page.name | replace: '.md' }} Reference</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Reference for the API served by Docker Engine." />
<m... | <!DOCTYPE html>
<html>
<head>
<title>Docker Engine API {{ page.name | replace: '.md' }} Reference</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Reference for the API served by Docker Engine." />
<m... | Make the latest API reference page the canonical URL | Make the latest API reference page the canonical URL
We host multiple versions of the API reference. While older versions of the
API are still supported by the latest engine release, users should generally
refer to the latest version of the API.
This patch adds a "canonical" meta-tag to the API reference pages, and p... | HTML | apache-2.0 | docker/docker.github.io,thaJeztah/docker.github.io,docker/docker.github.io,docker/docker.github.io,thaJeztah/docker.github.io,docker/docker.github.io,thaJeztah/docker.github.io,thaJeztah/docker.github.io,docker/docker.github.io,thaJeztah/docker.github.io | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<title>Docker Engine API {{ page.name | replace: '.md' }} Reference</title>
<!-- needed for adaptive design -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Reference for the API served by Docker En... |
1b0d965c4c65e74b7c8763aa873f30a5a0de7134 | universal/.config/nvim/plugin/indentation.vim | universal/.config/nvim/plugin/indentation.vim | " 2-space width tabs
set tabstop=2
set shiftwidth=2
" ics
autocmd BufNewFile,BufRead *.iced call SetICSOptions()
function SetICSOptions()
setlocal filetype=coffee
setlocal commentstring=#\ %s
setlocal expandtab
endfunction
" js indentation
autocmd BufNewFile,BufRead *.coffee set expandtab
autocmd BufNewFile,BufRea... | " 2-space width tabs
set tabstop=2
set shiftwidth=2
" whitespace highlighting
if !(&filetype == "txt")
set list " show special characters
set listchars=tab:→\ ,trail:·,extends:>,precedes:<,nbsp:‥
endif
" ics
autocmd BufNewFile,BufRead *.iced call SetICSOptions()
function SetICSOptions()
setlocal filetype=coffee
s... | Fix foreground in asm highlighting | Fix foreground in asm highlighting
| VimL | bsd-3-clause | alpinebutterfly/dotfiles,mpcsh/dotfiles,alpinebutterfly/dotfiles | viml | ## Code Before:
" 2-space width tabs
set tabstop=2
set shiftwidth=2
" ics
autocmd BufNewFile,BufRead *.iced call SetICSOptions()
function SetICSOptions()
setlocal filetype=coffee
setlocal commentstring=#\ %s
setlocal expandtab
endfunction
" js indentation
autocmd BufNewFile,BufRead *.coffee set expandtab
autocmd B... |
80bc3bfb68e56c2f9639323e7f06a5b49e6cd890 | RELEASE.md | RELEASE.md |
This release primarily focuses on the Command Log Persistence feature which allows the recovery of a workq-server.
* Added Command Log Persistence! Docs available at [doc/cmdlog](doc/cmdlog.md).
* Changed error "-TIMED-OUT" to "-TIMEOUT" for consistency.
* Fixed "run" job expiration issue on successful execution.
* R... |
This release primarily focuses on the Command Log Persistence feature which allows the recovery of a workq-server.
* Added Command Log Persistence! Docs available at [doc/cmdlog](doc/cmdlog.md).
* Changed error "-TIMED-OUT" to "-TIMEOUT" for consistency.
* Fixed "run" job expiration issue on successful execution.
... | Add additional 0.2.0 release bug fix notes. | Add additional 0.2.0 release bug fix notes.
| Markdown | mpl-2.0 | iamduo/workq,iamduo/workq | markdown | ## Code Before:
This release primarily focuses on the Command Log Persistence feature which allows the recovery of a workq-server.
* Added Command Log Persistence! Docs available at [doc/cmdlog](doc/cmdlog.md).
* Changed error "-TIMED-OUT" to "-TIMEOUT" for consistency.
* Fixed "run" job expiration issue on successfu... |
de4234259ed64d922e7dd6300b4f4bc1efebb2ef | lib/trashed/request_measurement.rb | lib/trashed/request_measurement.rb | module Trashed
module RequestMeasurement
def self.included(base)
base.send :around_filter, :measure_resource_usage
end
protected
def measure_resource_usage
before = Measurement.measure
yield
ensure
change = Measurement.change_since(before)
Rails.logger.in... | module Trashed
module RequestMeasurement
LOG_MESSAGE = 'STATS: %s | %s [%s]'.freeze
def self.included(base)
base.send :around_filter, :measure_resource_usage
end
protected
def measure_resource_usage
before = Measurement.now
yield
ensure
change = Measurement.... | Include request status and uri on the stats line for easy tracking | Include request status and uri on the stats line for easy tracking
| Ruby | mit | basecamp/trashed | ruby | ## Code Before:
module Trashed
module RequestMeasurement
def self.included(base)
base.send :around_filter, :measure_resource_usage
end
protected
def measure_resource_usage
before = Measurement.measure
yield
ensure
change = Measurement.change_since(before)
... |
0234d0399ae7864eda20db1ac116f9d9947a49bb | app/assets/stylesheets/mailer/_footer.sass | app/assets/stylesheets/mailer/_footer.sass | .upper-footer
background-color: #2d2a2b
p, span
color: $white
font-size: 12px
a:link, a:hover, a:active, a:visited
color: $white
.letter-a
color: #ed1c24
.initials
.letter-l
color: $primary-color
.letter-esperluette
color: $secondary-color
.letter-r
color: ... | .upper-footer
background-color: #2d2a2b
p, span
color: $white
font-size: 12px
a:link, a:hover, a:active, a:visited
color: $white
.letter-a
color: #ed1c24
.initials
background-color: $white
padding: 5px 4px
.letter-l
color: $primary-color
font-size: 8px
.lette... | Add white background for initials letters in mailer footer | Add white background for initials letters in mailer footer
| Sass | mit | lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter | sass | ## Code Before:
.upper-footer
background-color: #2d2a2b
p, span
color: $white
font-size: 12px
a:link, a:hover, a:active, a:visited
color: $white
.letter-a
color: #ed1c24
.initials
.letter-l
color: $primary-color
.letter-esperluette
color: $secondary-color
.letter... |
5a5593fd3f48f96ca717819b987860eb34f51937 | spec/test_node.rb | spec/test_node.rb |
require 'rubygems'
require 'bundler'
Bundler.setup
require 'dcell'
DCell.setup :id => 'test_node', :addr => 'tcp://127.0.0.1:21264'
class TestActor
include Celluloid
attr_reader :value
def initialize
@value = 42
end
def the_answer
DCell::Global[:the_answer]
end
def crash
raise "the spec ... |
require 'rubygems'
require 'bundler'
Bundler.setup
require 'dcell'
DCell.setup :id => 'test_node', :addr => 'tcp://127.0.0.1:21264'
class TestActor
include Celluloid
attr_reader :value
def initialize
@value = 42
end
def the_answer
DCell::Global[:the_answer]
end
def crash
raise "the spec ... | Use Celluloid::Group for defining the test node | Use Celluloid::Group for defining the test node
| Ruby | mit | celluloid/dcell,celluloid/dcell,dfockler/dcell,niamster/dcell,celluloid/dcell,dfockler/dcell,niamster/dcell,dfockler/dcell,niamster/dcell | ruby | ## Code Before:
require 'rubygems'
require 'bundler'
Bundler.setup
require 'dcell'
DCell.setup :id => 'test_node', :addr => 'tcp://127.0.0.1:21264'
class TestActor
include Celluloid
attr_reader :value
def initialize
@value = 42
end
def the_answer
DCell::Global[:the_answer]
end
def crash
... |
4b53b2c115458d1b964a73e4885c2cbdc3403b72 | index.html | index.html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dashboard</title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap... | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dashboard</title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap... | Add some dummy entries to branch list | Add some dummy entries to branch list
| HTML | apache-2.0 | lowsky/dashboard,lowsky/dashboard,lowsky/dashboard | html | ## Code Before:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dashboard</title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="//maxcdn.bootstrapc... |
b4bb13bd108222d4506602ff7255f3f428551f6e | lib/rails_xss.rb | lib/rails_xss.rb | module RailsXss
class Erubis < ::Erubis::Eruby
def add_preamble(src)
src << "@output_buffer = _buf = ActionView::SafeBuffer.new;"
end
def add_text(src, text)
src << "_buf.concat('" << escape_text(text) << "'.html_safe!);"
end
end
module SafeHelpers
def safe_helper(*names)
n... | module RailsXss
class Erubis < ::Erubis::Eruby
def add_preamble(src)
src << "@output_buffer = ActionView::SafeBuffer.new;\n"
end
def add_text(src, text)
src << "@output_buffer << ('" << escape_text(text) << "'.html_safe!);"
end
def add_expr_literal(src, code)
src << '@outpu... | Switch everything over to @output_buffer rather than _buf" git st " | Switch everything over to @output_buffer rather than _buf"
git st
"
| Ruby | mit | NZKoz/rails_xss,rails/rails_xss | ruby | ## Code Before:
module RailsXss
class Erubis < ::Erubis::Eruby
def add_preamble(src)
src << "@output_buffer = _buf = ActionView::SafeBuffer.new;"
end
def add_text(src, text)
src << "_buf.concat('" << escape_text(text) << "'.html_safe!);"
end
end
module SafeHelpers
def safe_helper... |
18ef01838a41cfcea21879a5f18798c80a35e14b | example/requirements.txt | example/requirements.txt | PyOpenGL
git+git://github.com/jstasiak/pysfml-cython.git@11a529e29af8e785ff347eb89861a4ef47454c86
git+git://github.com/sloonz/pil-py3k.git
| PyOpenGL
git+git://github.com/jstasiak/pysfml-cython.git@11a529e29af8e785ff347eb89861a4ef47454c86
git+git://github.com/sloonz/pil-py3k.git
git+git://github.com/adamlwgriffiths/Pyrr.git@d4978c76bdadd77fa263e0471ee13840c27f000d
| Add example application pyrr dependency | Add example application pyrr dependency
| Text | mit | jstasiak/python-cg,jstasiak/python-cg | text | ## Code Before:
PyOpenGL
git+git://github.com/jstasiak/pysfml-cython.git@11a529e29af8e785ff347eb89861a4ef47454c86
git+git://github.com/sloonz/pil-py3k.git
## Instruction:
Add example application pyrr dependency
## Code After:
PyOpenGL
git+git://github.com/jstasiak/pysfml-cython.git@11a529e29af8e785ff347eb89861a4ef474... |
9f1ba04e089a9f52abebe78e25bb1dc9abb94ba0 | file/name/util/test/FileNameUtilTest.sh | file/name/util/test/FileNameUtilTest.sh | include file.name.util.FileNameUtil
include test.util.TestUtil
@class
FileNameUtilTest(){
@test
testGetPathConvertToNixPath(){
local path="D:/foo/bar"
${assertEquals} $(FileNameUtil getPath nix ${path}) /d/foo/bar
}
@test
testGetPathConvertToWinPath(){
local path="/d/foo/bar"
${assertEquals} $(FileNam... | include file.name.util.FileNameUtil
include test.util.TestUtil
@class
FileNameUtilTest(){
@test
testGetPathConvertToNixPath(){
local path="D:/foo/bar"
${assertEquals} $(FileNameUtil _getPathUnix ${path}) /d/foo/bar
}
@test
testGetPathConvertToWinPath(){
local path="/d/foo/bar"
${assertEquals} $(FileNa... | Test using helper methods instead | Test using helper methods instead
| Shell | mit | anthony-chu/bash-toolbox | shell | ## Code Before:
include file.name.util.FileNameUtil
include test.util.TestUtil
@class
FileNameUtilTest(){
@test
testGetPathConvertToNixPath(){
local path="D:/foo/bar"
${assertEquals} $(FileNameUtil getPath nix ${path}) /d/foo/bar
}
@test
testGetPathConvertToWinPath(){
local path="/d/foo/bar"
${assertE... |
7846e154650615b9de624997f8af25a23bb11437 | app/services/precompute_feed_service.rb | app/services/precompute_feed_service.rb |
class PrecomputeFeedService < BaseService
def call(account)
FeedManager.instance.populate_feed(account)
end
end
|
class PrecomputeFeedService < BaseService
def call(account)
FeedManager.instance.populate_feed(account)
Redis.current.del("account:#{account.id}:regeneration")
end
end
| Delete regeneration flag after populate feed | Delete regeneration flag after populate feed
| Ruby | agpl-3.0 | pixiv/mastodon,pixiv/mastodon,pixiv/mastodon,pixiv/mastodon | ruby | ## Code Before:
class PrecomputeFeedService < BaseService
def call(account)
FeedManager.instance.populate_feed(account)
end
end
## Instruction:
Delete regeneration flag after populate feed
## Code After:
class PrecomputeFeedService < BaseService
def call(account)
FeedManager.instance.populate_feed(acc... |
6268d55d0c9d06aa3ad8c679d017d8bc306002cd | src/CodepenServiceProvider.php | src/CodepenServiceProvider.php | <?php
namespace Unicodeveloper\Codepen;
use Illuminate\Support\ServiceProvider;
class CodepenServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;
/**
* Publishes all the config file this pac... | <?php
namespace Unicodeveloper\Codepen;
use Illuminate\Support\ServiceProvider;
class CodepenServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;
/**
* Register the application services
... | Remove boot method from service provider | [laravel-codepen] Remove boot method from service provider
| PHP | mit | unicodeveloper/laravel-codepen | php | ## Code Before:
<?php
namespace Unicodeveloper\Codepen;
use Illuminate\Support\ServiceProvider;
class CodepenServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;
/**
* Publishes all the conf... |
6869965980d3e0234b7df70de8eb9f691c6b4fb7 | app/views/issues/new.html.haml | app/views/issues/new.html.haml | %section#content.content-no-sidebar
%header
%h1= t ".title"
%p= t ".new_issue_introduction"
%p= t ".new_issue_privacy_warning"
- if current_group
%p.comment= t ".admin_thread_pointer_html", administrative_matters_link: link_to(t(".administrative_matters"), new_thread_path)
= semantic_form_for ... | %section#content.content-no-sidebar
%header
%h1= t ".title"
%p= t ".new_issue_introduction"
%p= t ".new_issue_privacy_warning"
- if current_group
%p.comment= t ".admin_thread_pointer_html", administrative_matters_link: link_to(t(".administrative_matters"), new_thread_path)
= semantic_form_for ... | Hide thread hint along with thread form | Hide thread hint along with thread form
When are not starting a discussion hide the hint also.
Fixes #922
| Haml | mit | cyclestreets/cyclescape,cyclestreets/cyclescape,cyclestreets/cyclescape | haml | ## Code Before:
%section#content.content-no-sidebar
%header
%h1= t ".title"
%p= t ".new_issue_introduction"
%p= t ".new_issue_privacy_warning"
- if current_group
%p.comment= t ".admin_thread_pointer_html", administrative_matters_link: link_to(t(".administrative_matters"), new_thread_path)
= se... |
d9252a7175cd9b429a50c6f05214e1521916b4b3 | app/jobs.json | app/jobs.json | {
"jobs": [
{
"title": "Web Developer",
"company": "MyCompany, Inc.",
"startDate": "2016-01-01T00:00:00+00:00",
"endDate": null
},
{
"title": "Front End Developer",
"company": "Big Co.",
"startDate": "2015-03-01T00:00:00+00:00",
"endDate": "2016-01-01T00:00:... | {
"jobs": [
{
"title": "Web Developer",
"company": "MyCompany, Inc.",
"startDate": "2016-01-01T00:00:00+00:00",
"endDate": null,
"description":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur laoreet maximus dui, eget fermentum risus pellentesque ac. Vivamus facili... | Add description field to job data | Add description field to job data
| JSON | mit | filoxo/ng2-personal-profile,filoxo/ng2-personal-profile,filoxo/ng2-personal-profile | json | ## Code Before:
{
"jobs": [
{
"title": "Web Developer",
"company": "MyCompany, Inc.",
"startDate": "2016-01-01T00:00:00+00:00",
"endDate": null
},
{
"title": "Front End Developer",
"company": "Big Co.",
"startDate": "2015-03-01T00:00:00+00:00",
"endDate": "2... |
5a7bc5906217d9623580125720aa44ebf8b4d204 | src/Sylius/Bundle/ApiBundle/Resources/config/api_resources/Commands/RegisterShopUser.xml | src/Sylius/Bundle/ApiBundle/Resources/config/api_resources/Commands/RegisterShopUser.xml | <?xml version="1.0" ?>
<!--
This file is part of the Sylius package.
(c) Paweł Jędrzejewski
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
-->
<resources xmlns="https://api-platform.com/schema/metadata"
xmlns:xsi="http://www.... | <?xml version="1.0" ?>
<!--
This file is part of the Sylius package.
(c) Paweł Jędrzejewski
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
-->
<resources xmlns="https://api-platform.com/schema/metadata"
xmlns:xsi="http://www.... | Fix no identifier defined error in ApiPlatform 2.6 | Fix no identifier defined error in ApiPlatform 2.6
Caused by this change https://github.com/api-platform/core/pull/3871 | XML | mit | diimpp/Sylius,GSadee/Sylius,pamil/Sylius,lchrusciel/Sylius,Arminek/Sylius,antonioperic/Sylius,Zales0123/Sylius,diimpp/Sylius,SyliusBot/Sylius,Arminek/Sylius,kayue/Sylius,loic425/Sylius,antonioperic/Sylius,Zales0123/Sylius,loic425/Sylius,Sylius/Sylius,lchrusciel/Sylius,Arminek/Sylius,101medialab/Sylius,pamil/Sylius,Syli... | xml | ## Code Before:
<?xml version="1.0" ?>
<!--
This file is part of the Sylius package.
(c) Paweł Jędrzejewski
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
-->
<resources xmlns="https://api-platform.com/schema/metadata"
xmlns:... |
71b65d3f573646512f1fe411dc1278a493a82cae | src/nl/nelen_schuurmans/aquo/Aquo.java | src/nl/nelen_schuurmans/aquo/Aquo.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package nl.nelen_schuurmans.aquo;
import java.lang.Class;
import org.apache.log4j.Logger;
/**
*
* @author carsten.byrman@nelen-schuurmans.nl
*/
public class Aquo {
private static final Logger logger = Logger.ge... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package nl.nelen_schuurmans.aquo;
import org.apache.log4j.Logger;
/**
*
* @author carsten.byrman@nelen-schuurmans.nl
*/
public class Aquo {
private static final Logger logger = Logger.getLogger(Aquo.class);
... | Remove import from java.lang package | Remove import from java.lang package | Java | mit | ddsc/ddsc-aquo | java | ## Code Before:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package nl.nelen_schuurmans.aquo;
import java.lang.Class;
import org.apache.log4j.Logger;
/**
*
* @author carsten.byrman@nelen-schuurmans.nl
*/
public class Aquo {
private static final Logger lo... |
9d86c9998fc9a984726c1ee279d6d7520d3eadb0 | sources.cfg | sources.cfg | [remotes]
collective = git://github.com/collective
collective_push = git@github.com:collective
[sources]
dace = git git@git.ecreall.com:omegsi/dace.git
pontus = git git@git.ecreall.com:omegsi/pontus.git
pyramid_robot = git git://github.com/vincentfretin/pyramid_robot.git pushurl=git@github.com:vincentfretin/pyramid_ro... | [remotes]
collective = git://github.com/collective
collective_push = git@github.com:collective
[sources]
dace = git git://github.com/ecreall/dace.git
pontus = git git://github.com/ecreall/pontus.git
pyramid_robot = git git://github.com/vincentfretin/pyramid_robot.git pushurl=git@github.com:vincentfretin/pyramid_robot.... | Change Dace and Pontus repositories from ecreall to github repositories | Change Dace and Pontus repositories from ecreall to github repositories
| INI | agpl-3.0 | ecreall/nova-ideo,ecreall/nova-ideo,ecreall/nova-ideo,ecreall/nova-ideo,ecreall/nova-ideo | ini | ## Code Before:
[remotes]
collective = git://github.com/collective
collective_push = git@github.com:collective
[sources]
dace = git git@git.ecreall.com:omegsi/dace.git
pontus = git git@git.ecreall.com:omegsi/pontus.git
pyramid_robot = git git://github.com/vincentfretin/pyramid_robot.git pushurl=git@github.com:vincentf... |
bfbe4f0a2fa231b22f6ebaae3eb1065565ab66e4 | setup.py | setup.py | from setuptools import setup
setup(name='trytond_sentry',
version='3.0.1.0',
description='Sentry Client for Tryton',
long_description=open('README.rst').read(),
author="Openlabs Technologies & Consulting (P) Limited",
author_email="info@openlabs.co.in",
url="http://www.openlabs.co.in",
pack... | from setuptools import setup
setup(name='trytond_sentry',
version='3.0.1.0',
description='Sentry Client for Tryton',
long_description=open('README.rst').read(),
author="Openlabs Technologies & Consulting (P) Limited",
author_email="info@openlabs.co.in",
url="https://github.com/openlabs/trytond-... | Set homepage for package as github url | Set homepage for package as github url
| Python | bsd-3-clause | fulfilio/trytond-sentry | python | ## Code Before:
from setuptools import setup
setup(name='trytond_sentry',
version='3.0.1.0',
description='Sentry Client for Tryton',
long_description=open('README.rst').read(),
author="Openlabs Technologies & Consulting (P) Limited",
author_email="info@openlabs.co.in",
url="http://www.openlabs.... |
dc8c9cc89fdd93a3df9c1713b18eebfffc7ba215 | tools/ci/before_script.sh | tools/ci/before_script.sh | set -v
if [[ -n "$TEST_SUITE" ]] ; then
if [[ -n "$SPA_UI" ]] ; then
pushd spa_ui/$SPA_UI
npm install bower gulp -g
npm install
npm version
popd
fi
bundle exec rake test:$TEST_SUITE:setup
fi
set +v
| set -v
if [[ -n "$TEST_SUITE" ]] ; then
if [[ -n "$SPA_UI" ]] ; then
pushd spa_ui/$SPA_UI
npm set progress=false
npm install bower gulp -g
npm install
npm version
popd
fi
bundle exec rake test:$TEST_SUITE:setup
fi
set +v
| Disable the npm propressbar in travis land | Disable the npm propressbar in travis land
We don't actually have anyone looking at it, it's slow, and
all tests run this, wasting at least several seconds each time.
https://github.com/npm/npm/issues/11283
| Shell | apache-2.0 | lpichler/manageiq,hstastna/manageiq,NaNi-Z/manageiq,NickLaMuro/manageiq,gerikis/manageiq,ailisp/manageiq,skateman/manageiq,jvlcek/manageiq,agrare/manageiq,aufi/manageiq,mzazrivec/manageiq,NaNi-Z/manageiq,israel-hdez/manageiq,israel-hdez/manageiq,matobet/manageiq,romaintb/manageiq,maas-ufcg/manageiq,jntullo/manageiq,gmc... | shell | ## Code Before:
set -v
if [[ -n "$TEST_SUITE" ]] ; then
if [[ -n "$SPA_UI" ]] ; then
pushd spa_ui/$SPA_UI
npm install bower gulp -g
npm install
npm version
popd
fi
bundle exec rake test:$TEST_SUITE:setup
fi
set +v
## Instruction:
Disable the npm propressbar in travis land
We don't ac... |
3874982707cb6f8ab98d74cea23e5b8d39174f84 | app/views/root/404.html.erb | app/views/root/404.html.erb | <%= render partial: "four_hundred_error", locals: {
title: "Page not found - 404",
heading: "The page you are looking for can't be found",
intro: '<p>Please check that you have entered the correct web address, or try using the search box below or explore <a href="/">GOV.UK</a> to find the information you ne... | <%= render partial: "four_hundred_error", locals: {
title: "Page not found - 404",
heading: "This page cannot be found",
intro: '<p>Please check that you have entered the correct web address, or try using the search box below or explore <a href="/">GOV.UK</a> to find the information you need.</p>'
} %>
| Use a simpler heading for404 pages | Use a simpler heading for404 pages
| HTML+ERB | mit | tadast/static,alphagov/static,robinwhittleton/static,kalleth/static,tadast/static,robinwhittleton/static,kalleth/static,kalleth/static,tadast/static,robinwhittleton/static,kalleth/static,tadast/static,alphagov/static,alphagov/static,robinwhittleton/static | html+erb | ## Code Before:
<%= render partial: "four_hundred_error", locals: {
title: "Page not found - 404",
heading: "The page you are looking for can't be found",
intro: '<p>Please check that you have entered the correct web address, or try using the search box below or explore <a href="/">GOV.UK</a> to find the in... |
2f6fc2006f802bba00fae6f90eee672e0967e256 | cleanup.sh | cleanup.sh |
set -e
echo "cleaning up"
rm -rf autom4te*.cache scripts aclocal.m4 configure config.log config.status .deps stamp-h1
rm -f config.h.in config.h.in~ config.h
rm -f scripts
find . \( -name Makefile -o -name Makefile.in \) -print0 | xargs -0 rm -f
rm -f svnrev.c
rm -f *.o logwarn logwarn.1
rm -f logwarn-*.tar.gz
rm -rf... |
set -e
echo "cleaning up"
rm -rf autom4te*.cache scripts aclocal.m4 configure config.log config.status .deps stamp-h1
rm -f config.h.in config.h.in~ config.h
rm -f scripts
find . \( -name Makefile -o -name Makefile.in \) -print0 | xargs -0 rm -f
rm -f svnrev.c
rm -f *.o logwarn logwarn.1
rm -f logwarn-*.tar.gz logwar... | Clean up logwarn.spec now that it's a generated file. | Clean up logwarn.spec now that it's a generated file.
| Shell | apache-2.0 | archiecobbs/logwarn,archiecobbs/logwarn | shell | ## Code Before:
set -e
echo "cleaning up"
rm -rf autom4te*.cache scripts aclocal.m4 configure config.log config.status .deps stamp-h1
rm -f config.h.in config.h.in~ config.h
rm -f scripts
find . \( -name Makefile -o -name Makefile.in \) -print0 | xargs -0 rm -f
rm -f svnrev.c
rm -f *.o logwarn logwarn.1
rm -f logwarn... |
74fafbfe7f84dd5fdc7fcd75330d3de23f095842 | README.md | README.md |
Because i wan't a simple framework that just do the basic stuff and had native support for Xamarin
# How it works
Currently there is only one implementation for IMvvmContainer
wich is an abstraction to support containers, at the moment i only have provided
autofac because is the one i have used on my projects, but ... |
Because i wan't a simple framework that just do the basic stuff and had native support for Xamarin
# How it works
Currently there is only one implementation for IMvvmContainer
wich is an abstraction to support containers, at the moment i only have provided
autofac because is the one i have used on my projects, but ... | Add Example link on readme | Add Example link on readme
| Markdown | apache-2.0 | nukedbit/nukedbit-mvvm | markdown | ## Code Before:
Because i wan't a simple framework that just do the basic stuff and had native support for Xamarin
# How it works
Currently there is only one implementation for IMvvmContainer
wich is an abstraction to support containers, at the moment i only have provided
autofac because is the one i have used on m... |
99fbf97643bdfd42b1dc8890a7cfeccc61ae973f | moderator/moderate/auth.py | moderator/moderate/auth.py | from mozilla_django_oidc.auth import OIDCAuthenticationBackend
from moderator.moderate.mozillians import is_vouched, BadStatusCodeError
class ModeratorAuthBackend(OIDCAuthenticationBackend):
def create_user(self, email, **kwargs):
try:
data = is_vouched(email)
except BadStatusCodeErro... | from mozilla_django_oidc.auth import OIDCAuthenticationBackend
from moderator.moderate.mozillians import is_vouched, BadStatusCodeError
class ModeratorAuthBackend(OIDCAuthenticationBackend):
def create_user(self, claims, **kwargs):
try:
data = is_vouched(claims.get('email'))
except Ba... | Fix claims handling on create_user | Fix claims handling on create_user
| Python | agpl-3.0 | akatsoulas/mozmoderator,mozilla/mozmoderator,johngian/mozmoderator,mozilla/mozmoderator,akatsoulas/mozmoderator,akatsoulas/mozmoderator,johngian/mozmoderator,johngian/mozmoderator,mozilla/mozmoderator,johngian/mozmoderator | python | ## Code Before:
from mozilla_django_oidc.auth import OIDCAuthenticationBackend
from moderator.moderate.mozillians import is_vouched, BadStatusCodeError
class ModeratorAuthBackend(OIDCAuthenticationBackend):
def create_user(self, email, **kwargs):
try:
data = is_vouched(email)
except B... |
9ffac271ecda2e6305cbf085b8f53698d2e8e680 | dist/src/main/etc/support-bundle-redactor.json | dist/src/main/etc/support-bundle-redactor.json | {
"version": 1,
"rules": [
{
"description": "Generic password in configuration files.",
"trigger": "password",
"search": "password=.*",
"replace": "password=REDACTED"
}, {
"description": "DPM Authorization token",
"trigger": "dpm.appAuthToken",
"search": "dpm.appAut... | {
"version": 1,
"rules": [
{
"description": "Generic password in configuration files.",
"trigger": "password",
"search": "password=[^\"' ]*",
"replace": "password=REDACTED"
}, {
"description": "DPM Authorization token",
"trigger": "dpm.appAuthToken",
"search": "dpm.... | Support bundle changes quotation marks from the json file with the password to REDACTED | SDC-7258: Support bundle changes quotation marks from the json file with the password to REDACTED
Change-Id: I8550b6eb9156a015474af6e01bcffce6c0a79592
Reviewed-on: https://review.streamsets.net/10280
Reviewed-by: Bob Plotts <48181acd22b3edaebc8a447868a7df7ce629920a@streamsets.com>
Tested-by: StreamSets CI <809627f3732... | JSON | apache-2.0 | rockmkd/datacollector,z123/datacollector,kunickiaj/datacollector,z123/datacollector,kunickiaj/datacollector,z123/datacollector,z123/datacollector,kunickiaj/datacollector,SandishKumarHN/datacollector,streamsets/datacollector,SandishKumarHN/datacollector,SandishKumarHN/datacollector,rockmkd/datacollector,streamsets/datac... | json | ## Code Before:
{
"version": 1,
"rules": [
{
"description": "Generic password in configuration files.",
"trigger": "password",
"search": "password=.*",
"replace": "password=REDACTED"
}, {
"description": "DPM Authorization token",
"trigger": "dpm.appAuthToken",
"sear... |
b0842d7d4dfeec4ad9cb8a8a906b6723783b229c | src/com/google/api/explorer/Embedded.gwt.xml | src/com/google/api/explorer/Embedded.gwt.xml | <module>
<inherits name="com.google.gwt.user.User" />
<inherits name="com.google.common.collect.Collect" />
<inherits name="com.google.web.bindery.autobean.AutoBean" />
<inherits name="com.google.api.gwt.oauth2.OAuth2" />
<entry-point class="com.google.api.explorer.client.embedded.EmbeddedEntryPoint" />
<... | <module>
<inherits name="com.google.gwt.user.User" />
<inherits name="com.google.common.collect.Collect" />
<inherits name="com.google.web.bindery.autobean.AutoBean" />
<inherits name="com.google.api.gwt.oauth2.OAuth2" />
<inherits name="com.google.gwt.json.JSON" />
<entry-point class="com.google.api.explo... | Add a dependency on the JSON package in the embedded module (or it won't compile) | Add a dependency on the JSON package in the embedded module (or it
won't compile)
R=jschorr
DELTA=1 (1 added, 0 deleted, 0 changed)
Revision created by MOE tool push_codebase.
MOE_MIGRATION=2446
| XML | apache-2.0 | vemmaverve/google-apis-explorer,t9nf/google-apis-explorer,pombreda/google-apis-explorer,haocafes/google-apis-explorer,t9nf/google-apis-explorer,haonaturel/google-apis-explorer,google-code-export/google-apis-explorer,google-code-export/google-apis-explorer,showlowtech/google-apis-explorer,haocafes/google-apis-explorer,h... | xml | ## Code Before:
<module>
<inherits name="com.google.gwt.user.User" />
<inherits name="com.google.common.collect.Collect" />
<inherits name="com.google.web.bindery.autobean.AutoBean" />
<inherits name="com.google.api.gwt.oauth2.OAuth2" />
<entry-point class="com.google.api.explorer.client.embedded.EmbeddedEnt... |
96b59d9e3d202ed86060bee840136d5eab3cbbd7 | docker-compose.yml | docker-compose.yml | web:
build: .
links:
- mongo:db #An entry with the alias' name will be created in /etc/hosts inside containers for this service, e.g:
ports:
- "80:9000"
environment:
- MONGOLAB_URI=mongodb://db:27017/easydownload-dev
mongo:
image: mongo:latest
expose: # Expose ports without publishing them to the h... | web:
build: .
links:
- mongo:db #An entry with the alias' name will be created in /etc/hosts inside containers for this service, e.g:
ports:
- "80:9000"
environment:
- MONGOLAB_URI=mongodb://db:27017/easydownload-dev
mongo:
image: mongo:latest
ports:
- "16888:27017"
volumes:
- /mnt/ext/data... | Use external volumn for db | Use external volumn for db
| YAML | mit | zycbobby/easy_download,zycbobby/easy_download,zycbobby/easy_download | yaml | ## Code Before:
web:
build: .
links:
- mongo:db #An entry with the alias' name will be created in /etc/hosts inside containers for this service, e.g:
ports:
- "80:9000"
environment:
- MONGOLAB_URI=mongodb://db:27017/easydownload-dev
mongo:
image: mongo:latest
expose: # Expose ports without publishi... |
2bc8683bcfecda56665a1338bc5dc49ee2ed466a | config/deploy.rb | config/deploy.rb | load 'deploy' if respond_to?(:namespace) # cap2 differentiator
set :application, "wompt"
set :user, "ubuntu"
set :host, "wompt.com"
set :scm, :git
set :repository, "git@github.com:abtinf/wompt.git"
set :git_enable_submodules, true
set :deploy_via, :remote_cache
role :app, host
set :use_sudo, true
set :admin_runner... | load 'deploy' if respond_to?(:namespace) # cap2 differentiator
set :application, "wompt"
set :user, "ubuntu"
set :host, "wompt.com"
set :scm, :git
set :repository, "git@github.com:Wompt/wompt.com.git"
set :git_enable_submodules, true
set :deploy_via, :remote_cache
role :app, host
set :use_sudo, true
set :admin_run... | Change git repo to wompt/wompt.com | Change git repo to wompt/wompt.com
| Ruby | mit | iFixit/wompt.com,iFixit/wompt.com,iFixit/wompt.com,iFixit/wompt.com | ruby | ## Code Before:
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
set :application, "wompt"
set :user, "ubuntu"
set :host, "wompt.com"
set :scm, :git
set :repository, "git@github.com:abtinf/wompt.git"
set :git_enable_submodules, true
set :deploy_via, :remote_cache
role :app, host
set :use_sudo, true
s... |
4233dd881c2166a89712d6265c412d205ae6e544 | src/renderware/gzip_renderware.js | src/renderware/gzip_renderware.js | module.exports = (function() {
"use strict";
const Nodal = require('nodal');
const zlib = require('zlib');
class GzipMiddleware extends Nodal.Middleware {
exec(controller, data, callback) {
let contentType = controller.getHeader('Content-Type', '').split(';')[0];
let acceptEncoding = contr... | module.exports = (function() {
"use strict";
const Nodal = require('nodal');
const zlib = require('zlib');
class GzipRenderware extends Nodal.Renderware {
exec(controller, data, callback) {
let contentType = controller.getHeader('Content-Type', '').split(';')[0];
let acceptEncoding = contr... | Add renderware to generated apps | Add renderware to generated apps
| JavaScript | mit | abossard/nodal,nsipplswezey/nodal,IrregularShed/nodal,IrregularShed/nodal,nsipplswezey/nodal,rlugojr/nodal,nsipplswezey/nodal,abossard/nodal,keithwhor/nodal | javascript | ## Code Before:
module.exports = (function() {
"use strict";
const Nodal = require('nodal');
const zlib = require('zlib');
class GzipMiddleware extends Nodal.Middleware {
exec(controller, data, callback) {
let contentType = controller.getHeader('Content-Type', '').split(';')[0];
let accept... |
abdc15e7406ef4b2d21aab54b55bb7ea8829c124 | .travis.yml | .travis.yml | language: go
sudo: false
go:
- 1.5.x
- 1.6.x
- 1.7.x
- 1.8.x
- 1.9.x
- tip
install:
- go get -v github.com/qedus/osmpbf
script:
- make init
- make race
- make cover
- make bench
after_success:
- go get -u github.com/mattn/goveralls
- export PATH=$PATH:$HOME/gopath/bin
- goveralls -coverpr... | language: go
sudo: false
go:
- 1.6.x
- 1.7.x
- 1.8.x
- 1.9.x
- tip
install:
- go get -v github.com/qedus/osmpbf
script:
- make init
- make race
- make cover
- make bench
after_success:
- go get -u github.com/mattn/goveralls
- export PATH=$PATH:$HOME/gopath/bin
- goveralls -coverprofile=prof... | Drop testing with Go 1.5. | Drop testing with Go 1.5. | YAML | mit | qedus/osmpbf | yaml | ## Code Before:
language: go
sudo: false
go:
- 1.5.x
- 1.6.x
- 1.7.x
- 1.8.x
- 1.9.x
- tip
install:
- go get -v github.com/qedus/osmpbf
script:
- make init
- make race
- make cover
- make bench
after_success:
- go get -u github.com/mattn/goveralls
- export PATH=$PATH:$HOME/gopath/bin
- go... |
b6b146241d628d7a5502c05d01f879366be69ec6 | statichandler.go | statichandler.go | package kwiscale
import (
"crypto/md5"
"fmt"
"net/http"
"os"
"path/filepath"
)
// StaticHandler handle static files handlers. Use App.SetStatic(path) that create the static handler
type staticHandler struct {
RequestHandler
}
// Use http.FileServer to serve file after adding ETag.
func (s *staticHandler) Get()... | package kwiscale
import (
"crypto/md5"
"fmt"
"net/http"
"os"
"path/filepath"
)
// StaticHandler handle static files handlers. Use App.SetStatic(path) that create the static handler
type staticHandler struct {
RequestHandler
}
// Use http.FileServer to serve file after adding ETag.
func (s *staticHandler) Get()... | Fix prefix problem that made a 404 error | Fix prefix problem that made a 404 error
| Go | bsd-3-clause | kwiscale/framework | go | ## Code Before:
package kwiscale
import (
"crypto/md5"
"fmt"
"net/http"
"os"
"path/filepath"
)
// StaticHandler handle static files handlers. Use App.SetStatic(path) that create the static handler
type staticHandler struct {
RequestHandler
}
// Use http.FileServer to serve file after adding ETag.
func (s *stat... |
6a1c6cb16ad3b05e9b31b1a69c5ab03f919c573e | src/index.js | src/index.js | import React, { Component } from 'react';
import { ListView } from 'react-native';
class ScrollableList extends Component {
constructor(props) {
super(props);
const { data, row, ...other } = props;
this.otherProps = other;
this.row = row;
const ds = new ListView.DataSource({ rowHasChanged: (r1,... | import React, { Component } from 'react';
import { ListView } from 'react-native';
class ScrollableList extends Component {
constructor(props) {
super(props);
const { data, row, ...other } = props;
this.otherProps = other;
this.row = row;
this._ds = new ListView.DataSource({ rowHasChanged: (r1,... | Add componentWillReceiveProps for dynamic datasource updates | Add componentWillReceiveProps for dynamic datasource updates | JavaScript | mit | nachoaIvarez/react-native-scrollable-list | javascript | ## Code Before:
import React, { Component } from 'react';
import { ListView } from 'react-native';
class ScrollableList extends Component {
constructor(props) {
super(props);
const { data, row, ...other } = props;
this.otherProps = other;
this.row = row;
const ds = new ListView.DataSource({ row... |
788b20ef2560147fc8f614b3cf33d996cd576cf7 | .github/workflows/build.yml | .github/workflows/build.yml | name: Build
on:
push: ~
pull_request: ~
release:
types: [created]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~
jobs:
tests:
runs-on: ubuntu-latest
name: "PHP ${{ matrix.php }}"
strategy:
fail-fast... | name: Build
on:
push: ~
pull_request: ~
release:
types: [created]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~
jobs:
tests:
runs-on: ubuntu-latest
name: "PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}"
... | Fix GH Action to support different Sf versions | [Maintenance] Fix GH Action to support different Sf versions
| YAML | mit | winzou/state-machine | yaml | ## Code Before:
name: Build
on:
push: ~
pull_request: ~
release:
types: [created]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~
jobs:
tests:
runs-on: ubuntu-latest
name: "PHP ${{ matrix.php }}"
strategy:
... |
7b0b2ca43517ef59aa78c3ad4ce2c49df9bffaff | include/private/SkSpinlock.h | include/private/SkSpinlock.h | /*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkSpinlock_DEFINED
#define SkSpinlock_DEFINED
#include <atomic>
class SkSpinlock {
public:
void acquire() {
// To act as a mutex, we need an acquire barr... | /*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkSpinlock_DEFINED
#define SkSpinlock_DEFINED
#include "SkTypes.h"
#include <atomic>
class SkSpinlock {
public:
void acquire() {
// To act as a mutex, we... | Make Cmake work with debug build | Make Cmake work with debug build
Before this CL, the following failed to link:
cd .../skia
git fetch
git checkout origin/master
git clean -ffdx
SKIA="$PWD"
cd $(mktemp -d);
cmake "${SKIA}/cmake" -DCMAKE_BUILD_TYPE=Debug -G Ninja
ninja
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=... | C | bsd-3-clause | HalCanary/skia-hc,google/skia,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,google/skia,google/skia,tmpvar/skia.cc,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,tmpvar/skia.cc,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_extern... | c | ## Code Before:
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkSpinlock_DEFINED
#define SkSpinlock_DEFINED
#include <atomic>
class SkSpinlock {
public:
void acquire() {
// To act as a mutex, we need... |
b8f52243f6a19b50b73e6ae1a7713878eaf71acb | src/main/java/com/github/kristofa/brave/resteasyexample/SpanCollectorConfiguration.java | src/main/java/com/github/kristofa/brave/resteasyexample/SpanCollectorConfiguration.java | package com.github.kristofa.brave.resteasyexample;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import com.github.kristofa.brave.Brave;
import com.github.kristofa.brave.SpanCollector;
/**
* {@lin... | package com.github.kristofa.brave.resteasyexample;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import com.github.kristofa.brave.LoggingSpanCollectorImpl;
import com.github.kristofa.brave.SpanColle... | Fix to make compatible with brave-impl changes. LoggingSpanCollectorImpl is public class and not to be instantiated through com.github.kristofa.brave.Brave anymore. | Fix to make compatible with brave-impl changes. LoggingSpanCollectorImpl is public class and not to be instantiated through com.github.kristofa.brave.Brave anymore.
| Java | mit | wuqiangxjtu/brave-resteasy-example,kristofa/brave-resteasy-example,tinedel/brave-resteasy3-example | java | ## Code Before:
package com.github.kristofa.brave.resteasyexample;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import com.github.kristofa.brave.Brave;
import com.github.kristofa.brave.SpanCollecto... |
2cd68faccadb3d2e01956c23281b1dfad53a7a01 | client/landing/Workspace/panes/terminalpane.coffee | client/landing/Workspace/panes/terminalpane.coffee | class TerminalPane extends Pane
constructor: (options = {}, data) ->
options.cssClass = "terminal-pane terminal"
options.delay ?= 0
super options, data
@createWebTermView()
@webterm.on "WebTermConnected", (@remote) =>
@emit "WebtermCreated"
@onWebTermConnected()
createWebTer... | class TerminalPane extends Pane
constructor: (options = {}, data) ->
options.cssClass = "terminal-pane terminal"
options.delay ?= 0
super options, data
@createWebTermView()
createWebTermView: ->
KD.singletons.vmController.fetchDefaultVm (err, vm)=>
@webterm = new WebTe... | Fix TerminalPane until we support for multiple vms | Fix TerminalPane until we support for multiple vms
| CoffeeScript | agpl-3.0 | acbodine/koding,sinan/koding,rjeczalik/koding,drewsetski/koding,usirin/koding,sinan/koding,drewsetski/koding,koding/koding,koding/koding,mertaytore/koding,andrewjcasal/koding,gokmen/koding,kwagdy/koding-1,koding/koding,alex-ionochkin/koding,acbodine/koding,cihangir/koding,jack89129/koding,koding/koding,sinan/koding,cih... | coffeescript | ## Code Before:
class TerminalPane extends Pane
constructor: (options = {}, data) ->
options.cssClass = "terminal-pane terminal"
options.delay ?= 0
super options, data
@createWebTermView()
@webterm.on "WebTermConnected", (@remote) =>
@emit "WebtermCreated"
@onWebTermConnected()... |
93bb3fd1efceb6279effa460a02b27dd706c1222 | packages/vulcan-lib/lib/client/auth.js | packages/vulcan-lib/lib/client/auth.js | import cookie from 'react-cookie';
import { Meteor } from 'meteor/meteor';
import { getRenderContext } from './render_context.js';
function setToken(loginToken, expires) {
if (loginToken && expires !== -1) {
cookie.save('meteor_login_token', loginToken, {
path: '/',
expires,
});
} else {
... | import Cookies from 'universal-cookie';
import { Meteor } from 'meteor/meteor';
import { getRenderContext } from './render_context.js';
const cookie = new Cookies();
function setToken(loginToken, expires) {
if (loginToken && expires !== -1) {
cookie.set('meteor_login_token', loginToken, {
path: '/',
... | Update cookies to use universal-cookie | Update cookies to use universal-cookie
| JavaScript | mit | VulcanJS/Vulcan,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,VulcanJS/Vulcan,Discordius/Telescope | javascript | ## Code Before:
import cookie from 'react-cookie';
import { Meteor } from 'meteor/meteor';
import { getRenderContext } from './render_context.js';
function setToken(loginToken, expires) {
if (loginToken && expires !== -1) {
cookie.save('meteor_login_token', loginToken, {
path: '/',
expires,
});... |
9312aa374450f1e33e462bfaaf83b1a55d1ec719 | Sources/SwiftSyntaxBuilder/VariableDeclConvenienceInitializers.swift | Sources/SwiftSyntaxBuilder/VariableDeclConvenienceInitializers.swift | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | //===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | Add modifiers parameter to VariableDecl convenience init | Add modifiers parameter to VariableDecl convenience init
| Swift | apache-2.0 | apple/swift-syntax,apple/swift-syntax,apple/swift-syntax | swift | ## Code Before:
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See htt... |
58c53d45e21f4143fbb553305819099777490c82 | tests/CleanFuncTest.php | tests/CleanFuncTest.php | <?php
namespace Mimic\Test;
use PHPUnit_Framework_TestCase;
use Mimic\Functional as F;
/**
* Unit Test for clean Mimic library function.
*
* @since 0.1.0
*/
class CleanFuncTest extends PHPUnit_Framework_TestCase {
public function dataProvider() {
return array(
array(array(1, 2, 3, 4), array(1, false, 0, 2,... | <?php
namespace Mimic\Test;
use PHPUnit_Framework_TestCase;
use Mimic\Functional as F;
/**
* Unit Test for clean Mimic library function.
*
* @since 0.1.0
*/
class CleanFuncTest extends PHPUnit_Framework_TestCase {
public function dataProvider() {
return array(
array(array(0 => 1, 3 => 2, 4 => 3, 5 => 4), a... | Fix tests: filter preserves indexes. | Fix tests: filter preserves indexes.
| PHP | mit | SpeedySpec/phFunctional,MimicCMS/functional-primitives | php | ## Code Before:
<?php
namespace Mimic\Test;
use PHPUnit_Framework_TestCase;
use Mimic\Functional as F;
/**
* Unit Test for clean Mimic library function.
*
* @since 0.1.0
*/
class CleanFuncTest extends PHPUnit_Framework_TestCase {
public function dataProvider() {
return array(
array(array(1, 2, 3, 4), array... |
a53d5b2ad72c9d3b81b9fd83d2031a4da1233d2d | lib/days/app.rb | lib/days/app.rb | require 'sinatra'
require 'sprockets'
require_relative 'config'
module Days
class App < Sinatra::Base
set(:sprockets, Sprockets::Environment.new.tap { |env|
# env.append_path "#{root}/javascripts"
# env.append_path "#{root}/stylesheets"
})
set(:rack, Rack::Builder.app {
app = ::Days::A... | require 'sinatra'
require 'sprockets'
require_relative 'config'
module Days
class App < Sinatra::Base
set(:sprockets, Sprockets::Environment.new.tap { |env|
# env.append_path "#{root}/javascripts"
# env.append_path "#{root}/stylesheets"
})
set(:rack, Rack::Builder.app {
app = ::Days::A... | Enable session and condition for admin_only | Enable session and condition for admin_only
| Ruby | mit | sorah/days,sorah/days | ruby | ## Code Before:
require 'sinatra'
require 'sprockets'
require_relative 'config'
module Days
class App < Sinatra::Base
set(:sprockets, Sprockets::Environment.new.tap { |env|
# env.append_path "#{root}/javascripts"
# env.append_path "#{root}/stylesheets"
})
set(:rack, Rack::Builder.app {
... |
776110da71a3a6feffc1c812ff2f0404289b5da3 | client/packages/core-app-worona/src/app/gtm-app-extension-worona/sagas/index.js | client/packages/core-app-worona/src/app/gtm-app-extension-worona/sagas/index.js | /* eslint-disable no-undef */
import { takeEvery } from 'redux-saga';
import { select, take } from 'redux-saga/effects'
import * as deps from '../deps';
export function launchGTMEventsSaga({ type }) {
window.dataLayer.push({
event: type,
});
}
export default function* gtmSagas() {
yield take(deps.types.SITE... | /* eslint-disable no-undef */
import { takeEvery } from 'redux-saga';
import { select, take } from 'redux-saga/effects'
import * as deps from '../deps';
export function launchGTMEventsSaga({ type, ...props }) {
window.dataLayer.push({
event: type,
props,
});
}
export default function* gtmSagas() {
yield... | Revert "Don't send props to dataLayer." | Revert "Don't send props to dataLayer."
This reverts commit a104558a48e158e77226e1a635bf34fce9262259. | JavaScript | mit | worona/worona-app,worona/worona-app | javascript | ## Code Before:
/* eslint-disable no-undef */
import { takeEvery } from 'redux-saga';
import { select, take } from 'redux-saga/effects'
import * as deps from '../deps';
export function launchGTMEventsSaga({ type }) {
window.dataLayer.push({
event: type,
});
}
export default function* gtmSagas() {
yield take... |
e95319e1fee36579bd3d0c53b6bafd4ea585101c | lib/filestack-rails.rb | lib/filestack-rails.rb | require "filestack_rails/configuration"
require "filestack_rails/transform"
require "filestack_rails/engine"
module FilestackRails
# Your code goes here...
end
| require "filestack_rails/configuration"
require "filestack_rails/transform"
require "filestack_rails/engine"
require "filestack_rails/version"
module FilestackRails
# Your code goes here...
end
| Fix issue with missing module | Fix issue with missing module
| Ruby | mit | Ink/filepicker-rails,Ink/filepicker-rails,Ink/filepicker-rails | ruby | ## Code Before:
require "filestack_rails/configuration"
require "filestack_rails/transform"
require "filestack_rails/engine"
module FilestackRails
# Your code goes here...
end
## Instruction:
Fix issue with missing module
## Code After:
require "filestack_rails/configuration"
require "filestack_rails/transform"
re... |
ddcfae591848cadbfb5133b884220aed45477e80 | src/DefaultEncrypter.php | src/DefaultEncrypter.php | <?php namespace CodeZero\Encrypter;
use Illuminate\Contracts\Encryption\DecryptException as IlluminateDecryptException;
use Illuminate\Contracts\Encryption\Encrypter as IlluminateEncrypter;
use Illuminate\Encryption\Encrypter as DefaultIlluminateEncrypter;
class DefaultEncrypter implements Encrypter
{
/**
* ... | <?php namespace CodeZero\Encrypter;
use Illuminate\Contracts\Encryption\DecryptException as IlluminateDecryptException;
use Illuminate\Contracts\Encryption\Encrypter as IlluminateEncrypter;
use Illuminate\Encryption\Encrypter as DefaultIlluminateEncrypter;
class DefaultEncrypter implements Encrypter
{
/**
* ... | Set default 32 bit cipher | Set default 32 bit cipher
| PHP | mit | codezero-be/encrypter | php | ## Code Before:
<?php namespace CodeZero\Encrypter;
use Illuminate\Contracts\Encryption\DecryptException as IlluminateDecryptException;
use Illuminate\Contracts\Encryption\Encrypter as IlluminateEncrypter;
use Illuminate\Encryption\Encrypter as DefaultIlluminateEncrypter;
class DefaultEncrypter implements Encrypter
{... |
1a4ab7f6e92adb836edc21f13b110937bc3074b3 | .travis_create_doxygen_and_deploy.sh | .travis_create_doxygen_and_deploy.sh | set -e
mkdir doc
cd doc
git clone -b gh-pages https://github.com/LukasWoodtli/DesignByContractPlusPlus.git .
##### Configure git.
# Set the push default to simple i.e. push only the current branch.
git config --global push.default simple
# Pretend to be an user called Travis CI.
git config user.name "Travis CI"
git ... | set -e
mkdir doc
cd doc
git clone -b gh-pages https://github.com/LukasWoodtli/DesignByContractPlusPlus.git .
##### Configure git.
# Set the push default to simple i.e. push only the current branch.
git config --global push.default simple
# Pretend to be an user called Travis CI.
git config user.name "Travis CI"
git ... | Enable git output for ghpage | Enable git output for ghpage
| Shell | mit | LukasWoodtli/DesignByContractPlusPlus,LukasWoodtli/DesignByContractPlusPlus,LukasWoodtli/DesignByContractPlusPlus,LukasWoodtli/DesignByContractPlusPlus | shell | ## Code Before:
set -e
mkdir doc
cd doc
git clone -b gh-pages https://github.com/LukasWoodtli/DesignByContractPlusPlus.git .
##### Configure git.
# Set the push default to simple i.e. push only the current branch.
git config --global push.default simple
# Pretend to be an user called Travis CI.
git config user.name ... |
086610926fb12b35881c06d40c295be81ddc3173 | include/llvm/CodeGen/Passes.h | include/llvm/CodeGen/Passes.h | //===-- Passes.h - Target independent code generation passes ----*- C++ -*-===//
//
// This file defines interfaces to access the target independent code generation
// passes provided by the LLVM backend.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_PASSES_H
... | //===-- Passes.h - Target independent code generation passes ----*- C++ -*-===//
//
// This file defines interfaces to access the target independent code generation
// passes provided by the LLVM backend.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_PASSES_H
... | Include the sparc register in this file | Include the sparc register in this file
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@8794 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/... | c | ## Code Before:
//===-- Passes.h - Target independent code generation passes ----*- C++ -*-===//
//
// This file defines interfaces to access the target independent code generation
// passes provided by the LLVM backend.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_C... |
e246cdf0005296286bc8b50e7a33f5065744e9c4 | app/models/adjusted_net_income_calculator.rb | app/models/adjusted_net_income_calculator.rb | class AdjustedNetIncomeCalculator
PARAM_KEYS = [:gross_income, :other_income, :pension_contributions_from_pay,
:retirement_annuities, :cycle_scheme, :childcare, :pensions, :property,
:non_employment_income, :gift_aid_donations, :outgoing_pension_contributions]
def initialize(params)
PARAM_KEYS.each ... | class AdjustedNetIncomeCalculator
PARAM_KEYS = [:gross_income, :other_income, :pension_contributions_from_pay,
:retirement_annuities, :cycle_scheme, :childcare, :pensions, :property,
:non_employment_income, :gift_aid_donations, :outgoing_pension_contributions]
def initialize(params)
PARAM_KEYS.each ... | Use cleaner syntax for dynamically setting attr_reader | Use cleaner syntax for dynamically setting attr_reader
| Ruby | mit | mikeee/z_archived-calculators,mikeee/z_archived-calculators,mikeee/z_archived-calculators,mikeee/z_archived-calculators | ruby | ## Code Before:
class AdjustedNetIncomeCalculator
PARAM_KEYS = [:gross_income, :other_income, :pension_contributions_from_pay,
:retirement_annuities, :cycle_scheme, :childcare, :pensions, :property,
:non_employment_income, :gift_aid_donations, :outgoing_pension_contributions]
def initialize(params)
... |
554b2fccd9ff48c206d7274083155cf6a9d023ea | packages/revival-adapter-rxjs/src/rxjs-call-adapter.ts | packages/revival-adapter-rxjs/src/rxjs-call-adapter.ts | import { Call, CallAdapter } from "revival";
import { Observable, Observer } from "rxjs";
/**
* A {@link CallAdapter} implemented by rxjs.
*
* @author Vincent Cheung (coolingfall@gmail.com)
*/
export class RxjsCallAdapter<T> implements CallAdapter<T> {
private constructor() {}
static create(): CallAdapter<any... | import { Call, CallAdapter } from "revival";
import { Observable, Observer } from "rxjs";
/**
* A {@link CallAdapter} implemented by rxjs.
*
* @author Vincent Cheung (coolingfall@gmail.com)
*/
export class RxjsCallAdapter<T> implements CallAdapter<T> {
private constructor() {}
static create(): CallAdapter<any... | Fix rxjs call adapter throw error. | Fix rxjs call adapter throw error.
| TypeScript | mit | Coolerfall/revival | typescript | ## Code Before:
import { Call, CallAdapter } from "revival";
import { Observable, Observer } from "rxjs";
/**
* A {@link CallAdapter} implemented by rxjs.
*
* @author Vincent Cheung (coolingfall@gmail.com)
*/
export class RxjsCallAdapter<T> implements CallAdapter<T> {
private constructor() {}
static create():... |
44c0a1c639d0ef5de14b6911ba77500db7d471ad | rplugin/lisp/lisp-interface.lisp | rplugin/lisp/lisp-interface.lisp | (in-package :cl-user)
(defpackage #:lisp-interface
(:use #:cl #:cl-neovim)
(:shadowing-import-from #:cl #:defun #:eval))
(in-package :lisp-interface)
(defmacro echo-output (&body forms)
(let ((output (gensym)))
`(let ((,output (with-output-to-string (*standard-output*)
,@forms)))
... | (in-package :cl-user)
(defpackage #:lisp-interface
(:use #:cl #:cl-neovim)
(:shadowing-import-from #:cl #:defun #:eval))
(in-package :lisp-interface)
(defmacro echo-output (&body forms)
(let ((output (gensym)))
`(let ((,output (with-output-to-string (*standard-output*)
,@forms)))
... | Add :Lispdo command (lisp equivalent of :pydo) | Add :Lispdo command (lisp equivalent of :pydo)
| Common Lisp | mit | adolenc/cl-neovim,adolenc/cl-neovim | common-lisp | ## Code Before:
(in-package :cl-user)
(defpackage #:lisp-interface
(:use #:cl #:cl-neovim)
(:shadowing-import-from #:cl #:defun #:eval))
(in-package :lisp-interface)
(defmacro echo-output (&body forms)
(let ((output (gensym)))
`(let ((,output (with-output-to-string (*standard-output*)
... |
c5d4b5c7d9aa5b04f5c41720094322d05db39497 | README.md | README.md |
Erlang plugin for [asdf](https://github.com/HashNuke/asdf) version manager
## Install
```
asdf plugin-add erlang https://github.com/HashNuke/asdf-erlang.git
```
## Use
Check [asdf](https://github.com/HashNuke/asdf) readme for instructions on how to install & manage versions of Erlang.
|
Erlang plugin for [asdf](https://github.com/HashNuke/asdf) version manager
## Install
```
asdf plugin-add erlang https://github.com/HashNuke/asdf-erlang.git
```
## Use
Check [asdf](https://github.com/HashNuke/asdf) readme for instructions on how to install & manage versions of Erlang.
When installing Erlang using... | Add note about env vars for configure options | Add note about env vars for configure options
| Markdown | mit | asdf-vm/asdf-erlang | markdown | ## Code Before:
Erlang plugin for [asdf](https://github.com/HashNuke/asdf) version manager
## Install
```
asdf plugin-add erlang https://github.com/HashNuke/asdf-erlang.git
```
## Use
Check [asdf](https://github.com/HashNuke/asdf) readme for instructions on how to install & manage versions of Erlang.
## Instructi... |
8f369620b2e6e0023c3de3a52d48f557db2f402f | _people/oxana-smirnova.md | _people/oxana-smirnova.md | ---
layout: master
include: person
name: Oxana Smirnova
home: <a href="http://www.lu.se">LU</a>
country: SE
photo: assets/images/people/Oxana_Smirnova.jpg
email: oxana.smirnova@hep.lu.se
phone: "+46 709 22 46 57"
on_contract: yes
has_been_on_contract: yes
groups:
nt1:
role: CERN Liaison
nt1-sg:
role: Member... | ---
layout: master
include: person
name: Oxana Smirnova
home: <a href="http://www.lu.se">LU</a>
country: SE
photo: assets/images/people/Oxana_Smirnova.jpg
email: oxana.smirnova@hep.lu.se
phone: "+46 709 22 46 57"
on_contract: yes
has_been_on_contract: yes
groups:
nt1:
role: CERN Liaison
nt1-sg:
role: Member... | Add the role in NeIC2015 PC | Add the role in NeIC2015 PC | Markdown | mpl-2.0 | neicnordic/neic.no,neicnordic/experimental.neic.nordforsk.org,neicnordic/experimental.neic.nordforsk.org,neicnordic/neic.no,neicnordic/experimental.neic.nordforsk.org,neicnordic/neic.no | markdown | ## Code Before:
---
layout: master
include: person
name: Oxana Smirnova
home: <a href="http://www.lu.se">LU</a>
country: SE
photo: assets/images/people/Oxana_Smirnova.jpg
email: oxana.smirnova@hep.lu.se
phone: "+46 709 22 46 57"
on_contract: yes
has_been_on_contract: yes
groups:
nt1:
role: CERN Liaison
nt1-sg:
... |
1adad3465778ef60e33d13bed777fc06f3f0045c | src/Data/FilterableTrait.php | src/Data/FilterableTrait.php | <?php
/**
*
* (c) Marco Bunge <marco_bunge@web.de>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*
* Date: 12.02.2016
* Time: 10:39
*
*/
namespace Blast\Db\Data;
trait FilterableTrait
{
/**
* Filter containing ent... | <?php
/**
*
* (c) Marco Bunge <marco_bunge@web.de>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*
* Date: 12.02.2016
* Time: 10:39
*
*/
namespace Blast\Db\Data;
trait FilterableTrait
{
/**
* Filter data by callba... | Add Fallback for ARRAY_FILTER_USE_BOTH behaviour on array_filter for PHP version < 5.6 | Add Fallback for ARRAY_FILTER_USE_BOTH behaviour on array_filter for PHP version < 5.6
| PHP | mit | phpthinktank/blast-orm | php | ## Code Before:
<?php
/**
*
* (c) Marco Bunge <marco_bunge@web.de>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*
* Date: 12.02.2016
* Time: 10:39
*
*/
namespace Blast\Db\Data;
trait FilterableTrait
{
/**
* Filte... |
e9635deadbe2388e67a34e97850a00bb9337c726 | src/jsx/components/Copyright.jsx | src/jsx/components/Copyright.jsx | import React, { Component } from 'react';
const currentYear = new Date().getFullYear();
export default class Copyright extends Component {
render() {
return <span>© {currentYear} David Minnerly</span>;
}
}
| import React, { Component } from 'react';
export default class Copyright extends Component {
getYear() {
return new Date().getFullYear();
}
render() {
return <span>© {this.getYear()} David Minnerly</span>;
}
}
| Create a method for getting copyright year | Create a method for getting copyright year
| JSX | mit | vocksel/my-website,VoxelDavid/voxeldavid-website,VoxelDavid/voxeldavid-website,vocksel/my-website | jsx | ## Code Before:
import React, { Component } from 'react';
const currentYear = new Date().getFullYear();
export default class Copyright extends Component {
render() {
return <span>© {currentYear} David Minnerly</span>;
}
}
## Instruction:
Create a method for getting copyright year
## Code After:
import ... |
766cfe490b42eb9fa11cce9f1e875fbc2e3e05bb | models/publisher.js | models/publisher.js | const mongoose = require('mongoose');
const PublisherSchema = new mongoose.Schema({
name: {
type: String,
required: true,
minlength: 2,
maxlength: 256
},
createdBy: String
});
PublisherSchema.virtual('response').get(function() {
return {
id: this.id,
name: this.name
};
});
module.ex... | const mongoose = require('mongoose');
const PublisherSchema = new mongoose.Schema({
name: {
type: String,
required: true,
minlength: 2,
maxlength: 256
},
createdBy: String,
createdAt: {
type: Date,
default: Date.now
},
updatedAt: Date,
deletedAt: Date
});
PublisherSchema.virtual(... | Add timestamp properties to Publisher resource | Add timestamp properties to Publisher resource
| JavaScript | mit | biblys/biblys-data-server,biblys/biblys-data-server | javascript | ## Code Before:
const mongoose = require('mongoose');
const PublisherSchema = new mongoose.Schema({
name: {
type: String,
required: true,
minlength: 2,
maxlength: 256
},
createdBy: String
});
PublisherSchema.virtual('response').get(function() {
return {
id: this.id,
name: this.name
}... |
63480c0a3e05a70207ec29e7316c35f4caf66abb | README.md | README.md | * Implementation template for [CQRS](https://www.martinfowler.com/bliki/CQRS.html)
* Use laravel/lumen IoC container for dependency injection by default (or you can override it)
# Prerequisite
* PHP 7.1
* [composer](https://getcomposer.org)
* [Laravel](https://laravel.com) or [lumen](https://lumen.laravel.com) framewo... | [](https://www.travis-ci.org/arseto/lumencqrs)
# CQRS Template for Laravel\Lumen
# Overview
* Implementation template for [CQRS](https://www.martinfowler.com/bliki/CQRS.html)
* Use laravel/lumen IoC container for dependency injection by defau... | Add build status in readme | Add build status in readme
| Markdown | mit | arseto/lumencqrs | markdown | ## Code Before:
* Implementation template for [CQRS](https://www.martinfowler.com/bliki/CQRS.html)
* Use laravel/lumen IoC container for dependency injection by default (or you can override it)
# Prerequisite
* PHP 7.1
* [composer](https://getcomposer.org)
* [Laravel](https://laravel.com) or [lumen](https://lumen.lara... |
399b52d42cbb8b34fcf307832b74ce91df040038 | recipes/cairo/cairo_1.10.0.bb | recipes/cairo/cairo_1.10.0.bb | require cairo.inc
PR = "r2"
SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.gz;name=cairo \
"
SRC_URI[cairo.md5sum] = "70a2ece66cf473d976e2db0f75bf199e"
SRC_URI[cairo.sha256sum] = "0f2ce4cc4615594088d74eb8b5360bad7c3cc3c3da9b61af9bfd979ed1ed94b2"
| require cairo.inc
LICENSE = "MPL-1 LGPLv2.1"
PR = "r3"
SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.gz;name=cairo \
"
SRC_URI[cairo.md5sum] = "70a2ece66cf473d976e2db0f75bf199e"
SRC_URI[cairo.sha256sum] = "0f2ce4cc4615594088d74eb8b5360bad7c3cc3c3da9b61af9bfd979ed1ed94b2"
| Update LICENSE field version to MPL-1 and LGPLv2.1 | cairo: Update LICENSE field version to MPL-1 and LGPLv2.1
* Updated LICENSE field version from generic LGPL to MPL-1 and
LGPLv2.1 to reflect the real license version.
* This change was based on setting in oe-core as well as code
inspection.
Signed-off-by: Chase Maupin <5a5662f468a76e0fc4391e65fb9f536df44d7380@ti.... | BitBake | mit | giobauermeister/openembedded,openembedded/openembedded,hulifox008/openembedded,openembedded/openembedded,xifengchuo/openembedded,giobauermeister/openembedded,openembedded/openembedded,xifengchuo/openembedded,openembedded/openembedded,openembedded/openembedded,xifengchuo/openembedded,hulifox008/openembedded,giobauermeis... | bitbake | ## Code Before:
require cairo.inc
PR = "r2"
SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.gz;name=cairo \
"
SRC_URI[cairo.md5sum] = "70a2ece66cf473d976e2db0f75bf199e"
SRC_URI[cairo.sha256sum] = "0f2ce4cc4615594088d74eb8b5360bad7c3cc3c3da9b61af9bfd979ed1ed94b2"
## Instruction:
cairo: Update LICENSE f... |
d6fd33b1409130013d5f31148e89fb75c65aaec6 | cloudfoundry-connector/src/main/java/org/springframework/cloud/cloudfoundry/MongoServiceInfoCreator.java | cloudfoundry-connector/src/main/java/org/springframework/cloud/cloudfoundry/MongoServiceInfoCreator.java | package org.springframework.cloud.cloudfoundry;
import java.util.Map;
import org.springframework.cloud.service.common.MongoServiceInfo;
/**
*
* @author Ramnivas Laddad
*
*/
public class MongoServiceInfoCreator extends CloudFoundryServiceInfoCreator<MongoServiceInfo> {
public MongoServiceInfoCreator() {
supe... | package org.springframework.cloud.cloudfoundry;
import java.util.Map;
import org.springframework.cloud.service.common.MongoServiceInfo;
/**
*
* @author Ramnivas Laddad
*
*/
public class MongoServiceInfoCreator extends CloudFoundryServiceInfoCreator<MongoServiceInfo> {
public MongoServiceInfoCreator() {
super... | Add fix for MongoDb if url is used instead of uri | Add fix for MongoDb if url is used instead of uri
| Java | apache-2.0 | spring-cloud/spring-cloud-connectors,mbogoevici/spring-cloud-connectors,gorcz/spring-cloud-connectors,scottfrederick/spring-cloud-connectors,chrisjs/spring-cloud-connectors,sandhya9/spring-cloud-connectors,scottfrederick/spring-cloud-connectors,sandhya9/spring-cloud-connectors,mbogoevici/spring-cloud-connectors,spring-... | java | ## Code Before:
package org.springframework.cloud.cloudfoundry;
import java.util.Map;
import org.springframework.cloud.service.common.MongoServiceInfo;
/**
*
* @author Ramnivas Laddad
*
*/
public class MongoServiceInfoCreator extends CloudFoundryServiceInfoCreator<MongoServiceInfo> {
public MongoServiceInfoCr... |
f034689b4d2a1ff3090b3bf18fd5aff1bcd8630e | templates/_footer.html | templates/_footer.html | <div class="container">
<div class="row center">
<div class="col-sm-3 col-xs-12 vcenter hcenter footer-col hidden-xs">
<a href="http://labs.bl.uk/" target="_blank">
<img class="img-responsive center-block ie-mid-vcenter" src="{{url_for('static', filename='img/bl-logo.png')}}" al... | <div class="container">
<div class="row center vcenter hcenter">
<div class="col-sm-3 col-xs-12 footer-col hidden-xs">
<a href="http://labs.bl.uk/" target="_blank">
<img class="img-responsive center-block ie-mid-vcenter" src="{{url_for('static', filename='img/bl-logo.png')}}" al... | Fix vertical centering on footer | Fix vertical centering on footer
| HTML | bsd-3-clause | alexandermendes/libcrowds-pybossa-theme,jacksongs/libcrowds-pybossa-theme,alexandermendes/BL-pybossa-theme,alexandermendes/BL-pybossa-theme,jacksongs/libcrowds-pybossa-theme,LibCrowds/libcrowds-pybossa-theme,LibCrowds/libcrowds-pybossa-theme,alexandermendes/libcrowds-pybossa-theme | html | ## Code Before:
<div class="container">
<div class="row center">
<div class="col-sm-3 col-xs-12 vcenter hcenter footer-col hidden-xs">
<a href="http://labs.bl.uk/" target="_blank">
<img class="img-responsive center-block ie-mid-vcenter" src="{{url_for('static', filename='img/bl-... |
025c98bdbdda72fa06c3cbbeb7a3190ed0006300 | test/Transforms/InstSimplify/2010-12-20-Distribute.ll | test/Transforms/InstSimplify/2010-12-20-Distribute.ll | ; RUN: opt < %s -instsimplify -S | FileCheck %s
define i32 @factorize(i32 %x, i32 %y) {
; CHECK: @factorize
; (X | 1) & (X | 2) -> X | (1 & 2) -> X
%l = or i32 %x, 1
%r = or i32 %x, 2
%z = and i32 %l, %r
ret i32 %z
; CHECK: ret i32 %x
}
define i32 @expand(i32 %x) {
; CHECK: @expand
; ((X & 1) | 2) & 1 -> ((X ... | ; RUN: opt < %s -instsimplify -S | FileCheck %s
define i32 @factorize(i32 %x, i32 %y) {
; CHECK: @factorize
; (X | 1) & (X | 2) -> X | (1 & 2) -> X
%l = or i32 %x, 1
%r = or i32 %x, 2
%z = and i32 %l, %r
ret i32 %z
; CHECK: ret i32 %x
}
define i32 @factorize2(i32 %x) {
; CHECK: @factorize2
; 3*X - 2*X -> X
... | Add an additional InstructionSimplify factorization test. | Add an additional InstructionSimplify factorization test.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@122333 91177308-0d34-0410-b5e6-96231b3b80d8
| LLVM | bsd-2-clause | dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Dri... | llvm | ## Code Before:
; RUN: opt < %s -instsimplify -S | FileCheck %s
define i32 @factorize(i32 %x, i32 %y) {
; CHECK: @factorize
; (X | 1) & (X | 2) -> X | (1 & 2) -> X
%l = or i32 %x, 1
%r = or i32 %x, 2
%z = and i32 %l, %r
ret i32 %z
; CHECK: ret i32 %x
}
define i32 @expand(i32 %x) {
; CHECK: @expand
; ((X & 1) ... |
92308ff603cfcf2632ee8e47be27c40f73558b71 | README.md | README.md |
> Going where no QRCode has gone before.
![Basic Example][basic-example-img]
# Install
Can be installed with:
npm install qrcode-terminal
and used:
var qrcode = require('qrcode-terminal');
# Usage
To display some data to the terminal just call:
qrcode.generate('This will be a QRCode Eh!');
If you... |
> Going where no QRCode has gone before.
![Basic Example][basic-example-img]
# Install
Can be installed with:
npm install qrcode-terminal
and used:
var qrcode = require('qrcode-terminal');
# Usage
To display some data to the terminal just call:
qrcode.generate('This will be a QRCode Eh!');
If you... | Clarify OS support since few libs run on Windows. | [doc] Clarify OS support since few libs run on Windows.
| Markdown | apache-2.0 | hotuna/qrcode-console,gtanner/qrcode-terminal,CSilivestru/qrcode-terminal,CSilivestru/qrcode-terminal | markdown | ## Code Before:
> Going where no QRCode has gone before.
![Basic Example][basic-example-img]
# Install
Can be installed with:
npm install qrcode-terminal
and used:
var qrcode = require('qrcode-terminal');
# Usage
To display some data to the terminal just call:
qrcode.generate('This will be a QRCod... |
5a8c0c7eb21d37edcdb1a0d8b8b24513746c3c16 | php-symfony2/README.md | php-symfony2/README.md |
This is the Symfony 2 PHP portion of a [benchmarking test suite](../) comparing a variety of web development platforms.
### JSON Encoding Test
Uses the PHP standard [JSON encoder](http://www.php.net/manual/en/function.json-encode.php).
* [JSON test controller](src/Skamander/BenchmarkBundle/BenchController.php)
###... |
This is the Symfony 2 PHP portion of a [benchmarking test suite](../) comparing a variety of web development platforms.
### JSON Encoding Test
Uses the PHP standard [JSON encoder](http://www.php.net/manual/en/function.json-encode.php).
* [JSON test controller](src/Skamander/BenchmarkBundle/Controller/BenchController... | Fix link to JSON test controller | Fix link to JSON test controller | Markdown | bsd-3-clause | stefanocasazza/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,joshk/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBen... | markdown | ## Code Before:
This is the Symfony 2 PHP portion of a [benchmarking test suite](../) comparing a variety of web development platforms.
### JSON Encoding Test
Uses the PHP standard [JSON encoder](http://www.php.net/manual/en/function.json-encode.php).
* [JSON test controller](src/Skamander/BenchmarkBundle/BenchContr... |
30b3522c14087407600976007cde83c1dd681d07 | pkgs/development/compilers/scala/default.nix | pkgs/development/compilers/scala/default.nix | { stdenv, fetchurl }:
# at runtime, need jre or jdk
stdenv.mkDerivation rec {
name = "scala-2.9.2";
src = fetchurl {
url = "http://www.scala-lang.org/downloads/distrib/files/${name}.tgz";
sha256 = "0s1shpzw2hyz7bwxdqq19rcrzbpq4d7b0kvdvjvhy7h05x496b46";
};
installPhase = ''
mkdir -p $out
rm "... | { stdenv, fetchurl }:
# at runtime, need jre or jdk
stdenv.mkDerivation rec {
name = "scala-2.9.2";
src = fetchurl {
url = "http://www.scala-lang.org/downloads/distrib/files/${name}.tgz";
sha256 = "0s1shpzw2hyz7bwxdqq19rcrzbpq4d7b0kvdvjvhy7h05x496b46";
};
installPhase = ''
mkdir -p $out
rm b... | Remove scalacheck.jar from scala's classpath | scala: Remove scalacheck.jar from scala's classpath
| Nix | mit | triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/trito... | nix | ## Code Before:
{ stdenv, fetchurl }:
# at runtime, need jre or jdk
stdenv.mkDerivation rec {
name = "scala-2.9.2";
src = fetchurl {
url = "http://www.scala-lang.org/downloads/distrib/files/${name}.tgz";
sha256 = "0s1shpzw2hyz7bwxdqq19rcrzbpq4d7b0kvdvjvhy7h05x496b46";
};
installPhase = ''
mkdir ... |
911edda25a5c93db51158128c06281d9718b088c | .travis.yml | .travis.yml | language: python
python:
- "2.6"
- "2.7"
install:
- pip install -q Django==$DJANGO --use-mirrors
- pip install -q -e .
- pip install -q -r example/requirements.txt --use-mirrors
env:
- DJANGO=1.3.1
- DJANGO=1.4.1
notifications:
email: false
branches:
only:
- master
- testsuite
script:
- pyth... | language: python
python:
- "2.6"
- "2.7"
install:
- pip install -q Django==$DJANGO --use-mirrors
- pip install -q -e .
- pip install -q -r example/requirements.txt --use-mirrors
env:
- DJANGO=1.3.1
- DJANGO=1.4.1
notifications:
email: false
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init... | Allow browser tests on Travis CI | Allow browser tests on Travis CI
| YAML | bsd-3-clause | winzard/django-image-cropping,winzard/django-image-cropping,henriquechehad/django-image-cropping,winzard/django-image-cropping,henriquechehad/django-image-cropping,henriquechehad/django-image-cropping | yaml | ## Code Before:
language: python
python:
- "2.6"
- "2.7"
install:
- pip install -q Django==$DJANGO --use-mirrors
- pip install -q -e .
- pip install -q -r example/requirements.txt --use-mirrors
env:
- DJANGO=1.3.1
- DJANGO=1.4.1
notifications:
email: false
branches:
only:
- master
- testsuite
... |
4d39cd71753a0597df1d6cbe0f1ddfe59192fdcb | ingraph-ire/src/test/scala/ingraph/ire/IntegrationTest.scala | ingraph-ire/src/test/scala/ingraph/ire/IntegrationTest.scala | package ingraph.ire
import hu.bme.mit.ire.TransactionFactory
import org.scalatest.FlatSpec
import scala.io.Source
class IntegrationTest extends FlatSpec {
val modelPath = "../trainbenchmark/models/railway-repair-1-tinkerpop.graphml"
def queryPath(query: String): String = s"queries/trainbenchmark/$query.cypher"
... | package ingraph.ire
import hu.bme.mit.ire.TransactionFactory
import org.scalatest.FlatSpec
import scala.io.Source
// in Eclipse / ScalaTest, open the run configuration, go to the Arguments tab and set the
// Working directory to Other: ${workspace_loc:ingraph}
class IntegrationTest extends FlatSpec {
val modelPath... | Add comment for Eclipse & ScalaTest | Add comment for Eclipse & ScalaTest
| Scala | epl-1.0 | FTSRG/ingraph,FTSRG/ingraph,FTSRG/ingraph,FTSRG/ingraph,FTSRG/ingraph | scala | ## Code Before:
package ingraph.ire
import hu.bme.mit.ire.TransactionFactory
import org.scalatest.FlatSpec
import scala.io.Source
class IntegrationTest extends FlatSpec {
val modelPath = "../trainbenchmark/models/railway-repair-1-tinkerpop.graphml"
def queryPath(query: String): String = s"queries/trainbenchmark... |
61374fc4d557c34d7d051138916ed556d98dd085 | app/models/live.rb | app/models/live.rb | class Live < ApplicationRecord
has_many :songs, dependent: :restrict_with_exception
scope :order_by_date, -> { order(date: :desc) }
scope :future, -> { where('date > ?', Date.today) }
validates :name, presence: true, uniqueness: { scope: :date }
validates :date, presence: true
validates :album_url, format... | class Live < ApplicationRecord
has_many :songs, dependent: :restrict_with_exception
scope :order_by_date, -> { order(date: :desc) }
scope :future, -> { where('date >= ?', Date.today + 1.week) }
validates :name, presence: true, uniqueness: { scope: :date }
validates :date, presence: true
validates :album_u... | Change the start of `future` scope | Change the start of `future` scope
| Ruby | mit | sankichi92/LiveLog,sankichi92/LiveLog,sankichi92/LiveLog,sankichi92/LiveLog | ruby | ## Code Before:
class Live < ApplicationRecord
has_many :songs, dependent: :restrict_with_exception
scope :order_by_date, -> { order(date: :desc) }
scope :future, -> { where('date > ?', Date.today) }
validates :name, presence: true, uniqueness: { scope: :date }
validates :date, presence: true
validates :a... |
72368ca5f4df5351c0e214e281001a90f2a2d492 | source/manual/which-gem-to-use.html.md | source/manual/which-gem-to-use.html.md | ---
owner_slack: "#govuk-developers"
title: Figure out which gem to use
section: Patterns & Style Guides
layout: manual_layout
parent: "/manual.html"
last_reviewed_on: 2019-07-10
review_in: 12 months
---
## Testing a Ruby project
- Projects should use [RSpec](https://github.com/rspec/rspec)
- Projects must use [govuk... | ---
owner_slack: "#govuk-developers"
title: Figure out which gem to use
section: Dependencies
layout: manual_layout
parent: "/manual.html"
last_reviewed_on: 2019-07-10
review_in: 12 months
---
## Testing a Ruby project
- Projects should use [RSpec](https://github.com/rspec/rspec)
- Projects must use [govuk_test](http... | Move "Figure out which gem to use" to Dependencies section | Move "Figure out which gem to use" to Dependencies section | Markdown | mit | alphagov/govuk-developer-docs,alphagov/govuk-developer-docs,alphagov/govuk-developer-docs,alphagov/govuk-developer-docs | markdown | ## Code Before:
---
owner_slack: "#govuk-developers"
title: Figure out which gem to use
section: Patterns & Style Guides
layout: manual_layout
parent: "/manual.html"
last_reviewed_on: 2019-07-10
review_in: 12 months
---
## Testing a Ruby project
- Projects should use [RSpec](https://github.com/rspec/rspec)
- Projects... |
6670b7a714bd0f93d469fa1b5fabe5a5692e7d74 | init.sh | init.sh | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
git config --file="$(brew --repository)/.git/config" --replace-all homebrew.analyticsdisabled true
brew tap homebrew/science
brew install wget
brew install go
brew install node
brew install ant
brew install ffmpeg
brew in... | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
git config --file="$(brew --repository)/.git/config" --replace-all homebrew.analyticsdisabled true
brew tap homebrew/science
brew install wget
brew install go
brew install node
brew install ant
brew install ffmpeg
brew in... | Install radiant-player for Google Play Music | Install radiant-player for Google Play Music | Shell | mit | billmei/dotfiles,billmei/dotfiles,kortaggio/dotfiles,kortaggio/dotfiles | shell | ## Code Before:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
git config --file="$(brew --repository)/.git/config" --replace-all homebrew.analyticsdisabled true
brew tap homebrew/science
brew install wget
brew install go
brew install node
brew install ant
brew instal... |
91ea026fa0c354c81cf0a1e52dbbe626b83a00f8 | app.py | app.py | import feedparser
from flask import Flask, render_template
app = Flask(__name__)
BBC_FEED = "http://feeds.bbci.co.uk/news/rss.xml"
@app.route("/")
def index():
feed = feedparser.parse(BBC_FEED)
return render_template("index.html", feed=feed.get('entries'))
if __name__ == "__main__":
app.run() | import requests
from flask import Flask, render_template
app = Flask(__name__)
BBC_FEED = "http://feeds.bbci.co.uk/news/rss.xml"
API_KEY = "c4002216fa5446d582b5f31d73959d36"
@app.route("/")
def index():
r = requests.get(
f"https://newsapi.org/v1/articles?source=the-next-web&sortBy=latest&apiKey={API_KEY}... | Use requests instead of feedparser. | Use requests instead of feedparser.
| Python | mit | alchermd/headlines,alchermd/headlines | python | ## Code Before:
import feedparser
from flask import Flask, render_template
app = Flask(__name__)
BBC_FEED = "http://feeds.bbci.co.uk/news/rss.xml"
@app.route("/")
def index():
feed = feedparser.parse(BBC_FEED)
return render_template("index.html", feed=feed.get('entries'))
if __name__ == "__main__":
app... |
06524d01fded9e57a05164ac9db285cccca72c58 | api/version_test.go | api/version_test.go | package api
import (
"encoding/json"
"testing"
"github.com/keydotcat/server/util"
)
func TestGetFullVersion(t *testing.T) {
r, err := GetRequest("/version")
CheckErrorAndResponse(t, r, err, 200)
sga := &versionSendFullResponse{}
if err := json.NewDecoder(r.Body).Decode(sga); err != nil {
t.Fatal(err)
}
if... | package api
import (
"encoding/json"
"net/http"
"testing"
"github.com/keydotcat/server/util"
)
func TestGetFullVersion(t *testing.T) {
r, err := http.Get(srv.URL + "/version")
CheckErrorAndResponse(t, r, err, 200)
sga := &versionSendFullResponse{}
if err := json.NewDecoder(r.Body).Decode(sga); err != nil {
... | Make sure we don't use any auth/cookie when testing version | Make sure we don't use any auth/cookie when testing version
| Go | mit | keydotcat/backend | go | ## Code Before:
package api
import (
"encoding/json"
"testing"
"github.com/keydotcat/server/util"
)
func TestGetFullVersion(t *testing.T) {
r, err := GetRequest("/version")
CheckErrorAndResponse(t, r, err, 200)
sga := &versionSendFullResponse{}
if err := json.NewDecoder(r.Body).Decode(sga); err != nil {
t.F... |
7973710ab73a9d02d32344f0892d0b5211eebb4e | ansible/roles/ripgrep/tasks/main.yml | ansible/roles/ripgrep/tasks/main.yml | ---
- name: Install cargo (Rust package manager)
become: yes
apt: name=cargo state=present
- name: Install ripgrep
command: cargo install ripgrep
args:
creates: "{{ home_dir }}/.cargo/bin/rg"
| ---
- name: Install rust and cargo
shell: curl https://sh.rustup.rs -sSf | sh -s -- -y
args:
creates: "{{ home_dir }}/.cargo/bin/cargo"
warn: False
- name: Install ripgrep
command: "{{ home_dir }}/.cargo/bin/cargo install ripgrep"
args:
creates: "{{ home_dir }}/.cargo/bin/rg"
| Install latest rust for ripgrep | Install latest rust for ripgrep
| YAML | mit | fernandoacorreia/homefiles,fernandoacorreia/homefiles | yaml | ## Code Before:
---
- name: Install cargo (Rust package manager)
become: yes
apt: name=cargo state=present
- name: Install ripgrep
command: cargo install ripgrep
args:
creates: "{{ home_dir }}/.cargo/bin/rg"
## Instruction:
Install latest rust for ripgrep
## Code After:
---
- name: Install rust and cargo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.