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 |k, v|
puts "#{k} - #{v.empty? ? 'true' : 'false'}" if v.respond_to? :empty?
end
end
values = {
"'string'": 'string',
"''": '',
'[1, 2, 3]': [1, 2, 3],
'[]': [],
'5': 5,
'0': 0,
true: true,
false: false,
nil: nil
}
if_value(values)
nil_value(values)
empty_value(values)
| 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 value:', -> (v) { v }, values)
check('if value.nil?:', -> (v) { v.nil? }, values)
check('if value.empty?:', -> (v) { v.empty? }, values)
| 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?":'
values.each do |k, v|
puts "#{k} - #{v.empty? ? 'true' : 'false'}" if v.respond_to? :empty?
end
end
values = {
"'string'": 'string',
"''": '',
'[1, 2, 3]': [1, 2, 3],
'[]': [],
'5': 5,
'0': 0,
true: true,
false: false,
nil: nil
}
if_value(values)
nil_value(values)
empty_value(values)
## Instruction:
Refactor null-true-false example in Ruby to make it more readable
## Code After:
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 value:', -> (v) { v }, values)
check('if value.nil?:', -> (v) { v.nil? }, values)
check('if value.empty?:', -> (v) { v.empty? }, values)
|
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.OsDefines.Solaris = MODULE.OsDefines.Linux
MODULE.OsDefines.Windows = {
"VK_USE_PLATFORM_WIN32_KHR"
}
MODULE.OsFiles.Windows = {
"../src/Nazara/Vulkan/Win32/**.hpp",
"../src/Nazara/Vulkan/Win32/**.cpp"
}
| 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:
Build: Add support for Linux, BSD and Solaris
Former-commit-id: 2f7f1e74fd101d688977ceb5129027cb1fa4a67b
## Code After:
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.OsDefines.Solaris = MODULE.OsDefines.Linux
MODULE.OsDefines.Windows = {
"VK_USE_PLATFORM_WIN32_KHR"
}
MODULE.OsFiles.Windows = {
"../src/Nazara/Vulkan/Win32/**.hpp",
"../src/Nazara/Vulkan/Win32/**.cpp"
}
|
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)
{
$head = $observer->getLayout()->getBlock('head');
if(Mage::registry('current_product'))
{
$title = Mage::registry('current_product')->getName();
}
if(Mage::registry('current_category') && empty($title))
{
$title = Mage::registry('current_category')->getName();
}
$head->setTitle($title);
}
} | <?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)
{
$head = $observer->getLayout()->getBlock('head');
if(Mage::registry('current_product'))
{
$title = Mage::registry('current_product')->getName();
}
if(Mage::registry('current_category') && empty($title))
{
$title = Mage::registry('current_category')->getName();
}
if(!empty($title))
{
$head->setTitle($title);
}
}
} | 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 $observer)
{
$head = $observer->getLayout()->getBlock('head');
if(Mage::registry('current_product'))
{
$title = Mage::registry('current_product')->getName();
}
if(Mage::registry('current_category') && empty($title))
{
$title = Mage::registry('current_category')->getName();
}
$head->setTitle($title);
}
}
## Instruction:
Check For Empty String On Page Title Update
This commit fixes #8
## Code After:
<?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)
{
$head = $observer->getLayout()->getBlock('head');
if(Mage::registry('current_product'))
{
$title = Mage::registry('current_product')->getName();
}
if(Mage::registry('current_category') && empty($title))
{
$title = Mage::registry('current_category')->getName();
}
if(!empty($title))
{
$head->setTitle($title);
}
}
} |
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__repository('brightbox-ruby-ng')
end
end
| 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 contain_apt__repository('brightbox-ruby-ng')
end
end
## Instruction:
Remove redundant test for brightbox repo
## Code After:
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
|
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
false
match: nil
nil
match: _
unquote(right)
end
)
end
defmacro ||: [left, right] do
quote(
case !(__oror_var = unquote(left)) do
match: false
__oror_var
else:
unquote(right)
end
)
end
defmacro !: [expr] do
quote(
case unquote(expr) do
match: false
true
match: nil
true
else:
false
end
)
end | 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(
case !(__oror_var = unquote(left)) do
match: false
__oror_var
else:
unquote(right)
end
)
end
defmacro !: [expr] do
quote(
case unquote(expr) do
match: false
true
match: nil
true
else:
false
end
)
end | 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
match: false
false
match: nil
nil
match: _
unquote(right)
end
)
end
defmacro ||: [left, right] do
quote(
case !(__oror_var = unquote(left)) do
match: false
__oror_var
else:
unquote(right)
end
)
end
defmacro !: [expr] do
quote(
case unquote(expr) do
match: false
true
match: nil
true
else:
false
end
)
end
## Instruction:
Simplify unless macro now that we have "!"
## Code After:
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(
case !(__oror_var = unquote(left)) do
match: false
__oror_var
else:
unquote(right)
end
)
end
defmacro !: [expr] do
quote(
case unquote(expr) do
match: false
true
match: nil
true
else:
false
end
)
end |
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}'"
echo "# deploy URL : '${DEPLOY_LOCATION}'"
echo "============================================================================="
K=encrypted_${DEPLOY_KEY}_key
IV=encrypted_${DEPLOY_KEY}_iv
TMPDIR=/tmp/deploy
rm -rf $TMPDIR
mkdir -p $TMPDIR
KEYFN=${TMPDIR}/travis
openssl aes-256-cbc -K $K -iv $IV -in ${DEPLOY_FILE}.enc -out ${KEYFN} -d
scp -B -i ${KEYFN} ${DEPLOY_RESOURCE} ${DEPLOY_HOST}:${DEPLOY_LOCATION}
|
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}'"
echo "# deploy URL : '${DEPLOY_LOCATION}'"
echo "============================================================================="
K=encrypted_${DEPLOY_KEY}_key
IV=encrypted_${DEPLOY_KEY}_iv
TMPDIR=/tmp/deploy
rm -rf $TMPDIR
mkdir -p $TMPDIR
KEYFN=${TMPDIR}/travis
echo "# K=$K IV=${IV}"
openssl aes-256-cbc -K "$K" -iv "$IV" -in ${DEPLOY_FILE}.enc -out ${KEYFN} -d
ls -la
scp -B -i ${KEYFN} ${DEPLOY_RESOURCE} ${DEPLOY_HOST}:${DEPLOY_LOCATION}
| 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 : '${DEPLOY_KEY}'"
echo "# deploy URL : '${DEPLOY_LOCATION}'"
echo "============================================================================="
K=encrypted_${DEPLOY_KEY}_key
IV=encrypted_${DEPLOY_KEY}_iv
TMPDIR=/tmp/deploy
rm -rf $TMPDIR
mkdir -p $TMPDIR
KEYFN=${TMPDIR}/travis
openssl aes-256-cbc -K $K -iv $IV -in ${DEPLOY_FILE}.enc -out ${KEYFN} -d
scp -B -i ${KEYFN} ${DEPLOY_RESOURCE} ${DEPLOY_HOST}:${DEPLOY_LOCATION}
## Instruction:
Add some debugging to figure out where hex value is coming from
## Code After:
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}'"
echo "# deploy URL : '${DEPLOY_LOCATION}'"
echo "============================================================================="
K=encrypted_${DEPLOY_KEY}_key
IV=encrypted_${DEPLOY_KEY}_iv
TMPDIR=/tmp/deploy
rm -rf $TMPDIR
mkdir -p $TMPDIR
KEYFN=${TMPDIR}/travis
echo "# K=$K IV=${IV}"
openssl aes-256-cbc -K "$K" -iv "$IV" -in ${DEPLOY_FILE}.enc -out ${KEYFN} -d
ls -la
scp -B -i ${KEYFN} ${DEPLOY_RESOURCE} ${DEPLOY_HOST}:${DEPLOY_LOCATION}
|
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 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.
|
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):
errorExit("{} does not exist, or is not a file\n".format(fileName))
results = []
with open(fileName) as FILE:
for line in FILE:
tokens = line.split("\t")
frequency = float(tokens[1])
results.append((line, frequency))
results.sort(key=itemgetter(1), reverse=True)
for tup in results:
sys.stdout.write(tup[0])
if __name__ == "__main__":
main()
| 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):
errorExit("{} does not exist, or is not a file\n".format(fileName))
results = []
with open(fileName) as FILE:
for line in FILE:
tokens = line.split("}")
itemset = tokens[0][1:-1]
frequency = float((tokens[1].split(" "))[0][2:-3])
results.append((itemset + "\t" + str(frequency)+"\n", frequency))
results.sort(key=itemgetter(1), reverse=True)
for tup in results:
sys.stdout.write(tup[0])
if __name__ == "__main__":
main()
| 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(fileName):
errorExit("{} does not exist, or is not a file\n".format(fileName))
results = []
with open(fileName) as FILE:
for line in FILE:
tokens = line.split("\t")
frequency = float(tokens[1])
results.append((line, frequency))
results.sort(key=itemgetter(1), reverse=True)
for tup in results:
sys.stdout.write(tup[0])
if __name__ == "__main__":
main()
## Instruction:
Modify to handle ARtool output
## Code After:
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):
errorExit("{} does not exist, or is not a file\n".format(fileName))
results = []
with open(fileName) as FILE:
for line in FILE:
tokens = line.split("}")
itemset = tokens[0][1:-1]
frequency = float((tokens[1].split(" "))[0][2:-3])
results.append((itemset + "\t" + str(frequency)+"\n", frequency))
results.sort(key=itemgetter(1), reverse=True)
for tup in results:
sys.stdout.write(tup[0])
if __name__ == "__main__":
main()
|
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 \CarlBennett\MVC\Libraries\Controller;
use \CarlBennett\MVC\Libraries\Router;
use \CarlBennett\MVC\Libraries\View as ViewLib;
use \DateTime;
use \DateTimeZone;
class View extends Controller {
public function &run(Router &$router, ViewLib &$view, array &$args) {
$model = new DocumentViewModel();
$model->active_user = Authentication::$user;
$model->document_id = array_shift($args);
try {
$model->document = new Document($model->document_id);
} catch (DocumentNotFoundException $e) {
$model->document = null;
}
if ($model->document) {
$model->comments = Comment::getAll(
Comment::PARENT_TYPE_DOCUMENT,
$model->document_id
);
}
$view->render($model);
$model->_responseCode = ($model->document ? 200 : 404);
return $model;
}
}
| <?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 \CarlBennett\MVC\Libraries\Controller;
use \CarlBennett\MVC\Libraries\Router;
use \CarlBennett\MVC\Libraries\View as ViewLib;
use \DateTime;
use \DateTimeZone;
class View extends Controller {
public function &run(Router &$router, ViewLib &$view, array &$args) {
$model = new DocumentViewModel();
$model->active_user = Authentication::$user;
$model->document_id = array_shift($args);
try { $model->document = new Document($model->document_id); }
catch (DocumentNotFoundException $e) { $model->document = null; }
catch (InvalidArgumentException $e) { $model->document = null; }
if ($model->document) {
$model->comments = Comment::getAll(
Comment::PARENT_TYPE_DOCUMENT,
$model->document_id
);
}
$view->render($model);
$model->_responseCode = ($model->document ? 200 : 404);
return $model;
}
}
| 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\Libraries\Common;
use \CarlBennett\MVC\Libraries\Controller;
use \CarlBennett\MVC\Libraries\Router;
use \CarlBennett\MVC\Libraries\View as ViewLib;
use \DateTime;
use \DateTimeZone;
class View extends Controller {
public function &run(Router &$router, ViewLib &$view, array &$args) {
$model = new DocumentViewModel();
$model->active_user = Authentication::$user;
$model->document_id = array_shift($args);
try {
$model->document = new Document($model->document_id);
} catch (DocumentNotFoundException $e) {
$model->document = null;
}
if ($model->document) {
$model->comments = Comment::getAll(
Comment::PARENT_TYPE_DOCUMENT,
$model->document_id
);
}
$view->render($model);
$model->_responseCode = ($model->document ? 200 : 404);
return $model;
}
}
## Instruction:
Fix error handling for non-existent documents
## Code After:
<?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 \CarlBennett\MVC\Libraries\Controller;
use \CarlBennett\MVC\Libraries\Router;
use \CarlBennett\MVC\Libraries\View as ViewLib;
use \DateTime;
use \DateTimeZone;
class View extends Controller {
public function &run(Router &$router, ViewLib &$view, array &$args) {
$model = new DocumentViewModel();
$model->active_user = Authentication::$user;
$model->document_id = array_shift($args);
try { $model->document = new Document($model->document_id); }
catch (DocumentNotFoundException $e) { $model->document = null; }
catch (InvalidArgumentException $e) { $model->document = null; }
if ($model->document) {
$model->comments = Comment::getAll(
Comment::PARENT_TYPE_DOCUMENT,
$model->document_id
);
}
$view->render($model);
$model->_responseCode = ($model->document ? 200 : 404);
return $model;
}
}
|
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 for plugin
## Code After:
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()
}
|
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) ->
self.pushObject record
self.set 'isLoading', false
self.set 'isLoaded', true
array.addObserver 'isLoaded', observer
observe: (collection, filterWith) ->
@set 'filterWith', filterWith
collection.addArrayObserver this,
willChange: 'observedArrayWillChange'
didChange: 'observedArraydidChange'
observedArrayWillChange: (->)
observedArraydidChange: (array, index, removedCount, addedCount) ->
addedObjects = array.slice index, index + addedCount
for object in addedObjects
if @get('filterWith').call this, object
@pushObject object
pushObject: (record) ->
content = @get 'content'
id = record.get 'id'
clientId = record.get 'clientId'
reference = @get('store').referenceForClientId(clientId)
@addReference reference
| 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) ->
self.pushObject record
self.set 'isLoading', false
self.set 'isLoaded', true
array.addObserver 'isLoaded', observer
observe: (collection, filterWith) ->
@set 'filterWith', filterWith
collection.addArrayObserver this,
willChange: 'observedArrayWillChange'
didChange: 'observedArraydidChange'
observedArrayWillChange: (->)
observedArraydidChange: (array, index, removedCount, addedCount) ->
addedObjects = array.slice index, index + addedCount
for object in addedObjects
if @get('filterWith').call this, object
@pushObject object
pushObject: (record) ->
@get('content').pushObject(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,2947721120/travis-web,fotinakis/travis-web,fauxton/travis-web,jlrigau/travis-web,fauxton/travis-web,travis-ci/travis-web,2947721120/travis-web,fauxton/travis-web,Tiger66639/travis-web,2947721120/travis-web,fotinakis/travis-web,fauxton/travis-web,jlrigau/travis-web | 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.forEach (record) ->
self.pushObject record
self.set 'isLoading', false
self.set 'isLoaded', true
array.addObserver 'isLoaded', observer
observe: (collection, filterWith) ->
@set 'filterWith', filterWith
collection.addArrayObserver this,
willChange: 'observedArrayWillChange'
didChange: 'observedArraydidChange'
observedArrayWillChange: (->)
observedArraydidChange: (array, index, removedCount, addedCount) ->
addedObjects = array.slice index, index + addedCount
for object in addedObjects
if @get('filterWith').call this, object
@pushObject object
pushObject: (record) ->
content = @get 'content'
id = record.get 'id'
clientId = record.get 'clientId'
reference = @get('store').referenceForClientId(clientId)
@addReference reference
## Instruction:
Update ExpandableRecordArray to work correctly with Ember Model
## Code After:
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) ->
self.pushObject record
self.set 'isLoading', false
self.set 'isLoaded', true
array.addObserver 'isLoaded', observer
observe: (collection, filterWith) ->
@set 'filterWith', filterWith
collection.addArrayObserver this,
willChange: 'observedArrayWillChange'
didChange: 'observedArraydidChange'
observedArrayWillChange: (->)
observedArraydidChange: (array, index, removedCount, addedCount) ->
addedObjects = array.slice index, index + addedCount
for object in addedObjects
if @get('filterWith').call this, object
@pushObject object
pushObject: (record) ->
@get('content').pushObject(record)
|
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 = [ '[email protected]' ]
s.homepage = ''
s.summary = 'A Ruby client for the Akismet API'
s.description = s.summary
s.required_ruby_version = '~> 1.8.6'
s.required_rubygems_version = '>= 1.3.5'
s.files = Dir.glob( 'lib/**/*' )
s.require_path = 'lib'
end | 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 = [ '[email protected]' ]
s.homepage = 'http://github.com/bigthink/akismet'
s.summary = 'A Ruby client for the Akismet API'
s.description = s.summary
s.required_ruby_version = '~> 1.8.6'
s.required_rubygems_version = '>= 1.3.5'
s.files = Dir.glob( 'lib/**/*' )
s.require_path = 'lib'
end | 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 = [ '[email protected]' ]
s.homepage = ''
s.summary = 'A Ruby client for the Akismet API'
s.description = s.summary
s.required_ruby_version = '~> 1.8.6'
s.required_rubygems_version = '>= 1.3.5'
s.files = Dir.glob( 'lib/**/*' )
s.require_path = 'lib'
end
## Instruction:
Add home page to gemspec
## Code After:
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 = [ '[email protected]' ]
s.homepage = 'http://github.com/bigthink/akismet'
s.summary = 'A Ruby client for the Akismet API'
s.description = s.summary
s.required_ruby_version = '~> 1.8.6'
s.required_rubygems_version = '>= 1.3.5'
s.files = Dir.glob( 'lib/**/*' )
s.require_path = 'lib'
end |
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/collapsable';
| @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/placeholders/links';
@import 'lib/placeholders/collapsable';
| 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';
@import 'placeholders/collapsable';
## Instruction:
Add lib to file path in lib.scss
## Code After:
@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/placeholders/links';
@import 'lib/placeholders/collapsable';
|
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) { return done(err); }
should(res.body.length).be.above(0);
done();
});
});
});
| 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) {
if (err) { return done(err); }
should(res.body.length).be.above(0);
boardId = res.body[0].id;
done();
});
});
it('should get a board\'s lists', function(done) {
request.get('/v1/trello/boards/' + boardId + '/lists')
.expect(200, function(err, res) {
if (err) { return done(err); }
should(res.body.length).be.above(0);
done();
});
});
});
| 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) {
if (err) { return done(err); }
should(res.body.length).be.above(0);
done();
});
});
});
## Instruction:
Add test for get trello lists
## Code After:
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) {
if (err) { return done(err); }
should(res.body.length).be.above(0);
boardId = res.body[0].id;
done();
});
});
it('should get a board\'s lists', function(done) {
request.get('/v1/trello/boards/' + boardId + '/lists')
.expect(200, function(err, res) {
if (err) { return done(err); }
should(res.body.length).be.above(0);
done();
});
});
});
|
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/logrus,therealbill/logrus,creack/logrus,dpatel06/logrus,TheQuestionru/logrus,torfuzx/logrus,tianon/debian-golang-logrus,sirupsen/logrus,sirupsen/logrus,alecha/logrus,Invacio/logrus,pippio/logrus,axiomzen/logrus,yawn/logrus,orvice/logrus,seatgeek/logrus,lixin9311/logrus,HideoYamauchi/logrus,chendrak/logrus,xyliuke/logrus,noxiouz/logrus,wallclockbuilder/logrus,derekdowling/logrus,ryanfaerman/logrus,akutz/logrus,rfsbraz/logrus,w4ngyi/logrus,snowsnail/logrus,devopstaku/logrus,Sirupsen/logrus,ineiti/logrus,penhauer-xiao/logrus,ConnectedHomes/logrus,Dal-Papa/logrus | 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/testify
- go get github.com/stvp/go-udp-testing
- go get github.com/tobi/airbrake-go
|
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 sparked by the TrustWave POS malware whitepaper available at https://gsr.trustwave.com/topics/placeholder-topic/point-of-sale-malware/.
###Workflow
1. A tester starts up a listener on one side of the monitoring system, specifying the exfiltration method.
2. The tester then starts up a sender on the other side of the monitoring system, specifying the data to transmit and the exfiltration method.
3. The sender then transmits the specified data to the listener while the tester attempts to see the data exfiltration using the monitoring system.
Modules
-------
* `dns_lookup` - Transmit data using DNS lookups as described here http://breenmachine.blogspot.ca/2014/09/transfer-file-over-dns-in-windows-with.html
* `ping_data` - Transmit data using ICMP ping packets with data as defined here http://blog.c22.cc/2012/02/17/quick-post-fun-with-python-ctypes-simpleicmp/
Options
-------
* `-d string` - Send a string of data.
* `-f filename` - Send the specified file.
* `-l port` - Listen for a connection on the specified port. If no port is give then use the default port for the module.
* `-m module_name` - Transmit data using the specified module.
* `-s server[:port]` - Server where data should be sent. If no port is specified, then use the default port for the module.
Usage
-----
Start a listener: exfil -l <port> -m module_name
Send a string of data: exfile -s server[:port] -d String_of_data -m module_name
Send a file: exfil -s server[:port] -f file_to_send -m module_name | 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 catch the exfiltration. The idea for Exfil came from a Twitter conversation between @averagesecguy, @ChrisJohnRiley, and @Ben0xA and was sparked by the TrustWave POS malware whitepaper available at https://gsr.trustwave.com/topics/placeholder-topic/point-of-sale-malware/.
###Workflow
1. A tester starts up a listener on one side of the monitoring system, specifying the exfiltration method.
2. The tester then starts up a sender on the other side of the monitoring system, specifying the data to transmit and the exfiltration method.
3. The sender then transmits the specified data to the listener while the tester attempts to see the data exfiltration using the monitoring system.
Modules
-------
* `dns_lookup` - Transmit data using DNS lookups as described here http://breenmachine.blogspot.ca/2014/09/transfer-file-over-dns-in-windows-with.html
* `ping_data` - Transmit data using ICMP ping packets with data as defined here http://blog.c22.cc/2012/02/17/quick-post-fun-with-python-ctypes-simpleicmp/
Options
-------
* `-d string` - Send a string of data.
* `-f filename` - Send the specified file.
* `-l port` - Listen for a connection on the specified port. If no port is give then use the default port for the module.
* `-m module_name` - Transmit data using the specified module.
* `-s server[:port]` - Server where data should be sent. If no port is specified, then use the default port for the module.
Usage
-----
Start a listener: exfil -l <port> -m module_name
Send a string of data: exfile -s server[:port] -d String_of_data -m module_name
Send a file: exfil -s server[:port] -f file_to_send -m module_name |
825e22c4e6679ff0af05ce6267f8c2568951a9dd | COMPLIANCE.md | COMPLIANCE.md |
3.21 Unix Requirements v1.2
+-------------+----------------------------------------------------------+
| Requirement | Configuration |
+=============+==========================================================+
| 6 | active by default |
+-------------+----------------------------------------------------------+
| 9 | active by default |
+-------------+----------------------------------------------------------+
| 11 | active by default |
+-------------+----------------------------------------------------------+
| 10 | active by default |
+-------------+----------------------------------------------------------+
| 14 | `['security']['suid_sgid']['remove_from_unkown'] = true` |
+-------------+----------------------------------------------------------+
| 16 | active by default |
+-------------+----------------------------------------------------------+
| 17 | active by default |
+-------------+----------------------------------------------------------+
3.01 Technical Baseline Security for IT/NT Systems
+-------------+-------------------+
| Requirement | Configuration |
+=============+===================+
| 21 | active by default |
+-------------+-------------------+
| 22 | 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 | active by default |
| 9 | active by default |
| 11 | active by default |
| 10 | active by default |
| 14 | `['security']['suid_sgid']['remove_from_unkown'] = true` |
| 16 | active by default |
| 17 | active by default |
#### 3.01 Technical Baseline Security for IT/NT Systems
| Requirement | Configuration |
|-------------|-------------------|
| 21 | active by default |
| 22 | active by default |
| 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/chef-os-hardening,hardening-io/chef-os-hardening,hardening-io/chef-os-hardening,waz128/os-hardening | markdown | ## Code Before:
3.21 Unix Requirements v1.2
+-------------+----------------------------------------------------------+
| Requirement | Configuration |
+=============+==========================================================+
| 6 | active by default |
+-------------+----------------------------------------------------------+
| 9 | active by default |
+-------------+----------------------------------------------------------+
| 11 | active by default |
+-------------+----------------------------------------------------------+
| 10 | active by default |
+-------------+----------------------------------------------------------+
| 14 | `['security']['suid_sgid']['remove_from_unkown'] = true` |
+-------------+----------------------------------------------------------+
| 16 | active by default |
+-------------+----------------------------------------------------------+
| 17 | active by default |
+-------------+----------------------------------------------------------+
3.01 Technical Baseline Security for IT/NT Systems
+-------------+-------------------+
| Requirement | Configuration |
+=============+===================+
| 21 | active by default |
+-------------+-------------------+
| 22 | active by default |
+-------------+-------------------+
## Instruction:
Fix formatting for GitHub-flavored Markdown
Formatting didn't work well with GitHub. Fixed now.
## Code After:
See reference documentation [here](http://www.telekom.com/static/-/155996/7/technische-sicherheitsanforderungen-si)
#### 3.21 Unix Requirements v1.2
| Requirement | Configuration |
|-------------|----------------------------------------------------------|
| 6 | active by default |
| 9 | active by default |
| 11 | active by default |
| 10 | active by default |
| 14 | `['security']['suid_sgid']['remove_from_unkown'] = true` |
| 16 | active by default |
| 17 | active by default |
#### 3.01 Technical Baseline Security for IT/NT Systems
| Requirement | Configuration |
|-------------|-------------------|
| 21 | active by default |
| 22 | 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
{
$userClass = config('genealabs-laravel-governor.models.auth');
return (new $userClass)
->get();
}
}
| <?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() : Collection
{
$userClass = config('genealabs-laravel-governor.models.auth');
return (new $userClass)
->get();
}
}
| 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
{
$userClass = config('genealabs-laravel-governor.models.auth');
return (new $userClass)
->get();
}
}
## Instruction:
Clarify use of empty construct method
## Code After:
<?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() : Collection
{
$userClass = config('genealabs-laravel-governor.models.auth');
return (new $userClass)
->get();
}
}
|
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
## Instruction:
Add node 9 testing to coverage
## Code After:
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
|
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 SERVICE_VERSION=$SERVICE_VERSION
# Build docker image
docker build -t $SERVICE_NAME .
# Tag docker container
docker tag $SERVICE_NAME:latest $DOCKER_REGISTRY:$SERVICE_VERSION
# Push to new tag to private Docker Registry
docker push $DOCKER_REGISTRY:$SERVICE_VERSION
# Remove cached hosts file
rm -f hosts
# Extract deployment servers and create Ansible hosts file
IFS=':'; servers=($SERVERS)
for server in "${servers[@]}"
do
echo "$server" >> hosts
done
# Deploy to servers
ansible-playbook -i hosts bin/deploy-playbook.yml
| 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.json").version)'`
SERVICE_VERSION="$SERVICE_VERSION-$GIT_COMMIT_HASH"
# Export version
export SERVICE_VERSION=$SERVICE_VERSION
# Build docker image
docker build -t $SERVICE_NAME .
# Tag docker container
docker tag $SERVICE_NAME:latest $DOCKER_REGISTRY:$SERVICE_VERSION
# Push to new tag to private Docker Registry
docker push $DOCKER_REGISTRY:$SERVICE_VERSION
# Remove cached hosts file
rm -f hosts
# Extract deployment servers and create Ansible hosts file
IFS=':'; servers=($SERVERS)
for server in "${servers[@]}"
do
echo "$server" >> hosts
done
# Deploy to servers
ansible-playbook -i hosts bin/deploy-playbook.yml
| 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 version
export SERVICE_VERSION=$SERVICE_VERSION
# Build docker image
docker build -t $SERVICE_NAME .
# Tag docker container
docker tag $SERVICE_NAME:latest $DOCKER_REGISTRY:$SERVICE_VERSION
# Push to new tag to private Docker Registry
docker push $DOCKER_REGISTRY:$SERVICE_VERSION
# Remove cached hosts file
rm -f hosts
# Extract deployment servers and create Ansible hosts file
IFS=':'; servers=($SERVERS)
for server in "${servers[@]}"
do
echo "$server" >> hosts
done
# Deploy to servers
ansible-playbook -i hosts bin/deploy-playbook.yml
## Instruction:
[INFRA] Add git commit version to build number
## Code After:
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.json").version)'`
SERVICE_VERSION="$SERVICE_VERSION-$GIT_COMMIT_HASH"
# Export version
export SERVICE_VERSION=$SERVICE_VERSION
# Build docker image
docker build -t $SERVICE_NAME .
# Tag docker container
docker tag $SERVICE_NAME:latest $DOCKER_REGISTRY:$SERVICE_VERSION
# Push to new tag to private Docker Registry
docker push $DOCKER_REGISTRY:$SERVICE_VERSION
# Remove cached hosts file
rm -f hosts
# Extract deployment servers and create Ansible hosts file
IFS=':'; servers=($SERVERS)
for server in "${servers[@]}"
do
echo "$server" >> hosts
done
# Deploy to servers
ansible-playbook -i hosts bin/deploy-playbook.yml
|
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]}, {}, class: 'form-control' %>
</div>
</div>
<div class='form-group'>
<div class='col-sm-4'>
<%= o.label :function, class: 'col-sm-2 control-label' %>
</div>
<div class='col-sm-8'>
<%= o.select :function, Output::FUNCTIONS.values, {}, class: 'form-control' %>
</div>
</div>
<div class='form-group'>
<div class='col-sm-4'>
<%= o.label :cycle_delay, class: 'col-sm-2 control-label' %>
</div>
<div class='col-sm-8'>
<%= o.text_field :cycle_delay, class: 'form-control' %>
</div>
</div>
| <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]}, {}, class: 'form-control' %>
</div>
</div>
<div class='form-group'>
<div class='col-sm-4'>
<%= o.label :function, class: 'col-sm-2 control-label' %>
</div>
<div class='col-sm-8'>
<%= o.select :function, Output::FUNCTIONS.values, {}, class: 'form-control' %>
</div>
</div>
<div class='form-group'>
<div class='col-sm-4'>
<%= o.label :cycle_delay, class: 'col-sm-2 control-label' %>
</div>
<div class='col-sm-8'>
<div class="input-group">
<%= o.text_field :cycle_delay, class: 'form-control' %>
<span class="input-group-addon">minutes</span>
</div>
</div>
</div>
| 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+1}", s.id]}, {}, class: 'form-control' %>
</div>
</div>
<div class='form-group'>
<div class='col-sm-4'>
<%= o.label :function, class: 'col-sm-2 control-label' %>
</div>
<div class='col-sm-8'>
<%= o.select :function, Output::FUNCTIONS.values, {}, class: 'form-control' %>
</div>
</div>
<div class='form-group'>
<div class='col-sm-4'>
<%= o.label :cycle_delay, class: 'col-sm-2 control-label' %>
</div>
<div class='col-sm-8'>
<%= o.text_field :cycle_delay, class: 'form-control' %>
</div>
</div>
## Instruction:
Add cycle delay input group hint.
## Code After:
<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]}, {}, class: 'form-control' %>
</div>
</div>
<div class='form-group'>
<div class='col-sm-4'>
<%= o.label :function, class: 'col-sm-2 control-label' %>
</div>
<div class='col-sm-8'>
<%= o.select :function, Output::FUNCTIONS.values, {}, class: 'form-control' %>
</div>
</div>
<div class='form-group'>
<div class='col-sm-4'>
<%= o.label :cycle_delay, class: 'col-sm-2 control-label' %>
</div>
<div class='col-sm-8'>
<div class="input-group">
<%= o.text_field :cycle_delay, class: 'form-control' %>
<span class="input-group-addon">minutes</span>
</div>
</div>
</div>
|
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:
for item in re.findall(r"'[^']*'+", expression, re.S):
retVal = retVal.replace(item, escaper(item[1:-1]))
else:
retVal = escaper(expression)
return retVal
@staticmethod
def escape(expression, quote=True):
errMsg = "'escape' method must be defined "
errMsg += "inside the specific DBMS plugin"
raise SqlmapUndefinedMethod(errMsg)
|
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:
for item in re.findall(r"'[^']*'+", expression, re.S):
_ = item[1:-1]
if _:
retVal = retVal.replace(item, escaper(_))
else:
retVal = escaper(expression)
return retVal
@staticmethod
def escape(expression, quote=True):
errMsg = "'escape' method must be defined "
errMsg += "inside the specific DBMS plugin"
raise SqlmapUndefinedMethod(errMsg)
| 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
if quote:
for item in re.findall(r"'[^']*'+", expression, re.S):
retVal = retVal.replace(item, escaper(item[1:-1]))
else:
retVal = escaper(expression)
return retVal
@staticmethod
def escape(expression, quote=True):
errMsg = "'escape' method must be defined "
errMsg += "inside the specific DBMS plugin"
raise SqlmapUndefinedMethod(errMsg)
## Instruction:
Fix for empty strings (previously '' was just removed)
## Code After:
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:
for item in re.findall(r"'[^']*'+", expression, re.S):
_ = item[1:-1]
if _:
retVal = retVal.replace(item, escaper(_))
else:
retVal = escaper(expression)
return retVal
@staticmethod
def escape(expression, quote=True):
errMsg = "'escape' method must be defined "
errMsg += "inside the specific DBMS plugin"
raise SqlmapUndefinedMethod(errMsg)
|
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)
- unless orders.present?
%p You have no purchased orders
| %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(':id', order.to_param)
- unless orders.present?
%p You have no purchased orders
| 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_summary(order)
- unless orders.present?
%p You have no purchased orders
## Instruction:
Clean up order history partial
## Code After:
%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(':id', order.to_param)
- unless orders.present?
%p You have no purchased orders
|
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/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ"
crossorigin="anonymous">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
<title>Bitterjug.com</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script src="Main.js"></script>
</head>
<body>
</body>
<script type="text/javascript">
Elm.Main.fullscreen()
</script>
<script>hljs.initHighlightingOnLoad();</script>
</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/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ"
crossorigin="anonymous">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
<title>Bitterjug.com</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script src="Main.js"></script>
</head>
<body>
</body>
<script>hljs.initHighlightingOnLoad();</script>
<script type="text/javascript">
Elm.Main.fullscreen()
</script>
</html>
| 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-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ"
crossorigin="anonymous">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
<title>Bitterjug.com</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script src="Main.js"></script>
</head>
<body>
</body>
<script type="text/javascript">
Elm.Main.fullscreen()
</script>
<script>hljs.initHighlightingOnLoad();</script>
</html>
## Instruction:
Load syntax coloring before runing elm
## Code After:
<!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/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ"
crossorigin="anonymous">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
<title>Bitterjug.com</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script src="Main.js"></script>
</head>
<body>
</body>
<script>hljs.initHighlightingOnLoad();</script>
<script type="text/javascript">
Elm.Main.fullscreen()
</script>
</html>
|
e2d61f9029586dab905ba65fcaf402f3b57c23d2 | app/mailers/newsletter_mailer.rb | app/mailers/newsletter_mailer.rb | class NewsletterMailer
default :from => "[email protected]"
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 => "[email protected]"
default :to => "[email protected]"
def newsletter_email()
@offers = Offer.actual.take(6)
mail(:subject => "Newsletter Dealhunter")
#mail(:to => client.user.email, :subject => "Newsletter Dealhunter")
end
end | 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 => "[email protected]"
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 NewsletterMailer < ActionMailer::Base
default :from => "[email protected]"
default :to => "[email protected]"
def newsletter_email()
@offers = Offer.actual.take(6)
mail(:subject => "Newsletter Dealhunter")
#mail(:to => client.user.email, :subject => "Newsletter Dealhunter")
end
end |
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|
%tr
%td
#{petition.title}
%td
= simple_format(petition.description)
%td.calign
= link_to('Show', petition)
%td.calign
= link_to('Edit', edit_petition_path(petition))
- if current_user && (current_user.is_super_user || current_user.is_admin)
%td.calign
=check_box_tag petition.to_send, petition.to_send, petition.to_send, :disabled => true
= link_to('Start a New Petition', new_petition_path, :class => 'btn btn-primary')
| %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|
%tr
%td
#{petition.title}
%td
= simple_format(petition.description)
%td.calign
= link_to('Show', petition)
%td.calign
= link_to('Edit', edit_petition_path(petition))
- if current_user && (current_user.is_super_user || current_user.is_admin)
%td.calign
=check_box_tag petition.to_send, petition.to_send, petition.to_send, :disabled => true
= link_to('Start a New Petition', new_petition_path, :class => 'btn btn-primary')
| 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 |petition|
%tr
%td
#{petition.title}
%td
= simple_format(petition.description)
%td.calign
= link_to('Show', petition)
%td.calign
= link_to('Edit', edit_petition_path(petition))
- if current_user && (current_user.is_super_user || current_user.is_admin)
%td.calign
=check_box_tag petition.to_send, petition.to_send, petition.to_send, :disabled => true
= link_to('Start a New Petition', new_petition_path, :class => 'btn btn-primary')
## Instruction:
Change Petition to Send label to Petition to Feature
## Code After:
%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|
%tr
%td
#{petition.title}
%td
= simple_format(petition.description)
%td.calign
= link_to('Show', petition)
%td.calign
= link_to('Edit', edit_petition_path(petition))
- if current_user && (current_user.is_super_user || current_user.is_admin)
%td.calign
=check_box_tag petition.to_send, petition.to_send, petition.to_send, :disabled => true
= link_to('Start a New Petition', new_petition_path, :class => 'btn btn-primary')
|
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))
link_to "<i class='#{icons[format]}'></i> #{format_translation}".html_safe,
alternate_url(:format => format),
:rel => 'alternate',
:type => Mime::EXTENSION_LOOKUP[format.to_s].to_s,
:class => "btn",
:title => "Get this in #{format_translation} format"
end
def alternate_auto_discovery_link_tag(format)
auto_discovery_link_tag(
:rel,
alternate_url(:format => format),
{
:title => t("formats.#{format}", :default => h(format)),
:type => Mime::EXTENSION_LOOKUP[format.to_s].to_s
}
)
end
def alternate_auto_discovery_link_tags
safe_join((@alternate_formats||[]).map { |f| alternate_auto_discovery_link_tag(f)})
end
def alternate_link_buttons
safe_join((@alternate_formats||[]).map { |f| alternate_button(f)})
end
end
end | 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_translation = t("formats.#{format}", :default => h(format))
link_to "<i class='#{icon}'></i> #{format_translation}".html_safe,
alternate_url(:format => format),
:rel => 'alternate',
:type => Mime::EXTENSION_LOOKUP[format.to_s].to_s,
:class => options[:class] || "btn",
:title => options[:text] || "Get this in #{format_translation} format"
end
def alternate_auto_discovery_link_tag(format)
auto_discovery_link_tag(
:rel,
alternate_url(:format => format),
{
:title => t("formats.#{format}", :default => h(format)),
:type => Mime::EXTENSION_LOOKUP[format.to_s].to_s
}
)
end
def alternate_auto_discovery_link_tags
safe_join((@alternate_formats||[]).map { |f| alternate_auto_discovery_link_tag(f)})
end
def alternate_link_buttons(options)
safe_join((@alternate_formats||[]).map { |f| alternate_button(f, options)})
end
end
end | 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 => h(format))
link_to "<i class='#{icons[format]}'></i> #{format_translation}".html_safe,
alternate_url(:format => format),
:rel => 'alternate',
:type => Mime::EXTENSION_LOOKUP[format.to_s].to_s,
:class => "btn",
:title => "Get this in #{format_translation} format"
end
def alternate_auto_discovery_link_tag(format)
auto_discovery_link_tag(
:rel,
alternate_url(:format => format),
{
:title => t("formats.#{format}", :default => h(format)),
:type => Mime::EXTENSION_LOOKUP[format.to_s].to_s
}
)
end
def alternate_auto_discovery_link_tags
safe_join((@alternate_formats||[]).map { |f| alternate_auto_discovery_link_tag(f)})
end
def alternate_link_buttons
safe_join((@alternate_formats||[]).map { |f| alternate_button(f)})
end
end
end
## Instruction:
Add options for view helper
## Code After:
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_translation = t("formats.#{format}", :default => h(format))
link_to "<i class='#{icon}'></i> #{format_translation}".html_safe,
alternate_url(:format => format),
:rel => 'alternate',
:type => Mime::EXTENSION_LOOKUP[format.to_s].to_s,
:class => options[:class] || "btn",
:title => options[:text] || "Get this in #{format_translation} format"
end
def alternate_auto_discovery_link_tag(format)
auto_discovery_link_tag(
:rel,
alternate_url(:format => format),
{
:title => t("formats.#{format}", :default => h(format)),
:type => Mime::EXTENSION_LOOKUP[format.to_s].to_s
}
)
end
def alternate_auto_discovery_link_tags
safe_join((@alternate_formats||[]).map { |f| alternate_auto_discovery_link_tag(f)})
end
def alternate_link_buttons(options)
safe_join((@alternate_formats||[]).map { |f| alternate_button(f, options)})
end
end
end |
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 "$PSScriptRoot\docs-generated" "$PSScriptRoot\temp" $username $password -Buildserver:$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 "$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-GitBook "$PSScriptRoot\docs-generated" "$PSScriptRoot\temp" $username $password -Buildserver:$Buildserver
## Instruction:
Remove auth params for doc generation
Authentication and repo management should be moved to another script...
## Code After:
$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" |
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: '{{ states.input_select.harmony.state }}'
- alias: "Harmony Update Activity Select"
trigger:
- platform: state
entity_id: sensor.living_room_tv
action:
- service: notify.ios_dphone
data:
message: '{{ states.sensor.living_room_tv.state }}'
- service: input_select.select_option
data_template:
entity_id: input_select.living_room
option: '{{ states.sensor.living_room_tv.state }}'
| - 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
activity: '{{ states.input_select.living_room_tv.state }}'
- alias: "Harmony Update Activity Select"
trigger:
- platform: state
entity_id: sensor.living_room_tv
action:
- service: notify.ios_dphone
data:
message: '{{ states.sensor.living_room_tv.state }}'
- service: input_select.select_option
data_template:
entity_id: input_select.living_room
option: '{{ states.sensor.living_room_tv.state }}'
| 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
activity: '{{ states.input_select.harmony.state }}'
- alias: "Harmony Update Activity Select"
trigger:
- platform: state
entity_id: sensor.living_room_tv
action:
- service: notify.ios_dphone
data:
message: '{{ states.sensor.living_room_tv.state }}'
- service: input_select.select_option
data_template:
entity_id: input_select.living_room
option: '{{ states.sensor.living_room_tv.state }}'
## Instruction:
Fix to harony update automation
## Code After:
- 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
activity: '{{ states.input_select.living_room_tv.state }}'
- alias: "Harmony Update Activity Select"
trigger:
- platform: state
entity_id: sensor.living_room_tv
action:
- service: notify.ios_dphone
data:
message: '{{ states.sensor.living_room_tv.state }}'
- service: input_select.select_option
data_template:
entity_id: input_select.living_room
option: '{{ states.sensor.living_room_tv.state }}'
|
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", "pl", "he", "fr"],});
| 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", "ru", "ca", "ja", "pl", "he", "fr"],});
## Instruction:
Select all blocks with the same selector for speed
## Code After:
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"],});
|
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[:platform_version].start_with?('5.')
default['wkhtmltox']['release'] = "centos5"
default['wkhtmltox']['options'] = "--nogpgcheck"
end
end
default['wkhtmltox']['version'] = "0.12.1"
wk = node['wkhtmltox']
if wk['version'] && wk['release'] && wk['arch']
default['wkhtmltox']['package_file'] = "wkhtmltox-#{wk['version']}_linux-#{wk['release']}-#{wk['arch']}.rpm"
end
| 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['wkhtmltox']['release'] = "centos6"
end
if node[:platform_version].start_with?('5.')
default['wkhtmltox']['release'] = "centos5"
default['wkhtmltox']['options'] = "--nogpgcheck"
end
end
default['wkhtmltox']['version'] = "0.12.1"
wk = node['wkhtmltox']
if wk['version'] && wk['release'] && wk['arch']
default['wkhtmltox']['package_file'] = "wkhtmltox-#{wk['version']}_linux-#{wk['release']}-#{wk['arch']}.rpm"
end
| 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
if node[:platform_version].start_with?('5.')
default['wkhtmltox']['release'] = "centos5"
default['wkhtmltox']['options'] = "--nogpgcheck"
end
end
default['wkhtmltox']['version'] = "0.12.1"
wk = node['wkhtmltox']
if wk['version'] && wk['release'] && wk['arch']
default['wkhtmltox']['package_file'] = "wkhtmltox-#{wk['version']}_linux-#{wk['release']}-#{wk['arch']}.rpm"
end
## Instruction:
Add comment about amazon linux
## Code After:
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['wkhtmltox']['release'] = "centos6"
end
if node[:platform_version].start_with?('5.')
default['wkhtmltox']['release'] = "centos5"
default['wkhtmltox']['options'] = "--nogpgcheck"
end
end
default['wkhtmltox']['version'] = "0.12.1"
wk = node['wkhtmltox']
if wk['version'] && wk['release'] && wk['arch']
default['wkhtmltox']['package_file'] = "wkhtmltox-#{wk['version']}_linux-#{wk['release']}-#{wk['arch']}.rpm"
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: 1.34.0
script: cargo check
- rust: nightly
name: Clippy
script:
- rustup component add clippy || travis_terminate 0
- cargo clippy -- -Dclippy::all
|
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." />
<meta charset="utf-8" />
<!-- favicon -->
<meta name="msapplication-TileImage" content="/favicons/[email protected]" />
<meta property="og:image" content="/favicons/[email protected]" />
<link rel="apple-touch-icon" type="image/x-icon" href="/favicons/[email protected]" sizes="129x128" />
<link rel="icon" type="image/x-icon" href="/favicons/[email protected]" sizes="129x128" />
<link rel="stylesheet" type="text/css" href="/css/api-reference.css" />
</head>
<body>
<redoc spec-url="/engine/api/{{ page.name | replace: '.md'}}.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="/js/redoc.min.js"></script>
</body>
</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." />
<meta charset="utf-8" />
<!-- favicon -->
<meta name="msapplication-TileImage" content="/favicons/[email protected]" />
<meta property="og:image" content="/favicons/[email protected]" />
<link rel="apple-touch-icon" type="image/x-icon" href="/favicons/[email protected]" sizes="129x128" />
<link rel="icon" type="image/x-icon" href="/favicons/[email protected]" sizes="129x128" />
<link rel="stylesheet" type="text/css" href="/css/api-reference.css" />
<!-- make the latest API version the canonical page as that's what we want users to be using mostly -->
<link rel="canonical" href="/engine/api/v{{ site.latest_engine_api_version }}/" />
</head>
<body>
<redoc spec-url="/engine/api/{{ page.name | replace: '.md'}}.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="/js/redoc.min.js"></script>
</body>
</html>
| 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 points
it to the latest version of the API.
Note that there's also a /engine/api/latest/ page, but I didn't pick that
URL, because it's a redirect to `/engine/api/v<current>/`, which Google
probably doesn't like.
Signed-off-by: Sebastiaan van Stijn <[email protected]>
| 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 Engine." />
<meta charset="utf-8" />
<!-- favicon -->
<meta name="msapplication-TileImage" content="/favicons/[email protected]" />
<meta property="og:image" content="/favicons/[email protected]" />
<link rel="apple-touch-icon" type="image/x-icon" href="/favicons/[email protected]" sizes="129x128" />
<link rel="icon" type="image/x-icon" href="/favicons/[email protected]" sizes="129x128" />
<link rel="stylesheet" type="text/css" href="/css/api-reference.css" />
</head>
<body>
<redoc spec-url="/engine/api/{{ page.name | replace: '.md'}}.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="/js/redoc.min.js"></script>
</body>
</html>
## Instruction:
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 points
it to the latest version of the API.
Note that there's also a /engine/api/latest/ page, but I didn't pick that
URL, because it's a redirect to `/engine/api/v<current>/`, which Google
probably doesn't like.
Signed-off-by: Sebastiaan van Stijn <[email protected]>
## Code After:
<!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." />
<meta charset="utf-8" />
<!-- favicon -->
<meta name="msapplication-TileImage" content="/favicons/[email protected]" />
<meta property="og:image" content="/favicons/[email protected]" />
<link rel="apple-touch-icon" type="image/x-icon" href="/favicons/[email protected]" sizes="129x128" />
<link rel="icon" type="image/x-icon" href="/favicons/[email protected]" sizes="129x128" />
<link rel="stylesheet" type="text/css" href="/css/api-reference.css" />
<!-- make the latest API version the canonical page as that's what we want users to be using mostly -->
<link rel="canonical" href="/engine/api/v{{ site.latest_engine_api_version }}/" />
</head>
<body>
<redoc spec-url="/engine/api/{{ page.name | replace: '.md'}}.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="/js/redoc.min.js"></script>
</body>
</html>
|
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,BufRead *.js set expandtab
autocmd BufNewFile,BufRead *.json set expandtab
" assembly indentation
autocmd BufNewFile,BufRead *.s call SetAsmOptions()
autocmd BufNewFile,BufRead *.as call SetAsmOptions()
autocmd BufNewFile,BufRead *.asm call SetAsmOptions()
function SetAsmOptions()
setlocal tabstop=8
hi SpecialKey cterm=none ctermbg=none ctermfg=bg
endfunction
" whitespace highlighting
if !(&filetype == "txt")
set list " show special characters
set listchars=tab:→\ ,trail:·,extends:>,precedes:<,nbsp:‥
endif
| " 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
setlocal commentstring=#\ %s
setlocal expandtab
endfunction
" js indentation
autocmd BufNewFile,BufRead *.coffee set expandtab
autocmd BufNewFile,BufRead *.js set expandtab
autocmd BufNewFile,BufRead *.json set expandtab
" assembly indentation
autocmd BufNewFile,BufRead *.s call SetAsmOptions()
autocmd BufNewFile,BufRead *.as call SetAsmOptions()
autocmd BufNewFile,BufRead *.asm call SetAsmOptions()
function SetAsmOptions()
setlocal tabstop=8
setlocal nolist
endfunction
| 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 BufNewFile,BufRead *.js set expandtab
autocmd BufNewFile,BufRead *.json set expandtab
" assembly indentation
autocmd BufNewFile,BufRead *.s call SetAsmOptions()
autocmd BufNewFile,BufRead *.as call SetAsmOptions()
autocmd BufNewFile,BufRead *.asm call SetAsmOptions()
function SetAsmOptions()
setlocal tabstop=8
hi SpecialKey cterm=none ctermbg=none ctermfg=bg
endfunction
" whitespace highlighting
if !(&filetype == "txt")
set list " show special characters
set listchars=tab:→\ ,trail:·,extends:>,precedes:<,nbsp:‥
endif
## Instruction:
Fix foreground in asm highlighting
## Code After:
" 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
setlocal commentstring=#\ %s
setlocal expandtab
endfunction
" js indentation
autocmd BufNewFile,BufRead *.coffee set expandtab
autocmd BufNewFile,BufRead *.js set expandtab
autocmd BufNewFile,BufRead *.json set expandtab
" assembly indentation
autocmd BufNewFile,BufRead *.s call SetAsmOptions()
autocmd BufNewFile,BufRead *.as call SetAsmOptions()
autocmd BufNewFile,BufRead *.asm call SetAsmOptions()
function SetAsmOptions()
setlocal tabstop=8
setlocal nolist
endfunction
|
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.
* Removed "log-file" option, all errors now direct to STDERR.
### Testing
* Combined test coverage is now at 97.048%.
* Race detector enabled.
* Additional system smoke test added for Command Log which generates 1k jobs, restarts workq-server, and verifies all expected jobs.
## 0.1.0
2016-08-23
First! Initial release.
|
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.
* "run" commands did not always clean the completed job up after command returns.
* Fixed "lease" timeout priority and accuracy for lower timeouts (e.g. 10ms).
* 10ms timeouts would return a -TIMEOUT intermittently even if there is a job available.
* Removed "log-file" option, all errors now direct to STDERR.
### Testing
* Combined test coverage is now at 97.048%.
* Race detector enabled.
* Additional system smoke test added for Command Log which generates 1k jobs, restarts workq-server, and verifies all expected jobs.
## 0.1.0
2016-08-23
First! Initial release.
| 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 successful execution.
* Removed "log-file" option, all errors now direct to STDERR.
### Testing
* Combined test coverage is now at 97.048%.
* Race detector enabled.
* Additional system smoke test added for Command Log which generates 1k jobs, restarts workq-server, and verifies all expected jobs.
## 0.1.0
2016-08-23
First! Initial release.
## Instruction:
Add additional 0.2.0 release bug fix notes.
## Code After:
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.
* "run" commands did not always clean the completed job up after command returns.
* Fixed "lease" timeout priority and accuracy for lower timeouts (e.g. 10ms).
* 10ms timeouts would return a -TIMEOUT intermittently even if there is a job available.
* Removed "log-file" option, all errors now direct to STDERR.
### Testing
* Combined test coverage is now at 97.048%.
* Race detector enabled.
* Additional system smoke test added for Command Log which generates 1k jobs, restarts workq-server, and verifies all expected jobs.
## 0.1.0
2016-08-23
First! Initial release.
|
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.info "STATS: #{change.pp}"
end
class Measurement < Struct.new(:time, :memory, :objects, :gc_runs, :gc_time)
PP_FORMAT = '%d ms, %.2f KB, %d obj, %d GCs in %d ms'.freeze
def self.change_since(before)
measure - before
end
def self.measure
new(Time.now.to_f,
GC.allocated_size, ObjectSpace.allocated_objects,
GC.collections, GC.time)
end
def -(other)
self.class.new(time - other.time,
memory - other.memory, objects - other.objects,
gc_runs - other.gc_runs, gc_time - other.gc_time)
end
def pp
PP_FORMAT % [time * 1000,
memory / 1024.0, objects,
gc_runs, gc_time / 1000.0]
end
end
end
end
| 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.now - before
Rails.logger.info(LOG_MESSAGE % [change.to_s,
headers['Status'].to_s, (complete_request_uri rescue 'unknown')])
end
class Measurement < Struct.new(:time, :memory, :objects, :gc_runs, :gc_time)
PP_FORMAT = '%d ms, %.2f KB, %d obj, %d GCs in %d ms'.freeze
def self.now
new(Time.now.to_f,
GC.allocated_size, ObjectSpace.allocated_objects,
GC.collections, GC.time)
end
def -(other)
self.class.new(time - other.time,
memory - other.memory, objects - other.objects,
gc_runs - other.gc_runs, gc_time - other.gc_time)
end
def to_s
PP_FORMAT % [time * 1000,
memory / 1024.0, objects,
gc_runs, gc_time / 1000.0]
end
end
end
end
| 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)
Rails.logger.info "STATS: #{change.pp}"
end
class Measurement < Struct.new(:time, :memory, :objects, :gc_runs, :gc_time)
PP_FORMAT = '%d ms, %.2f KB, %d obj, %d GCs in %d ms'.freeze
def self.change_since(before)
measure - before
end
def self.measure
new(Time.now.to_f,
GC.allocated_size, ObjectSpace.allocated_objects,
GC.collections, GC.time)
end
def -(other)
self.class.new(time - other.time,
memory - other.memory, objects - other.objects,
gc_runs - other.gc_runs, gc_time - other.gc_time)
end
def pp
PP_FORMAT % [time * 1000,
memory / 1024.0, objects,
gc_runs, gc_time / 1000.0]
end
end
end
end
## Instruction:
Include request status and uri on the stats line for easy tracking
## Code After:
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.now - before
Rails.logger.info(LOG_MESSAGE % [change.to_s,
headers['Status'].to_s, (complete_request_uri rescue 'unknown')])
end
class Measurement < Struct.new(:time, :memory, :objects, :gc_runs, :gc_time)
PP_FORMAT = '%d ms, %.2f KB, %d obj, %d GCs in %d ms'.freeze
def self.now
new(Time.now.to_f,
GC.allocated_size, ObjectSpace.allocated_objects,
GC.collections, GC.time)
end
def -(other)
self.class.new(time - other.time,
memory - other.memory, objects - other.objects,
gc_runs - other.gc_runs, gc_time - other.gc_time)
end
def to_s
PP_FORMAT % [time * 1000,
memory / 1024.0, objects,
gc_runs, gc_time / 1000.0]
end
end
end
end
|
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: $tercery-color
.fix-padding-left
padding-right: 20px
.fix-padding-right
padding-left: 20px
.lower-footer
p
font-size: 12px
text-align: right
margin-bottom: 0
| .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
.letter-esperluette
color: $secondary-color
font-size: 8px
.letter-r
color: $tercery-color
font-size: 8px
.fix-padding-left
padding-right: 20px
.fix-padding-right
padding-left: 20px
.lower-footer
p
font-size: 12px
text-align: right
margin-bottom: 0
| 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-r
color: $tercery-color
.fix-padding-left
padding-right: 20px
.fix-padding-right
padding-left: 20px
.lower-footer
p
font-size: 12px
text-align: right
margin-bottom: 0
## Instruction:
Add white background for initials letters in mailer footer
## Code After:
.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
.letter-esperluette
color: $secondary-color
font-size: 8px
.letter-r
color: $tercery-color
font-size: 8px
.fix-padding-left
padding-right: 20px
.fix-padding-right
padding-left: 20px
.lower-footer
p
font-size: 12px
text-align: right
margin-bottom: 0
|
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 purposely crashed me :("
end
end
class TestApplication < Celluloid::Application
supervise DCell::Application
supervise TestActor, :as => :test_actor
end
TestApplication.run
|
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 purposely crashed me :("
end
end
class TestGroup < Celluloid::Group
supervise DCell::Group
supervise TestActor, :as => :test_actor
end
TestGroup.run
| 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
raise "the spec purposely crashed me :("
end
end
class TestApplication < Celluloid::Application
supervise DCell::Application
supervise TestActor, :as => :test_actor
end
TestApplication.run
## Instruction:
Use Celluloid::Group for defining the test node
## Code After:
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 purposely crashed me :("
end
end
class TestGroup < Celluloid::Group
supervise DCell::Group
supervise TestActor, :as => :test_actor
end
TestGroup.run
|
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/3.3.4/js/bootstrap.min.js"></script>
</head>
<body>
<header class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand"
href="https://github.com/lowsky/dashboard/">Dashboard</a>
</div>
</div>
</header>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">Main</div>
<div class="panel-body">This area should be filled with the data, later...</div>
</div>
</div>
</body>
</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/3.3.4/js/bootstrap.min.js"></script>
</head>
<body>
<header class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand"
href="https://github.com/lowsky/dashboard/">Dashboard</a>
</div>
</div>
</header>
<div class="container-fluid">
<div class="panel panel-default">
<div class="panel-heading">
<h1>Main</h1>
</div>
<div class="panel-body">
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Git branch</th>
</tr>
</thead>
<tbody>
<tr class="warning">
<td>dockerize</td>
</tr>
<tr class="warning">
<td>show-dummy-branches</td>
</tr>
<tr class="warning">
<td>simple-web-app</td>
</tr>
<tr class="warning">
<td>master</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html> | 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.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
</head>
<body>
<header class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand"
href="https://github.com/lowsky/dashboard/">Dashboard</a>
</div>
</div>
</header>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">Main</div>
<div class="panel-body">This area should be filled with the data, later...</div>
</div>
</div>
</body>
</html>
## Instruction:
Add some dummy entries to branch list
## Code After:
<!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/3.3.4/js/bootstrap.min.js"></script>
</head>
<body>
<header class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand"
href="https://github.com/lowsky/dashboard/">Dashboard</a>
</div>
</div>
</header>
<div class="container-fluid">
<div class="panel panel-default">
<div class="panel-heading">
<h1>Main</h1>
</div>
<div class="panel-body">
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Git branch</th>
</tr>
</thead>
<tbody>
<tr class="warning">
<td>dockerize</td>
</tr>
<tr class="warning">
<td>show-dummy-branches</td>
</tr>
<tr class="warning">
<td>simple-web-app</td>
</tr>
<tr class="warning">
<td>master</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html> |
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)
names.each do |helper_method_name|
aliased_target, punctuation = helper_method_name.to_s.sub(/([?!=])$/, ''), $1
module_eval <<-END
def #{aliased_target}_with_xss_safety#{punctuation}(*args, &block)
raw(#{aliased_target}_without_xss_safety#{punctuation}(*args, &block))
end
END
alias_method_chain helper_method_name, :xss_safety
end
end
end
end | 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 << '@output_buffer << ((' << code << ').to_s);'
end
def add_expr_escaped(src, code)
src << '@output_buffer << ' << escaped_expr(code) << ';'
end
def add_postamble(src)
src << '@output_buffer.to_s'
end
end
module SafeHelpers
def safe_helper(*names)
names.each do |helper_method_name|
aliased_target, punctuation = helper_method_name.to_s.sub(/([?!=])$/, ''), $1
module_eval <<-END
def #{aliased_target}_with_xss_safety#{punctuation}(*args, &block)
raw(#{aliased_target}_without_xss_safety#{punctuation}(*args, &block))
end
END
alias_method_chain helper_method_name, :xss_safety
end
end
end
end | 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(*names)
names.each do |helper_method_name|
aliased_target, punctuation = helper_method_name.to_s.sub(/([?!=])$/, ''), $1
module_eval <<-END
def #{aliased_target}_with_xss_safety#{punctuation}(*args, &block)
raw(#{aliased_target}_without_xss_safety#{punctuation}(*args, &block))
end
END
alias_method_chain helper_method_name, :xss_safety
end
end
end
end
## Instruction:
Switch everything over to @output_buffer rather than _buf"
git st
"
## Code After:
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 << '@output_buffer << ((' << code << ').to_s);'
end
def add_expr_escaped(src, code)
src << '@output_buffer << ' << escaped_expr(code) << ';'
end
def add_postamble(src)
src << '@output_buffer.to_s'
end
end
module SafeHelpers
def safe_helper(*names)
names.each do |helper_method_name|
aliased_target, punctuation = helper_method_name.to_s.sub(/([?!=])$/, ''), $1
module_eval <<-END
def #{aliased_target}_with_xss_safety#{punctuation}(*args, &block)
raw(#{aliased_target}_without_xss_safety#{punctuation}(*args, &block))
end
END
alias_method_chain helper_method_name, :xss_safety
end
end
end
end |
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@11a529e29af8e785ff347eb89861a4ef47454c86
git+git://github.com/sloonz/pil-py3k.git
git+git://github.com/adamlwgriffiths/Pyrr.git@d4978c76bdadd77fa263e0471ee13840c27f000d
|
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} $(FileNameUtil getPath win ${path}) D:/foo/bar
}
@test
testGetPathPreserveNixPath(){
local path="/d/foo/bar"
${assertEquals} ${path} $(FileNameUtil getPath nix ${path})
}
@test
testGetPathPreserveWinPath(){
local path="D:/foo/bar"
${assertEquals} ${path} $(FileNameUtil getPath win ${path})
}
local assertEquals="TestUtil assertEquals"
$@
} | 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} $(FileNameUtil _getPathWin ${path}) D:/foo/bar
}
@test
testGetPathPreserveNixPath(){
local path="/d/foo/bar"
${assertEquals} ${path} $(FileNameUtil _getPathUnix ${path})
}
@test
testGetPathPreserveWinPath(){
local path="D:/foo/bar"
${assertEquals} ${path} $(FileNameUtil _getPathWin ${path})
}
local assertEquals="TestUtil assertEquals"
$@
} | 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"
${assertEquals} $(FileNameUtil getPath win ${path}) D:/foo/bar
}
@test
testGetPathPreserveNixPath(){
local path="/d/foo/bar"
${assertEquals} ${path} $(FileNameUtil getPath nix ${path})
}
@test
testGetPathPreserveWinPath(){
local path="D:/foo/bar"
${assertEquals} ${path} $(FileNameUtil getPath win ${path})
}
local assertEquals="TestUtil assertEquals"
$@
}
## Instruction:
Test using helper methods instead
## Code After:
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} $(FileNameUtil _getPathWin ${path}) D:/foo/bar
}
@test
testGetPathPreserveNixPath(){
local path="/d/foo/bar"
${assertEquals} ${path} $(FileNameUtil _getPathUnix ${path})
}
@test
testGetPathPreserveWinPath(){
local path="D:/foo/bar"
${assertEquals} ${path} $(FileNameUtil _getPathWin ${path})
}
local assertEquals="TestUtil assertEquals"
$@
} |
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(account)
Redis.current.del("account:#{account.id}:regeneration")
end
end
|
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 package needs to function
* @return void
*/
public function boot()
{
$config = realpath(__DIR__.'/../resources/config/codepen.php');
$this->publishes([
$config => config_path('codepen.php')
]);
}
/**
* Register the application services
* @return void
*/
public function register()
{
$this->app->bind('laravel-codepen', function(){
return new CodepenManager;
});
}
/**
* Get the services provided by the provider
* @return array
*/
public function provides()
{
return ['laravel-codepen'];
}
} | <?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
* @return void
*/
public function register()
{
$this->app->bind('laravel-codepen', function(){
return new CodepenManager;
});
}
/**
* Get the services provided by the provider
* @return array
*/
public function provides()
{
return ['laravel-codepen'];
}
} | 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 config file this package needs to function
* @return void
*/
public function boot()
{
$config = realpath(__DIR__.'/../resources/config/codepen.php');
$this->publishes([
$config => config_path('codepen.php')
]);
}
/**
* Register the application services
* @return void
*/
public function register()
{
$this->app->bind('laravel-codepen', function(){
return new CodepenManager;
});
}
/**
* Get the services provided by the provider
* @return array
*/
public function provides()
{
return ['laravel-codepen'];
}
}
## Instruction:
[laravel-codepen] Remove boot method from service provider
## Code After:
<?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
* @return void
*/
public function register()
{
$this->app->bind('laravel-codepen', function(){
return new CodepenManager;
});
}
/**
* Get the services provided by the provider
* @return array
*/
public function provides()
{
return ['laravel-codepen'];
}
} |
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 @issue, html: {class: "guided navigate-away-warning", multipart: true} do |f|
= render "form", f: f
%h2=t ".start_discussion"
%p
%label
= f.check_box("start_discussion", {checked: true})
= t(".start_discussion")
%br
%p
%br
%i= simple_format t ".new_hint"
%div{data: "start-discussion-form"}
= f.semantic_fields_for :threads do |ft|
= render "shared/message_thread_form", f: ft, thread_dom_prefix: "issue_threads_attributes_0"
= f.actions do
= f.action :submit, button_html: {class: "btn-green submit", data: { disable_with: t("formtastic.actions.saving"), start_discussion: t("formtastic.actions.issue.create"), no_discussion: t(".no_discussion_create") }}
| %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 @issue, html: {class: "guided navigate-away-warning", multipart: true} do |f|
= render "form", f: f
%h2=t ".start_discussion"
%p
%label
= f.check_box("start_discussion", {checked: true})
= t(".start_discussion")
%br
%div{data: "start-discussion-form"}
%br
%i= simple_format t ".new_hint"
= f.semantic_fields_for :threads do |ft|
= render "shared/message_thread_form", f: ft, thread_dom_prefix: "issue_threads_attributes_0"
= f.actions do
= f.action :submit, button_html: {class: "btn-green submit", data: { disable_with: t("formtastic.actions.saving"), start_discussion: t("formtastic.actions.issue.create"), no_discussion: t(".no_discussion_create") }}
| 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)
= semantic_form_for @issue, html: {class: "guided navigate-away-warning", multipart: true} do |f|
= render "form", f: f
%h2=t ".start_discussion"
%p
%label
= f.check_box("start_discussion", {checked: true})
= t(".start_discussion")
%br
%p
%br
%i= simple_format t ".new_hint"
%div{data: "start-discussion-form"}
= f.semantic_fields_for :threads do |ft|
= render "shared/message_thread_form", f: ft, thread_dom_prefix: "issue_threads_attributes_0"
= f.actions do
= f.action :submit, button_html: {class: "btn-green submit", data: { disable_with: t("formtastic.actions.saving"), start_discussion: t("formtastic.actions.issue.create"), no_discussion: t(".no_discussion_create") }}
## Instruction:
Hide thread hint along with thread form
When are not starting a discussion hide the hint also.
Fixes #922
## Code After:
%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 @issue, html: {class: "guided navigate-away-warning", multipart: true} do |f|
= render "form", f: f
%h2=t ".start_discussion"
%p
%label
= f.check_box("start_discussion", {checked: true})
= t(".start_discussion")
%br
%div{data: "start-discussion-form"}
%br
%i= simple_format t ".new_hint"
= f.semantic_fields_for :threads do |ft|
= render "shared/message_thread_form", f: ft, thread_dom_prefix: "issue_threads_attributes_0"
= f.actions do
= f.action :submit, button_html: {class: "btn-green submit", data: { disable_with: t("formtastic.actions.saving"), start_discussion: t("formtastic.actions.issue.create"), no_discussion: t(".no_discussion_create") }}
|
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:00+00: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 facilisis neque a porttitor vestibulum. Nam bibendum orci quis lorem rhoncus, quis mattis lorem auctor. Duis euismod sagittis nunc ac placerat."
},
{
"title": "Front End Developer",
"company": "Big Co.",
"startDate": "2015-03-01T00:00:00+00:00",
"endDate": "2016-01-01T00:00:00+00:00",
"description": "Donec sed orci rhoncus, egestas augue a, pharetra augue. Donec ac erat nulla. Quisque nec interdum purus. Nullam tempor neque nibh, at bibendum nunc facilisis auctor. Curabitur a massa leo. Duis eget orci eu nunc malesuada luctus."
}
]
} | 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": "2016-01-01T00:00:00+00:00"
}
]
}
## Instruction:
Add description field to job data
## Code After:
{
"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 facilisis neque a porttitor vestibulum. Nam bibendum orci quis lorem rhoncus, quis mattis lorem auctor. Duis euismod sagittis nunc ac placerat."
},
{
"title": "Front End Developer",
"company": "Big Co.",
"startDate": "2015-03-01T00:00:00+00:00",
"endDate": "2016-01-01T00:00:00+00:00",
"description": "Donec sed orci rhoncus, egestas augue a, pharetra augue. Donec ac erat nulla. Quisque nec interdum purus. Nullam tempor neque nibh, at bibendum nunc facilisis auctor. Curabitur a massa leo. Duis eget orci eu nunc malesuada luctus."
}
]
} |
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.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://api-platform.com/schema/metadata https://api-platform.com/schema/metadata/metadata-2.5.xsd"
>
<resource class="Sylius\Bundle\ApiBundle\Command\RegisterShopUser" shortName="RegisterShopUser">
<attribute name="route_prefix">shop</attribute>
<attribute name="messenger">true</attribute>
<attribute name="output">false</attribute>
<attribute name="validation_groups">sylius</attribute>
<collectionOperations>
<collectionOperation name="post">
<attribute name="path">/register</attribute>
<attribute name="openapi_context">
<attribute name="summary">Registers a shop user</attribute>
</attribute>
<attribute name="validation_groups">
<attribute>sylius</attribute>
</attribute>
</collectionOperation>
</collectionOperations>
<itemOperations />
<property name="firstName" required="true" />
<property name="lastName" required="true" />
<property name="email" required="true" />
<property name="password" required="true" />
</resource>
</resources>
| <?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.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://api-platform.com/schema/metadata https://api-platform.com/schema/metadata/metadata-2.5.xsd"
>
<resource class="Sylius\Bundle\ApiBundle\Command\RegisterShopUser" shortName="RegisterShopUser">
<attribute name="route_prefix">shop</attribute>
<attribute name="messenger">true</attribute>
<attribute name="output">false</attribute>
<attribute name="validation_groups">sylius</attribute>
<collectionOperations>
<collectionOperation name="post">
<attribute name="path">/register</attribute>
<attribute name="openapi_context">
<attribute name="summary">Registers a shop user</attribute>
</attribute>
<attribute name="validation_groups">
<attribute>sylius</attribute>
</attribute>
</collectionOperation>
</collectionOperations>
<itemOperations />
<property name="firstName" required="true" />
<property name="lastName" required="true" />
<property name="email" required="true" identifier="true" />
<property name="password" required="true" />
</resource>
</resources>
| 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,SyliusBot/Sylius,SyliusBot/Sylius,GSadee/Sylius,antonioperic/Sylius,Zales0123/Sylius,kayue/Sylius,loic425/Sylius,GSadee/Sylius,101medialab/Sylius,diimpp/Sylius,kayue/Sylius,101medialab/Sylius,pamil/Sylius,lchrusciel/Sylius,Sylius/Sylius,Sylius/Sylius | 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:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://api-platform.com/schema/metadata https://api-platform.com/schema/metadata/metadata-2.5.xsd"
>
<resource class="Sylius\Bundle\ApiBundle\Command\RegisterShopUser" shortName="RegisterShopUser">
<attribute name="route_prefix">shop</attribute>
<attribute name="messenger">true</attribute>
<attribute name="output">false</attribute>
<attribute name="validation_groups">sylius</attribute>
<collectionOperations>
<collectionOperation name="post">
<attribute name="path">/register</attribute>
<attribute name="openapi_context">
<attribute name="summary">Registers a shop user</attribute>
</attribute>
<attribute name="validation_groups">
<attribute>sylius</attribute>
</attribute>
</collectionOperation>
</collectionOperations>
<itemOperations />
<property name="firstName" required="true" />
<property name="lastName" required="true" />
<property name="email" required="true" />
<property name="password" required="true" />
</resource>
</resources>
## Instruction:
Fix no identifier defined error in ApiPlatform 2.6
Caused by this change https://github.com/api-platform/core/pull/3871
## Code After:
<?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.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://api-platform.com/schema/metadata https://api-platform.com/schema/metadata/metadata-2.5.xsd"
>
<resource class="Sylius\Bundle\ApiBundle\Command\RegisterShopUser" shortName="RegisterShopUser">
<attribute name="route_prefix">shop</attribute>
<attribute name="messenger">true</attribute>
<attribute name="output">false</attribute>
<attribute name="validation_groups">sylius</attribute>
<collectionOperations>
<collectionOperation name="post">
<attribute name="path">/register</attribute>
<attribute name="openapi_context">
<attribute name="summary">Registers a shop user</attribute>
</attribute>
<attribute name="validation_groups">
<attribute>sylius</attribute>
</attribute>
</collectionOperation>
</collectionOperations>
<itemOperations />
<property name="firstName" required="true" />
<property name="lastName" required="true" />
<property name="email" required="true" identifier="true" />
<property name="password" required="true" />
</resource>
</resources>
|
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 [email protected]
*/
public class Aquo {
private static final Logger logger = Logger.getLogger(Aquo.class);
private static String[] classNames = {
"nl.nelen_schuurmans.aquo.CompartmentSynchronizer",
"nl.nelen_schuurmans.aquo.MeasuringDeviceSynchronizer",
"nl.nelen_schuurmans.aquo.MeasuringMethodSynchronizer",
"nl.nelen_schuurmans.aquo.ParameterSynchronizer",
"nl.nelen_schuurmans.aquo.ProcessingMethodSynchronizer",
"nl.nelen_schuurmans.aquo.ReferenceFrameSynchronizer",
"nl.nelen_schuurmans.aquo.UnitSynchronizer"
};
public static void main(String[] args) {
for (String className : classNames) {
try {
Object object = Class.forName(className).newInstance();
Synchronizer synchronizer = (Synchronizer) object;
synchronizer.synchronize();
} catch (Exception ex) {
logger.error(ex);
}
}
}
}
| /*
* 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 [email protected]
*/
public class Aquo {
private static final Logger logger = Logger.getLogger(Aquo.class);
private static String[] classNames = {
"nl.nelen_schuurmans.aquo.CompartmentSynchronizer",
"nl.nelen_schuurmans.aquo.MeasuringDeviceSynchronizer",
"nl.nelen_schuurmans.aquo.MeasuringMethodSynchronizer",
"nl.nelen_schuurmans.aquo.ParameterSynchronizer",
"nl.nelen_schuurmans.aquo.ProcessingMethodSynchronizer",
"nl.nelen_schuurmans.aquo.ReferenceFrameSynchronizer",
"nl.nelen_schuurmans.aquo.UnitSynchronizer"
};
public static void main(String[] args) {
for (String className : classNames) {
try {
Object object = Class.forName(className).newInstance();
Synchronizer synchronizer = (Synchronizer) object;
synchronizer.synchronize();
} catch (Exception ex) {
logger.error(ex);
}
}
}
}
| 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 [email protected]
*/
public class Aquo {
private static final Logger logger = Logger.getLogger(Aquo.class);
private static String[] classNames = {
"nl.nelen_schuurmans.aquo.CompartmentSynchronizer",
"nl.nelen_schuurmans.aquo.MeasuringDeviceSynchronizer",
"nl.nelen_schuurmans.aquo.MeasuringMethodSynchronizer",
"nl.nelen_schuurmans.aquo.ParameterSynchronizer",
"nl.nelen_schuurmans.aquo.ProcessingMethodSynchronizer",
"nl.nelen_schuurmans.aquo.ReferenceFrameSynchronizer",
"nl.nelen_schuurmans.aquo.UnitSynchronizer"
};
public static void main(String[] args) {
for (String className : classNames) {
try {
Object object = Class.forName(className).newInstance();
Synchronizer synchronizer = (Synchronizer) object;
synchronizer.synchronize();
} catch (Exception ex) {
logger.error(ex);
}
}
}
}
## Instruction:
Remove import from java.lang package
## Code After:
/*
* 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 [email protected]
*/
public class Aquo {
private static final Logger logger = Logger.getLogger(Aquo.class);
private static String[] classNames = {
"nl.nelen_schuurmans.aquo.CompartmentSynchronizer",
"nl.nelen_schuurmans.aquo.MeasuringDeviceSynchronizer",
"nl.nelen_schuurmans.aquo.MeasuringMethodSynchronizer",
"nl.nelen_schuurmans.aquo.ParameterSynchronizer",
"nl.nelen_schuurmans.aquo.ProcessingMethodSynchronizer",
"nl.nelen_schuurmans.aquo.ReferenceFrameSynchronizer",
"nl.nelen_schuurmans.aquo.UnitSynchronizer"
};
public static void main(String[] args) {
for (String className : classNames) {
try {
Object object = Class.forName(className).newInstance();
Synchronizer synchronizer = (Synchronizer) object;
synchronizer.synchronize();
} catch (Exception ex) {
logger.error(ex);
}
}
}
}
|
9d86c9998fc9a984726c1ee279d6d7520d3eadb0 | sources.cfg | sources.cfg | [remotes]
collective = git://github.com/collective
collective_push = [email protected]:collective
[sources]
dace = git [email protected]:omegsi/dace.git
pontus = git [email protected]:omegsi/pontus.git
pyramid_robot = git git://github.com/vincentfretin/pyramid_robot.git [email protected]:vincentfretin/pyramid_robot.git
robotsuite = git git://github.com/vincentfretin/robotsuite.git [email protected]:vincentfretin/robotsuite.git
robotframework-selenium2library = git git://github.com/vincentfretin/robotframework-selenium2library.git [email protected]:vincentfretin/robotframework-selenium2library.git
substanced = git git://github.com/Pylons/substanced.git [email protected]:Pylons/substanced.git
collective.recipe.template = git ${remotes:collective}/collective.recipe.template.git pushurl=${remotes:collective_push}/collective.recipe.template.git
collective.xmltestreport = git ${remotes:collective}/collective.xmltestreport.git pushurl=${remotes:collective_push}/collective.xmltestreport.git
| [remotes]
collective = git://github.com/collective
collective_push = [email protected]: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 [email protected]:vincentfretin/pyramid_robot.git
robotsuite = git git://github.com/vincentfretin/robotsuite.git [email protected]:vincentfretin/robotsuite.git
robotframework-selenium2library = git git://github.com/vincentfretin/robotframework-selenium2library.git [email protected]:vincentfretin/robotframework-selenium2library.git
substanced = git git://github.com/Pylons/substanced.git [email protected]:Pylons/substanced.git
collective.recipe.template = git ${remotes:collective}/collective.recipe.template.git pushurl=${remotes:collective_push}/collective.recipe.template.git
collective.xmltestreport = git ${remotes:collective}/collective.xmltestreport.git pushurl=${remotes:collective_push}/collective.xmltestreport.git
| 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 = [email protected]:collective
[sources]
dace = git [email protected]:omegsi/dace.git
pontus = git [email protected]:omegsi/pontus.git
pyramid_robot = git git://github.com/vincentfretin/pyramid_robot.git [email protected]:vincentfretin/pyramid_robot.git
robotsuite = git git://github.com/vincentfretin/robotsuite.git [email protected]:vincentfretin/robotsuite.git
robotframework-selenium2library = git git://github.com/vincentfretin/robotframework-selenium2library.git [email protected]:vincentfretin/robotframework-selenium2library.git
substanced = git git://github.com/Pylons/substanced.git [email protected]:Pylons/substanced.git
collective.recipe.template = git ${remotes:collective}/collective.recipe.template.git pushurl=${remotes:collective_push}/collective.recipe.template.git
collective.xmltestreport = git ${remotes:collective}/collective.xmltestreport.git pushurl=${remotes:collective_push}/collective.xmltestreport.git
## Instruction:
Change Dace and Pontus repositories from ecreall to github repositories
## Code After:
[remotes]
collective = git://github.com/collective
collective_push = [email protected]: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 [email protected]:vincentfretin/pyramid_robot.git
robotsuite = git git://github.com/vincentfretin/robotsuite.git [email protected]:vincentfretin/robotsuite.git
robotframework-selenium2library = git git://github.com/vincentfretin/robotframework-selenium2library.git [email protected]:vincentfretin/robotframework-selenium2library.git
substanced = git git://github.com/Pylons/substanced.git [email protected]:Pylons/substanced.git
collective.recipe.template = git ${remotes:collective}/collective.recipe.template.git pushurl=${remotes:collective_push}/collective.recipe.template.git
collective.xmltestreport = git ${remotes:collective}/collective.xmltestreport.git pushurl=${remotes:collective_push}/collective.xmltestreport.git
|
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="[email protected]",
url="http://www.openlabs.co.in",
package_dir={'trytond_sentry': '.'},
packages=[
'trytond_sentry',
],
scripts=[
'bin/trytond_sentry',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Office/Business',
],
license='GPL-3',
install_requires=[
"trytond>=3.0,<3.1",
"raven",
],
zip_safe=False,
)
| 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="[email protected]",
url="https://github.com/openlabs/trytond-sentry",
package_dir={'trytond_sentry': '.'},
packages=[
'trytond_sentry',
],
scripts=[
'bin/trytond_sentry',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Office/Business',
],
license='GPL-3',
install_requires=[
"trytond>=3.0,<3.1",
"raven",
],
zip_safe=False,
)
| 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="[email protected]",
url="http://www.openlabs.co.in",
package_dir={'trytond_sentry': '.'},
packages=[
'trytond_sentry',
],
scripts=[
'bin/trytond_sentry',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Office/Business',
],
license='GPL-3',
install_requires=[
"trytond>=3.0,<3.1",
"raven",
],
zip_safe=False,
)
## Instruction:
Set homepage for package as github url
## Code After:
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="[email protected]",
url="https://github.com/openlabs/trytond-sentry",
package_dir={'trytond_sentry': '.'},
packages=[
'trytond_sentry',
],
scripts=[
'bin/trytond_sentry',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Office/Business',
],
license='GPL-3',
install_requires=[
"trytond>=3.0,<3.1",
"raven",
],
zip_safe=False,
)
|
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,gmcculloug/manageiq,jntullo/manageiq,mfeifer/manageiq,israel-hdez/manageiq,mkanoor/manageiq,mkanoor/manageiq,romaintb/manageiq,israel-hdez/manageiq,aufi/manageiq,andyvesel/manageiq,maas-ufcg/manageiq,maas-ufcg/manageiq,jrafanie/manageiq,agrare/manageiq,jvlcek/manageiq,chessbyte/manageiq,skateman/manageiq,lpichler/manageiq,romaintb/manageiq,mresti/manageiq,branic/manageiq,ilackarms/manageiq,KevinLoiseau/manageiq,syncrou/manageiq,juliancheal/manageiq,ManageIQ/manageiq,branic/manageiq,durandom/manageiq,josejulio/manageiq,durandom/manageiq,NickLaMuro/manageiq,fbladilo/manageiq,billfitzgerald0120/manageiq,djberg96/manageiq,jameswnl/manageiq,yaacov/manageiq,gmcculloug/manageiq,josejulio/manageiq,yaacov/manageiq,agrare/manageiq,KevinLoiseau/manageiq,djberg96/manageiq,billfitzgerald0120/manageiq,romanblanco/manageiq,KevinLoiseau/manageiq,chessbyte/manageiq,jameswnl/manageiq,romaintb/manageiq,mfeifer/manageiq,d-m-u/manageiq,pkomanek/manageiq,gerikis/manageiq,borod108/manageiq,jameswnl/manageiq,djberg96/manageiq,pkomanek/manageiq,josejulio/manageiq,KevinLoiseau/manageiq,borod108/manageiq,gmcculloug/manageiq,romaintb/manageiq,gerikis/manageiq,romaintb/manageiq,tinaafitz/manageiq,syncrou/manageiq,jvlcek/manageiq,ailisp/manageiq,maas-ufcg/manageiq,NickLaMuro/manageiq,kbrock/manageiq,mkanoor/manageiq,jntullo/manageiq,durandom/manageiq,fbladilo/manageiq,ManageIQ/manageiq,fbladilo/manageiq,skateman/manageiq,juliancheal/manageiq,branic/manageiq,mfeifer/manageiq,jrafanie/manageiq,ilackarms/manageiq,d-m-u/manageiq,gmcculloug/manageiq,jameswnl/manageiq,tinaafitz/manageiq,mzazrivec/manageiq,jrafanie/manageiq,KevinLoiseau/manageiq,ilackarms/manageiq,billfitzgerald0120/manageiq,aufi/manageiq,jvlcek/manageiq,mfeifer/manageiq,syncrou/manageiq,borod108/manageiq,juliancheal/manageiq,agrare/manageiq,tinaafitz/manageiq,romanblanco/manageiq,lpichler/manageiq,pkomanek/manageiq,mresti/manageiq,ailisp/manageiq,yaacov/manageiq,mzazrivec/manageiq,juliancheal/manageiq,jrafanie/manageiq,chessbyte/manageiq,ManageIQ/manageiq,matobet/manageiq,NickLaMuro/manageiq,mkanoor/manageiq,branic/manageiq,skateman/manageiq,pkomanek/manageiq,hstastna/manageiq,jntullo/manageiq,billfitzgerald0120/manageiq,andyvesel/manageiq,tzumainn/manageiq,andyvesel/manageiq,andyvesel/manageiq,yaacov/manageiq,maas-ufcg/manageiq,matobet/manageiq,lpichler/manageiq,tzumainn/manageiq,romanblanco/manageiq,chessbyte/manageiq,matobet/manageiq,hstastna/manageiq,josejulio/manageiq,gerikis/manageiq,aufi/manageiq,kbrock/manageiq,durandom/manageiq,kbrock/manageiq,maas-ufcg/manageiq,mresti/manageiq,hstastna/manageiq,NaNi-Z/manageiq,d-m-u/manageiq,d-m-u/manageiq,tzumainn/manageiq,tinaafitz/manageiq,mzazrivec/manageiq,mresti/manageiq,romanblanco/manageiq,tzumainn/manageiq,fbladilo/manageiq,kbrock/manageiq,NaNi-Z/manageiq,borod108/manageiq,ailisp/manageiq,KevinLoiseau/manageiq,ManageIQ/manageiq,ilackarms/manageiq,syncrou/manageiq,djberg96/manageiq | 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 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
## Code After:
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
|
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 need.</p>'
} %>
| <%= 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 information you need.</p>'
} %>
## Instruction:
Use a simpler heading for404 pages
## Code After:
<%= 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>'
} %>
|
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 a.out.* tags
|
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 logwarn.spec
rm -rf a.out.* tags
| 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-*.tar.gz
rm -rf a.out.* tags
## Instruction:
Clean up logwarn.spec now that it's a generated file.
## Code After:
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 logwarn.spec
rm -rf a.out.* tags
|
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 it is very easy to add support
for others.
NukedBit.Mvvm differ also from other frameworks because it use a lot dependency injection,
you can in fact pass argument to viewmodels.
# What is implemented?
Very basic stuff IViewModelNavigator also as only what i needed at the moment,
i hope to add in future more features, but you are welcome to make pull requests :)
Install-Package NukedBit.Mvvm
Install-Package NukedBit.Mvvm.DI.AutoFac
|
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 it is very easy to add support
for others.
NukedBit.Mvvm differ also from other frameworks because it use a lot dependency injection,
you can in fact pass argument to viewmodels.
# What is implemented?
Very basic stuff IViewModelNavigator also as only what i needed at the moment,
i hope to add in future more features, but you are welcome to make pull requests :)
Examples can be fount at [https://github.com/nukedbit/nukedbit-mvvm-examples](https://github.com/nukedbit/nukedbit-mvvm-examples)
Install-Package NukedBit.Mvvm
Install-Package NukedBit.Mvvm.DI.AutoFac
| 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 my projects, but it is very easy to add support
for others.
NukedBit.Mvvm differ also from other frameworks because it use a lot dependency injection,
you can in fact pass argument to viewmodels.
# What is implemented?
Very basic stuff IViewModelNavigator also as only what i needed at the moment,
i hope to add in future more features, but you are welcome to make pull requests :)
Install-Package NukedBit.Mvvm
Install-Package NukedBit.Mvvm.DI.AutoFac
## Instruction:
Add Example link on readme
## Code After:
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 it is very easy to add support
for others.
NukedBit.Mvvm differ also from other frameworks because it use a lot dependency injection,
you can in fact pass argument to viewmodels.
# What is implemented?
Very basic stuff IViewModelNavigator also as only what i needed at the moment,
i hope to add in future more features, but you are welcome to make pull requests :)
Examples can be fount at [https://github.com/nukedbit/nukedbit-mvvm-examples](https://github.com/nukedbit/nukedbit-mvvm-examples)
Install-Package NukedBit.Mvvm
Install-Package NukedBit.Mvvm.DI.AutoFac
|
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 BadStatusCodeError:
data = None
if data and data['is_vouched']:
return super(ModeratorAuthBackend, self).create_user(email, **kwargs)
return None
| 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 BadStatusCodeError:
data = None
if data and data['is_vouched']:
return super(ModeratorAuthBackend, self).create_user(claims, **kwargs)
return None
| 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 BadStatusCodeError:
data = None
if data and data['is_vouched']:
return super(ModeratorAuthBackend, self).create_user(email, **kwargs)
return None
## Instruction:
Fix claims handling on create_user
## Code After:
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 BadStatusCodeError:
data = None
if data and data['is_vouched']:
return super(ModeratorAuthBackend, self).create_user(claims, **kwargs)
return None
|
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.appAuthToken=.*",
"replace": "dpm.appAuthToken=REDACTED"
}, {
"description": "LDAP Password",
"trigger": "bindPassword",
"search": "bindPassword=.*",
"replace": "bindPassword=REDACTED"
}
]
}
| {
"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.appAuthToken=[^\"' ]*",
"replace": "dpm.appAuthToken=REDACTED"
}, {
"description": "LDAP Password",
"trigger": "bindPassword",
"search": "bindPassword=[^\"' ]*",
"replace": "bindPassword=REDACTED"
}
]
}
| 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 <[email protected]>
Tested-by: StreamSets CI <[email protected]>
| 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/datacollector,streamsets/datacollector,kunickiaj/datacollector,rockmkd/datacollector,rockmkd/datacollector,z123/datacollector,streamsets/datacollector,SandishKumarHN/datacollector,SandishKumarHN/datacollector,kunickiaj/datacollector,streamsets/datacollector,rockmkd/datacollector | 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",
"search": "dpm.appAuthToken=.*",
"replace": "dpm.appAuthToken=REDACTED"
}, {
"description": "LDAP Password",
"trigger": "bindPassword",
"search": "bindPassword=.*",
"replace": "bindPassword=REDACTED"
}
]
}
## Instruction:
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 <[email protected]>
Tested-by: StreamSets CI <[email protected]>
## Code After:
{
"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.appAuthToken=[^\"' ]*",
"replace": "dpm.appAuthToken=REDACTED"
}, {
"description": "LDAP Password",
"trigger": "bindPassword",
"search": "bindPassword=[^\"' ]*",
"replace": "bindPassword=REDACTED"
}
]
}
|
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" />
<!-- Use Cross-site IFrame linker. -->
<add-linker name="xsiframe" />
</module>
| <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.explorer.client.embedded.EmbeddedEntryPoint" />
<!-- Use Cross-site IFrame linker. -->
<add-linker name="xsiframe" />
</module>
| 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,haonature/google-apis-explorer,pombreda/google-apis-explorer,haonature/google-apis-explorer,roniest/google-apis-explorer,vemmaverve/google-apis-explorer,twcctz500000/google-apis-explorer,twcctz500000/google-apis-explorer,roniest/google-apis-explorer,haonaturel/google-apis-explorer,showlowtech/google-apis-explorer | 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.EmbeddedEntryPoint" />
<!-- Use Cross-site IFrame linker. -->
<add-linker name="xsiframe" />
</module>
## Instruction:
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
## Code After:
<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.explorer.client.embedded.EmbeddedEntryPoint" />
<!-- Use Cross-site IFrame linker. -->
<add-linker name="xsiframe" />
</module>
|
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 host machine - they'll only be accessible to linked services.
- "16888:27017"
- "28017"
crawler:
image: easydownload_web:latest
links:
- mongo:db #An entry with the alias' name will be created in /etc/hosts inside containers for this service, e.g:
environment:
- MONGOLAB_URI=mongodb://db:27017/easydownload-dev
- ITEM_CRON=0 */5 * * * *
- THING_CRON=0 */10 * * * *
command: node server/crawler.js
| 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:/data/db
expose: # Expose ports without publishing them to the host machine - they'll only be accessible to linked services.
- "27017"
- "28017"
crawler:
image: easydownload_web:latest
links:
- mongo:db #An entry with the alias' name will be created in /etc/hosts inside containers for this service, e.g:
environment:
- MONGOLAB_URI=mongodb://db:27017/easydownload-dev
- ITEM_CRON=0 */5 * * * *
- THING_CRON=0 */10 * * * *
command: node server/crawler.js
| 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 publishing them to the host machine - they'll only be accessible to linked services.
- "16888:27017"
- "28017"
crawler:
image: easydownload_web:latest
links:
- mongo:db #An entry with the alias' name will be created in /etc/hosts inside containers for this service, e.g:
environment:
- MONGOLAB_URI=mongodb://db:27017/easydownload-dev
- ITEM_CRON=0 */5 * * * *
- THING_CRON=0 */10 * * * *
command: node server/crawler.js
## Instruction:
Use external volumn for db
## Code After:
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:/data/db
expose: # Expose ports without publishing them to the host machine - they'll only be accessible to linked services.
- "27017"
- "28017"
crawler:
image: easydownload_web:latest
links:
- mongo:db #An entry with the alias' name will be created in /etc/hosts inside containers for this service, e.g:
environment:
- MONGOLAB_URI=mongodb://db:27017/easydownload-dev
- ITEM_CRON=0 */5 * * * *
- THING_CRON=0 */10 * * * *
command: node server/crawler.js
|
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, "[email protected]:abtinf/wompt.git"
set :git_enable_submodules, true
set :deploy_via, :remote_cache
role :app, host
set :use_sudo, true
set :admin_runner, 'ubuntu'
set :normalize_asset_timestamps, false
set :copy_exclude, [".git"]
default_run_options[:pty] = true
task :production do
# :deployment variable should match task name
set :deployment, 'production'
set :deploy_to, "/home/ubuntu/www/#{application}"
set :branch, "master"
# environment string that is passed to the nodejs and auth apps at startup
set :application_environment, 'production'
find_and_execute_task("deploy:tags:schedule_creation")
end
load 'config/tasks'
load 'config/config_files'
load 'config/deploy_tags'
load 'config/symlinks'
load 'config/npm'
load 'config/gems'
| load 'deploy' if respond_to?(:namespace) # cap2 differentiator
set :application, "wompt"
set :user, "ubuntu"
set :host, "wompt.com"
set :scm, :git
set :repository, "[email protected]:Wompt/wompt.com.git"
set :git_enable_submodules, true
set :deploy_via, :remote_cache
role :app, host
set :use_sudo, true
set :admin_runner, 'ubuntu'
set :normalize_asset_timestamps, false
set :copy_exclude, [".git"]
default_run_options[:pty] = true
task :production do
# :deployment variable should match task name
set :deployment, 'production'
set :deploy_to, "/home/ubuntu/www/#{application}"
set :branch, "master"
# environment string that is passed to the nodejs and auth apps at startup
set :application_environment, 'production'
find_and_execute_task("deploy:tags:schedule_creation")
end
load 'config/tasks'
load 'config/config_files'
load 'config/deploy_tags'
load 'config/symlinks'
load 'config/npm'
load 'config/gems'
| 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, "[email protected]:abtinf/wompt.git"
set :git_enable_submodules, true
set :deploy_via, :remote_cache
role :app, host
set :use_sudo, true
set :admin_runner, 'ubuntu'
set :normalize_asset_timestamps, false
set :copy_exclude, [".git"]
default_run_options[:pty] = true
task :production do
# :deployment variable should match task name
set :deployment, 'production'
set :deploy_to, "/home/ubuntu/www/#{application}"
set :branch, "master"
# environment string that is passed to the nodejs and auth apps at startup
set :application_environment, 'production'
find_and_execute_task("deploy:tags:schedule_creation")
end
load 'config/tasks'
load 'config/config_files'
load 'config/deploy_tags'
load 'config/symlinks'
load 'config/npm'
load 'config/gems'
## Instruction:
Change git repo to wompt/wompt.com
## Code After:
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
set :application, "wompt"
set :user, "ubuntu"
set :host, "wompt.com"
set :scm, :git
set :repository, "[email protected]:Wompt/wompt.com.git"
set :git_enable_submodules, true
set :deploy_via, :remote_cache
role :app, host
set :use_sudo, true
set :admin_runner, 'ubuntu'
set :normalize_asset_timestamps, false
set :copy_exclude, [".git"]
default_run_options[:pty] = true
task :production do
# :deployment variable should match task name
set :deployment, 'production'
set :deploy_to, "/home/ubuntu/www/#{application}"
set :branch, "master"
# environment string that is passed to the nodejs and auth apps at startup
set :application_environment, 'production'
find_and_execute_task("deploy:tags:schedule_creation")
end
load 'config/tasks'
load 'config/config_files'
load 'config/deploy_tags'
load 'config/symlinks'
load 'config/npm'
load 'config/gems'
|
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 = controller._request.headers['accept-encoding'] || '';
let canCompress = !!{
'text/plain': 1,
'text/html': 1,
'text/xml': 1,
'text/json': 1,
'text/javascript': 1,
'application/json': 1,
'application/xml': 1,
'application/javascript': 1,
'application/octet-stream': 1
}[contentType];
if (canCompress) {
if (acceptEncoding.match(/\bgzip\b/)) {
zlib.gzip(data, function(err, result) {
if (!err) {
controller.setHeader('Content-Encoding', 'gzip');
callback(null, result);
return;
}
callback(null, data);
});
return true;
} else if(acceptEncoding.match(/\bdeflate\b/)) {
zlib.deflate(data, function(err, result) {
if (!err) {
controller.setHeader('Content-Encoding', 'deflate');
callback(null, result);
return;
}
callback(null, data);
});
return true;
}
}
callback(null, data);
return false;
}
}
return GzipMiddleware;
})();
| 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 = controller._request.headers['accept-encoding'] || '';
let canCompress = !!{
'text/plain': 1,
'text/html': 1,
'text/xml': 1,
'text/json': 1,
'text/javascript': 1,
'application/json': 1,
'application/xml': 1,
'application/javascript': 1,
'application/octet-stream': 1
}[contentType];
if (canCompress) {
if (acceptEncoding.match(/\bgzip\b/)) {
zlib.gzip(data, function(err, result) {
if (!err) {
controller.setHeader('Content-Encoding', 'gzip');
callback(null, result);
return;
}
callback(null, data);
});
return true;
} else if(acceptEncoding.match(/\bdeflate\b/)) {
zlib.deflate(data, function(err, result) {
if (!err) {
controller.setHeader('Content-Encoding', 'deflate');
callback(null, result);
return;
}
callback(null, data);
});
return true;
}
}
callback(null, data);
return false;
}
}
return GzipRenderware;
})();
| 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 acceptEncoding = controller._request.headers['accept-encoding'] || '';
let canCompress = !!{
'text/plain': 1,
'text/html': 1,
'text/xml': 1,
'text/json': 1,
'text/javascript': 1,
'application/json': 1,
'application/xml': 1,
'application/javascript': 1,
'application/octet-stream': 1
}[contentType];
if (canCompress) {
if (acceptEncoding.match(/\bgzip\b/)) {
zlib.gzip(data, function(err, result) {
if (!err) {
controller.setHeader('Content-Encoding', 'gzip');
callback(null, result);
return;
}
callback(null, data);
});
return true;
} else if(acceptEncoding.match(/\bdeflate\b/)) {
zlib.deflate(data, function(err, result) {
if (!err) {
controller.setHeader('Content-Encoding', 'deflate');
callback(null, result);
return;
}
callback(null, data);
});
return true;
}
}
callback(null, data);
return false;
}
}
return GzipMiddleware;
})();
## Instruction:
Add renderware to generated apps
## Code After:
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 = controller._request.headers['accept-encoding'] || '';
let canCompress = !!{
'text/plain': 1,
'text/html': 1,
'text/xml': 1,
'text/json': 1,
'text/javascript': 1,
'application/json': 1,
'application/xml': 1,
'application/javascript': 1,
'application/octet-stream': 1
}[contentType];
if (canCompress) {
if (acceptEncoding.match(/\bgzip\b/)) {
zlib.gzip(data, function(err, result) {
if (!err) {
controller.setHeader('Content-Encoding', 'gzip');
callback(null, result);
return;
}
callback(null, data);
});
return true;
} else if(acceptEncoding.match(/\bdeflate\b/)) {
zlib.deflate(data, function(err, result) {
if (!err) {
controller.setHeader('Content-Encoding', 'deflate');
callback(null, result);
return;
}
callback(null, data);
});
return true;
}
}
callback(null, data);
return false;
}
}
return GzipRenderware;
})();
|
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 -coverprofile=profile.cov -service=travis-ci
| 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=profile.cov -service=travis-ci
| 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
- goveralls -coverprofile=profile.cov -service=travis-ci
## Instruction:
Drop testing with Go 1.5.
## Code After:
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=profile.cov -service=travis-ci
|
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() {
file := s.Vars["file"]
file = filepath.Join(s.app.Config.StaticDir, file)
// control or add etag
if etag, err := eTag(file); err == nil {
s.response.Header().Add("ETag", etag)
}
fs := http.FileServer(http.Dir(s.app.Config.StaticDir))
fs.ServeHTTP(s.response, s.request)
}
// Get a etag for the file. It's constuct with a md5 sum of
// <filename> + "." + <modification-time>
func eTag(file string) (string, error) {
stat, err := os.Stat(file)
if err != nil {
return "", err
}
s := md5.Sum([]byte(stat.Name() + "." + stat.ModTime().String()))
return fmt.Sprintf("%x", s), nil
}
| 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() {
file := s.Vars["file"]
abs, _ := filepath.Abs(s.app.Config.StaticDir)
file = filepath.Join(abs, file)
// control or add etag
if etag, err := eTag(file); err == nil {
s.response.Header().Add("ETag", etag)
}
// create a fileserver for the static dir
fs := http.FileServer(http.Dir(s.app.Config.StaticDir))
// stip directory name and serve the file
http.StripPrefix("/"+filepath.Base(s.app.Config.StaticDir), fs).
ServeHTTP(s.Response(), s.Request())
}
// Get a etag for the file. It's constuct with a md5 sum of
// <filename> + "." + <modification-time>
func eTag(file string) (string, error) {
stat, err := os.Stat(file)
if err != nil {
return "", err
}
s := md5.Sum([]byte(stat.Name() + "." + stat.ModTime().String()))
return fmt.Sprintf("%x", s), nil
}
| 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 *staticHandler) Get() {
file := s.Vars["file"]
file = filepath.Join(s.app.Config.StaticDir, file)
// control or add etag
if etag, err := eTag(file); err == nil {
s.response.Header().Add("ETag", etag)
}
fs := http.FileServer(http.Dir(s.app.Config.StaticDir))
fs.ServeHTTP(s.response, s.request)
}
// Get a etag for the file. It's constuct with a md5 sum of
// <filename> + "." + <modification-time>
func eTag(file string) (string, error) {
stat, err := os.Stat(file)
if err != nil {
return "", err
}
s := md5.Sum([]byte(stat.Name() + "." + stat.ModTime().String()))
return fmt.Sprintf("%x", s), nil
}
## Instruction:
Fix prefix problem that made a 404 error
## Code After:
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() {
file := s.Vars["file"]
abs, _ := filepath.Abs(s.app.Config.StaticDir)
file = filepath.Join(abs, file)
// control or add etag
if etag, err := eTag(file); err == nil {
s.response.Header().Add("ETag", etag)
}
// create a fileserver for the static dir
fs := http.FileServer(http.Dir(s.app.Config.StaticDir))
// stip directory name and serve the file
http.StripPrefix("/"+filepath.Base(s.app.Config.StaticDir), fs).
ServeHTTP(s.Response(), s.Request())
}
// Get a etag for the file. It's constuct with a md5 sum of
// <filename> + "." + <modification-time>
func eTag(file string) (string, error) {
stat, err := os.Stat(file)
if err != nil {
return "", err
}
s := md5.Sum([]byte(stat.Name() + "." + stat.ModTime().String()))
return fmt.Sprintf("%x", s), nil
}
|
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, r2) => r1 !== r2 });
this.state = {
dataSource: ds.cloneWithRows(data),
};
}
render() {
const Row = this.row;
return (
<ListView
{...this.otherProps}
dataSource={this.state.dataSource}
renderRow={(data) => <Row {...data} />}
/>
);
}
}
export default ScrollableList;
| 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, r2) => r1 !== r2 });
this.state = {
dataSource: this._ds.cloneWithRows(data),
};
}
componentWillReceiveProps(props){
if(this.props.data !== props.data){
this.setState({
dataSource: this._ds.cloneWithRows(props.data)
});
}
}
render() {
const Row = this.row;
return (
<ListView
{...this.otherProps}
dataSource={this.state.dataSource}
renderRow={(data) => <Row {...data} />}
/>
);
}
}
export default ScrollableList;
| 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({ rowHasChanged: (r1, r2) => r1 !== r2 });
this.state = {
dataSource: ds.cloneWithRows(data),
};
}
render() {
const Row = this.row;
return (
<ListView
{...this.otherProps}
dataSource={this.state.dataSource}
renderRow={(data) => <Row {...data} />}
/>
);
}
}
export default ScrollableList;
## Instruction:
Add componentWillReceiveProps for dynamic datasource updates
## Code After:
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, r2) => r1 !== r2 });
this.state = {
dataSource: this._ds.cloneWithRows(data),
};
}
componentWillReceiveProps(props){
if(this.props.data !== props.data){
this.setState({
dataSource: this._ds.cloneWithRows(props.data)
});
}
}
render() {
const Row = this.row;
return (
<ListView
{...this.otherProps}
dataSource={this.state.dataSource}
renderRow={(data) => <Row {...data} />}
/>
);
}
}
export default ScrollableList;
|
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: false
matrix:
php: ["7.1", "7.2", "7.3", "7.4", "8.0"]
symfony: ["~4.3", "~4.4", "~5.1", "~5.2", "~5.3", "~5.4", "~6.0"]
steps:
-
uses: actions/checkout@v2
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer require symfony/event-dispatcher:${SYMFONY_VERSION} --no-update --dev
composer require symfony/property-access:${SYMFONY_VERSION} --no-update --dev
composer require symfony/expression-language:${SYMFONY_VERSION} --no-update --dev
-
name: Install dependencies
run: |
composer --no-interaction --prefer-source install
-
name: Run tests specification
run: bin/phpspec run -f dot
| 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 }}"
strategy:
fail-fast: false
matrix:
php: ["7.2", "7.3", "7.4", "8.0", "8.1"]
symfony: ["~4.3", "~4.4", "~5.1", "~5.2", "~5.3", "~5.4"]
include:
- php: "7.1"
symfony: "~4.3"
- php: "7.1"
symfony: "~4.4"
- php: "8.0"
symfony: "~6.0"
- php: "8.1"
symfony: "~6.0"
steps:
-
uses: actions/checkout@v2
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer require symfony/event-dispatcher:${{ matrix.symfony }} --no-update --dev
composer require symfony/property-access:${{ matrix.symfony }} --no-update --dev
composer require symfony/expression-language:${{ matrix.symfony }} --no-update --dev
-
name: Install dependencies
run: |
composer --no-interaction --prefer-source install
-
name: Run tests specification
run: bin/phpspec run -f dot
| 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:
fail-fast: false
matrix:
php: ["7.1", "7.2", "7.3", "7.4", "8.0"]
symfony: ["~4.3", "~4.4", "~5.1", "~5.2", "~5.3", "~5.4", "~6.0"]
steps:
-
uses: actions/checkout@v2
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer require symfony/event-dispatcher:${SYMFONY_VERSION} --no-update --dev
composer require symfony/property-access:${SYMFONY_VERSION} --no-update --dev
composer require symfony/expression-language:${SYMFONY_VERSION} --no-update --dev
-
name: Install dependencies
run: |
composer --no-interaction --prefer-source install
-
name: Run tests specification
run: bin/phpspec run -f dot
## Instruction:
[Maintenance] Fix GH Action to support different Sf versions
## Code After:
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 }}"
strategy:
fail-fast: false
matrix:
php: ["7.2", "7.3", "7.4", "8.0", "8.1"]
symfony: ["~4.3", "~4.4", "~5.1", "~5.2", "~5.3", "~5.4"]
include:
- php: "7.1"
symfony: "~4.3"
- php: "7.1"
symfony: "~4.4"
- php: "8.0"
symfony: "~6.0"
- php: "8.1"
symfony: "~6.0"
steps:
-
uses: actions/checkout@v2
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer require symfony/event-dispatcher:${{ matrix.symfony }} --no-update --dev
composer require symfony/property-access:${{ matrix.symfony }} --no-update --dev
composer require symfony/expression-language:${{ matrix.symfony }} --no-update --dev
-
name: Install dependencies
run: |
composer --no-interaction --prefer-source install
-
name: Run tests specification
run: bin/phpspec run -f dot
|
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 barrier when we acquire the lock.
if (fLocked.exchange(true, std::memory_order_acquire)) {
// Lock was contended. Fall back to an out-of-line spin loop.
this->contendedAcquire();
}
}
void release() {
// To act as a mutex, we need a release barrier when we release the lock.
fLocked.store(false, std::memory_order_release);
}
private:
void contendedAcquire();
std::atomic<bool> fLocked{false};
};
#endif//SkSpinlock_DEFINED
| /*
* 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 need an acquire barrier when we acquire the lock.
if (fLocked.exchange(true, std::memory_order_acquire)) {
// Lock was contended. Fall back to an out-of-line spin loop.
this->contendedAcquire();
}
}
void release() {
// To act as a mutex, we need a release barrier when we release the lock.
fLocked.store(false, std::memory_order_release);
}
private:
SK_API void contendedAcquire();
std::atomic<bool> fLocked{false};
};
#endif//SkSpinlock_DEFINED
| 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=true&query=source_type%3Dgm&master=false&issue=1757993006
Review URL: https://codereview.chromium.org/1757993006
| 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_external_skia,tmpvar/skia.cc,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,tmpvar/skia.cc,tmpvar/skia.cc,qrealka/skia-hc,rubenvb/skia,tmpvar/skia.cc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,qrealka/skia-hc,tmpvar/skia.cc,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,HalCanary/skia-hc,qrealka/skia-hc,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,tmpvar/skia.cc,tmpvar/skia.cc,rubenvb/skia,google/skia,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,HalCanary/skia-hc,HalCanary/skia-hc,qrealka/skia-hc | 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 an acquire barrier when we acquire the lock.
if (fLocked.exchange(true, std::memory_order_acquire)) {
// Lock was contended. Fall back to an out-of-line spin loop.
this->contendedAcquire();
}
}
void release() {
// To act as a mutex, we need a release barrier when we release the lock.
fLocked.store(false, std::memory_order_release);
}
private:
void contendedAcquire();
std::atomic<bool> fLocked{false};
};
#endif//SkSpinlock_DEFINED
## Instruction:
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=true&query=source_type%3Dgm&master=false&issue=1757993006
Review URL: https://codereview.chromium.org/1757993006
## Code After:
/*
* 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 need an acquire barrier when we acquire the lock.
if (fLocked.exchange(true, std::memory_order_acquire)) {
// Lock was contended. Fall back to an out-of-line spin loop.
this->contendedAcquire();
}
}
void release() {
// To act as a mutex, we need a release barrier when we release the lock.
fLocked.store(false, std::memory_order_release);
}
private:
SK_API void contendedAcquire();
std::atomic<bool> fLocked{false};
};
#endif//SkSpinlock_DEFINED
|
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;
/**
* {@link SpanCollector} spring dependency injection configuration.
*
* @author kristof
*/
@Configuration
public class SpanCollectorConfiguration {
@Bean
@Scope(value = "singleton")
public SpanCollector spanCollector() {
// For development purposes we use the logging span collector.
return Brave.getLoggingSpanCollector();
}
}
| 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.SpanCollector;
/**
* {@link SpanCollector} spring dependency injection configuration.
*
* @author kristof
*/
@Configuration
public class SpanCollectorConfiguration {
@Bean
@Scope(value = "singleton")
public SpanCollector spanCollector() {
// For development purposes we use the logging span collector.
return new LoggingSpanCollectorImpl();
}
}
| 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.SpanCollector;
/**
* {@link SpanCollector} spring dependency injection configuration.
*
* @author kristof
*/
@Configuration
public class SpanCollectorConfiguration {
@Bean
@Scope(value = "singleton")
public SpanCollector spanCollector() {
// For development purposes we use the logging span collector.
return Brave.getLoggingSpanCollector();
}
}
## Instruction:
Fix to make compatible with brave-impl changes. LoggingSpanCollectorImpl is public class and not to be instantiated through com.github.kristofa.brave.Brave anymore.
## Code After:
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.SpanCollector;
/**
* {@link SpanCollector} spring dependency injection configuration.
*
* @author kristof
*/
@Configuration
public class SpanCollectorConfiguration {
@Bean
@Scope(value = "singleton")
public SpanCollector spanCollector() {
// For development purposes we use the logging span collector.
return new LoggingSpanCollectorImpl();
}
}
|
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()
createWebTermView: ->
@webterm = new WebTermView
cssClass : "webterm"
advancedSettings : no
delegate : this
mode : @getMode()
@webterm.connectToTerminal()
# WebTermView.setTerminalTimeout null, 15000, handler, handler
getMode: -> "create"
onWebTermConnected: ->
{command} = @getOptions()
@runCommand command if command
runCommand: (command, callback) ->
return unless command
if @remote
if callback
@webterm.once "WebTermEvent", callback
command += ";echo $?|kdevent"
return @remote.input "#{command}\n"
if not @remote and not @triedAgain
@utils.wait 2000, =>
@runCommand command
@triedAgain = yes
pistachio: ->
"""
{{> @header}}
{{> @webterm}}
""" | 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 WebTermView {
cssClass : "webterm"
advancedSettings : no
delegate : this
mode : @getMode()
vm
}
@addSubView @header
@addSubView @webterm
@webterm.connectToTerminal()
@webterm.on "WebTermConnected", (@remote) =>
@emit "WebtermCreated"
@onWebTermConnected()
# WebTermView.setTerminalTimeout null, 15000, handler, handler
getMode: -> "create"
onWebTermConnected: ->
{command} = @getOptions()
@runCommand command if command
runCommand: (command, callback) ->
return unless command
if @remote
if callback
@webterm.once "WebTermEvent", callback
command += ";echo $?|kdevent"
return @remote.input "#{command}\n"
if not @remote and not @triedAgain
@utils.wait 2000, =>
@runCommand command
@triedAgain = yes
# pistachio: ->
# """
# {{> @header}}
# {{> @webterm}}
# """ | 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,cihangir/koding,rjeczalik/koding,gokmen/koding,jack89129/koding,alex-ionochkin/koding,drewsetski/koding,mertaytore/koding,jack89129/koding,gokmen/koding,cihangir/koding,drewsetski/koding,kwagdy/koding-1,kwagdy/koding-1,sinan/koding,szkl/koding,mertaytore/koding,drewsetski/koding,szkl/koding,usirin/koding,andrewjcasal/koding,andrewjcasal/koding,sinan/koding,koding/koding,kwagdy/koding-1,alex-ionochkin/koding,rjeczalik/koding,acbodine/koding,usirin/koding,koding/koding,jack89129/koding,szkl/koding,alex-ionochkin/koding,acbodine/koding,usirin/koding,acbodine/koding,andrewjcasal/koding,mertaytore/koding,gokmen/koding,jack89129/koding,szkl/koding,alex-ionochkin/koding,andrewjcasal/koding,sinan/koding,gokmen/koding,andrewjcasal/koding,kwagdy/koding-1,sinan/koding,sinan/koding,kwagdy/koding-1,drewsetski/koding,andrewjcasal/koding,acbodine/koding,drewsetski/koding,rjeczalik/koding,cihangir/koding,szkl/koding,andrewjcasal/koding,gokmen/koding,usirin/koding,rjeczalik/koding,alex-ionochkin/koding,drewsetski/koding,koding/koding,kwagdy/koding-1,acbodine/koding,alex-ionochkin/koding,jack89129/koding,kwagdy/koding-1,cihangir/koding,usirin/koding,rjeczalik/koding,jack89129/koding,szkl/koding,mertaytore/koding,mertaytore/koding,gokmen/koding,alex-ionochkin/koding,mertaytore/koding,mertaytore/koding,rjeczalik/koding,rjeczalik/koding,cihangir/koding,jack89129/koding,cihangir/koding,szkl/koding,gokmen/koding,usirin/koding,acbodine/koding,koding/koding,szkl/koding,cihangir/koding,usirin/koding | 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()
createWebTermView: ->
@webterm = new WebTermView
cssClass : "webterm"
advancedSettings : no
delegate : this
mode : @getMode()
@webterm.connectToTerminal()
# WebTermView.setTerminalTimeout null, 15000, handler, handler
getMode: -> "create"
onWebTermConnected: ->
{command} = @getOptions()
@runCommand command if command
runCommand: (command, callback) ->
return unless command
if @remote
if callback
@webterm.once "WebTermEvent", callback
command += ";echo $?|kdevent"
return @remote.input "#{command}\n"
if not @remote and not @triedAgain
@utils.wait 2000, =>
@runCommand command
@triedAgain = yes
pistachio: ->
"""
{{> @header}}
{{> @webterm}}
"""
## Instruction:
Fix TerminalPane until we support for multiple vms
## Code After:
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 WebTermView {
cssClass : "webterm"
advancedSettings : no
delegate : this
mode : @getMode()
vm
}
@addSubView @header
@addSubView @webterm
@webterm.connectToTerminal()
@webterm.on "WebTermConnected", (@remote) =>
@emit "WebtermCreated"
@onWebTermConnected()
# WebTermView.setTerminalTimeout null, 15000, handler, handler
getMode: -> "create"
onWebTermConnected: ->
{command} = @getOptions()
@runCommand command if command
runCommand: (command, callback) ->
return unless command
if @remote
if callback
@webterm.once "WebTermEvent", callback
command += ";echo $?|kdevent"
return @remote.input "#{command}\n"
if not @remote and not @triedAgain
@utils.wait 2000, =>
@runCommand command
@triedAgain = yes
# pistachio: ->
# """
# {{> @header}}
# {{> @webterm}}
# """ |
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 {
cookie.remove('meteor_login_token', {
path: '/',
});
}
}
function resetToken() {
const context = getRenderContext();
const loginToken = global.localStorage['Meteor.loginToken'];
const loginTokenExpires = new Date(global.localStorage['Meteor.loginTokenExpires']);
if (loginToken) {
setToken(loginToken, loginTokenExpires);
} else {
setToken(null, -1);
}
context.loginToken = loginToken;
}
Meteor.startup(() => {
resetToken();
});
const originalSetItem = Meteor._localStorage.setItem;
Meteor._localStorage.setItem = function setItem(key, value) {
if (key === 'Meteor.loginToken') {
Meteor.defer(resetToken);
}
originalSetItem.call(Meteor._localStorage, key, value);
};
const originalRemoveItem = Meteor._localStorage.removeItem;
Meteor._localStorage.removeItem = function removeItem(key) {
if (key === 'Meteor.loginToken') {
Meteor.defer(resetToken);
}
originalRemoveItem.call(Meteor._localStorage, key);
};
| 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: '/',
expires,
});
} else {
cookie.remove('meteor_login_token', {
path: '/',
});
}
}
function resetToken() {
const context = getRenderContext();
const loginToken = global.localStorage['Meteor.loginToken'];
const loginTokenExpires = new Date(global.localStorage['Meteor.loginTokenExpires']);
if (loginToken) {
setToken(loginToken, loginTokenExpires);
} else {
setToken(null, -1);
}
context.loginToken = loginToken;
}
Meteor.startup(() => {
resetToken();
});
const originalSetItem = Meteor._localStorage.setItem;
Meteor._localStorage.setItem = function setItem(key, value) {
if (key === 'Meteor.loginToken') {
Meteor.defer(resetToken);
}
originalSetItem.call(Meteor._localStorage, key, value);
};
const originalRemoveItem = Meteor._localStorage.removeItem;
Meteor._localStorage.removeItem = function removeItem(key) {
if (key === 'Meteor.loginToken') {
Meteor.defer(resetToken);
}
originalRemoveItem.call(Meteor._localStorage, key);
}; | 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,
});
} else {
cookie.remove('meteor_login_token', {
path: '/',
});
}
}
function resetToken() {
const context = getRenderContext();
const loginToken = global.localStorage['Meteor.loginToken'];
const loginTokenExpires = new Date(global.localStorage['Meteor.loginTokenExpires']);
if (loginToken) {
setToken(loginToken, loginTokenExpires);
} else {
setToken(null, -1);
}
context.loginToken = loginToken;
}
Meteor.startup(() => {
resetToken();
});
const originalSetItem = Meteor._localStorage.setItem;
Meteor._localStorage.setItem = function setItem(key, value) {
if (key === 'Meteor.loginToken') {
Meteor.defer(resetToken);
}
originalSetItem.call(Meteor._localStorage, key, value);
};
const originalRemoveItem = Meteor._localStorage.removeItem;
Meteor._localStorage.removeItem = function removeItem(key) {
if (key === 'Meteor.loginToken') {
Meteor.defer(resetToken);
}
originalRemoveItem.call(Meteor._localStorage, key);
};
## Instruction:
Update cookies to use universal-cookie
## Code After:
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: '/',
expires,
});
} else {
cookie.remove('meteor_login_token', {
path: '/',
});
}
}
function resetToken() {
const context = getRenderContext();
const loginToken = global.localStorage['Meteor.loginToken'];
const loginTokenExpires = new Date(global.localStorage['Meteor.loginTokenExpires']);
if (loginToken) {
setToken(loginToken, loginTokenExpires);
} else {
setToken(null, -1);
}
context.loginToken = loginToken;
}
Meteor.startup(() => {
resetToken();
});
const originalSetItem = Meteor._localStorage.setItem;
Meteor._localStorage.setItem = function setItem(key, value) {
if (key === 'Meteor.loginToken') {
Meteor.defer(resetToken);
}
originalSetItem.call(Meteor._localStorage, key, value);
};
const originalRemoveItem = Meteor._localStorage.removeItem;
Meteor._localStorage.removeItem = function removeItem(key) {
if (key === 'Meteor.loginToken') {
Meteor.defer(resetToken);
}
originalRemoveItem.call(Meteor._localStorage, key);
}; |
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/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
import SwiftSyntax
extension VariableDecl {
public init(
leadingTrivia: Trivia = [],
_ letOrVarKeyword: TokenSyntax,
name: ExpressibleAsIdentifierPattern,
type: ExpressibleAsTypeAnnotation? = nil,
initializer: ExpressibleAsInitializerClause? = nil
) {
self.init(leadingTrivia: leadingTrivia, letOrVarKeyword: letOrVarKeyword) {
PatternBinding(
pattern: name,
typeAnnotation: type,
initializer: initializer
)
}
}
}
| //===----------------------------------------------------------------------===//
//
// 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/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
import SwiftSyntax
extension VariableDecl {
public init(
leadingTrivia: Trivia = [],
modifiers: ModifierList? = nil,
_ letOrVarKeyword: TokenSyntax,
name: ExpressibleAsIdentifierPattern,
type: ExpressibleAsTypeAnnotation? = nil,
initializer: ExpressibleAsInitializerClause? = nil
) {
self.init(leadingTrivia: leadingTrivia, modifiers: modifiers, letOrVarKeyword: letOrVarKeyword) {
PatternBinding(
pattern: name,
typeAnnotation: type,
initializer: initializer
)
}
}
}
| 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 https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
import SwiftSyntax
extension VariableDecl {
public init(
leadingTrivia: Trivia = [],
_ letOrVarKeyword: TokenSyntax,
name: ExpressibleAsIdentifierPattern,
type: ExpressibleAsTypeAnnotation? = nil,
initializer: ExpressibleAsInitializerClause? = nil
) {
self.init(leadingTrivia: leadingTrivia, letOrVarKeyword: letOrVarKeyword) {
PatternBinding(
pattern: name,
typeAnnotation: type,
initializer: initializer
)
}
}
}
## Instruction:
Add modifiers parameter to VariableDecl convenience init
## Code After:
//===----------------------------------------------------------------------===//
//
// 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/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
import SwiftSyntax
extension VariableDecl {
public init(
leadingTrivia: Trivia = [],
modifiers: ModifierList? = nil,
_ letOrVarKeyword: TokenSyntax,
name: ExpressibleAsIdentifierPattern,
type: ExpressibleAsTypeAnnotation? = nil,
initializer: ExpressibleAsInitializerClause? = nil
) {
self.init(leadingTrivia: leadingTrivia, modifiers: modifiers, letOrVarKeyword: letOrVarKeyword) {
PatternBinding(
pattern: name,
typeAnnotation: type,
initializer: initializer
)
}
}
}
|
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, 3, 4, '')),
array(array('something', 'else', 'hello'), array('something', 'else', false, 0, '', 'hello')),
);
}
/**
* @dataProvider dataProvider
* @covers ::Mimic\Functional\clean
*/
public function testResults($expected, $collection) {
$this->assertEquals($expected, F\clean($collection));
}
}
| <?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), array(1, false, 0, 2, 3, 4, '')),
array(array(0 => 'something', 1 => 'else', 5 => 'hello'), array('something', 'else', false, 0, '', 'hello')),
);
}
/**
* @dataProvider dataProvider
* @covers ::Mimic\Functional\clean
*/
public function testResults($expected, $collection) {
$this->assertEquals($expected, F\clean($collection));
}
}
| 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(1, false, 0, 2, 3, 4, '')),
array(array('something', 'else', 'hello'), array('something', 'else', false, 0, '', 'hello')),
);
}
/**
* @dataProvider dataProvider
* @covers ::Mimic\Functional\clean
*/
public function testResults($expected, $collection) {
$this->assertEquals($expected, F\clean($collection));
}
}
## Instruction:
Fix tests: filter preserves indexes.
## Code After:
<?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), array(1, false, 0, 2, 3, 4, '')),
array(array(0 => 'something', 1 => 'else', 5 => 'hello'), array('something', 'else', false, 0, '', 'hello')),
);
}
/**
* @dataProvider dataProvider
* @covers ::Mimic\Functional\clean
*/
public function testResults($expected, $collection) {
$this->assertEquals($expected, F\clean($collection));
}
}
|
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::App
map '/' do
run app
end
map '/assets' do
run app.sprockets
end
})
set(:config, nil)
class << self
alias environment_orig= environment=
def environment=(x)
environment_orig = x
Config.namespace x.to_s
x
end
end
end
end
| 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::App
map '/' do
run app
end
map '/assets' do
run app.sprockets
end
})
set(:config, nil)
set :method_override, true
configure :production, :development do
enable :sessions
end
helpers do
def logged_in?
!!session[:user_id]
end
end
set :admin_only do |_|
condition do
unless logged_in?
halt 401
end
end
end
class << self
alias environment_orig= environment=
def environment=(x)
self.environment_orig = x
Config.namespace x.to_s
x
end
alias config_orig= config=
def config=(x)
self.config_orig = x
self.set :session_secret, config['session_secret'] || 'jjiw-jewn-n2i9-nc1e_binding.pry-is-good'
x
end
end
end
end
Dir["#{File.dirname(__FILE__)}/app/**/*.rb"].each do |f|
require f
end
| 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 {
app = ::Days::App
map '/' do
run app
end
map '/assets' do
run app.sprockets
end
})
set(:config, nil)
class << self
alias environment_orig= environment=
def environment=(x)
environment_orig = x
Config.namespace x.to_s
x
end
end
end
end
## Instruction:
Enable session and condition for admin_only
## Code After:
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::App
map '/' do
run app
end
map '/assets' do
run app.sprockets
end
})
set(:config, nil)
set :method_override, true
configure :production, :development do
enable :sessions
end
helpers do
def logged_in?
!!session[:user_id]
end
end
set :admin_only do |_|
condition do
unless logged_in?
halt 401
end
end
end
class << self
alias environment_orig= environment=
def environment=(x)
self.environment_orig = x
Config.namespace x.to_s
x
end
alias config_orig= config=
def config=(x)
self.config_orig = x
self.set :session_secret, config['session_secret'] || 'jjiw-jewn-n2i9-nc1e_binding.pry-is-good'
x
end
end
end
end
Dir["#{File.dirname(__FILE__)}/app/**/*.rb"].each do |f|
require f
end
|
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_ID_CHANGED);
const isPreview = yield select(deps.selectors.getPreview);
if (!isPreview) {
window.dataLayer = window.dataLayer || [];
yield takeEvery('*', launchGTMEventsSaga);
}
}
| /* 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 take(deps.types.SITE_ID_CHANGED);
const isPreview = yield select(deps.selectors.getPreview);
if (!isPreview) {
window.dataLayer = window.dataLayer || [];
yield takeEvery('*', launchGTMEventsSaga);
}
}
| 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(deps.types.SITE_ID_CHANGED);
const isPreview = yield select(deps.selectors.getPreview);
if (!isPreview) {
window.dataLayer = window.dataLayer || [];
yield takeEvery('*', launchGTMEventsSaga);
}
}
## Instruction:
Revert "Don't send props to dataLayer."
This reverts commit a104558a48e158e77226e1a635bf34fce9262259.
## Code After:
/* 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 take(deps.types.SITE_ID_CHANGED);
const isPreview = yield select(deps.selectors.getPreview);
if (!isPreview) {
window.dataLayer = window.dataLayer || [];
yield takeEvery('*', launchGTMEventsSaga);
}
}
|
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"
require "filestack_rails/engine"
require "filestack_rails/version"
module FilestackRails
# Your code goes here...
end
|
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
{
/**
* Laravel's Encrypter
*
* @var IlluminateEncrypter
*/
private $encrypter;
/**
* Create a new instance of LaravelEncrypter
*
* @param string $key
* @param IlluminateEncrypter $encrypter
*/
public function __construct($key, IlluminateEncrypter $encrypter = null)
{
$this->encrypter = $encrypter ?: new DefaultIlluminateEncrypter(md5($key));
}
/**
* Encrypt a string
*
* @param string $string
*
* @return string
*/
public function encrypt($string)
{
return $this->encrypter->encrypt($string);
}
/**
* Decrypt an encrypted string
*
* @param string $payload
*
* @return string
* @throws DecryptException
*/
public function decrypt($payload)
{
try {
$decrypted = $this->encrypter->decrypt($payload);
} catch (IlluminateDecryptException $exception) {
throw new DecryptException('Decryption failed.', 0, $exception);
}
return $decrypted;
}
}
| <?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
{
/**
* Laravel's Encrypter
*
* @var IlluminateEncrypter
*/
private $encrypter;
/**
* Create a new instance of LaravelEncrypter
*
* @param string $key
* @param IlluminateEncrypter $encrypter
*/
public function __construct($key, IlluminateEncrypter $encrypter = null)
{
$this->encrypter = $encrypter ?: new DefaultIlluminateEncrypter(md5($key), 'AES-256-CBC');
}
/**
* Encrypt a string
*
* @param string $string
*
* @return string
*/
public function encrypt($string)
{
return $this->encrypter->encrypt($string);
}
/**
* Decrypt an encrypted string
*
* @param string $payload
*
* @return string
* @throws DecryptException
*/
public function decrypt($payload)
{
try {
$decrypted = $this->encrypter->decrypt($payload);
} catch (IlluminateDecryptException $exception) {
throw new DecryptException('Decryption failed.', 0, $exception);
}
return $decrypted;
}
}
| 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
{
/**
* Laravel's Encrypter
*
* @var IlluminateEncrypter
*/
private $encrypter;
/**
* Create a new instance of LaravelEncrypter
*
* @param string $key
* @param IlluminateEncrypter $encrypter
*/
public function __construct($key, IlluminateEncrypter $encrypter = null)
{
$this->encrypter = $encrypter ?: new DefaultIlluminateEncrypter(md5($key));
}
/**
* Encrypt a string
*
* @param string $string
*
* @return string
*/
public function encrypt($string)
{
return $this->encrypter->encrypt($string);
}
/**
* Decrypt an encrypted string
*
* @param string $payload
*
* @return string
* @throws DecryptException
*/
public function decrypt($payload)
{
try {
$decrypted = $this->encrypter->decrypt($payload);
} catch (IlluminateDecryptException $exception) {
throw new DecryptException('Decryption failed.', 0, $exception);
}
return $decrypted;
}
}
## Instruction:
Set default 32 bit cipher
## Code After:
<?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
{
/**
* Laravel's Encrypter
*
* @var IlluminateEncrypter
*/
private $encrypter;
/**
* Create a new instance of LaravelEncrypter
*
* @param string $key
* @param IlluminateEncrypter $encrypter
*/
public function __construct($key, IlluminateEncrypter $encrypter = null)
{
$this->encrypter = $encrypter ?: new DefaultIlluminateEncrypter(md5($key), 'AES-256-CBC');
}
/**
* Encrypt a string
*
* @param string $string
*
* @return string
*/
public function encrypt($string)
{
return $this->encrypter->encrypt($string);
}
/**
* Decrypt an encrypted string
*
* @param string $payload
*
* @return string
* @throws DecryptException
*/
public function decrypt($payload)
{
try {
$decrypted = $this->encrypter->decrypt($payload);
} catch (IlluminateDecryptException $exception) {
throw new DecryptException('Decryption failed.', 0, $exception);
}
return $decrypted;
}
}
|
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 config user.email "[email protected]"
rm -rf *
echo "" > .nojekyll
cd ..
doxygen Doxyfile 2>&1 | tee doxygen.log
cd doc
git add --all
git commit -m "Deploy code docs to GitHub Pages"
git push --force --quiet "https://${GH_REPO_TOKEN}@github.com/LukasWoodtli/DesignByContractPlusPlus" master:gh-pages > /dev/null 2>&1
| 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 config user.email "[email protected]"
rm -rf *
echo "" > .nojekyll
cd ..
doxygen Doxyfile 2>&1 | tee doxygen.log
cd doc
git add --all
git commit -m "Deploy code docs to GitHub Pages"
git push --force "https://${GH_REPO_TOKEN}@github.com/LukasWoodtli/DesignByContractPlusPlus" master:gh-pages
| 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 "Travis CI"
git config user.email "[email protected]"
rm -rf *
echo "" > .nojekyll
cd ..
doxygen Doxyfile 2>&1 | tee doxygen.log
cd doc
git add --all
git commit -m "Deploy code docs to GitHub Pages"
git push --force --quiet "https://${GH_REPO_TOKEN}@github.com/LukasWoodtli/DesignByContractPlusPlus" master:gh-pages > /dev/null 2>&1
## Instruction:
Enable git output for ghpage
## Code After:
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 config user.email "[email protected]"
rm -rf *
echo "" > .nojekyll
cd ..
doxygen Doxyfile 2>&1 | tee doxygen.log
cd doc
git add --all
git commit -m "Deploy code docs to GitHub Pages"
git push --force "https://${GH_REPO_TOKEN}@github.com/LukasWoodtli/DesignByContractPlusPlus" master:gh-pages
|
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
#define LLVM_CODEGEN_PASSES_H
class FunctionPass;
class PassInfo;
// PHIElimination pass - This pass eliminates machine instruction PHI nodes by
// inserting copy instructions. This destroys SSA information, but is the
// desired input for some register allocators. This pass is "required" by these
// register allocator like this: AU.addRequiredID(PHIEliminationID);
//
extern const PassInfo *PHIEliminationID;
/// SimpleRegisterAllocation Pass - This pass converts the input machine code
/// from SSA form to use explicit registers by spilling every register. Wow,
/// great policy huh?
///
FunctionPass *createSimpleRegisterAllocator();
/// LocalRegisterAllocation Pass - This pass register allocates the input code a
/// basic block at a time, yielding code better than the simple register
/// allocator, but not as good as a global allocator.
///
FunctionPass *createLocalRegisterAllocator();
/// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
/// and eliminates abstract frame references.
///
FunctionPass *createPrologEpilogCodeInserter();
#endif
| //===-- 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
#define LLVM_CODEGEN_PASSES_H
class FunctionPass;
class PassInfo;
// PHIElimination pass - This pass eliminates machine instruction PHI nodes by
// inserting copy instructions. This destroys SSA information, but is the
// desired input for some register allocators. This pass is "required" by these
// register allocator like this: AU.addRequiredID(PHIEliminationID);
//
extern const PassInfo *PHIEliminationID;
/// SimpleRegisterAllocation Pass - This pass converts the input machine code
/// from SSA form to use explicit registers by spilling every register. Wow,
/// great policy huh?
///
FunctionPass *createSimpleRegisterAllocator();
/// LocalRegisterAllocation Pass - This pass register allocates the input code a
/// basic block at a time, yielding code better than the simple register
/// allocator, but not as good as a global allocator.
///
FunctionPass *createLocalRegisterAllocator();
/// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
/// and eliminates abstract frame references.
///
FunctionPass *createPrologEpilogCodeInserter();
/// getRegisterAllocator - This creates an instance of the register allocator
/// for the Sparc.
FunctionPass *getRegisterAllocator(TargetMachine &T);
#endif
| 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/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap | 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_CODEGEN_PASSES_H
#define LLVM_CODEGEN_PASSES_H
class FunctionPass;
class PassInfo;
// PHIElimination pass - This pass eliminates machine instruction PHI nodes by
// inserting copy instructions. This destroys SSA information, but is the
// desired input for some register allocators. This pass is "required" by these
// register allocator like this: AU.addRequiredID(PHIEliminationID);
//
extern const PassInfo *PHIEliminationID;
/// SimpleRegisterAllocation Pass - This pass converts the input machine code
/// from SSA form to use explicit registers by spilling every register. Wow,
/// great policy huh?
///
FunctionPass *createSimpleRegisterAllocator();
/// LocalRegisterAllocation Pass - This pass register allocates the input code a
/// basic block at a time, yielding code better than the simple register
/// allocator, but not as good as a global allocator.
///
FunctionPass *createLocalRegisterAllocator();
/// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
/// and eliminates abstract frame references.
///
FunctionPass *createPrologEpilogCodeInserter();
#endif
## Instruction:
Include the sparc register in this file
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@8794 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
//===-- 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
#define LLVM_CODEGEN_PASSES_H
class FunctionPass;
class PassInfo;
// PHIElimination pass - This pass eliminates machine instruction PHI nodes by
// inserting copy instructions. This destroys SSA information, but is the
// desired input for some register allocators. This pass is "required" by these
// register allocator like this: AU.addRequiredID(PHIEliminationID);
//
extern const PassInfo *PHIEliminationID;
/// SimpleRegisterAllocation Pass - This pass converts the input machine code
/// from SSA form to use explicit registers by spilling every register. Wow,
/// great policy huh?
///
FunctionPass *createSimpleRegisterAllocator();
/// LocalRegisterAllocation Pass - This pass register allocates the input code a
/// basic block at a time, yielding code better than the simple register
/// allocator, but not as good as a global allocator.
///
FunctionPass *createLocalRegisterAllocator();
/// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
/// and eliminates abstract frame references.
///
FunctionPass *createPrologEpilogCodeInserter();
/// getRegisterAllocator - This creates an instance of the register allocator
/// for the Sparc.
FunctionPass *getRegisterAllocator(TargetMachine &T);
#endif
|
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 do |key|
instance_variable_set :"@#{key}", integer_value(params[key])
self.class.send("attr_reader", :"#{key}")
end
end
def calculate_adjusted_net_income
additions - deductions
end
private
def additions
@gross_income + @other_income + @pensions + @property + @non_employment_income
end
def deductions
grossed_up(@pension_contributions_from_pay) + grossed_up(@gift_aid_donations) +
@retirement_annuities + @cycle_scheme + @childcare
end
def grossed_up(amount)
(amount * 1.25)
end
def integer_value(val)
val.gsub!(/[£,-]/,'') if val.is_a?(String)
val.to_i
end
end
| 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 do |key|
self.class.class_eval { attr_reader :"#{key}" }
instance_variable_set :"@#{key}", integer_value(params[key])
end
end
def calculate_adjusted_net_income
additions - deductions
end
private
def additions
@gross_income + @other_income + @pensions + @property + @non_employment_income
end
def deductions
grossed_up(@pension_contributions_from_pay) + grossed_up(@gift_aid_donations) +
@retirement_annuities + @cycle_scheme + @childcare
end
def grossed_up(amount)
(amount * 1.25)
end
def integer_value(val)
val.gsub!(/[£,-]/,'') if val.is_a?(String)
val.to_i
end
end
| 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)
PARAM_KEYS.each do |key|
instance_variable_set :"@#{key}", integer_value(params[key])
self.class.send("attr_reader", :"#{key}")
end
end
def calculate_adjusted_net_income
additions - deductions
end
private
def additions
@gross_income + @other_income + @pensions + @property + @non_employment_income
end
def deductions
grossed_up(@pension_contributions_from_pay) + grossed_up(@gift_aid_donations) +
@retirement_annuities + @cycle_scheme + @childcare
end
def grossed_up(amount)
(amount * 1.25)
end
def integer_value(val)
val.gsub!(/[£,-]/,'') if val.is_a?(String)
val.to_i
end
end
## Instruction:
Use cleaner syntax for dynamically setting attr_reader
## Code After:
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 do |key|
self.class.class_eval { attr_reader :"#{key}" }
instance_variable_set :"@#{key}", integer_value(params[key])
end
end
def calculate_adjusted_net_income
additions - deductions
end
private
def additions
@gross_income + @other_income + @pensions + @property + @non_employment_income
end
def deductions
grossed_up(@pension_contributions_from_pay) + grossed_up(@gift_aid_donations) +
@retirement_annuities + @cycle_scheme + @childcare
end
def grossed_up(amount)
(amount * 1.25)
end
def integer_value(val)
val.gsub!(/[£,-]/,'') if val.is_a?(String)
val.to_i
end
end
|
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 ([email protected])
*/
export class RxjsCallAdapter<T> implements CallAdapter<T> {
private constructor() {}
static create(): CallAdapter<any> {
return new RxjsCallAdapter();
}
check(returnType: string): boolean {
return returnType === "Observable";
}
adapt(call: Call<T>, returnRaw: boolean): any {
return Observable.create((observer: Observer<any>) => {
try {
call.enqueue(
response => observer.next(returnRaw ? response : response.body),
error => Observable.throw(error)
);
} catch (e) {
return Observable.throw(e);
}
});
}
}
| import { Call, CallAdapter } from "revival";
import { Observable, Observer } from "rxjs";
/**
* A {@link CallAdapter} implemented by rxjs.
*
* @author Vincent Cheung ([email protected])
*/
export class RxjsCallAdapter<T> implements CallAdapter<T> {
private constructor() {}
static create(): CallAdapter<any> {
return new RxjsCallAdapter();
}
check(returnType: string): boolean {
return returnType === "Observable";
}
adapt(call: Call<T>, returnRaw: boolean): any {
return Observable.create((observer: Observer<any>) => {
try {
call.enqueue(
response => observer.next(returnRaw ? response : response.body),
error => observer.error(error)
);
} catch (e) {
return observer.error(e);
}
});
}
}
| 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 ([email protected])
*/
export class RxjsCallAdapter<T> implements CallAdapter<T> {
private constructor() {}
static create(): CallAdapter<any> {
return new RxjsCallAdapter();
}
check(returnType: string): boolean {
return returnType === "Observable";
}
adapt(call: Call<T>, returnRaw: boolean): any {
return Observable.create((observer: Observer<any>) => {
try {
call.enqueue(
response => observer.next(returnRaw ? response : response.body),
error => Observable.throw(error)
);
} catch (e) {
return Observable.throw(e);
}
});
}
}
## Instruction:
Fix rxjs call adapter throw error.
## Code After:
import { Call, CallAdapter } from "revival";
import { Observable, Observer } from "rxjs";
/**
* A {@link CallAdapter} implemented by rxjs.
*
* @author Vincent Cheung ([email protected])
*/
export class RxjsCallAdapter<T> implements CallAdapter<T> {
private constructor() {}
static create(): CallAdapter<any> {
return new RxjsCallAdapter();
}
check(returnType: string): boolean {
return returnType === "Observable";
}
adapt(call: Call<T>, returnRaw: boolean): any {
return Observable.create((observer: Observer<any>) => {
try {
call.enqueue(
response => observer.next(returnRaw ? response : response.body),
error => observer.error(error)
);
} catch (e) {
return observer.error(e);
}
});
}
}
|
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)))
(nvim:command (format nil "echo '~A'" ,output)))))
(defun eval-string (str)
(eval (read-from-string str)))
(nvim:defcommand/s lisp (&rest form)
(declare (opts nargs))
(echo-output (eval-string (format nil "~{~A~^ ~}" form))))
(in-package :cl-user)
| (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)))
(nvim:command (format nil "echo '~A'" ,output)))))
(defun eval-string (str)
(eval (read-from-string str)))
(nvim:defcommand/s lisp (&rest form)
(declare (opts nargs))
(echo-output (eval-string (format nil "~{~A~^ ~}" form))))
(nvim:defcommand/s lispdo (&rest form &opts range)
(declare (opts nargs range))
(let ((fn (eval-string
(format nil "#'(lambda (line line-nr)
(declare (ignorable line line-nr))
~{~A~^ ~})"
form)))
(start (1- (first range)))
(end (second range)))
(echo-output
(let ((new-lines (mapcar #'(lambda (line line-nr)
(or (let ((new-line (funcall fn line line-nr)))
(if (or (stringp new-line) (null new-line))
new-line
(error "Function must return either string or NIL.")))
line))
(nvim:buffer-lines (nvim:current-buffer) start end T)
(loop for line-nr from start upto end collect (1+ line-nr)))))
(setf (nvim:buffer-lines (nvim:current-buffer) start end T) new-lines)))))
(in-package :cl-user)
| 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*)
,@forms)))
(nvim:command (format nil "echo '~A'" ,output)))))
(defun eval-string (str)
(eval (read-from-string str)))
(nvim:defcommand/s lisp (&rest form)
(declare (opts nargs))
(echo-output (eval-string (format nil "~{~A~^ ~}" form))))
(in-package :cl-user)
## Instruction:
Add :Lispdo command (lisp equivalent of :pydo)
## Code After:
(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)))
(nvim:command (format nil "echo '~A'" ,output)))))
(defun eval-string (str)
(eval (read-from-string str)))
(nvim:defcommand/s lisp (&rest form)
(declare (opts nargs))
(echo-output (eval-string (format nil "~{~A~^ ~}" form))))
(nvim:defcommand/s lispdo (&rest form &opts range)
(declare (opts nargs range))
(let ((fn (eval-string
(format nil "#'(lambda (line line-nr)
(declare (ignorable line line-nr))
~{~A~^ ~})"
form)))
(start (1- (first range)))
(end (second range)))
(echo-output
(let ((new-lines (mapcar #'(lambda (line line-nr)
(or (let ((new-line (funcall fn line line-nr)))
(if (or (stringp new-line) (null new-line))
new-line
(error "Function must return either string or NIL.")))
line))
(nvim:buffer-lines (nvim:current-buffer) start end T)
(loop for line-nr from start upto end collect (1+ line-nr)))))
(setf (nvim:buffer-lines (nvim:current-buffer) start end T) new-lines)))))
(in-package :cl-user)
|
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 `asdf install`, you can pass custom configure options with the following env vars:
* `ERLANG_CONFIGURE_OPTIONS` - use only your configure options
* `ERLANG_EXTRA_CONFIGURE_OPTIONS` - append these configure options along with ones that this plugin already uses
| 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.
## Instruction:
Add note about env vars for configure options
## Code After:
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 `asdf install`, you can pass custom configure options with the following env vars:
* `ERLANG_CONFIGURE_OPTIONS` - use only your configure options
* `ERLANG_EXTRA_CONFIGURE_OPTIONS` - append these configure options along with ones that this plugin already uses
|
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: [email protected]
phone: "+46 709 22 46 57"
on_contract: yes
has_been_on_contract: yes
groups:
nt1:
role: CERN Liaison
nt1-sg:
role: Member, User and CERN representative
nlcg:
role: Ex officio, Secretary
neic2015-pc:
---
| ---
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: [email protected]
phone: "+46 709 22 46 57"
on_contract: yes
has_been_on_contract: yes
groups:
nt1:
role: CERN Liaison
nt1-sg:
role: Member, User and CERN representative
nlcg:
role: Ex officio, Secretary
neic2015-pc:
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: [email protected]
phone: "+46 709 22 46 57"
on_contract: yes
has_been_on_contract: yes
groups:
nt1:
role: CERN Liaison
nt1-sg:
role: Member, User and CERN representative
nlcg:
role: Ex officio, Secretary
neic2015-pc:
---
## Instruction:
Add the role in NeIC2015 PC
## Code After:
---
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: [email protected]
phone: "+46 709 22 46 57"
on_contract: yes
has_been_on_contract: yes
groups:
nt1:
role: CERN Liaison
nt1-sg:
role: Member, User and CERN representative
nlcg:
role: Ex officio, Secretary
neic2015-pc:
role: Member
---
|
1adad3465778ef60e33d13bed777fc06f3f0045c | src/Data/FilterableTrait.php | src/Data/FilterableTrait.php | <?php
/**
*
* (c) Marco Bunge <[email protected]>
*
* 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 entities
*
* @param callable $filter
* @return array
*/
public function filter(callable $filter)
{
return array_filter(Helper::receiveDataFromObject($this), $filter, ARRAY_FILTER_USE_BOTH);
}
} | <?php
/**
*
* (c) Marco Bunge <[email protected]>
*
* 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 callback
*
* Emulates array_filter behaviour with optional flags ARRAY_FILTER_USE_BOTH for PHP version < 5.6.x
*
* Create a callback with key and value parameters and return a boolean.
*
* ```
* FilterableTrait::filter(function($key, $value){
* //added to result if value is scalar
* return is_scalar($value)
* });
* ```
*
* @see http://php.net/manual/de/function.array-filter.php
*
* @param callable $filter
* @return array
*/
public function filter(callable $filter)
{
$data = DataHelper::receiveDataFromObject($this);
if(defined('ARRAY_FILTER_USE_BOTH') && version_compare(PHP_VERSION, '5.6.0') >= 0){
return array_filter($data, $filter, ARRAY_FILTER_USE_BOTH);
}
$results = [];
//if filter is truthy pass key-value-pair to results
foreach($data as $key => $value){
if(call_user_func($filter, $key, $value) == true){
$results[$key] = $value;
}
}
return $results;
}
} | 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 <[email protected]>
*
* 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 entities
*
* @param callable $filter
* @return array
*/
public function filter(callable $filter)
{
return array_filter(Helper::receiveDataFromObject($this), $filter, ARRAY_FILTER_USE_BOTH);
}
}
## Instruction:
Add Fallback for ARRAY_FILTER_USE_BOTH behaviour on array_filter for PHP version < 5.6
## Code After:
<?php
/**
*
* (c) Marco Bunge <[email protected]>
*
* 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 callback
*
* Emulates array_filter behaviour with optional flags ARRAY_FILTER_USE_BOTH for PHP version < 5.6.x
*
* Create a callback with key and value parameters and return a boolean.
*
* ```
* FilterableTrait::filter(function($key, $value){
* //added to result if value is scalar
* return is_scalar($value)
* });
* ```
*
* @see http://php.net/manual/de/function.array-filter.php
*
* @param callable $filter
* @return array
*/
public function filter(callable $filter)
{
$data = DataHelper::receiveDataFromObject($this);
if(defined('ARRAY_FILTER_USE_BOTH') && version_compare(PHP_VERSION, '5.6.0') >= 0){
return array_filter($data, $filter, ARRAY_FILTER_USE_BOTH);
}
$results = [];
//if filter is truthy pass key-value-pair to results
foreach($data as $key => $value){
if(call_user_func($filter, $key, $value) == true){
$results[$key] = $value;
}
}
return $results;
}
} |
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 React, { Component } from 'react';
export default class Copyright extends Component {
getYear() {
return new Date().getFullYear();
}
render() {
return <span>© {this.getYear()} David Minnerly</span>;
}
}
|
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.exports = mongoose.model('Publisher', PublisherSchema);
| 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('response').get(function() {
return {
id: this.id,
name: this.name
};
});
module.exports = mongoose.model('Publisher', PublisherSchema);
| 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
};
});
module.exports = mongoose.model('Publisher', PublisherSchema);
## Instruction:
Add timestamp properties to Publisher resource
## Code After:
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('response').get(function() {
return {
id: this.id,
name: this.name
};
});
module.exports = mongoose.model('Publisher', PublisherSchema);
|
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) framework installed
# Installation
* execute `composer require arseto/lumencqrs` in your project folder
* For lumen, add this line to the `bootstrap/app.php` file
```php
$app->register(Arseto\LumenCQRS\Providers\CQRSServiceProvider::class);
```
* For laravel, add this line to 'providers' in `config/app.php`
```php
Arseto\LumenCQRS\Providers\CQRSServiceProvider::class,
```
# Usage
* This package serves as template to implement CQRS
* Simply create command-handler pair and query-reader pair then inject the CommandBus and QueryBus to your controller
* Command-handler and query-reader pair must implement provided interfaces
| [](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 default (or you can override it)
# Prerequisite
* PHP 7.1
* [composer](https://getcomposer.org)
* [Laravel](https://laravel.com) or [lumen](https://lumen.laravel.com) framework installed
# Installation
* execute `composer require arseto/lumencqrs` in your project folder
* For lumen, add this line to the `bootstrap/app.php` file
```php
$app->register(Arseto\LumenCQRS\Providers\CQRSServiceProvider::class);
```
* For laravel, add this line to 'providers' in `config/app.php`
```php
Arseto\LumenCQRS\Providers\CQRSServiceProvider::class,
```
# Usage
* This package serves as template to implement CQRS
* Simply create command-handler pair and query-reader pair then inject the CommandBus and QueryBus to your controller
* Command-handler and query-reader pair must implement provided interfaces
| 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.laravel.com) framework installed
# Installation
* execute `composer require arseto/lumencqrs` in your project folder
* For lumen, add this line to the `bootstrap/app.php` file
```php
$app->register(Arseto\LumenCQRS\Providers\CQRSServiceProvider::class);
```
* For laravel, add this line to 'providers' in `config/app.php`
```php
Arseto\LumenCQRS\Providers\CQRSServiceProvider::class,
```
# Usage
* This package serves as template to implement CQRS
* Simply create command-handler pair and query-reader pair then inject the CommandBus and QueryBus to your controller
* Command-handler and query-reader pair must implement provided interfaces
## Instruction:
Add build status in readme
## Code After:
[](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 default (or you can override it)
# Prerequisite
* PHP 7.1
* [composer](https://getcomposer.org)
* [Laravel](https://laravel.com) or [lumen](https://lumen.laravel.com) framework installed
# Installation
* execute `composer require arseto/lumencqrs` in your project folder
* For lumen, add this line to the `bootstrap/app.php` file
```php
$app->register(Arseto\LumenCQRS\Providers\CQRSServiceProvider::class);
```
* For laravel, add this line to 'providers' in `config/app.php`
```php
Arseto\LumenCQRS\Providers\CQRSServiceProvider::class,
```
# Usage
* This package serves as template to implement CQRS
* Simply create command-handler pair and query-reader pair then inject the CommandBus and QueryBus to your controller
* Command-handler and query-reader pair must implement provided interfaces
|
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 <[email protected]>
Signed-off-by: Martin Jansa <[email protected]>
| 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,giobauermeister/openembedded,openembedded/openembedded,xifengchuo/openembedded,giobauermeister/openembedded,giobauermeister/openembedded,hulifox008/openembedded,openembedded/openembedded,giobauermeister/openembedded,xifengchuo/openembedded,giobauermeister/openembedded,xifengchuo/openembedded,hulifox008/openembedded,xifengchuo/openembedded,hulifox008/openembedded,giobauermeister/openembedded,openembedded/openembedded,hulifox008/openembedded,openembedded/openembedded,hulifox008/openembedded,openembedded/openembedded,xifengchuo/openembedded,openembedded/openembedded,giobauermeister/openembedded,xifengchuo/openembedded | 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 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 <[email protected]>
Signed-off-by: Martin Jansa <[email protected]>
## Code After:
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"
|
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() {
super("mongodb");
}
public MongoServiceInfo createServiceInfo(Map<String,Object> serviceData) {
@SuppressWarnings("unchecked")
Map<String,Object> credentials = (Map<String, Object>) serviceData.get("credentials");
String id = (String) serviceData.get("name");
String uri = (String) credentials.get("uri");
return new MongoServiceInfo(id, uri);
}
}
| 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("mongodb");
}
public MongoServiceInfo createServiceInfo(Map<String,Object> serviceData) {
@SuppressWarnings("unchecked")
Map<String,Object> credentials = (Map<String, Object>) serviceData.get("credentials");
String id = (String) serviceData.get("name");
String uri = (String) ((credentials.get("uri") == null) ? credentials.get("url") : credentials.get("uri"));
return new MongoServiceInfo(id, uri);
}
}
| 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-cloud/spring-cloud-connectors,chrisjs/spring-cloud-connectors | 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 MongoServiceInfoCreator() {
super("mongodb");
}
public MongoServiceInfo createServiceInfo(Map<String,Object> serviceData) {
@SuppressWarnings("unchecked")
Map<String,Object> credentials = (Map<String, Object>) serviceData.get("credentials");
String id = (String) serviceData.get("name");
String uri = (String) credentials.get("uri");
return new MongoServiceInfo(id, uri);
}
}
## Instruction:
Add fix for MongoDb if url is used instead of uri
## Code After:
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("mongodb");
}
public MongoServiceInfo createServiceInfo(Map<String,Object> serviceData) {
@SuppressWarnings("unchecked")
Map<String,Object> credentials = (Map<String, Object>) serviceData.get("credentials");
String id = (String) serviceData.get("name");
String uri = (String) ((credentials.get("uri") == null) ? credentials.get("url") : credentials.get("uri"));
return new MongoServiceInfo(id, uri);
}
}
|
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')}}" alt="BL Labs logo">
</a>
</div>
<div class="col-sm-6 vcenter hcenter footer-col">
{% if not enforce_privacy %}
<div class="row ie-vcenter">
<ul>
<li>
<a href="http://twitter.com/{{contact_twitter}}" target="_blank"><i class="fa fa-twitter padding-sides-xs"></i></a>
</li>
<li>
<a href="mailto:{{contact_email}}"><i class="fa fa-envelope padding-sides-xs"></i></a>
</li>
<li>
<a href="https://github.com/{{brand}}"><i class="fa fa-github padding-sides-xs"></i></a>
</li>
</ul>
</div>
{% endif %}
</div>
<div class="col-sm-3 vcenter hcenter footer-col hidden-xs">
<a href="http://pybossa.com/" target="_blank">
<img class="img-responsive center-block ie-mid-vcenter" src="{{url_for('static', filename='img/pybossa.png')}}" alt="PyBossa logo">
</a>
</div>
</div>
</div> | <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')}}" alt="BL Labs logo">
</a>
</div>
<div class="col-sm-6 footer-col">
{% if not enforce_privacy %}
<div class="row ie-vcenter">
<ul>
<li>
<a href="http://twitter.com/{{contact_twitter}}" target="_blank"><i class="fa fa-twitter padding-sides-xs"></i></a>
</li>
<li>
<a href="mailto:{{contact_email}}"><i class="fa fa-envelope padding-sides-xs"></i></a>
</li>
<li>
<a href="https://github.com/{{brand}}"><i class="fa fa-github padding-sides-xs"></i></a>
</li>
</ul>
</div>
{% endif %}
</div>
<div class="col-sm-3 footer-col hidden-xs">
<a href="http://pybossa.com/" target="_blank">
<img class="img-responsive center-block ie-mid-vcenter" src="{{url_for('static', filename='img/pybossa.png')}}" alt="PyBossa logo">
</a>
</div>
</div>
</div> | 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-logo.png')}}" alt="BL Labs logo">
</a>
</div>
<div class="col-sm-6 vcenter hcenter footer-col">
{% if not enforce_privacy %}
<div class="row ie-vcenter">
<ul>
<li>
<a href="http://twitter.com/{{contact_twitter}}" target="_blank"><i class="fa fa-twitter padding-sides-xs"></i></a>
</li>
<li>
<a href="mailto:{{contact_email}}"><i class="fa fa-envelope padding-sides-xs"></i></a>
</li>
<li>
<a href="https://github.com/{{brand}}"><i class="fa fa-github padding-sides-xs"></i></a>
</li>
</ul>
</div>
{% endif %}
</div>
<div class="col-sm-3 vcenter hcenter footer-col hidden-xs">
<a href="http://pybossa.com/" target="_blank">
<img class="img-responsive center-block ie-mid-vcenter" src="{{url_for('static', filename='img/pybossa.png')}}" alt="PyBossa logo">
</a>
</div>
</div>
</div>
## Instruction:
Fix vertical centering on footer
## Code After:
<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')}}" alt="BL Labs logo">
</a>
</div>
<div class="col-sm-6 footer-col">
{% if not enforce_privacy %}
<div class="row ie-vcenter">
<ul>
<li>
<a href="http://twitter.com/{{contact_twitter}}" target="_blank"><i class="fa fa-twitter padding-sides-xs"></i></a>
</li>
<li>
<a href="mailto:{{contact_email}}"><i class="fa fa-envelope padding-sides-xs"></i></a>
</li>
<li>
<a href="https://github.com/{{brand}}"><i class="fa fa-github padding-sides-xs"></i></a>
</li>
</ul>
</div>
{% endif %}
</div>
<div class="col-sm-3 footer-col hidden-xs">
<a href="http://pybossa.com/" target="_blank">
<img class="img-responsive center-block ie-mid-vcenter" src="{{url_for('static', filename='img/pybossa.png')}}" alt="PyBossa logo">
</a>
</div>
</div>
</div> |
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 & 1) & 1) | (2 & 1) -> (X & 1) | 0 -> X & 1
%a = and i32 %x, 1
%b = or i32 %a, 2
%c = and i32 %b, 1
ret i32 %c
; CHECK: ret i32 %a
}
| ; 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
%l = mul i32 3, %x
%r = mul i32 2, %x
%z = sub i32 %l, %r
ret i32 %z
; CHECK: ret i32 %x
}
define i32 @expand(i32 %x) {
; CHECK: @expand
; ((X & 1) | 2) & 1 -> ((X & 1) & 1) | (2 & 1) -> (X & 1) | 0 -> X & 1
%a = and i32 %x, 1
%b = or i32 %a, 2
%c = and i32 %b, 1
ret i32 %c
; CHECK: ret i32 %a
}
| 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-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap | 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) | 2) & 1 -> ((X & 1) & 1) | (2 & 1) -> (X & 1) | 0 -> X & 1
%a = and i32 %x, 1
%b = or i32 %a, 2
%c = and i32 %b, 1
ret i32 %c
; CHECK: ret i32 %a
}
## Instruction:
Add an additional InstructionSimplify factorization test.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@122333 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
; 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
%l = mul i32 3, %x
%r = mul i32 2, %x
%z = sub i32 %l, %r
ret i32 %z
; CHECK: ret i32 %x
}
define i32 @expand(i32 %x) {
; CHECK: @expand
; ((X & 1) | 2) & 1 -> ((X & 1) & 1) | (2 & 1) -> (X & 1) | 0 -> X & 1
%a = and i32 %x, 1
%b = or i32 %a, 2
%c = and i32 %b, 1
ret i32 %c
; CHECK: ret i32 %a
}
|
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 don't want to display to the terminal but just want to string you can provide a callback:
qrcode.generate('http://www.github.com', function (qrcode) {
console.log(qrcode);
});
# Developing
To setup the development envrionment run `npm install`
To run tests run `npm test`
# Contributers
Gord Tanner <[email protected]>
Micheal Brooks <[email protected]>
[travis-ci-img]: https://travis-ci.org/gtanner/qrcode-terminal.png
[travis-ci-url]: https://travis-ci.org/gtanner/qrcode-terminal
[basic-example-img]: https://raw.github.com/gtanner/qrcode-terminal/master/example/basic.png
|
> 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 don't want to display to the terminal but just want to string you can provide a callback:
qrcode.generate('http://www.github.com', function (qrcode) {
console.log(qrcode);
});
# Support
- OS X
- Windows
- Linux (untested)
# Developing
To setup the development envrionment run `npm install`
To run tests run `npm test`
# Contributers
Gord Tanner <[email protected]>
Micheal Brooks <[email protected]>
[travis-ci-img]: https://travis-ci.org/gtanner/qrcode-terminal.png
[travis-ci-url]: https://travis-ci.org/gtanner/qrcode-terminal
[basic-example-img]: https://raw.github.com/gtanner/qrcode-terminal/master/example/basic.png
| 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 QRCode Eh!');
If you don't want to display to the terminal but just want to string you can provide a callback:
qrcode.generate('http://www.github.com', function (qrcode) {
console.log(qrcode);
});
# Developing
To setup the development envrionment run `npm install`
To run tests run `npm test`
# Contributers
Gord Tanner <[email protected]>
Micheal Brooks <[email protected]>
[travis-ci-img]: https://travis-ci.org/gtanner/qrcode-terminal.png
[travis-ci-url]: https://travis-ci.org/gtanner/qrcode-terminal
[basic-example-img]: https://raw.github.com/gtanner/qrcode-terminal/master/example/basic.png
## Instruction:
[doc] Clarify OS support since few libs run on Windows.
## Code After:
> 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 don't want to display to the terminal but just want to string you can provide a callback:
qrcode.generate('http://www.github.com', function (qrcode) {
console.log(qrcode);
});
# Support
- OS X
- Windows
- Linux (untested)
# Developing
To setup the development envrionment run `npm install`
To run tests run `npm test`
# Contributers
Gord Tanner <[email protected]>
Micheal Brooks <[email protected]>
[travis-ci-img]: https://travis-ci.org/gtanner/qrcode-terminal.png
[travis-ci-url]: https://travis-ci.org/gtanner/qrcode-terminal
[basic-example-img]: https://raw.github.com/gtanner/qrcode-terminal/master/example/basic.png
|
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)
### Data-Store/Database Mapping Test
Uses the Symfony 2/Doctrine 2 Entity functionality.
* [DB test controller](src/Skamander/BenchmarkBundle/Controller/BenchController.php)
* [DB test model](src/Skamander/BenchmarkBundle/Entity/World.php)
### Template Test
Uses Symfony's template engine 'Twig'
* [Template test controller](src/Skamander/BenchmarkBundle/Controller/BenchController.php)
## Infrastructure Software Versions
The tests were run with:
* [Symfony Version 2.2.1](http://symfony.com/)
* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
* [nginx 1.4.0](http://nginx.org/)
* [MySQL 5.5.29](https://dev.mysql.com/)
## Test URLs
### JSON Encoding Test
http://localhost/json
### Data-Store/Database Mapping Test
http://localhost/db
### Variable Query Test
http://localhost/db?queries=2
### Templating Test
http://localhost/fortunes |
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.php)
### Data-Store/Database Mapping Test
Uses the Symfony 2/Doctrine 2 Entity functionality.
* [DB test controller](src/Skamander/BenchmarkBundle/Controller/BenchController.php)
* [DB test model](src/Skamander/BenchmarkBundle/Entity/World.php)
### Template Test
Uses Symfony's template engine 'Twig'
* [Template test controller](src/Skamander/BenchmarkBundle/Controller/BenchController.php)
## Infrastructure Software Versions
The tests were run with:
* [Symfony Version 2.2.1](http://symfony.com/)
* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
* [nginx 1.4.0](http://nginx.org/)
* [MySQL 5.5.29](https://dev.mysql.com/)
## Test URLs
### JSON Encoding Test
http://localhost/json
### Data-Store/Database Mapping Test
http://localhost/db
### Variable Query Test
http://localhost/db?queries=2
### Templating Test
http://localhost/fortunes
| 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/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,sxend/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,sxend/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,denkab/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,denkab/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,jamming/FrameworkBenchmarks,sgml/FrameworkBenchmarks,sxend/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,herloct/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,joshk/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,grob/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,actframework/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,actframework/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,sgml/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,dmacd/FB-try1,RockinRoel/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,herloct/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,valyala/FrameworkBenchmarks,actframework/FrameworkBenchmarks,khellang/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,grob/FrameworkBenchmarks,dmacd/FB-try1,Synchro/FrameworkBenchmarks,zapov/FrameworkBenchmarks,doom369/FrameworkBenchmarks,jamming/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,joshk/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,Verber/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,actframework/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,zloster/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,sxend/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,jamming/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,Verber/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,denkab/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,methane/FrameworkBenchmarks,denkab/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,herloct/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,zloster/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,zloster/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,methane/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,valyala/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,sgml/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,testn/FrameworkBenchmarks,methane/FrameworkBenchmarks,denkab/FrameworkBenchmarks,denkab/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,doom369/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,testn/FrameworkBenchmarks,valyala/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,doom369/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,Verber/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,sxend/FrameworkBenchmarks,khellang/FrameworkBenchmarks,sxend/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,leafo/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,sxend/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,grob/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,sgml/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,zapov/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,sgml/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,methane/FrameworkBenchmarks,grob/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,zapov/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,dmacd/FB-try1,kostya-sh/FrameworkBenchmarks,leafo/FrameworkBenchmarks,sgml/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Verber/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,joshk/FrameworkBenchmarks,sxend/FrameworkBenchmarks,khellang/FrameworkBenchmarks,valyala/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,zloster/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,zapov/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,actframework/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,jamming/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,herloct/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,torhve/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,actframework/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,khellang/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,doom369/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,khellang/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,khellang/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,dmacd/FB-try1,sanjoydesk/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,khellang/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,torhve/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,sxend/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,actframework/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,khellang/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,sxend/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,Verber/FrameworkBenchmarks,valyala/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,valyala/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,grob/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,torhve/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,doom369/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,torhve/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,doom369/FrameworkBenchmarks,sxend/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,jamming/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,actframework/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,testn/FrameworkBenchmarks,jamming/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,khellang/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,actframework/FrameworkBenchmarks,doom369/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,torhve/FrameworkBenchmarks,leafo/FrameworkBenchmarks,actframework/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,Verber/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,torhve/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Verber/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,testn/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,testn/FrameworkBenchmarks,methane/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,sxend/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,doom369/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,sxend/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,sgml/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,jamming/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,joshk/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,testn/FrameworkBenchmarks,Verber/FrameworkBenchmarks,jamming/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,grob/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,herloct/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,grob/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,zapov/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,testn/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,sgml/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,zapov/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,dmacd/FB-try1,joshk/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,joshk/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,dmacd/FB-try1,markkolich/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,denkab/FrameworkBenchmarks,zapov/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,khellang/FrameworkBenchmarks,sgml/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,zapov/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,joshk/FrameworkBenchmarks,doom369/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,khellang/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,testn/FrameworkBenchmarks,grob/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,testn/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,zapov/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,zapov/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,zapov/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,sxend/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,zloster/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Verber/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,valyala/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,torhve/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,sxend/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,torhve/FrameworkBenchmarks,valyala/FrameworkBenchmarks,leafo/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,doom369/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,leafo/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,leafo/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,dmacd/FB-try1,raziel057/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,actframework/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,joshk/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,khellang/FrameworkBenchmarks,leafo/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,zapov/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,doom369/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,methane/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,dmacd/FB-try1,nbrady-techempower/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,Verber/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,joshk/FrameworkBenchmarks,methane/FrameworkBenchmarks,methane/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,dmacd/FB-try1,Jesterovskiy/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,valyala/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,actframework/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,actframework/FrameworkBenchmarks,doom369/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,sxend/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,sgml/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,herloct/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,denkab/FrameworkBenchmarks,zloster/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,testn/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,valyala/FrameworkBenchmarks,sgml/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Verber/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,zloster/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,testn/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,joshk/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,doom369/FrameworkBenchmarks,actframework/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,doom369/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,zapov/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,methane/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,khellang/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,herloct/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,denkab/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,sgml/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,jamming/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,jamming/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,testn/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,Verber/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,herloct/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,herloct/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,valyala/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,doom369/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,herloct/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,sgml/FrameworkBenchmarks,zloster/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,herloct/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,valyala/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,denkab/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,grob/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,sxend/FrameworkBenchmarks,leafo/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,grob/FrameworkBenchmarks,leafo/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,jamming/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,torhve/FrameworkBenchmarks,actframework/FrameworkBenchmarks,methane/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,zapov/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,testn/FrameworkBenchmarks,sxend/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,jamming/FrameworkBenchmarks,leafo/FrameworkBenchmarks,grob/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,zapov/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,joshk/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,zapov/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,zloster/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,leafo/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,methane/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,joshk/FrameworkBenchmarks,doom369/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,grob/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,grob/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,leafo/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,denkab/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,methane/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,doom369/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,dmacd/FB-try1,ratpack/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,jamming/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,zloster/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,methane/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,valyala/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,torhve/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,denkab/FrameworkBenchmarks,denkab/FrameworkBenchmarks,grob/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Verber/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,sgml/FrameworkBenchmarks,khellang/FrameworkBenchmarks,zloster/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,denkab/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,torhve/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,dmacd/FB-try1,Eyepea/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,jamming/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,testn/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,herloct/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,zloster/FrameworkBenchmarks,dmacd/FB-try1,victorbriz/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,zloster/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,methane/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,Verber/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,joshk/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,actframework/FrameworkBenchmarks,torhve/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,zloster/FrameworkBenchmarks,valyala/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks | 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/BenchController.php)
### Data-Store/Database Mapping Test
Uses the Symfony 2/Doctrine 2 Entity functionality.
* [DB test controller](src/Skamander/BenchmarkBundle/Controller/BenchController.php)
* [DB test model](src/Skamander/BenchmarkBundle/Entity/World.php)
### Template Test
Uses Symfony's template engine 'Twig'
* [Template test controller](src/Skamander/BenchmarkBundle/Controller/BenchController.php)
## Infrastructure Software Versions
The tests were run with:
* [Symfony Version 2.2.1](http://symfony.com/)
* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
* [nginx 1.4.0](http://nginx.org/)
* [MySQL 5.5.29](https://dev.mysql.com/)
## Test URLs
### JSON Encoding Test
http://localhost/json
### Data-Store/Database Mapping Test
http://localhost/db
### Variable Query Test
http://localhost/db?queries=2
### Templating Test
http://localhost/fortunes
## Instruction:
Fix link to JSON test controller
## Code After:
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.php)
### Data-Store/Database Mapping Test
Uses the Symfony 2/Doctrine 2 Entity functionality.
* [DB test controller](src/Skamander/BenchmarkBundle/Controller/BenchController.php)
* [DB test model](src/Skamander/BenchmarkBundle/Entity/World.php)
### Template Test
Uses Symfony's template engine 'Twig'
* [Template test controller](src/Skamander/BenchmarkBundle/Controller/BenchController.php)
## Infrastructure Software Versions
The tests were run with:
* [Symfony Version 2.2.1](http://symfony.com/)
* [PHP Version 5.4.13](http://www.php.net/) with FPM and APC
* [nginx 1.4.0](http://nginx.org/)
* [MySQL 5.5.29](https://dev.mysql.com/)
## Test URLs
### JSON Encoding Test
http://localhost/json
### Data-Store/Database Mapping Test
http://localhost/db
### Variable Query Test
http://localhost/db?queries=2
### Templating Test
http://localhost/fortunes
|
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 "bin/"*.bat
mv * $out
'';
meta = {
description = "Scala is a general purpose programming language";
longDescription = ''
Scala is a general purpose programming language designed to express
common programming patterns in a concise, elegant, and type-safe way.
It smoothly integrates features of object-oriented and functional
languages, enabling Java and other programmers to be more productive.
Code sizes are typically reduced by a factor of two to three when
compared to an equivalent Java application.
'';
homepage = http://www.scala-lang.org/;
license = "BSD";
platforms = stdenv.lib.platforms.all;
};
}
| { 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 bin/*.bat
rm lib/scalacheck.jar
mv * $out
'';
meta = {
description = "Scala is a general purpose programming language";
longDescription = ''
Scala is a general purpose programming language designed to express
common programming patterns in a concise, elegant, and type-safe way.
It smoothly integrates features of object-oriented and functional
languages, enabling Java and other programmers to be more productive.
Code sizes are typically reduced by a factor of two to three when
compared to an equivalent Java application.
'';
homepage = http://www.scala-lang.org/;
license = "BSD";
platforms = stdenv.lib.platforms.all;
};
}
| 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/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs | 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 -p $out
rm "bin/"*.bat
mv * $out
'';
meta = {
description = "Scala is a general purpose programming language";
longDescription = ''
Scala is a general purpose programming language designed to express
common programming patterns in a concise, elegant, and type-safe way.
It smoothly integrates features of object-oriented and functional
languages, enabling Java and other programmers to be more productive.
Code sizes are typically reduced by a factor of two to three when
compared to an equivalent Java application.
'';
homepage = http://www.scala-lang.org/;
license = "BSD";
platforms = stdenv.lib.platforms.all;
};
}
## Instruction:
scala: Remove scalacheck.jar from scala's classpath
## Code After:
{ 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 bin/*.bat
rm lib/scalacheck.jar
mv * $out
'';
meta = {
description = "Scala is a general purpose programming language";
longDescription = ''
Scala is a general purpose programming language designed to express
common programming patterns in a concise, elegant, and type-safe way.
It smoothly integrates features of object-oriented and functional
languages, enabling Java and other programmers to be more productive.
Code sizes are typically reduced by a factor of two to three when
compared to an equivalent Java application.
'';
homepage = http://www.scala-lang.org/;
license = "BSD";
platforms = stdenv.lib.platforms.all;
};
}
|
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:
- python setup.py test
| 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.d/xvfb start"
branches:
only:
- master
- testsuite
script:
- python setup.py test
| 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
script:
- python setup.py test
## Instruction:
Allow browser tests on Travis CI
## Code After:
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.d/xvfb start"
branches:
only:
- master
- testsuite
script:
- python setup.py test
|
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"
case class TestCase(name: String, expectedResultSize: Int)
Vector(
TestCase("PosLength", 95),
TestCase("RouteSensor", 18),
TestCase("SemaphoreNeighbor", 3),
TestCase("SwitchMonitored", 0),
TestCase("SwitchSet", 5)
).foreach(
t => t.name should "work" in {
val query = Source.fromFile(queryPath(t.name)).getLines().mkString
val adapter = new IngraphAdapter(query)
val tf = new TransactionFactory(16)
tf.subscribe(adapter.engine.inputLookup)
val tran = tf.newBatchTransaction()
adapter.readGraph(modelPath, tran)
tran.close()
val results = adapter.engine.getResults().size
assert(results == t.expectedResultSize)
}
)
}
| 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 = "../trainbenchmark/models/railway-repair-1-tinkerpop.graphml"
def queryPath(query: String): String = s"queries/trainbenchmark/$query.cypher"
case class TestCase(name: String, expectedResultSize: Int)
Vector(
TestCase("PosLength", 95),
TestCase("RouteSensor", 18),
TestCase("SemaphoreNeighbor", 3),
TestCase("SwitchMonitored", 0),
TestCase("SwitchSet", 5)
).foreach(
t => t.name should "work" in {
val query = Source.fromFile(queryPath(t.name)).getLines().mkString
val adapter = new IngraphAdapter(query)
val tf = new TransactionFactory(16)
tf.subscribe(adapter.engine.inputLookup)
val tran = tf.newBatchTransaction()
adapter.readGraph(modelPath, tran)
tran.close()
val results = adapter.engine.getResults().size
assert(results == t.expectedResultSize)
}
)
}
| 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/$query.cypher"
case class TestCase(name: String, expectedResultSize: Int)
Vector(
TestCase("PosLength", 95),
TestCase("RouteSensor", 18),
TestCase("SemaphoreNeighbor", 3),
TestCase("SwitchMonitored", 0),
TestCase("SwitchSet", 5)
).foreach(
t => t.name should "work" in {
val query = Source.fromFile(queryPath(t.name)).getLines().mkString
val adapter = new IngraphAdapter(query)
val tf = new TransactionFactory(16)
tf.subscribe(adapter.engine.inputLookup)
val tran = tf.newBatchTransaction()
adapter.readGraph(modelPath, tran)
tran.close()
val results = adapter.engine.getResults().size
assert(results == t.expectedResultSize)
}
)
}
## Instruction:
Add comment for Eclipse & ScalaTest
## Code After:
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 = "../trainbenchmark/models/railway-repair-1-tinkerpop.graphml"
def queryPath(query: String): String = s"queries/trainbenchmark/$query.cypher"
case class TestCase(name: String, expectedResultSize: Int)
Vector(
TestCase("PosLength", 95),
TestCase("RouteSensor", 18),
TestCase("SemaphoreNeighbor", 3),
TestCase("SwitchMonitored", 0),
TestCase("SwitchSet", 5)
).foreach(
t => t.name should "work" in {
val query = Source.fromFile(queryPath(t.name)).getLines().mkString
val adapter = new IngraphAdapter(query)
val tf = new TransactionFactory(16)
tf.subscribe(adapter.engine.inputLookup)
val tran = tf.newBatchTransaction()
adapter.readGraph(modelPath, tran)
tran.close()
val results = adapter.engine.getResults().size
assert(results == t.expectedResultSize)
}
)
}
|
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: /\A#{URI.regexp(%w[http https])}\z/, allow_blank: true
def self.years
Live.order_by_date.select(:date).map(&:nendo).uniq
end
def title
"#{date.year} #{name}"
end
def nendo
if date.mon < 4
date.year - 1
else
date.year
end
end
end
| 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_url, format: /\A#{URI.regexp(%w[http https])}\z/, allow_blank: true
def self.years
Live.order_by_date.select(:date).map(&:nendo).uniq
end
def title
"#{date.year} #{name}"
end
def nendo
if date.mon < 4
date.year - 1
else
date.year
end
end
end
| 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 :album_url, format: /\A#{URI.regexp(%w[http https])}\z/, allow_blank: true
def self.years
Live.order_by_date.select(:date).map(&:nendo).uniq
end
def title
"#{date.year} #{name}"
end
def nendo
if date.mon < 4
date.year - 1
else
date.year
end
end
end
## Instruction:
Change the start of `future` scope
## Code After:
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_url, format: /\A#{URI.regexp(%w[http https])}\z/, allow_blank: true
def self.years
Live.order_by_date.select(:date).map(&:nendo).uniq
end
def title
"#{date.year} #{name}"
end
def nendo
if date.mon < 4
date.year - 1
else
date.year
end
end
end
|
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_test](https://github.com/alphagov/govuk_test) for
test dependencies
Some projects use MiniTest. If you're in the position, you should convert these
tests into RSpec tests, but never mix RSpec and MiniTest in projects.
## Linting Ruby code
- Projects must use [RuboCop](https://github.com/rubocop-hq/rubocop) with
[rubocop-govuk](https://github.com/alphagov/rubocop-govuk) style rules.
See [Lint your Ruby code](/manual/lint-ruby-code.html) for more instructions.
## Background processing
- Projects must use [govuk_sidekiq](https://github.com/alphagov/govuk_sidekiq)
## Using RabbitMQ
- Projects must use [govuk_message_queue_consumer](https://github.com/alphagov/govuk_message_queue_consumer)
| ---
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](https://github.com/alphagov/govuk_test) for
test dependencies
Some projects use MiniTest. If you're in the position, you should convert these
tests into RSpec tests, but never mix RSpec and MiniTest in projects.
## Linting Ruby code
- Projects must use [RuboCop](https://github.com/rubocop-hq/rubocop) with
[rubocop-govuk](https://github.com/alphagov/rubocop-govuk) style rules.
See [Lint your Ruby code](/manual/lint-ruby-code.html) for more instructions.
## Background processing
- Projects must use [govuk_sidekiq](https://github.com/alphagov/govuk_sidekiq)
## Using RabbitMQ
- Projects must use [govuk_message_queue_consumer](https://github.com/alphagov/govuk_message_queue_consumer)
| 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 must use [govuk_test](https://github.com/alphagov/govuk_test) for
test dependencies
Some projects use MiniTest. If you're in the position, you should convert these
tests into RSpec tests, but never mix RSpec and MiniTest in projects.
## Linting Ruby code
- Projects must use [RuboCop](https://github.com/rubocop-hq/rubocop) with
[rubocop-govuk](https://github.com/alphagov/rubocop-govuk) style rules.
See [Lint your Ruby code](/manual/lint-ruby-code.html) for more instructions.
## Background processing
- Projects must use [govuk_sidekiq](https://github.com/alphagov/govuk_sidekiq)
## Using RabbitMQ
- Projects must use [govuk_message_queue_consumer](https://github.com/alphagov/govuk_message_queue_consumer)
## Instruction:
Move "Figure out which gem to use" to Dependencies section
## Code After:
---
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](https://github.com/alphagov/govuk_test) for
test dependencies
Some projects use MiniTest. If you're in the position, you should convert these
tests into RSpec tests, but never mix RSpec and MiniTest in projects.
## Linting Ruby code
- Projects must use [RuboCop](https://github.com/rubocop-hq/rubocop) with
[rubocop-govuk](https://github.com/alphagov/rubocop-govuk) style rules.
See [Lint your Ruby code](/manual/lint-ruby-code.html) for more instructions.
## Background processing
- Projects must use [govuk_sidekiq](https://github.com/alphagov/govuk_sidekiq)
## Using RabbitMQ
- Projects must use [govuk_message_queue_consumer](https://github.com/alphagov/govuk_message_queue_consumer)
|
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 install eigen
brew install opencv
brew install youtube-dl
brew install gpg
npm install -g gitjk
# Cask files
brew tap phinze/cask
brew install brew-cask
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
brew cask install google-chrome
brew cask install vlc
brew cask install iterm2
brew cask install flux
brew cask install spectacle
brew cask install dropbox
brew cask install heroku-toolbelt
brew cask install sublime-text
brew cask install postgres
brew cask install ccleaner
brew cask install dash
brew cask install the-unarchiver
brew cask install firefox
brew cask install skype
brew cask install gpgtools
# Veracrypt must be installed manually
brew cask install osxfuse
brew cask install sshfs
# brew cask install virtualbox
# Fonts
brew tap caskroom/fonts
brew cask install font-noto-sans
brew cask install font-vollkorn
brew cask install font-open-sans
brew cask install font-source-sans-pro
brew cask install font-computer-modern
brew cask install font-comic-neue
brew cask install font-montserrat
| /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 install eigen
brew install opencv
brew install youtube-dl
brew install gpg
npm install -g gitjk
# Cask files
brew tap phinze/cask
brew install brew-cask
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
brew cask install google-chrome
brew cask install vlc
brew cask install iterm2
brew cask install flux
brew cask install spectacle
brew cask install dropbox
brew cask install heroku-toolbelt
brew cask install sublime-text
brew cask install postgres
brew cask install ccleaner
brew cask install dash
brew cask install the-unarchiver
brew cask install firefox
brew cask install skype
brew cask install gpgtools
brew cask install flash
brew cask install radiant-player
# Veracrypt must be installed manually
brew cask install osxfuse
brew cask install sshfs
# brew cask install virtualbox
# Fonts
brew tap caskroom/fonts
brew cask install font-noto-sans
brew cask install font-vollkorn
brew cask install font-open-sans
brew cask install font-source-sans-pro
brew cask install font-computer-modern
brew cask install font-comic-neue
brew cask install font-montserrat
| 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 install ffmpeg
brew install eigen
brew install opencv
brew install youtube-dl
brew install gpg
npm install -g gitjk
# Cask files
brew tap phinze/cask
brew install brew-cask
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
brew cask install google-chrome
brew cask install vlc
brew cask install iterm2
brew cask install flux
brew cask install spectacle
brew cask install dropbox
brew cask install heroku-toolbelt
brew cask install sublime-text
brew cask install postgres
brew cask install ccleaner
brew cask install dash
brew cask install the-unarchiver
brew cask install firefox
brew cask install skype
brew cask install gpgtools
# Veracrypt must be installed manually
brew cask install osxfuse
brew cask install sshfs
# brew cask install virtualbox
# Fonts
brew tap caskroom/fonts
brew cask install font-noto-sans
brew cask install font-vollkorn
brew cask install font-open-sans
brew cask install font-source-sans-pro
brew cask install font-computer-modern
brew cask install font-comic-neue
brew cask install font-montserrat
## Instruction:
Install radiant-player for Google Play Music
## Code After:
/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 install eigen
brew install opencv
brew install youtube-dl
brew install gpg
npm install -g gitjk
# Cask files
brew tap phinze/cask
brew install brew-cask
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
brew cask install google-chrome
brew cask install vlc
brew cask install iterm2
brew cask install flux
brew cask install spectacle
brew cask install dropbox
brew cask install heroku-toolbelt
brew cask install sublime-text
brew cask install postgres
brew cask install ccleaner
brew cask install dash
brew cask install the-unarchiver
brew cask install firefox
brew cask install skype
brew cask install gpgtools
brew cask install flash
brew cask install radiant-player
# Veracrypt must be installed manually
brew cask install osxfuse
brew cask install sshfs
# brew cask install virtualbox
# Fonts
brew tap caskroom/fonts
brew cask install font-noto-sans
brew cask install font-vollkorn
brew cask install font-open-sans
brew cask install font-source-sans-pro
brew cask install font-computer-modern
brew cask install font-comic-neue
brew cask install font-montserrat
|
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}"
)
return render_template("index.html", articles=r.json().get("articles"))
if __name__ == "__main__":
app.run() | 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.run()
## Instruction:
Use requests instead of feedparser.
## Code After:
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}"
)
return render_template("index.html", articles=r.json().get("articles"))
if __name__ == "__main__":
app.run() |
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 sga.Server != util.GetServerVersion() {
t.Errorf("Mismatch in the server version: %s vs %s", util.GetServerVersion(), sga.Server)
}
if sga.Web != util.GetWebVersion() {
t.Errorf("Mismatch in the web version: %s vs %s", util.GetWebVersion(), sga.Web)
}
}
| 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 {
t.Fatal(err)
}
if sga.Server != util.GetServerVersion() {
t.Errorf("Mismatch in the server version: %s vs %s", util.GetServerVersion(), sga.Server)
}
if sga.Web != util.GetWebVersion() {
t.Errorf("Mismatch in the web version: %s vs %s", util.GetWebVersion(), sga.Web)
}
}
| 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.Fatal(err)
}
if sga.Server != util.GetServerVersion() {
t.Errorf("Mismatch in the server version: %s vs %s", util.GetServerVersion(), sga.Server)
}
if sga.Web != util.GetWebVersion() {
t.Errorf("Mismatch in the web version: %s vs %s", util.GetWebVersion(), sga.Web)
}
}
## Instruction:
Make sure we don't use any auth/cookie when testing version
## Code After:
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 {
t.Fatal(err)
}
if sga.Server != util.GetServerVersion() {
t.Errorf("Mismatch in the server version: %s vs %s", util.GetServerVersion(), sga.Server)
}
if sga.Web != util.GetWebVersion() {
t.Errorf("Mismatch in the web version: %s vs %s", util.GetWebVersion(), sga.Web)
}
}
|
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
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"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.