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
94c8e82694546cd77dc956a4269448e504276969
src/background.js
src/background.js
/*global chrome, hwRules */ chrome.runtime.onInstalled.addListener(function(details) { // Install declarative content rules if (details.reason == 'update') { // Upgrade stored data to a new format when a new version is installed. // Delay installing the rules until the data is upgraded in case the new rules code relies // on the new format. chrome.storage.local.get(null, function (items) { _upgradeData(items); hwRules.resetRules(); }); } else { hwRules.resetRules(); } function _upgradeData(items) { Object.keys(items).filter(function (domain) { var settings = items[domain]; // For data from previous versions that doesn't have the create/access dates. // We'll use 0 as a special value to indicate that the date is not known. This will // allow us to know that these sites already have hashwords created for them, as // well as show a special string in the options page for such cases. if (settings.createDate == null) { settings.createDate = 0; settings.accessDate = 0; return true; } return false; }); chrome.storage.local.set(items); } }); // Just in case chrome.runtime.onStartup.addListener(hwRules.resetRules);
/*global chrome, hwRules */ chrome.runtime.onInstalled.addListener(function(details) { // Install declarative content rules if (details.reason == 'update') { console.info('Upgrade detected, checking data format...'); // Upgrade stored data to a new format when a new version is installed. // Delay installing the rules until the data is upgraded in case the new rules code relies // on the new format. chrome.storage.local.get(null, function (items) { _upgradeData(items); console.info('Data upgraded, adding declarativeContent rules'); hwRules.resetRules(); }); } else { console.info('Adding declarativeContent rules for new install'); hwRules.resetRules(); } function _upgradeData(items) { Object.keys(items).filter(function (domain) { var settings = items[domain]; // For data from previous versions that doesn't have the create/access dates. // We'll use 0 as a special value to indicate that the date is not known. This will // allow us to know that these sites already have hashwords created for them, as // well as show a special string in the options page for such cases. if (settings.createDate == null) { settings.createDate = 0; settings.accessDate = 0; return true; } return false; }); chrome.storage.local.set(items); } }); // Just in case chrome.runtime.onStartup.addListener(hwRules.resetRules);
Add some logging at install time
Add some logging at install time Otherwise, it's tough to know if this code executed.
JavaScript
mit
mmeisel/hashword,mmeisel/hashword
javascript
## Code Before: /*global chrome, hwRules */ chrome.runtime.onInstalled.addListener(function(details) { // Install declarative content rules if (details.reason == 'update') { // Upgrade stored data to a new format when a new version is installed. // Delay installing the rules until the data is upgraded in case the new rules code relies // on the new format. chrome.storage.local.get(null, function (items) { _upgradeData(items); hwRules.resetRules(); }); } else { hwRules.resetRules(); } function _upgradeData(items) { Object.keys(items).filter(function (domain) { var settings = items[domain]; // For data from previous versions that doesn't have the create/access dates. // We'll use 0 as a special value to indicate that the date is not known. This will // allow us to know that these sites already have hashwords created for them, as // well as show a special string in the options page for such cases. if (settings.createDate == null) { settings.createDate = 0; settings.accessDate = 0; return true; } return false; }); chrome.storage.local.set(items); } }); // Just in case chrome.runtime.onStartup.addListener(hwRules.resetRules); ## Instruction: Add some logging at install time Otherwise, it's tough to know if this code executed. ## Code After: /*global chrome, hwRules */ chrome.runtime.onInstalled.addListener(function(details) { // Install declarative content rules if (details.reason == 'update') { console.info('Upgrade detected, checking data format...'); // Upgrade stored data to a new format when a new version is installed. // Delay installing the rules until the data is upgraded in case the new rules code relies // on the new format. chrome.storage.local.get(null, function (items) { _upgradeData(items); console.info('Data upgraded, adding declarativeContent rules'); hwRules.resetRules(); }); } else { console.info('Adding declarativeContent rules for new install'); hwRules.resetRules(); } function _upgradeData(items) { Object.keys(items).filter(function (domain) { var settings = items[domain]; // For data from previous versions that doesn't have the create/access dates. // We'll use 0 as a special value to indicate that the date is not known. This will // allow us to know that these sites already have hashwords created for them, as // well as show a special string in the options page for such cases. if (settings.createDate == null) { settings.createDate = 0; settings.accessDate = 0; return true; } return false; }); chrome.storage.local.set(items); } }); // Just in case chrome.runtime.onStartup.addListener(hwRules.resetRules);
753c36a4f26f63d5a5684591b0c619e04cf08e0b
README.md
README.md
Hadoop Yarn dockerized ==== This is a set of scripts to create a full Hadoop Yarn cluster, each node inside a docker container. Quick start --- To create a 3 node YARN cluster, run: ``` bash <(curl -s https://raw.githubusercontent.com/gustavonalle/yarn-docker/master/cluster.sh) ``` Usage --- Run the script cluster/cluster.sh passing the number of slaves: ``` ./cluster.sh 3 ``` After the container creation the script will print the master ip address. http://master:50070 for the HDFS console http://master:8088 for the YARN UI Details --- Each container is based on Alpine Linux and OpenJDK 1.8. The master container will run the namenode, secondary namenode, and the resource manager. Each slave container will run the data node and the node manager.
Hadoop Yarn dockerized ==== This is a set of scripts to create a full Hadoop Yarn cluster, each node inside a docker container. Quick start --- To create a 3 node YARN cluster, run: ``` bash <(curl -s https://raw.githubusercontent.com/gustavonalle/yarn-docker/master/cluster.sh) ``` Usage --- Run the script cluster/cluster.sh passing the number of slaves: ``` ./cluster.sh 3 ``` After the container creation the script will print the master ip address. http://master:9870/dfshealth.html#tab-datanode for the HDFS console http://master:8088/cluster/nodes for the YARN UI Details --- Each container is based on Alpine Linux and OpenJDK 1.8. The master container will run the namenode, secondary namenode, and the resource manager. Each slave container will run the data node and the node manager.
Update the URL of consoles
Update the URL of consoles
Markdown
apache-2.0
gustavonalle/yarn-docker
markdown
## Code Before: Hadoop Yarn dockerized ==== This is a set of scripts to create a full Hadoop Yarn cluster, each node inside a docker container. Quick start --- To create a 3 node YARN cluster, run: ``` bash <(curl -s https://raw.githubusercontent.com/gustavonalle/yarn-docker/master/cluster.sh) ``` Usage --- Run the script cluster/cluster.sh passing the number of slaves: ``` ./cluster.sh 3 ``` After the container creation the script will print the master ip address. http://master:50070 for the HDFS console http://master:8088 for the YARN UI Details --- Each container is based on Alpine Linux and OpenJDK 1.8. The master container will run the namenode, secondary namenode, and the resource manager. Each slave container will run the data node and the node manager. ## Instruction: Update the URL of consoles ## Code After: Hadoop Yarn dockerized ==== This is a set of scripts to create a full Hadoop Yarn cluster, each node inside a docker container. Quick start --- To create a 3 node YARN cluster, run: ``` bash <(curl -s https://raw.githubusercontent.com/gustavonalle/yarn-docker/master/cluster.sh) ``` Usage --- Run the script cluster/cluster.sh passing the number of slaves: ``` ./cluster.sh 3 ``` After the container creation the script will print the master ip address. http://master:9870/dfshealth.html#tab-datanode for the HDFS console http://master:8088/cluster/nodes for the YARN UI Details --- Each container is based on Alpine Linux and OpenJDK 1.8. The master container will run the namenode, secondary namenode, and the resource manager. Each slave container will run the data node and the node manager.
ea2247fe90836e92067ce27e5b22cf8e7dc7bc1b
saleor/app/tasks.py
saleor/app/tasks.py
import logging from django.core.exceptions import ValidationError from requests import HTTPError, RequestException from .. import celeryconf from ..core import JobStatus from .installation_utils import install_app from .models import AppInstallation logger = logging.getLogger(__name__) @celeryconf.app.task def install_app_task(job_id, activate=False): app_installation = AppInstallation.objects.get(id=job_id) try: install_app(app_installation, activate=activate) app_installation.delete() return except ValidationError as e: msg = ", ".join([f"{name}: {err}" for name, err in e.message_dict.items()]) app_installation.message = msg except (RequestException, HTTPError) as e: logger.warning("Failed to install an app. error: %s", e) app_installation.message = ( "Failed to connect to app. Try later or contact with app support." ) except Exception: app_installation.message = "Unknow error. Contact with app support." app_installation.status = JobStatus.FAILED app_installation.save()
import logging from django.core.exceptions import ValidationError from requests import HTTPError, RequestException from .. import celeryconf from ..core import JobStatus from .installation_utils import install_app from .models import AppInstallation logger = logging.getLogger(__name__) @celeryconf.app.task def install_app_task(job_id, activate=False): app_installation = AppInstallation.objects.get(id=job_id) try: install_app(app_installation, activate=activate) app_installation.delete() return except ValidationError as e: msg = ", ".join([f"{name}: {err}" for name, err in e.message_dict.items()]) app_installation.message = msg except (RequestException, HTTPError) as e: logger.warning("Failed to install an app. error: %s", e) app_installation.message = ( "Failed to connect to app. Try later or contact with app support." ) except Exception as e: logger.warning("Failed to install app. error %s", e) app_installation.message = f"Error {e}. Contact with app support." app_installation.status = JobStatus.FAILED app_installation.save()
Add more context to install app msg
Add more context to install app msg
Python
bsd-3-clause
mociepka/saleor,mociepka/saleor,mociepka/saleor
python
## Code Before: import logging from django.core.exceptions import ValidationError from requests import HTTPError, RequestException from .. import celeryconf from ..core import JobStatus from .installation_utils import install_app from .models import AppInstallation logger = logging.getLogger(__name__) @celeryconf.app.task def install_app_task(job_id, activate=False): app_installation = AppInstallation.objects.get(id=job_id) try: install_app(app_installation, activate=activate) app_installation.delete() return except ValidationError as e: msg = ", ".join([f"{name}: {err}" for name, err in e.message_dict.items()]) app_installation.message = msg except (RequestException, HTTPError) as e: logger.warning("Failed to install an app. error: %s", e) app_installation.message = ( "Failed to connect to app. Try later or contact with app support." ) except Exception: app_installation.message = "Unknow error. Contact with app support." app_installation.status = JobStatus.FAILED app_installation.save() ## Instruction: Add more context to install app msg ## Code After: import logging from django.core.exceptions import ValidationError from requests import HTTPError, RequestException from .. import celeryconf from ..core import JobStatus from .installation_utils import install_app from .models import AppInstallation logger = logging.getLogger(__name__) @celeryconf.app.task def install_app_task(job_id, activate=False): app_installation = AppInstallation.objects.get(id=job_id) try: install_app(app_installation, activate=activate) app_installation.delete() return except ValidationError as e: msg = ", ".join([f"{name}: {err}" for name, err in e.message_dict.items()]) app_installation.message = msg except (RequestException, HTTPError) as e: logger.warning("Failed to install an app. error: %s", e) app_installation.message = ( "Failed to connect to app. Try later or contact with app support." ) except Exception as e: logger.warning("Failed to install app. error %s", e) app_installation.message = f"Error {e}. Contact with app support." app_installation.status = JobStatus.FAILED app_installation.save()
8c6ff33c8a034c2eecf5f2244811c86acf96120a
tools/apollo/list_organisms.py
tools/apollo/list_organisms.py
from __future__ import print_function import argparse import json from webapollo import AssertUser, WAAuth, WebApolloInstance, accessible_organisms, PasswordGenerator if __name__ == '__main__': parser = argparse.ArgumentParser(description='List all organisms available in an Apollo instance') WAAuth(parser) parser.add_argument('email', help='User Email') args = parser.parse_args() wa = WebApolloInstance(args.apollo, args.username, args.password) try: gx_user = AssertUser(wa.users.loadUsers(email=args.email)) except Exception: returnData = wa.users.createUser(args.email, args.email, args.email, PasswordGenerator(12), role='user', addToHistory=True) gx_user = AssertUser(wa.users.loadUsers(email=args.email)) all_orgs = wa.organisms.findAllOrganisms() orgs = accessible_organisms(gx_user, all_orgs) print(json.dumps(orgs, indent=2))
from __future__ import print_function import argparse import json from webapollo import AssertUser, WAAuth, WebApolloInstance, accessible_organisms, PasswordGenerator if __name__ == '__main__': parser = argparse.ArgumentParser(description='List all organisms available in an Apollo instance') WAAuth(parser) parser.add_argument('email', help='User Email') args = parser.parse_args() wa = WebApolloInstance(args.apollo, args.username, args.password) try: gx_user = AssertUser(wa.users.loadUsers(email=args.email)) except Exception: returnData = wa.users.createUser(args.email, args.email, args.email, PasswordGenerator(12), role='user', addToHistory=True) gx_user = AssertUser(wa.users.loadUsers(email=args.email)) all_orgs = wa.organisms.findAllOrganisms() try: orgs = accessible_organisms(gx_user, all_orgs) except Exception: orgs = [] print(json.dumps(orgs, indent=2))
Add try-catch if no organism allowed
Add try-catch if no organism allowed
Python
mit
galaxy-genome-annotation/galaxy-tools,galaxy-genome-annotation/galaxy-tools
python
## Code Before: from __future__ import print_function import argparse import json from webapollo import AssertUser, WAAuth, WebApolloInstance, accessible_organisms, PasswordGenerator if __name__ == '__main__': parser = argparse.ArgumentParser(description='List all organisms available in an Apollo instance') WAAuth(parser) parser.add_argument('email', help='User Email') args = parser.parse_args() wa = WebApolloInstance(args.apollo, args.username, args.password) try: gx_user = AssertUser(wa.users.loadUsers(email=args.email)) except Exception: returnData = wa.users.createUser(args.email, args.email, args.email, PasswordGenerator(12), role='user', addToHistory=True) gx_user = AssertUser(wa.users.loadUsers(email=args.email)) all_orgs = wa.organisms.findAllOrganisms() orgs = accessible_organisms(gx_user, all_orgs) print(json.dumps(orgs, indent=2)) ## Instruction: Add try-catch if no organism allowed ## Code After: from __future__ import print_function import argparse import json from webapollo import AssertUser, WAAuth, WebApolloInstance, accessible_organisms, PasswordGenerator if __name__ == '__main__': parser = argparse.ArgumentParser(description='List all organisms available in an Apollo instance') WAAuth(parser) parser.add_argument('email', help='User Email') args = parser.parse_args() wa = WebApolloInstance(args.apollo, args.username, args.password) try: gx_user = AssertUser(wa.users.loadUsers(email=args.email)) except Exception: returnData = wa.users.createUser(args.email, args.email, args.email, PasswordGenerator(12), role='user', addToHistory=True) gx_user = AssertUser(wa.users.loadUsers(email=args.email)) all_orgs = wa.organisms.findAllOrganisms() try: orgs = accessible_organisms(gx_user, all_orgs) except Exception: orgs = [] print(json.dumps(orgs, indent=2))
1a2c272af6ba2f95d0c55e65acff7c800a628652
test/phpSmug/Tests/PsrComplianceTest.php
test/phpSmug/Tests/PsrComplianceTest.php
<?php namespace phpSmug\Tests; /** * @class * Test properties of our codebase rather than the actual code. */ class PsrComplianceTest extends \PHPUnit_Framework_TestCase { /** * @test */ public function testPSR() { // If we can't find the command-line tool, we mark the test as skipped // so it shows as a warning to the developer rather than passing silently. if (!file_exists('vendor/bin/php-cs-fixer')) { $this->markTestSkipped( 'Needs linter to check PSR compliance' ); } // Let's check all PSR compliance for our code and tests. // Add any other pass you want to test to this array. foreach (array('lib/', 'examples/', 'test/') as $path) { // Run linter in dry-run mode so it changes nothing. exec( escapeshellcmd('vendor/bin/php-cs-fixer fix --dry-run '.$_SERVER['PWD']."/$path"), $output, $return_var ); // If we've got output, pop its first item ("Fixed all files...") // and trim whitespace from the rest so the below makes sense. if ($output) { array_pop($output); $output = array_map('trim', $output); } // Check shell return code: if nonzero, report the output as a failure. $this->assertEquals( 0, $return_var, "PSR linter reported errors in $path: \n\t".implode("\n\t", $output) ); } } }
<?php namespace phpSmug\Tests; /** * @class * Test properties of our codebase rather than the actual code. */ class PsrComplianceTest extends \PHPUnit_Framework_TestCase { /** * @test */ public function testPSR() { // If we can't find the command-line tool, we mark the test as skipped // so it shows as a warning to the developer rather than passing silently. if (!file_exists('vendor/bin/php-cs-fixer')) { $this->markTestSkipped( 'Needs linter to check PSR compliance' ); } // Run linter in dry-run mode so it changes nothing. exec( escapeshellcmd('vendor/bin/php-cs-fixer fix --diff -v --dry-run .'), $output, $return_var ); // If we've got output, pop its first item ("Fixed all files...") // shift off the last two lines, and trim whitespace from the rest. if ($output) { array_pop($output); array_shift($output); array_shift($output); $output = array_map('trim', $output); } // Check shell return code: if nonzero, report the output as a failure. $this->assertEquals( 0, $return_var, "PSR linter reported errors in: \n\t".implode("\n\t", $output) ); } }
Improve PSR test to produce useful output
Improve PSR test to produce useful output
PHP
mit
lildude/phpSmug
php
## Code Before: <?php namespace phpSmug\Tests; /** * @class * Test properties of our codebase rather than the actual code. */ class PsrComplianceTest extends \PHPUnit_Framework_TestCase { /** * @test */ public function testPSR() { // If we can't find the command-line tool, we mark the test as skipped // so it shows as a warning to the developer rather than passing silently. if (!file_exists('vendor/bin/php-cs-fixer')) { $this->markTestSkipped( 'Needs linter to check PSR compliance' ); } // Let's check all PSR compliance for our code and tests. // Add any other pass you want to test to this array. foreach (array('lib/', 'examples/', 'test/') as $path) { // Run linter in dry-run mode so it changes nothing. exec( escapeshellcmd('vendor/bin/php-cs-fixer fix --dry-run '.$_SERVER['PWD']."/$path"), $output, $return_var ); // If we've got output, pop its first item ("Fixed all files...") // and trim whitespace from the rest so the below makes sense. if ($output) { array_pop($output); $output = array_map('trim', $output); } // Check shell return code: if nonzero, report the output as a failure. $this->assertEquals( 0, $return_var, "PSR linter reported errors in $path: \n\t".implode("\n\t", $output) ); } } } ## Instruction: Improve PSR test to produce useful output ## Code After: <?php namespace phpSmug\Tests; /** * @class * Test properties of our codebase rather than the actual code. */ class PsrComplianceTest extends \PHPUnit_Framework_TestCase { /** * @test */ public function testPSR() { // If we can't find the command-line tool, we mark the test as skipped // so it shows as a warning to the developer rather than passing silently. if (!file_exists('vendor/bin/php-cs-fixer')) { $this->markTestSkipped( 'Needs linter to check PSR compliance' ); } // Run linter in dry-run mode so it changes nothing. exec( escapeshellcmd('vendor/bin/php-cs-fixer fix --diff -v --dry-run .'), $output, $return_var ); // If we've got output, pop its first item ("Fixed all files...") // shift off the last two lines, and trim whitespace from the rest. if ($output) { array_pop($output); array_shift($output); array_shift($output); $output = array_map('trim', $output); } // Check shell return code: if nonzero, report the output as a failure. $this->assertEquals( 0, $return_var, "PSR linter reported errors in: \n\t".implode("\n\t", $output) ); } }
5d36d858226b659db2e28b6050b583d91922ab1c
app/views/matches/_form.html.erb
app/views/matches/_form.html.erb
<%= form_for(@match) do |f| %> <% if @match.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@match.errors.count, "error") %> prohibited this match from being saved:</h2> <ul> <% @match.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> <% end %> <div class="field"> <%= f.label :name, 'Match Name' %> <%= f.text_field :name %> <br/> <br/> <%= f.label :tanks, 'Tanks Competing (at least two)' %> <br/> <%= f.select :tanks, options_for_select(Tank.all.collect {|t| [t.name, t.id]}), {}, multiple: true, style: 'width: 300px;' %> </div> <div class="actions"> <%= f.submit class:"primary" %> <%= link_to 'Match List', matches_path, class:"button" %> </div> <% end %>
<%= form_for(@match) do |f| %> <% if @match.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@match.errors.count, "error") %> prohibited this match from being saved:</h2> <ul> <% @match.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> <% end %> <div class="field"> <%= f.label :name, 'Match Name' %> <%= f.text_field :name %> <br/> <br/> <%= f.label :tanks, 'Tanks Competing (at least two)' %> <br/> <%= f.select :tanks, options_for_select(Tank.all.collect {|t| [t.name, t.id]}), {}, multiple: true, style: 'width: 300px;' %> </div> <div class="field"> <%= f.label :public, 'Make public' %> <%= f.check_box :public, data:{toggle: 'toggle'} %> </div> <div class="actions"> <%= f.submit class:"primary" %> <%= link_to 'Match List', matches_path, class:"button" %> </div> <% end %>
Add toggle to make match public
Add toggle to make match public
HTML+ERB
mit
TotalVerb/game,TotalVerb/game,TotalVerb/game,TechRetreat/game,TechRetreat/game,TechRetreat/game
html+erb
## Code Before: <%= form_for(@match) do |f| %> <% if @match.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@match.errors.count, "error") %> prohibited this match from being saved:</h2> <ul> <% @match.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> <% end %> <div class="field"> <%= f.label :name, 'Match Name' %> <%= f.text_field :name %> <br/> <br/> <%= f.label :tanks, 'Tanks Competing (at least two)' %> <br/> <%= f.select :tanks, options_for_select(Tank.all.collect {|t| [t.name, t.id]}), {}, multiple: true, style: 'width: 300px;' %> </div> <div class="actions"> <%= f.submit class:"primary" %> <%= link_to 'Match List', matches_path, class:"button" %> </div> <% end %> ## Instruction: Add toggle to make match public ## Code After: <%= form_for(@match) do |f| %> <% if @match.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@match.errors.count, "error") %> prohibited this match from being saved:</h2> <ul> <% @match.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> <% end %> <div class="field"> <%= f.label :name, 'Match Name' %> <%= f.text_field :name %> <br/> <br/> <%= f.label :tanks, 'Tanks Competing (at least two)' %> <br/> <%= f.select :tanks, options_for_select(Tank.all.collect {|t| [t.name, t.id]}), {}, multiple: true, style: 'width: 300px;' %> </div> <div class="field"> <%= f.label :public, 'Make public' %> <%= f.check_box :public, data:{toggle: 'toggle'} %> </div> <div class="actions"> <%= f.submit class:"primary" %> <%= link_to 'Match List', matches_path, class:"button" %> </div> <% end %>
a7a313470e0d5c0800c78b0edca8d93993a2881f
init-extension/init-solarized-theme.el
init-extension/init-solarized-theme.el
(require 'solarized) (deftheme solarized-dark "The dark variant of the Solarized colour theme") (create-solarized-theme 'dark 'solarized-dark) (provide-theme 'solarized-dark) (deftheme solarized-light "The light variant of the Solarized colour theme") (create-solarized-theme 'light 'solarized-light) (provide-theme 'solarized-light) (if (equal system-name "QUE-WKS-AA427-Linux") (load-theme 'solarized-light t) (load-theme 'solarized-dark t))
(require 'solarized) (deftheme solarized-dark "The dark variant of the Solarized colour theme") (create-solarized-theme 'dark 'solarized-dark) (provide-theme 'solarized-dark) (deftheme solarized-light "The light variant of the Solarized colour theme") (create-solarized-theme 'light 'solarized-light) (provide-theme 'solarized-light) (if (or (equal system-name "QUE-WKS-AA427-Linux") (equal system-name "QUE-WKS-AA593")) (load-theme 'solarized-light t) (load-theme 'solarized-dark t))
Add theme support for AA593
Add theme support for AA593
Emacs Lisp
mit
tsonntag/dotemacs,tsonntag/dotemacs,tsonntag/dotemacs,tsonntag/dotemacs
emacs-lisp
## Code Before: (require 'solarized) (deftheme solarized-dark "The dark variant of the Solarized colour theme") (create-solarized-theme 'dark 'solarized-dark) (provide-theme 'solarized-dark) (deftheme solarized-light "The light variant of the Solarized colour theme") (create-solarized-theme 'light 'solarized-light) (provide-theme 'solarized-light) (if (equal system-name "QUE-WKS-AA427-Linux") (load-theme 'solarized-light t) (load-theme 'solarized-dark t)) ## Instruction: Add theme support for AA593 ## Code After: (require 'solarized) (deftheme solarized-dark "The dark variant of the Solarized colour theme") (create-solarized-theme 'dark 'solarized-dark) (provide-theme 'solarized-dark) (deftheme solarized-light "The light variant of the Solarized colour theme") (create-solarized-theme 'light 'solarized-light) (provide-theme 'solarized-light) (if (or (equal system-name "QUE-WKS-AA427-Linux") (equal system-name "QUE-WKS-AA593")) (load-theme 'solarized-light t) (load-theme 'solarized-dark t))
3cc6b1726aa029d79f1b132c1e77f090d15a2d34
README.md
README.md
MCAC Landing Page ================= This is the temporary landing page for mcac.church until we have v1 up and running.
MCAC Landing Page ================= This is the temporary landing page for mcac.church until we have v1 up and running. To run a test server, run the following command: ``` ruby -run -e httpd www -p 9090 ``` Now you can access the page at http://localhost:9090.
Add instructions to start developement server
Add instructions to start developement server
Markdown
mit
openmcac/landing
markdown
## Code Before: MCAC Landing Page ================= This is the temporary landing page for mcac.church until we have v1 up and running. ## Instruction: Add instructions to start developement server ## Code After: MCAC Landing Page ================= This is the temporary landing page for mcac.church until we have v1 up and running. To run a test server, run the following command: ``` ruby -run -e httpd www -p 9090 ``` Now you can access the page at http://localhost:9090.
1cf5bc51b42c8b5f521cbb41f3e414ad9879896b
lib/index.coffee
lib/index.coffee
class EyeTribe @Tracker = require('./tracker') @version = require('./version') @loop = (config, callback)-> if typeof config == 'function' [callback, config] = [config, {}] @loopTracker = new @Tracker config .loop callback module.exports = EyeTribe
class EyeTribe @Tracker = require('./tracker') @version = require('./version') @Protocol = require('./protocol') @GazeData = require('./gazedata') @Point2D = require('./point2d') @_ = require('underscore') @loop = (config, callback)-> if typeof config == 'function' [callback, config] = [config, {}] @loopTracker = new @Tracker config .loop callback module.exports = EyeTribe
Add references to internal modules as member variables of class EyeTribe
Add references to internal modules as member variables of class EyeTribe
CoffeeScript
mit
kzokm/eyetribe-websocket
coffeescript
## Code Before: class EyeTribe @Tracker = require('./tracker') @version = require('./version') @loop = (config, callback)-> if typeof config == 'function' [callback, config] = [config, {}] @loopTracker = new @Tracker config .loop callback module.exports = EyeTribe ## Instruction: Add references to internal modules as member variables of class EyeTribe ## Code After: class EyeTribe @Tracker = require('./tracker') @version = require('./version') @Protocol = require('./protocol') @GazeData = require('./gazedata') @Point2D = require('./point2d') @_ = require('underscore') @loop = (config, callback)-> if typeof config == 'function' [callback, config] = [config, {}] @loopTracker = new @Tracker config .loop callback module.exports = EyeTribe
3c841a6e1c6ef0808a09eb8a57b7067d7a17b8b9
README.md
README.md
gps-distance ============ [![NPM](https://nodei.co/npm/gps-distance.png)](https://nodei.co/npm/gps-distance/) A node module for performing distance calculations between GPS coordinates Example ------- ```javascript var distance = require('gps-distance'); // Between two points: var result = distance(45.527517, -122.718766, 45.373373, -121.693604); // result is 81.78450202539503 // Along a path: var path = [ [45.527517, -122.718766], [45.373373, -121.693604], [45.527517, -122.718766] ]; var result2 = distance(path); // result2 is 163.56900405079006 ``` Notes ----- Distances are returned in kilometers and computed using the Haversine formula.
gps-distance ============ [![NPM](https://nodei.co/npm/gps-distance.png)](https://nodei.co/npm/gps-distance/) A node module for performing distance calculations between GPS coordinates Examples ======== `gps-distance` supports two syntaxes for convenience. You can measure just between two points and supply in your GPS coordinates as direct arguments to distance in the form `(source_lat, source_lon, destination_lat, destination_lon)`, or you can use an array of points each in `[lat,lon]` format. See the examples below. Point to Point -------------- ```javascript var distance = require('gps-distance'); // Between two points: var result = distance(45.527517, -122.718766, 45.373373, -121.693604); // result is 81.78450202539503 ``` Array of GPS points ------------------- ```javascript // Measure a list of GPS points along a path: var path = [ [45.527517, -122.718766], [45.373373, -121.693604], [45.527517, -122.718766] ]; var result2 = distance(path); // result2 is 163.56900405079006 ``` Notes ----- Distances are returned in kilometers and computed using the Haversine formula.
Update readme with clearer labeling of examples
Update readme with clearer labeling of examples
Markdown
bsd-2-clause
Maciek416/gps-distance
markdown
## Code Before: gps-distance ============ [![NPM](https://nodei.co/npm/gps-distance.png)](https://nodei.co/npm/gps-distance/) A node module for performing distance calculations between GPS coordinates Example ------- ```javascript var distance = require('gps-distance'); // Between two points: var result = distance(45.527517, -122.718766, 45.373373, -121.693604); // result is 81.78450202539503 // Along a path: var path = [ [45.527517, -122.718766], [45.373373, -121.693604], [45.527517, -122.718766] ]; var result2 = distance(path); // result2 is 163.56900405079006 ``` Notes ----- Distances are returned in kilometers and computed using the Haversine formula. ## Instruction: Update readme with clearer labeling of examples ## Code After: gps-distance ============ [![NPM](https://nodei.co/npm/gps-distance.png)](https://nodei.co/npm/gps-distance/) A node module for performing distance calculations between GPS coordinates Examples ======== `gps-distance` supports two syntaxes for convenience. You can measure just between two points and supply in your GPS coordinates as direct arguments to distance in the form `(source_lat, source_lon, destination_lat, destination_lon)`, or you can use an array of points each in `[lat,lon]` format. See the examples below. Point to Point -------------- ```javascript var distance = require('gps-distance'); // Between two points: var result = distance(45.527517, -122.718766, 45.373373, -121.693604); // result is 81.78450202539503 ``` Array of GPS points ------------------- ```javascript // Measure a list of GPS points along a path: var path = [ [45.527517, -122.718766], [45.373373, -121.693604], [45.527517, -122.718766] ]; var result2 = distance(path); // result2 is 163.56900405079006 ``` Notes ----- Distances are returned in kilometers and computed using the Haversine formula.
13866af8073a35c3731a208af662422788d53b19
telegramcalendar.py
telegramcalendar.py
from telebot import types import calendar def create_calendar(year,month): markup = types.InlineKeyboardMarkup() #First row - Month and Year row=[] row.append(types.InlineKeyboardButton(calendar.month_name[month]+" "+str(year),callback_data="ignore")) markup.row(*row) #Second row - Week Days week_days=["M","T","W","R","F","S","U"] row=[] for day in week_days: row.append(types.InlineKeyboardButton(day,callback_data="ignore")) markup.row(*row) my_calendar = calendar.monthcalendar(year, month) for week in my_calendar: row=[] for day in week: if(day==0): row.append(types.InlineKeyboardButton(" ",callback_data="ignore")) else: row.append(types.InlineKeyboardButton(str(day),callback_data="calendar-day-"+str(day))) markup.row(*row) #Last row - Buttons row=[] row.append(types.InlineKeyboardButton("<",callback_data="previous-month")) row.append(types.InlineKeyboardButton(" ",callback_data="ignore")) row.append(types.InlineKeyboardButton(">",callback_data="next-month")) markup.row(*row) return markup
from telebot import types import calendar def create_calendar(year,month): markup = types.InlineKeyboardMarkup() #First row - Month and Year row=[] row.append(types.InlineKeyboardButton(calendar.month_name[month]+" "+str(year),callback_data="ignore")) markup.row(*row) my_calendar = calendar.monthcalendar(year, month) for week in my_calendar: row=[] for day in week: if(day==0): row.append(types.InlineKeyboardButton(" ",callback_data="ignore")) else: row.append(types.InlineKeyboardButton(str(day),callback_data="calendar-day-"+str(day))) markup.row(*row) #Last row - Buttons row=[] row.append(types.InlineKeyboardButton("<",callback_data="previous-month")) row.append(types.InlineKeyboardButton(" ",callback_data="ignore")) row.append(types.InlineKeyboardButton(">",callback_data="next-month")) markup.row(*row) return markup
Remove day of the week row
Remove day of the week row
Python
mit
myxo/remu,myxo/remu,myxo/remu
python
## Code Before: from telebot import types import calendar def create_calendar(year,month): markup = types.InlineKeyboardMarkup() #First row - Month and Year row=[] row.append(types.InlineKeyboardButton(calendar.month_name[month]+" "+str(year),callback_data="ignore")) markup.row(*row) #Second row - Week Days week_days=["M","T","W","R","F","S","U"] row=[] for day in week_days: row.append(types.InlineKeyboardButton(day,callback_data="ignore")) markup.row(*row) my_calendar = calendar.monthcalendar(year, month) for week in my_calendar: row=[] for day in week: if(day==0): row.append(types.InlineKeyboardButton(" ",callback_data="ignore")) else: row.append(types.InlineKeyboardButton(str(day),callback_data="calendar-day-"+str(day))) markup.row(*row) #Last row - Buttons row=[] row.append(types.InlineKeyboardButton("<",callback_data="previous-month")) row.append(types.InlineKeyboardButton(" ",callback_data="ignore")) row.append(types.InlineKeyboardButton(">",callback_data="next-month")) markup.row(*row) return markup ## Instruction: Remove day of the week row ## Code After: from telebot import types import calendar def create_calendar(year,month): markup = types.InlineKeyboardMarkup() #First row - Month and Year row=[] row.append(types.InlineKeyboardButton(calendar.month_name[month]+" "+str(year),callback_data="ignore")) markup.row(*row) my_calendar = calendar.monthcalendar(year, month) for week in my_calendar: row=[] for day in week: if(day==0): row.append(types.InlineKeyboardButton(" ",callback_data="ignore")) else: row.append(types.InlineKeyboardButton(str(day),callback_data="calendar-day-"+str(day))) markup.row(*row) #Last row - Buttons row=[] row.append(types.InlineKeyboardButton("<",callback_data="previous-month")) row.append(types.InlineKeyboardButton(" ",callback_data="ignore")) row.append(types.InlineKeyboardButton(">",callback_data="next-month")) markup.row(*row) return markup
8654aadc9c675642c78e0d8e52f8b5e3cc28d242
tasks/main.yml
tasks/main.yml
--- # See https://nodesource.com/blog/nodejs-v012-iojs-and-the-nodesource-linux-repositories - name: Ensure script to install NodeSource Node.js 0.12 repo has been executed shell: > curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - creates=/etc/apt/sources.list.d/nodesource.list sudo: yes - name: Ensure Node.js 0.12 is installed apt: pkg: nodejs state: present sudo: yes - name: Ensure Shout package is installed npm: name: shout global: yes production: yes version: 0.51.1 state: present sudo: yes - name: Ensure Shout is configured copy: src: config.js dest: /root/.shout/config.js sudo: yes
--- # See https://nodesource.com/blog/nodejs-v012-iojs-and-the-nodesource-linux-repositories - name: Ensure script to install NodeSource Node.js 0.12 repo has been executed shell: > curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - creates=/etc/apt/sources.list.d/nodesource.list sudo: yes - name: Ensure Node.js 0.12 is installed apt: pkg: nodejs state: present sudo: yes - name: Ensure Shout package is installed npm: name: shout global: yes production: yes version: 0.51.1 state: present sudo: yes - name: Ensure esprima package (for JS syntax checking) is installed npm: name: esprima global: yes production: yes state: present sudo: yes - name: Ensure Shout is configured copy: src: config.js dest: /root/.shout/config.js validate: 'esvalidate %s' sudo: yes
Validate configuration file before copying it
Validate configuration file before copying it
YAML
mit
astorije/ansible-role-shout,astorije/ansible-lounge,astorije/ansible-role-shout
yaml
## Code Before: --- # See https://nodesource.com/blog/nodejs-v012-iojs-and-the-nodesource-linux-repositories - name: Ensure script to install NodeSource Node.js 0.12 repo has been executed shell: > curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - creates=/etc/apt/sources.list.d/nodesource.list sudo: yes - name: Ensure Node.js 0.12 is installed apt: pkg: nodejs state: present sudo: yes - name: Ensure Shout package is installed npm: name: shout global: yes production: yes version: 0.51.1 state: present sudo: yes - name: Ensure Shout is configured copy: src: config.js dest: /root/.shout/config.js sudo: yes ## Instruction: Validate configuration file before copying it ## Code After: --- # See https://nodesource.com/blog/nodejs-v012-iojs-and-the-nodesource-linux-repositories - name: Ensure script to install NodeSource Node.js 0.12 repo has been executed shell: > curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - creates=/etc/apt/sources.list.d/nodesource.list sudo: yes - name: Ensure Node.js 0.12 is installed apt: pkg: nodejs state: present sudo: yes - name: Ensure Shout package is installed npm: name: shout global: yes production: yes version: 0.51.1 state: present sudo: yes - name: Ensure esprima package (for JS syntax checking) is installed npm: name: esprima global: yes production: yes state: present sudo: yes - name: Ensure Shout is configured copy: src: config.js dest: /root/.shout/config.js validate: 'esvalidate %s' sudo: yes
7c3a06bfb34e591ca0f7324eaa11b8e1401794e4
setup.cfg
setup.cfg
[bdist_wheel] universal=1 [pytest] pep8maxlinelength = 104 norecursedirs = build docs .tox mccabe-complexity = 8 [coverage:run] branch = True [zest.releaser] create-wheel = yes
[bdist_wheel] universal=1 [pytest] pep8maxlinelength = 104 norecursedirs = build docs .tox mccabe-complexity = *.py 8 selfcheck.py 12 [coverage:run] branch = True [zest.releaser] create-wheel = yes
Clean up api.py and advertise it in the README.
Clean up api.py and advertise it in the README.
INI
apache-2.0
bopen/elevation
ini
## Code Before: [bdist_wheel] universal=1 [pytest] pep8maxlinelength = 104 norecursedirs = build docs .tox mccabe-complexity = 8 [coverage:run] branch = True [zest.releaser] create-wheel = yes ## Instruction: Clean up api.py and advertise it in the README. ## Code After: [bdist_wheel] universal=1 [pytest] pep8maxlinelength = 104 norecursedirs = build docs .tox mccabe-complexity = *.py 8 selfcheck.py 12 [coverage:run] branch = True [zest.releaser] create-wheel = yes
90ade823700da61824c113759f847bf08823c148
nova/objects/__init__.py
nova/objects/__init__.py
def register_all(): # NOTE(danms): You must make sure your object gets imported in this # function in order for it to be registered by services that may # need to receive it via RPC. __import__('nova.objects.dns_domain') __import__('nova.objects.instance') __import__('nova.objects.instance_info_cache') __import__('nova.objects.security_group') __import__('nova.objects.migration') __import__('nova.objects.quotas') __import__('nova.objects.virtual_interface') __import__('nova.objects.network') __import__('nova.objects.block_device') __import__('nova.objects.fixed_ip') __import__('nova.objects.floating_ip')
def register_all(): # NOTE(danms): You must make sure your object gets imported in this # function in order for it to be registered by services that may # need to receive it via RPC. __import__('nova.objects.dns_domain') __import__('nova.objects.instance') __import__('nova.objects.instance_info_cache') __import__('nova.objects.security_group') __import__('nova.objects.migration') __import__('nova.objects.quotas') __import__('nova.objects.virtual_interface') __import__('nova.objects.network') __import__('nova.objects.block_device') __import__('nova.objects.fixed_ip') __import__('nova.objects.floating_ip') __import__('nova.objects.security_group_rule')
Add security_group_rule to objects registry
Add security_group_rule to objects registry This adds the security_group_rule module to the objects registry, which allows a service to make sure that all of its objects are registered before any could be received over RPC. We don't really have a test for any of these because of the nature of how they're imported. Refactoring this later could provide some incremental steps to making this more testable. Change-Id: Ie96021f3cdeac6addab21c42a14cd8f136eb0b27 Closes-Bug: #1264816
Python
apache-2.0
citrix-openstack-build/oslo.versionedobjects,openstack/oslo.versionedobjects
python
## Code Before: def register_all(): # NOTE(danms): You must make sure your object gets imported in this # function in order for it to be registered by services that may # need to receive it via RPC. __import__('nova.objects.dns_domain') __import__('nova.objects.instance') __import__('nova.objects.instance_info_cache') __import__('nova.objects.security_group') __import__('nova.objects.migration') __import__('nova.objects.quotas') __import__('nova.objects.virtual_interface') __import__('nova.objects.network') __import__('nova.objects.block_device') __import__('nova.objects.fixed_ip') __import__('nova.objects.floating_ip') ## Instruction: Add security_group_rule to objects registry This adds the security_group_rule module to the objects registry, which allows a service to make sure that all of its objects are registered before any could be received over RPC. We don't really have a test for any of these because of the nature of how they're imported. Refactoring this later could provide some incremental steps to making this more testable. Change-Id: Ie96021f3cdeac6addab21c42a14cd8f136eb0b27 Closes-Bug: #1264816 ## Code After: def register_all(): # NOTE(danms): You must make sure your object gets imported in this # function in order for it to be registered by services that may # need to receive it via RPC. __import__('nova.objects.dns_domain') __import__('nova.objects.instance') __import__('nova.objects.instance_info_cache') __import__('nova.objects.security_group') __import__('nova.objects.migration') __import__('nova.objects.quotas') __import__('nova.objects.virtual_interface') __import__('nova.objects.network') __import__('nova.objects.block_device') __import__('nova.objects.fixed_ip') __import__('nova.objects.floating_ip') __import__('nova.objects.security_group_rule')
032a222c1d3c8067279f66687ffb0ac257b28aa7
provisioning/docker/eclipse-mosquitto/docker-entrypoint.sh
provisioning/docker/eclipse-mosquitto/docker-entrypoint.sh
set -e IOT_CORE_PROJECT_ID="${1}" && shift IOT_CORE_CREDENTIALS_VALIDITY="${1}" && shift IOT_CORE_DEVICE_ID="${1}" && shift IOT_CORE_DEVICE_NAME="${1}" && shift COMMAND_PATH="${1}" && shift echo "Generating JWT valid for ${IOT_CORE_PROJECT_ID} project and duration ${IOT_CORE_CREDENTIALS_VALIDITY} seconds from now..." IOT_CORE_JWT="$(pyjwt --key="$(cat /etc/cloud-iot-core/keys/private_key.pem)" --alg=RS256 encode iat="$(date +%s)" exp=+"${IOT_CORE_CREDENTIALS_VALIDITY}" aud="${IOT_CORE_PROJECT_ID}")" COMMAND_TO_RUN="${COMMAND_PATH} --id ${IOT_CORE_DEVICE_ID} --pw ${IOT_CORE_JWT} -W ${IOT_CORE_CREDENTIALS_VALIDITY} --topic /devices/${IOT_CORE_DEVICE_NAME}/commands/# --topic /devices/${IOT_CORE_DEVICE_NAME}/config" echo "Running command: ${COMMAND_TO_RUN}" eval "${COMMAND_TO_RUN}"
set -e IOT_CORE_PROJECT_ID="${1}" && shift IOT_CORE_CREDENTIALS_VALIDITY="${1}" && shift IOT_CORE_DEVICE_ID="${1}" && shift IOT_CORE_DEVICE_NAME="${1}" && shift COMMAND_PATH="${1}" && shift echo "Copying mosquitto configuration files where expected..." MOSQUITTO_PUB_SUB_CONFIG_DIRECTORY_PATH="${HOME}"/.config MOSQUITTO_PUB_SUB_CONFIG_FILE_PATH="/etc/mosquitto/mosquitto" mkdir -p "${MOSQUITTO_PUB_SUB_CONFIG_DIRECTORY_PATH}" cp "${MOSQUITTO_PUB_SUB_CONFIG_FILE_PATH}" "${MOSQUITTO_PUB_SUB_CONFIG_DIRECTORY_PATH}"/mosquitto_pub cp "${MOSQUITTO_PUB_SUB_CONFIG_FILE_PATH}" "${MOSQUITTO_PUB_SUB_CONFIG_DIRECTORY_PATH}"/mosquitto_sub echo "Generating JWT valid for ${IOT_CORE_PROJECT_ID} project and duration ${IOT_CORE_CREDENTIALS_VALIDITY} seconds from now..." IOT_CORE_JWT="$(pyjwt --key="$(cat /etc/cloud-iot-core/keys/private_key.pem)" --alg=RS256 encode iat="$(date +%s)" exp=+"${IOT_CORE_CREDENTIALS_VALIDITY}" aud="${IOT_CORE_PROJECT_ID}")" COMMAND_TO_RUN="${COMMAND_PATH} --id ${IOT_CORE_DEVICE_ID} --pw ${IOT_CORE_JWT} -W ${IOT_CORE_CREDENTIALS_VALIDITY} --topic /devices/${IOT_CORE_DEVICE_NAME}/commands/# --topic /devices/${IOT_CORE_DEVICE_NAME}/config" echo "Running command: ${COMMAND_TO_RUN}" eval "${COMMAND_TO_RUN}"
Initialize mosquitto_pub and mosquitto_sub configuration
Initialize mosquitto_pub and mosquitto_sub configuration
Shell
mit
ferrarimarco/home-lab,ferrarimarco/home-lab
shell
## Code Before: set -e IOT_CORE_PROJECT_ID="${1}" && shift IOT_CORE_CREDENTIALS_VALIDITY="${1}" && shift IOT_CORE_DEVICE_ID="${1}" && shift IOT_CORE_DEVICE_NAME="${1}" && shift COMMAND_PATH="${1}" && shift echo "Generating JWT valid for ${IOT_CORE_PROJECT_ID} project and duration ${IOT_CORE_CREDENTIALS_VALIDITY} seconds from now..." IOT_CORE_JWT="$(pyjwt --key="$(cat /etc/cloud-iot-core/keys/private_key.pem)" --alg=RS256 encode iat="$(date +%s)" exp=+"${IOT_CORE_CREDENTIALS_VALIDITY}" aud="${IOT_CORE_PROJECT_ID}")" COMMAND_TO_RUN="${COMMAND_PATH} --id ${IOT_CORE_DEVICE_ID} --pw ${IOT_CORE_JWT} -W ${IOT_CORE_CREDENTIALS_VALIDITY} --topic /devices/${IOT_CORE_DEVICE_NAME}/commands/# --topic /devices/${IOT_CORE_DEVICE_NAME}/config" echo "Running command: ${COMMAND_TO_RUN}" eval "${COMMAND_TO_RUN}" ## Instruction: Initialize mosquitto_pub and mosquitto_sub configuration ## Code After: set -e IOT_CORE_PROJECT_ID="${1}" && shift IOT_CORE_CREDENTIALS_VALIDITY="${1}" && shift IOT_CORE_DEVICE_ID="${1}" && shift IOT_CORE_DEVICE_NAME="${1}" && shift COMMAND_PATH="${1}" && shift echo "Copying mosquitto configuration files where expected..." MOSQUITTO_PUB_SUB_CONFIG_DIRECTORY_PATH="${HOME}"/.config MOSQUITTO_PUB_SUB_CONFIG_FILE_PATH="/etc/mosquitto/mosquitto" mkdir -p "${MOSQUITTO_PUB_SUB_CONFIG_DIRECTORY_PATH}" cp "${MOSQUITTO_PUB_SUB_CONFIG_FILE_PATH}" "${MOSQUITTO_PUB_SUB_CONFIG_DIRECTORY_PATH}"/mosquitto_pub cp "${MOSQUITTO_PUB_SUB_CONFIG_FILE_PATH}" "${MOSQUITTO_PUB_SUB_CONFIG_DIRECTORY_PATH}"/mosquitto_sub echo "Generating JWT valid for ${IOT_CORE_PROJECT_ID} project and duration ${IOT_CORE_CREDENTIALS_VALIDITY} seconds from now..." IOT_CORE_JWT="$(pyjwt --key="$(cat /etc/cloud-iot-core/keys/private_key.pem)" --alg=RS256 encode iat="$(date +%s)" exp=+"${IOT_CORE_CREDENTIALS_VALIDITY}" aud="${IOT_CORE_PROJECT_ID}")" COMMAND_TO_RUN="${COMMAND_PATH} --id ${IOT_CORE_DEVICE_ID} --pw ${IOT_CORE_JWT} -W ${IOT_CORE_CREDENTIALS_VALIDITY} --topic /devices/${IOT_CORE_DEVICE_NAME}/commands/# --topic /devices/${IOT_CORE_DEVICE_NAME}/config" echo "Running command: ${COMMAND_TO_RUN}" eval "${COMMAND_TO_RUN}"
32818df5e46c57d64e34c50bb34755e1747cab0e
lib/bane/service_maker.rb
lib/bane/service_maker.rb
module Bane class ServiceMaker def initialize @everything = {} Bane::Behaviors::EXPORTED.each { |behavior| @everything[behavior.unqualified_name] = BehaviorMaker.new(behavior) } Bane::Services::EXPORTED.each { |service| @everything[service.unqualified_name] = service } end def all_service_names @everything.keys.sort end def create(service_names, starting_port, host) service_names .map { |service_name| @everything.fetch(service_name) { raise UnknownServiceError.new(service_name) } } .map.with_index { |maker, index| maker.make(starting_port + index, host) } end def create_all(starting_port, host) create(all_service_names, starting_port, host) end end class UnknownServiceError < RuntimeError def initialize(name) super "Unknown service: #{name}" end end class BehaviorMaker def initialize(behavior) @behavior = behavior end def make(port, host) Services::BehaviorServer.new(port, @behavior.new, host) end end end
module Bane class ServiceMaker def initialize initialize_makeables end def all_service_names makeables.keys.sort end def create(service_names, starting_port, host) service_names .map { |service_name| makeables.fetch(service_name) { raise UnknownServiceError.new(service_name) } } .map.with_index { |maker, index| maker.make(starting_port + index, host) } end def create_all(starting_port, host) create(all_service_names, starting_port, host) end private attr_reader :makeables def initialize_makeables @makeables = {} Bane::Behaviors::EXPORTED.each { |behavior| @makeables[behavior.unqualified_name] = BehaviorMaker.new(behavior) } Bane::Services::EXPORTED.each { |service| @makeables[service.unqualified_name] = service } end end class UnknownServiceError < RuntimeError def initialize(name) super "Unknown service: #{name}" end end class BehaviorMaker def initialize(behavior) @behavior = behavior end def make(port, host) Services::BehaviorServer.new(port, @behavior.new, host) end end end
Rename instance var everything to makeables
Rename instance var everything to makeables
Ruby
bsd-2-clause
danielwellman/bane
ruby
## Code Before: module Bane class ServiceMaker def initialize @everything = {} Bane::Behaviors::EXPORTED.each { |behavior| @everything[behavior.unqualified_name] = BehaviorMaker.new(behavior) } Bane::Services::EXPORTED.each { |service| @everything[service.unqualified_name] = service } end def all_service_names @everything.keys.sort end def create(service_names, starting_port, host) service_names .map { |service_name| @everything.fetch(service_name) { raise UnknownServiceError.new(service_name) } } .map.with_index { |maker, index| maker.make(starting_port + index, host) } end def create_all(starting_port, host) create(all_service_names, starting_port, host) end end class UnknownServiceError < RuntimeError def initialize(name) super "Unknown service: #{name}" end end class BehaviorMaker def initialize(behavior) @behavior = behavior end def make(port, host) Services::BehaviorServer.new(port, @behavior.new, host) end end end ## Instruction: Rename instance var everything to makeables ## Code After: module Bane class ServiceMaker def initialize initialize_makeables end def all_service_names makeables.keys.sort end def create(service_names, starting_port, host) service_names .map { |service_name| makeables.fetch(service_name) { raise UnknownServiceError.new(service_name) } } .map.with_index { |maker, index| maker.make(starting_port + index, host) } end def create_all(starting_port, host) create(all_service_names, starting_port, host) end private attr_reader :makeables def initialize_makeables @makeables = {} Bane::Behaviors::EXPORTED.each { |behavior| @makeables[behavior.unqualified_name] = BehaviorMaker.new(behavior) } Bane::Services::EXPORTED.each { |service| @makeables[service.unqualified_name] = service } end end class UnknownServiceError < RuntimeError def initialize(name) super "Unknown service: #{name}" end end class BehaviorMaker def initialize(behavior) @behavior = behavior end def make(port, host) Services::BehaviorServer.new(port, @behavior.new, host) end end end
3c3759436d5b5d0af5d45b5cadabbd6a3ed193f2
src/cljs/hacker_agent/utils.cljs
src/cljs/hacker_agent/utils.cljs
(ns hacker-agent.utils) (defn dissoc-in [data path] (let [prefix (butlast path) key (last path)] (if prefix (update-in data prefix dissoc key) (dissoc data key)))) (defn log-clj [o] (.log js/console (clj->js o)))
(ns hacker-agent.utils) (defn dissoc-in [data path] (let [prefix (butlast path) key (last path)] (if prefix (update-in data prefix dissoc key) (dissoc data key)))) (defn log-clj [o] (.log js/console (clj->js o))) (defn domain [url] (let [re (new js/RegExp "^https?\\:\\/\\/(www\\.)?([^\\/:?#]+)(?:[\\/:?#]|$)") matches (.exec re url)] (and matches (get matches 2))))
Add a domain extractor utility
Add a domain extractor utility
Clojure
epl-1.0
alvinfrancis/hacker-agent
clojure
## Code Before: (ns hacker-agent.utils) (defn dissoc-in [data path] (let [prefix (butlast path) key (last path)] (if prefix (update-in data prefix dissoc key) (dissoc data key)))) (defn log-clj [o] (.log js/console (clj->js o))) ## Instruction: Add a domain extractor utility ## Code After: (ns hacker-agent.utils) (defn dissoc-in [data path] (let [prefix (butlast path) key (last path)] (if prefix (update-in data prefix dissoc key) (dissoc data key)))) (defn log-clj [o] (.log js/console (clj->js o))) (defn domain [url] (let [re (new js/RegExp "^https?\\:\\/\\/(www\\.)?([^\\/:?#]+)(?:[\\/:?#]|$)") matches (.exec re url)] (and matches (get matches 2))))
fecf5c1362d064472c11aa73ffd52c25f7ca7265
flask_boost/project/application/templates/macros/_form.html
flask_boost/project/application/templates/macros/_form.html
{% macro field_errors(field) %} <ul class="list-form-errors text-danger list-unstyled"> <li>{{ field.errors[0] }}</li> </ul> {% endmacro %} {% macro horizontal_field(field, length=6, label=True, static=False) %} <div class="form-group clearfix"> {% if label %} {{ field.label(class="col-md-2 control-label") }} {% endif %} <div class="col-md-{{ length }} {% if not label %}col-md-offset-2{% endif %} {% if static %}form-control-static{% endif %}"> {{ field(class="form-control", placeholder=field.description, **kwargs) }} {{ field_errors(field) }} </div> </div> {% endmacro %} {% macro checkbox_field(field) %} <div class="form-group"> <div class="col-md-offset-2 col-sm-10"> <div class="checkbox"> {{ field() }} {{ field.label() }} </div> </div> </div> {% endmacro %} {% macro form_submit(btn_text) %} <div class="form-group"> <div class="col-sm-6 col-sm-offset-2"> <button type="submit" class="btn btn-sm btn-primary">{{ btn_text }}</button> </div> </div> {% endmacro %}
{% macro field_errors(field) %} <ul class="list-form-errors text-danger list-unstyled"> <li>{{ field.errors[0] }}</li> </ul> {% endmacro %} {% macro horizontal_field(field, length=6, label=True, static=False) %} <div class="form-group clearfix"> {% if label %} {{ field.label(class="col-md-2 control-label") }} {% endif %} <div class="col-md-{{ length }} {% if not label %}col-md-offset-2{% endif %} {% if static %}form-control-static{% endif %}"> {{ field(class="form-control", placeholder=field.description, **kwargs) }} {{ field_errors(field) }} </div> </div> {% endmacro %} {% macro checkbox_field(field) %} <div class="form-group clearfix"> <div class="col-md-offset-2 col-sm-10"> <div class="checkbox"> {{ field() }} {{ field.label() }} </div> </div> </div> {% endmacro %} {% macro form_submit(btn_text) %} <div class="form-group clearfix"> <div class="col-sm-6 col-sm-offset-2"> <button type="submit" class="btn btn-sm btn-primary">{{ btn_text }}</button> </div> </div> {% endmacro %}
Add clearfix style to form-group.
Add clearfix style to form-group.
HTML
mit
1045347128/Flask-Boost,1045347128/Flask-Boost,hustlzp/Flask-Boost,1045347128/Flask-Boost,hustlzp/Flask-Boost,hustlzp/Flask-Boost,1045347128/Flask-Boost,hustlzp/Flask-Boost
html
## Code Before: {% macro field_errors(field) %} <ul class="list-form-errors text-danger list-unstyled"> <li>{{ field.errors[0] }}</li> </ul> {% endmacro %} {% macro horizontal_field(field, length=6, label=True, static=False) %} <div class="form-group clearfix"> {% if label %} {{ field.label(class="col-md-2 control-label") }} {% endif %} <div class="col-md-{{ length }} {% if not label %}col-md-offset-2{% endif %} {% if static %}form-control-static{% endif %}"> {{ field(class="form-control", placeholder=field.description, **kwargs) }} {{ field_errors(field) }} </div> </div> {% endmacro %} {% macro checkbox_field(field) %} <div class="form-group"> <div class="col-md-offset-2 col-sm-10"> <div class="checkbox"> {{ field() }} {{ field.label() }} </div> </div> </div> {% endmacro %} {% macro form_submit(btn_text) %} <div class="form-group"> <div class="col-sm-6 col-sm-offset-2"> <button type="submit" class="btn btn-sm btn-primary">{{ btn_text }}</button> </div> </div> {% endmacro %} ## Instruction: Add clearfix style to form-group. ## Code After: {% macro field_errors(field) %} <ul class="list-form-errors text-danger list-unstyled"> <li>{{ field.errors[0] }}</li> </ul> {% endmacro %} {% macro horizontal_field(field, length=6, label=True, static=False) %} <div class="form-group clearfix"> {% if label %} {{ field.label(class="col-md-2 control-label") }} {% endif %} <div class="col-md-{{ length }} {% if not label %}col-md-offset-2{% endif %} {% if static %}form-control-static{% endif %}"> {{ field(class="form-control", placeholder=field.description, **kwargs) }} {{ field_errors(field) }} </div> </div> {% endmacro %} {% macro checkbox_field(field) %} <div class="form-group clearfix"> <div class="col-md-offset-2 col-sm-10"> <div class="checkbox"> {{ field() }} {{ field.label() }} </div> </div> </div> {% endmacro %} {% macro form_submit(btn_text) %} <div class="form-group clearfix"> <div class="col-sm-6 col-sm-offset-2"> <button type="submit" class="btn btn-sm btn-primary">{{ btn_text }}</button> </div> </div> {% endmacro %}
fe442d84140b0a588c6a8490b58a10995df58f17
tests/optimizers/test_constant_optimizer.py
tests/optimizers/test_constant_optimizer.py
"""Test suite for optimizers.constant.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import ast import pytest from pycc.asttools import parse from pycc.optimizers import constant source = """ ONE = 1 TWO = 2 THREE = ONE + TWO FOUR = THREE + ONE FIVE = THREE + TWO def return_const(): return FOUR def return_var(): return FIVE FIVE = FIVE + ONE FIVE -= ONE """ @pytest.fixture def node(): """Get as AST node from the source.""" return parse.parse(source) def test_constant_inliner(node): """Test that constant values are inlined.""" constant.ConstantOptimizer()(node) # Check assignment values using constants. assert node.body[2].value.n == 3 assert node.body[3].value.n == 4 assert node.body[4].value.n == 5 # Check return val of const function. assert isinstance(node.body[5].body[0].value, ast.Num) assert node.body[5].body[0].value.n == 4 # Check return val of var function. assert isinstance(node.body[6].body[0].value, ast.Name) assert node.body[6].body[0].value.id == 'FIVE'
"""Test suite for optimizers.constant.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import ast import pytest from pycc.asttools import parse from pycc.optimizers import constant source = """ ONE = 1 TWO = 2 THREE = ONE + TWO FOUR = THREE + ONE FIVE = THREE + TWO def return_const(): return FOUR def return_var(): return FIVE FIVE = FIVE + ONE FIVE -= ONE """ @pytest.fixture def node(): """Get as AST node from the source.""" return parse.parse(source) def test_constant_inliner(node): """Test that constant values are inlined.""" constant.optimize(node) # Check assignment values using constants. assert node.body[2].value.n == 3 assert node.body[3].value.n == 4 assert node.body[4].value.n == 5 # Check return val of const function. assert isinstance(node.body[5].body[0].value, ast.Num) assert node.body[5].body[0].value.n == 4 # Check return val of var function. assert isinstance(node.body[6].body[0].value, ast.Name) assert node.body[6].body[0].value.id == 'FIVE'
Fix test to use new optimizer interface
Fix test to use new optimizer interface Signed-off-by: Kevin Conway <3473c1f185ca03eadc40ad288d84425b54fd7d57@gmail.com>
Python
apache-2.0
kevinconway/pycc,kevinconway/pycc
python
## Code Before: """Test suite for optimizers.constant.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import ast import pytest from pycc.asttools import parse from pycc.optimizers import constant source = """ ONE = 1 TWO = 2 THREE = ONE + TWO FOUR = THREE + ONE FIVE = THREE + TWO def return_const(): return FOUR def return_var(): return FIVE FIVE = FIVE + ONE FIVE -= ONE """ @pytest.fixture def node(): """Get as AST node from the source.""" return parse.parse(source) def test_constant_inliner(node): """Test that constant values are inlined.""" constant.ConstantOptimizer()(node) # Check assignment values using constants. assert node.body[2].value.n == 3 assert node.body[3].value.n == 4 assert node.body[4].value.n == 5 # Check return val of const function. assert isinstance(node.body[5].body[0].value, ast.Num) assert node.body[5].body[0].value.n == 4 # Check return val of var function. assert isinstance(node.body[6].body[0].value, ast.Name) assert node.body[6].body[0].value.id == 'FIVE' ## Instruction: Fix test to use new optimizer interface Signed-off-by: Kevin Conway <3473c1f185ca03eadc40ad288d84425b54fd7d57@gmail.com> ## Code After: """Test suite for optimizers.constant.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import ast import pytest from pycc.asttools import parse from pycc.optimizers import constant source = """ ONE = 1 TWO = 2 THREE = ONE + TWO FOUR = THREE + ONE FIVE = THREE + TWO def return_const(): return FOUR def return_var(): return FIVE FIVE = FIVE + ONE FIVE -= ONE """ @pytest.fixture def node(): """Get as AST node from the source.""" return parse.parse(source) def test_constant_inliner(node): """Test that constant values are inlined.""" constant.optimize(node) # Check assignment values using constants. assert node.body[2].value.n == 3 assert node.body[3].value.n == 4 assert node.body[4].value.n == 5 # Check return val of const function. assert isinstance(node.body[5].body[0].value, ast.Num) assert node.body[5].body[0].value.n == 4 # Check return val of var function. assert isinstance(node.body[6].body[0].value, ast.Name) assert node.body[6].body[0].value.id == 'FIVE'
775cb748148bf5a426b01ab8ae4088f2d2e3fead
app/mutations/OrganizationInvitationCreate.js
app/mutations/OrganizationInvitationCreate.js
import Relay from 'react-relay'; import OrganizationMemberRoleConstants from '../constants/OrganizationMemberRoleConstants'; export default class OrganizationInvitationCreate extends Relay.Mutation { static fragments = { organization: () => Relay.QL` fragment on Organization { id } ` } getMutation() { return Relay.QL` mutation { organizationInvitationCreate } `; } getFatQuery() { return Relay.QL` fragment on OrganizationInvitationCreatePayload { invitationEdges { node { role user { name } } } } `; } getOptimisticResponse() { return { organizationInvitationEdge: { node: { role: OrganizationMemberRoleConstants.MEMBER } } }; } getConfigs() { return [{ type: 'RANGE_ADD', parentName: 'organization', parentID: this.props.organization.id, connectionName: 'invitations', edgeName: 'organizationInvitationEdge', rangeBehaviors: () => 'prepend' }]; } getVariables() { return { id: this.props.organizationMember.id, role: this.props.role }; } }
import Relay from 'react-relay'; import OrganizationMemberRoleConstants from '../constants/OrganizationMemberRoleConstants'; export default class OrganizationInvitationCreate extends Relay.Mutation { static fragments = { organization: () => Relay.QL` fragment on Organization { id } ` } getMutation() { return Relay.QL` mutation { organizationInvitationCreate } `; } getFatQuery() { return Relay.QL` fragment on OrganizationInvitationCreatePayload { invitationEdges { node { role user { name } } } } `; } getOptimisticResponse() { return { organizationInvitationEdge: { node: { role: OrganizationMemberRoleConstants.MEMBER } } }; } getConfigs() { return [{ type: 'RANGE_ADD', parentName: 'organization', parentID: this.props.organization.id, connectionName: 'invitations', edgeName: 'organizationInvitationEdge', rangeBehaviors: () => 'prepend' }]; } getVariables() { return { id: this.props.organizationMember.id, emails: this.props.emails, role: this.props.role }; } }
Add email to OrganizationInvitation query
Add email to OrganizationInvitation query
JavaScript
mit
buildkite/frontend,fotinakis/buildkite-frontend,fotinakis/buildkite-frontend,buildkite/frontend
javascript
## Code Before: import Relay from 'react-relay'; import OrganizationMemberRoleConstants from '../constants/OrganizationMemberRoleConstants'; export default class OrganizationInvitationCreate extends Relay.Mutation { static fragments = { organization: () => Relay.QL` fragment on Organization { id } ` } getMutation() { return Relay.QL` mutation { organizationInvitationCreate } `; } getFatQuery() { return Relay.QL` fragment on OrganizationInvitationCreatePayload { invitationEdges { node { role user { name } } } } `; } getOptimisticResponse() { return { organizationInvitationEdge: { node: { role: OrganizationMemberRoleConstants.MEMBER } } }; } getConfigs() { return [{ type: 'RANGE_ADD', parentName: 'organization', parentID: this.props.organization.id, connectionName: 'invitations', edgeName: 'organizationInvitationEdge', rangeBehaviors: () => 'prepend' }]; } getVariables() { return { id: this.props.organizationMember.id, role: this.props.role }; } } ## Instruction: Add email to OrganizationInvitation query ## Code After: import Relay from 'react-relay'; import OrganizationMemberRoleConstants from '../constants/OrganizationMemberRoleConstants'; export default class OrganizationInvitationCreate extends Relay.Mutation { static fragments = { organization: () => Relay.QL` fragment on Organization { id } ` } getMutation() { return Relay.QL` mutation { organizationInvitationCreate } `; } getFatQuery() { return Relay.QL` fragment on OrganizationInvitationCreatePayload { invitationEdges { node { role user { name } } } } `; } getOptimisticResponse() { return { organizationInvitationEdge: { node: { role: OrganizationMemberRoleConstants.MEMBER } } }; } getConfigs() { return [{ type: 'RANGE_ADD', parentName: 'organization', parentID: this.props.organization.id, connectionName: 'invitations', edgeName: 'organizationInvitationEdge', rangeBehaviors: () => 'prepend' }]; } getVariables() { return { id: this.props.organizationMember.id, emails: this.props.emails, role: this.props.role }; } }
7c253db94d410aceb9915618aebf075e3b26268b
package.json
package.json
{ "name": "fury", "description": "API Description SDK", "version": "0.2.0", "author": "Apiary.io <support@apiary.io>", "main": "./lib/fury", "repository": { "type": "git", "url": "git+ssh://git@github.com:apiaryio/fury.git" }, "engines": { "node": ">= 0.10.x" }, "scripts": { "test": "scripts/test", "prepublish": "scripts/build" }, "dependencies": { "coffee-script": "~1.9", "apiary-blueprint-parser": "", "protagonist": "~0.17.1", "request": "", "sanitizer": "", "underscore": "", "robotskirt": "" }, "devDependencies": { "chai": "~2.1", "coffee-coverage": "^0.4.4", "coveralls": "^2.11.2", "jscoverage": "^0.5.9", "mocha": "~2.1", "mocha-lcov-reporter": "0.0.2" }, "license": "MIT" }
{ "name": "fury", "description": "API Description SDK", "version": "0.3.0", "author": "Apiary.io <support@apiary.io>", "main": "./lib/fury", "repository": { "type": "git", "url": "git+ssh://git@github.com:apiaryio/fury.git" }, "engines": { "node": ">= 0.10.x" }, "scripts": { "test": "scripts/test", "prepublish": "scripts/build" }, "dependencies": { "coffee-script": "~1.9", "apiary-blueprint-parser": "", "protagonist": "~0.17.1", "sanitizer": "", "underscore": "", "robotskirt": "" }, "devDependencies": { "chai": "~2.1", "coffee-coverage": "^0.4.4", "coveralls": "^2.11.2", "jscoverage": "^0.5.9", "mocha": "~2.1", "mocha-lcov-reporter": "0.0.2" }, "license": "MIT" }
Remove unused dependencies, prepare v0.3.0
Remove unused dependencies, prepare v0.3.0
JSON
mit
apiaryio/fury.js
json
## Code Before: { "name": "fury", "description": "API Description SDK", "version": "0.2.0", "author": "Apiary.io <support@apiary.io>", "main": "./lib/fury", "repository": { "type": "git", "url": "git+ssh://git@github.com:apiaryio/fury.git" }, "engines": { "node": ">= 0.10.x" }, "scripts": { "test": "scripts/test", "prepublish": "scripts/build" }, "dependencies": { "coffee-script": "~1.9", "apiary-blueprint-parser": "", "protagonist": "~0.17.1", "request": "", "sanitizer": "", "underscore": "", "robotskirt": "" }, "devDependencies": { "chai": "~2.1", "coffee-coverage": "^0.4.4", "coveralls": "^2.11.2", "jscoverage": "^0.5.9", "mocha": "~2.1", "mocha-lcov-reporter": "0.0.2" }, "license": "MIT" } ## Instruction: Remove unused dependencies, prepare v0.3.0 ## Code After: { "name": "fury", "description": "API Description SDK", "version": "0.3.0", "author": "Apiary.io <support@apiary.io>", "main": "./lib/fury", "repository": { "type": "git", "url": "git+ssh://git@github.com:apiaryio/fury.git" }, "engines": { "node": ">= 0.10.x" }, "scripts": { "test": "scripts/test", "prepublish": "scripts/build" }, "dependencies": { "coffee-script": "~1.9", "apiary-blueprint-parser": "", "protagonist": "~0.17.1", "sanitizer": "", "underscore": "", "robotskirt": "" }, "devDependencies": { "chai": "~2.1", "coffee-coverage": "^0.4.4", "coveralls": "^2.11.2", "jscoverage": "^0.5.9", "mocha": "~2.1", "mocha-lcov-reporter": "0.0.2" }, "license": "MIT" }
d2893bec1bbd34fa325d8a1c5b50e9bf7699cc9e
frontend/app/scripts/Router.coffee
frontend/app/scripts/Router.coffee
define [ "backbone" "sp-utils-middleware" "common" "view/page" "view/modal" ],( Backbone Middleware common Page Modal )-> showPage=(View,options={},callback)-> common.app.content.show View, options, callback class MiddlewareRouter extends Middleware auth:(async,args)-> async.resolve "auth" middleware = new MiddlewareRouter Router = Backbone.Router.extend routes: "":"index" "!/rooms(/:id)": "rooms" "!/roomadd/:token": "roomAdd" "!/404": "error404" "*default":"default_router" index: middleware.wrap -> view = showPage Page.IndexPage rooms: middleware.wrap (id)-> auto_id = common.user.get 'active_room_id' unless id? if auto_id? @navigate "!/rooms/#{auto_id}", {trigger: true} return view = showPage Page.MainPage view.setRoom id if id? roomAdd: middleware.wrap (token)-> common.api.post_rooms_join(token).done (data)-> Backbone.trigger "rooms:needUpdate" common.router "!/rooms/#{data.id}", {trigger:true} error404: middleware.wrap -> showPage Page.Error404Page default_router:-> @navigate "!/404", {trigger:true,replace:true}
define [ "backbone" "sp-utils-middleware" "common" "view/page" "view/modal" ],( Backbone Middleware common Page Modal )-> showPage=(View,options={},callback)-> common.app.content.show View, options, callback class MiddlewareRouter extends Middleware auth:(async,args)-> async.resolve "auth" middleware = new MiddlewareRouter Router = Backbone.Router.extend routes: "":"index" "!/rooms(/:id)": "rooms" "!/roomadd/:token": "roomAdd" "!/404": "error404" "*default":"default_router" index: middleware.wrap -> view = showPage Page.IndexPage rooms: middleware.wrap (id)-> auto_id = common.user.get 'active_room_id' unless id? if auto_id? @navigate "!/rooms/#{auto_id}", {trigger: true} return view = showPage Page.MainPage view.setRoom id if id? roomAdd: middleware.wrap (token)-> common.api.post_rooms_join(token) .done (data)-> Backbone.trigger "rooms:needUpdate" common.router.navigate "!/rooms/#{data.id}", {trigger:true} .fail -> common.router.navigate "#", {trigger: true} error404: middleware.wrap -> showPage Page.Error404Page default_router:-> @navigate "!/404", {trigger:true,replace:true}
Fix add room route work
Fix add room route work
CoffeeScript
mit
jukebuzz/jb-backend,jukebuzz/jb-backend,jukebuzz/jb-frontend
coffeescript
## Code Before: define [ "backbone" "sp-utils-middleware" "common" "view/page" "view/modal" ],( Backbone Middleware common Page Modal )-> showPage=(View,options={},callback)-> common.app.content.show View, options, callback class MiddlewareRouter extends Middleware auth:(async,args)-> async.resolve "auth" middleware = new MiddlewareRouter Router = Backbone.Router.extend routes: "":"index" "!/rooms(/:id)": "rooms" "!/roomadd/:token": "roomAdd" "!/404": "error404" "*default":"default_router" index: middleware.wrap -> view = showPage Page.IndexPage rooms: middleware.wrap (id)-> auto_id = common.user.get 'active_room_id' unless id? if auto_id? @navigate "!/rooms/#{auto_id}", {trigger: true} return view = showPage Page.MainPage view.setRoom id if id? roomAdd: middleware.wrap (token)-> common.api.post_rooms_join(token).done (data)-> Backbone.trigger "rooms:needUpdate" common.router "!/rooms/#{data.id}", {trigger:true} error404: middleware.wrap -> showPage Page.Error404Page default_router:-> @navigate "!/404", {trigger:true,replace:true} ## Instruction: Fix add room route work ## Code After: define [ "backbone" "sp-utils-middleware" "common" "view/page" "view/modal" ],( Backbone Middleware common Page Modal )-> showPage=(View,options={},callback)-> common.app.content.show View, options, callback class MiddlewareRouter extends Middleware auth:(async,args)-> async.resolve "auth" middleware = new MiddlewareRouter Router = Backbone.Router.extend routes: "":"index" "!/rooms(/:id)": "rooms" "!/roomadd/:token": "roomAdd" "!/404": "error404" "*default":"default_router" index: middleware.wrap -> view = showPage Page.IndexPage rooms: middleware.wrap (id)-> auto_id = common.user.get 'active_room_id' unless id? if auto_id? @navigate "!/rooms/#{auto_id}", {trigger: true} return view = showPage Page.MainPage view.setRoom id if id? roomAdd: middleware.wrap (token)-> common.api.post_rooms_join(token) .done (data)-> Backbone.trigger "rooms:needUpdate" common.router.navigate "!/rooms/#{data.id}", {trigger:true} .fail -> common.router.navigate "#", {trigger: true} error404: middleware.wrap -> showPage Page.Error404Page default_router:-> @navigate "!/404", {trigger:true,replace:true}
358c47d8d6ee239cbc23b3983689bd4795a76992
metadata/com.tughi.aggregator.yml
metadata/com.tughi.aggregator.yml
Categories: - Reading License: GPL-3.0-only AuthorName: Ștefan Șelariu WebSite: https://tughi.github.io/aggregator-android/ SourceCode: https://github.com/tughi/aggregator-android IssueTracker: https://github.com/tughi/aggregator-android/issues AutoName: Aggregator RepoType: git Repo: https://github.com/tughi/aggregator-android.git Builds: - versionName: Preview:031 versionCode: 299031 commit: preview-031 subdir: app submodules: true sudo: - apt-get update - apt-get install -y openjdk-11-jdk-headless tree - update-alternatives --auto java gradle: - fdroid AutoUpdateMode: Version UpdateCheckMode: Tags CurrentVersion: preview-031 CurrentVersionCode: 299031
Categories: - Reading License: GPL-3.0-only AuthorName: Ștefan Șelariu WebSite: https://tughi.github.io/aggregator-android/ SourceCode: https://github.com/tughi/aggregator-android IssueTracker: https://github.com/tughi/aggregator-android/issues AutoName: Aggregator RepoType: git Repo: https://github.com/tughi/aggregator-android.git Builds: - versionName: Preview:031 versionCode: 299031 commit: preview-031 subdir: app submodules: true sudo: - apt-get update - apt-get install -y openjdk-11-jdk-headless tree - update-alternatives --auto java gradle: - fdroid - versionName: Preview:032 versionCode: 299032 commit: f7bb83e317f268bef08db966fce807612a8813ef subdir: app submodules: true sudo: - apt-get update - apt-get install -y openjdk-11-jdk-headless tree - update-alternatives --auto java gradle: - fdroid AutoUpdateMode: Version UpdateCheckMode: Tags CurrentVersion: Preview:032 CurrentVersionCode: 299032
Update Aggregator to Preview:032 (299032)
Update Aggregator to Preview:032 (299032)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - Reading License: GPL-3.0-only AuthorName: Ștefan Șelariu WebSite: https://tughi.github.io/aggregator-android/ SourceCode: https://github.com/tughi/aggregator-android IssueTracker: https://github.com/tughi/aggregator-android/issues AutoName: Aggregator RepoType: git Repo: https://github.com/tughi/aggregator-android.git Builds: - versionName: Preview:031 versionCode: 299031 commit: preview-031 subdir: app submodules: true sudo: - apt-get update - apt-get install -y openjdk-11-jdk-headless tree - update-alternatives --auto java gradle: - fdroid AutoUpdateMode: Version UpdateCheckMode: Tags CurrentVersion: preview-031 CurrentVersionCode: 299031 ## Instruction: Update Aggregator to Preview:032 (299032) ## Code After: Categories: - Reading License: GPL-3.0-only AuthorName: Ștefan Șelariu WebSite: https://tughi.github.io/aggregator-android/ SourceCode: https://github.com/tughi/aggregator-android IssueTracker: https://github.com/tughi/aggregator-android/issues AutoName: Aggregator RepoType: git Repo: https://github.com/tughi/aggregator-android.git Builds: - versionName: Preview:031 versionCode: 299031 commit: preview-031 subdir: app submodules: true sudo: - apt-get update - apt-get install -y openjdk-11-jdk-headless tree - update-alternatives --auto java gradle: - fdroid - versionName: Preview:032 versionCode: 299032 commit: f7bb83e317f268bef08db966fce807612a8813ef subdir: app submodules: true sudo: - apt-get update - apt-get install -y openjdk-11-jdk-headless tree - update-alternatives --auto java gradle: - fdroid AutoUpdateMode: Version UpdateCheckMode: Tags CurrentVersion: Preview:032 CurrentVersionCode: 299032
39866edf5430c0be966e0bbc9abebf26bef4489e
roles/knime/tasks/plugins.yml
roles/knime/tasks/plugins.yml
--- - name: Copy knime plugin installer template: src=plugin_installer.sh.j2 dest=/usr/bin/knime_plugin_installer.sh mode=u+rx - name: Install RDKIT wizards integration command: /usr/bin/knime_plugin_installer.sh org.rdkit.knime.wizards.feature.feature.group args: creates: "{{ knime_root }}/org.rdkit.knime.wizards.feature.feature.group.installed" - name: Install Indigo integration command: /usr/bin/knime_plugin_installer.sh com.ggasoftware.indigo.knime.feature args: creates: "{{ knime_root }}/com.ggasoftware.indigo.knime.feature.installed" - name: Install Erlwood integration command: /usr/bin/knime_plugin_installer.sh org.erlwood.features.core.base args: creates: "{{ knime_root }}/org.erlwood.features.core.base..installed" - name: Install OpenPHACTS integration get_url: url="https://github.com/openphacts/OPS-Knime/raw/master/org.openphacts.utils.json_{{ ops_knime_version }}.zip" dest="{{ knime_root }}/dropins/org.openphacts.utils.json_{{ ops_knime_version }}.jar"
--- - name: Copy knime plugin installer template: src=plugin_installer.sh.j2 dest=/usr/bin/knime_plugin_installer.sh mode=u+rx - name: Install RDKIT wizards integration command: /usr/bin/knime_plugin_installer.sh org.rdkit.knime.wizards.feature.feature.group args: creates: "{{ knime_root }}/org.rdkit.knime.wizards.feature.feature.group.installed" - name: Install OpenPHACTS integration get_url: url="https://github.com/openphacts/OPS-Knime/raw/master/org.openphacts.utils.json_{{ ops_knime_version }}.zip" dest="{{ knime_root }}/dropins/org.openphacts.utils.json_{{ ops_knime_version }}.jar"
Remove erlwood knime plugin because it is already part of the Knime distro.
Remove erlwood knime plugin because it is already part of the Knime distro. Removed Indigo knime plugin because it can not be found.
YAML
apache-2.0
3D-e-Chem/3D-e-Chem-VM
yaml
## Code Before: --- - name: Copy knime plugin installer template: src=plugin_installer.sh.j2 dest=/usr/bin/knime_plugin_installer.sh mode=u+rx - name: Install RDKIT wizards integration command: /usr/bin/knime_plugin_installer.sh org.rdkit.knime.wizards.feature.feature.group args: creates: "{{ knime_root }}/org.rdkit.knime.wizards.feature.feature.group.installed" - name: Install Indigo integration command: /usr/bin/knime_plugin_installer.sh com.ggasoftware.indigo.knime.feature args: creates: "{{ knime_root }}/com.ggasoftware.indigo.knime.feature.installed" - name: Install Erlwood integration command: /usr/bin/knime_plugin_installer.sh org.erlwood.features.core.base args: creates: "{{ knime_root }}/org.erlwood.features.core.base..installed" - name: Install OpenPHACTS integration get_url: url="https://github.com/openphacts/OPS-Knime/raw/master/org.openphacts.utils.json_{{ ops_knime_version }}.zip" dest="{{ knime_root }}/dropins/org.openphacts.utils.json_{{ ops_knime_version }}.jar" ## Instruction: Remove erlwood knime plugin because it is already part of the Knime distro. Removed Indigo knime plugin because it can not be found. ## Code After: --- - name: Copy knime plugin installer template: src=plugin_installer.sh.j2 dest=/usr/bin/knime_plugin_installer.sh mode=u+rx - name: Install RDKIT wizards integration command: /usr/bin/knime_plugin_installer.sh org.rdkit.knime.wizards.feature.feature.group args: creates: "{{ knime_root }}/org.rdkit.knime.wizards.feature.feature.group.installed" - name: Install OpenPHACTS integration get_url: url="https://github.com/openphacts/OPS-Knime/raw/master/org.openphacts.utils.json_{{ ops_knime_version }}.zip" dest="{{ knime_root }}/dropins/org.openphacts.utils.json_{{ ops_knime_version }}.jar"
b6c36a57def8fab9a7a63487b3e335c0f44c370c
src/scene/request-animation-frame.js
src/scene/request-animation-frame.js
let func if(typeof window === 'undefined') // for unit testing in Node func = (callback => setTimeout(callback, 1000 / 60)) else func = ( window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || (callback => window.setTimeout(callback, 1000 / 60)) ) export default func
let func if(typeof window === 'undefined') // for unit testing in Node func = (callback => setTimeout(callback, 1000 / 60)) else { func = ( window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ) if(func) func = func.bind(window) else func = (callback => window.setTimeout(callback, 1000 / 60)) } export default func
Fix for illegal invocation caused by Uglify
Fix for illegal invocation caused by Uglify
JavaScript
unknown
Flaise/skid,Flaise/esquire
javascript
## Code Before: let func if(typeof window === 'undefined') // for unit testing in Node func = (callback => setTimeout(callback, 1000 / 60)) else func = ( window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || (callback => window.setTimeout(callback, 1000 / 60)) ) export default func ## Instruction: Fix for illegal invocation caused by Uglify ## Code After: let func if(typeof window === 'undefined') // for unit testing in Node func = (callback => setTimeout(callback, 1000 / 60)) else { func = ( window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ) if(func) func = func.bind(window) else func = (callback => window.setTimeout(callback, 1000 / 60)) } export default func
fdb7c400adb777cdc60cf034569d81e95797cc10
infupy/backends/common.py
infupy/backends/common.py
import sys from abc import ABCMeta, abstractmethod def printerr(msg, e=''): msg = "Backend: " + str(msg) print(msg.format(e), file=sys.stderr) class CommandError(Exception): def __str__(self): return "Command error: {}".format(self.args) class Syringe(metaclass=ABCMeta): _events = set() @abstractmethod def execCommand(self, msg): """ Send command and read reply. """ pass # Read Perfusion related values @abstractmethod def readRate(self): return 0 @abstractmethod def readVolume(self): return 0 # Infusion control def setRate(self, rate): pass # Events def registerEvent(self, event): self._events |= set([event]) def unregisterEvent(self, event): self._events -= set([event]) def clearEvents(self): self._events = set()
import sys from abc import ABCMeta, abstractmethod def printerr(msg, e=''): msg = "Backend: " + str(msg) print(msg.format(e), file=sys.stderr) class CommandError(Exception): def __str__(self): return "Command error: {}".format(self.args) class Syringe(metaclass=ABCMeta): _events = set() @abstractmethod def execCommand(self, msg): raise NotImplementedError # Read Perfusion related values @abstractmethod def readRate(self): raise NotImplementedError @abstractmethod def readVolume(self): raise NotImplementedError # Infusion control def setRate(self, rate): raise NotImplementedError # Events def registerEvent(self, event): self._events |= set([event]) def unregisterEvent(self, event): self._events -= set([event]) def clearEvents(self): self._events = set()
Make abstract methods raise not implemented
Make abstract methods raise not implemented
Python
isc
jaj42/infupy
python
## Code Before: import sys from abc import ABCMeta, abstractmethod def printerr(msg, e=''): msg = "Backend: " + str(msg) print(msg.format(e), file=sys.stderr) class CommandError(Exception): def __str__(self): return "Command error: {}".format(self.args) class Syringe(metaclass=ABCMeta): _events = set() @abstractmethod def execCommand(self, msg): """ Send command and read reply. """ pass # Read Perfusion related values @abstractmethod def readRate(self): return 0 @abstractmethod def readVolume(self): return 0 # Infusion control def setRate(self, rate): pass # Events def registerEvent(self, event): self._events |= set([event]) def unregisterEvent(self, event): self._events -= set([event]) def clearEvents(self): self._events = set() ## Instruction: Make abstract methods raise not implemented ## Code After: import sys from abc import ABCMeta, abstractmethod def printerr(msg, e=''): msg = "Backend: " + str(msg) print(msg.format(e), file=sys.stderr) class CommandError(Exception): def __str__(self): return "Command error: {}".format(self.args) class Syringe(metaclass=ABCMeta): _events = set() @abstractmethod def execCommand(self, msg): raise NotImplementedError # Read Perfusion related values @abstractmethod def readRate(self): raise NotImplementedError @abstractmethod def readVolume(self): raise NotImplementedError # Infusion control def setRate(self, rate): raise NotImplementedError # Events def registerEvent(self, event): self._events |= set([event]) def unregisterEvent(self, event): self._events -= set([event]) def clearEvents(self): self._events = set()
9b6079b7cbb504d9d0a7e1ce9d5176d7039e090f
README.md
README.md
datagen [![http://travis-ci.org/cliffano/datagen](https://secure.travis-ci.org/cliffano/datagen.png?branch=master)](http://travis-ci.org/cliffano/datagen) ----------- TODO Installation ------------ npm install -g datagen Usage ----- TODO Colophon -------- Follow [@cliffano](http://twitter.com/cliffano) on Twitter.
DataGen [![http://travis-ci.org/cliffano/datagen](https://secure.travis-ci.org/cliffano/datagen.png?branch=master)](http://travis-ci.org/cliffano/datagen) ----------- Multi-process data file generator. Installation ------------ npm install -g datagen Usage ----- Create template files example: datagen init Generate data files containing 1 million segments, over 8 processes, written to data0 ... data7 files: datagen run -s 1000000 -w 8 -o data Templates --------- DataGen uses 3 template files: header, segment, and footer. They are simple text files which will be constructed into a data file in this format: header segment 0 segment 1 ... segment num_segments - 1 footer Each template can contain the following parameters: <table> <tr><td>run_id</td><td>Unique to each program execution. Default value is master process PID, can be overridden via -r flag.</td></tr> <tr><td>worker_id</td><td>Unique to each worker. Value from 0 to number of workers - 1.</td></tr> <tr><td>segment_id</td><td>Unique to each segment within a file, repeated in each file. Value from 0 to number of segments - 1. Not available in header and footer templates.</td></tr> </table> Colophon -------- Follow [@cliffano](http://twitter.com/cliffano) on Twitter.
Add usage and template info.
Add usage and template info.
Markdown
mit
cliffano/datagen
markdown
## Code Before: datagen [![http://travis-ci.org/cliffano/datagen](https://secure.travis-ci.org/cliffano/datagen.png?branch=master)](http://travis-ci.org/cliffano/datagen) ----------- TODO Installation ------------ npm install -g datagen Usage ----- TODO Colophon -------- Follow [@cliffano](http://twitter.com/cliffano) on Twitter. ## Instruction: Add usage and template info. ## Code After: DataGen [![http://travis-ci.org/cliffano/datagen](https://secure.travis-ci.org/cliffano/datagen.png?branch=master)](http://travis-ci.org/cliffano/datagen) ----------- Multi-process data file generator. Installation ------------ npm install -g datagen Usage ----- Create template files example: datagen init Generate data files containing 1 million segments, over 8 processes, written to data0 ... data7 files: datagen run -s 1000000 -w 8 -o data Templates --------- DataGen uses 3 template files: header, segment, and footer. They are simple text files which will be constructed into a data file in this format: header segment 0 segment 1 ... segment num_segments - 1 footer Each template can contain the following parameters: <table> <tr><td>run_id</td><td>Unique to each program execution. Default value is master process PID, can be overridden via -r flag.</td></tr> <tr><td>worker_id</td><td>Unique to each worker. Value from 0 to number of workers - 1.</td></tr> <tr><td>segment_id</td><td>Unique to each segment within a file, repeated in each file. Value from 0 to number of segments - 1. Not available in header and footer templates.</td></tr> </table> Colophon -------- Follow [@cliffano](http://twitter.com/cliffano) on Twitter.
b4946f54a646003b907eb98469f96656bf212d36
README.md
README.md
Code and notes for FENS 2015 Winter School on decision-making ============================================================= This repository contains all the MATLAB code used to generate the figures for my tutorial on normative solutions to the speed/accuracy trade-off, held at the FENS-Hertie 2015 Winter School on the neuroscience on decision-making. The derivations that result in these figures are provided in the [tutorial notes](https://sites.google.com/site/jdrugo/pub/pdf/fens2015_notes.pdf). Further information is provided on the [tutorial slides](https://sites.google.com/site/jdrugo/pub/pdf/fens2015_slides.pdf)
Code and notes for FENS 2015 Winter School on decision-making ============================================================= This repository contains all the MATLAB code used to generate the figures for my tutorial on normative solutions to the speed/accuracy trade-off, held at the FENS-Hertie 2015 Winter School on the neuroscience on decision-making. The derivations that result in these figures are provided in the [tutorial notes](http://drugowitschlab.hms.harvard.edu/files/drugowitschlab/files/fens2015_notes.pdf). Further information is provided on the [tutorial slides](http://drugowitschlab.hms.harvard.edu/files/drugowitschlab/files/fens2015_slides.pdf)
Update URLs for tutorial notes and slides
Update URLs for tutorial notes and slides
Markdown
bsd-3-clause
jdrugo/FENS2015
markdown
## Code Before: Code and notes for FENS 2015 Winter School on decision-making ============================================================= This repository contains all the MATLAB code used to generate the figures for my tutorial on normative solutions to the speed/accuracy trade-off, held at the FENS-Hertie 2015 Winter School on the neuroscience on decision-making. The derivations that result in these figures are provided in the [tutorial notes](https://sites.google.com/site/jdrugo/pub/pdf/fens2015_notes.pdf). Further information is provided on the [tutorial slides](https://sites.google.com/site/jdrugo/pub/pdf/fens2015_slides.pdf) ## Instruction: Update URLs for tutorial notes and slides ## Code After: Code and notes for FENS 2015 Winter School on decision-making ============================================================= This repository contains all the MATLAB code used to generate the figures for my tutorial on normative solutions to the speed/accuracy trade-off, held at the FENS-Hertie 2015 Winter School on the neuroscience on decision-making. The derivations that result in these figures are provided in the [tutorial notes](http://drugowitschlab.hms.harvard.edu/files/drugowitschlab/files/fens2015_notes.pdf). Further information is provided on the [tutorial slides](http://drugowitschlab.hms.harvard.edu/files/drugowitschlab/files/fens2015_slides.pdf)
06d166ce54ed2925e2ad911d9b951f34ff669d08
.travis.yml
.travis.yml
language: java sudo: false jdk: - oraclejdk12 - openjdk8 install: true branches: only: - master script: mvn clean test
language: java sudo: false jdk: - oraclejdk12 - openjdk8 install: true branches: only: - master script: mvn clean test cache: directories: - $HOME/.m2
Improve Travis CI build Performance
Improve Travis CI build Performance
YAML
apache-2.0
lemire/javaewah
yaml
## Code Before: language: java sudo: false jdk: - oraclejdk12 - openjdk8 install: true branches: only: - master script: mvn clean test ## Instruction: Improve Travis CI build Performance ## Code After: language: java sudo: false jdk: - oraclejdk12 - openjdk8 install: true branches: only: - master script: mvn clean test cache: directories: - $HOME/.m2
54873530cf823bd733d359d26a48fba7e57791fa
test/models/indicator.coffee
test/models/indicator.coffee
assert = require('chai').assert _ = require('underscore') sinon = require('sinon') Indicator = require('../../models/indicator') fs = require 'fs' suite('Indicator') test(".find reads the definition from definitions/indicators.json and returns an indicator with the correct attributes for that ID", (done)-> definitions = [ {id: 1, type: 'esri'}, {id: 5, type: 'standard'} ] readFileStub = sinon.stub(fs, 'readFile', (filename, callback) -> callback(null, JSON.stringify(definitions)) ) Indicator.find(5).then((indicator) -> try assert.isTrue readFileStub.calledWith('./definitions/indicators.json'), "Expected find to read the definitions file" assert.property indicator, 'type', "Expected the type property from the JSON to be populated on indicator model" assert.strictEqual indicator.type, 'standard', "Expected the type property to be populated correctly from the definition" done() catch err done(err) finally readFileStub.restore() ).fail(done) )
assert = require('chai').assert _ = require('underscore') sinon = require('sinon') Indicator = require('../../models/indicator') fs = require 'fs' suite('Indicator') test(".find reads the definition from definitions/indicators.json and returns an indicator with the correct attributes for that ID", (done)-> definitions = [ {id: 1, type: 'esri'}, {id: 5, type: 'standard'} ] readFileStub = sinon.stub(fs, 'readFile', (filename, callback) -> callback(null, JSON.stringify(definitions)) ) Indicator.find(5).then((indicator) -> try assert.isTrue readFileStub.calledWith('./definitions/indicators.json'), "Expected find to read the definitions file" assert.property indicator, 'type', "Expected the type property from the JSON to be populated on indicator model" assert.strictEqual indicator.type, 'standard', "Expected the type property to be populated correctly from the definition" done() catch err done(err) finally readFileStub.restore() ).fail(done) ) test(".query loads and formats the data based on its source", -> indicator = new Indicator( source: "gdoc" ) gotData = {some: 'data'} getDataStub = sinon.stub(indicator, 'getDataFrom', -> Q.fcall(-> gotData) ) formatDataFrom = sinon.stub(indicator, 'formatDataFrom', -> Q.fcall(-> {}) ) assert.isTrue( getDataStub.calledWith(indicator.source), "Expected getDataFrom to be called with the indicator source" ) assert.isTrue( formatDataFrom.calledWith(indicator.source, gotData), "Expected formatDataFrom to be called with the indicator source and fetched data" ) )
Add tests for new get/format data methods
Add tests for new get/format data methods
CoffeeScript
bsd-3-clause
unepwcmc/NRT,unepwcmc/NRT
coffeescript
## Code Before: assert = require('chai').assert _ = require('underscore') sinon = require('sinon') Indicator = require('../../models/indicator') fs = require 'fs' suite('Indicator') test(".find reads the definition from definitions/indicators.json and returns an indicator with the correct attributes for that ID", (done)-> definitions = [ {id: 1, type: 'esri'}, {id: 5, type: 'standard'} ] readFileStub = sinon.stub(fs, 'readFile', (filename, callback) -> callback(null, JSON.stringify(definitions)) ) Indicator.find(5).then((indicator) -> try assert.isTrue readFileStub.calledWith('./definitions/indicators.json'), "Expected find to read the definitions file" assert.property indicator, 'type', "Expected the type property from the JSON to be populated on indicator model" assert.strictEqual indicator.type, 'standard', "Expected the type property to be populated correctly from the definition" done() catch err done(err) finally readFileStub.restore() ).fail(done) ) ## Instruction: Add tests for new get/format data methods ## Code After: assert = require('chai').assert _ = require('underscore') sinon = require('sinon') Indicator = require('../../models/indicator') fs = require 'fs' suite('Indicator') test(".find reads the definition from definitions/indicators.json and returns an indicator with the correct attributes for that ID", (done)-> definitions = [ {id: 1, type: 'esri'}, {id: 5, type: 'standard'} ] readFileStub = sinon.stub(fs, 'readFile', (filename, callback) -> callback(null, JSON.stringify(definitions)) ) Indicator.find(5).then((indicator) -> try assert.isTrue readFileStub.calledWith('./definitions/indicators.json'), "Expected find to read the definitions file" assert.property indicator, 'type', "Expected the type property from the JSON to be populated on indicator model" assert.strictEqual indicator.type, 'standard', "Expected the type property to be populated correctly from the definition" done() catch err done(err) finally readFileStub.restore() ).fail(done) ) test(".query loads and formats the data based on its source", -> indicator = new Indicator( source: "gdoc" ) gotData = {some: 'data'} getDataStub = sinon.stub(indicator, 'getDataFrom', -> Q.fcall(-> gotData) ) formatDataFrom = sinon.stub(indicator, 'formatDataFrom', -> Q.fcall(-> {}) ) assert.isTrue( getDataStub.calledWith(indicator.source), "Expected getDataFrom to be called with the indicator source" ) assert.isTrue( formatDataFrom.calledWith(indicator.source, gotData), "Expected formatDataFrom to be called with the indicator source and fetched data" ) )
640725d8409152bfee732b2a28396837d89111ff
schema/create_schema.sql
schema/create_schema.sql
-- Generate core schema \i schema/generate/01-schema.sql \i schema/generate/02-augur_data.sql \i schema/generate/03-augur_operations.sql \i schema/generate/04-spdx.sql \i schema/generate/05-seed_data.sql -- Update scripts \i schema/generate/06-schema_update_8.sql \i schema/generate/07-schema_update_9.sql \i schema/generate/08-schema_update_10.sql \i schema/generate/09-schema_update_11.sql \i schema/generate/10-schema_update_12.sql \i schema/generate/10-schema_update_12.sql \i schema/generate/11-schema_update_13.sql \i schema/generate/12-schema_update_14.sql \i schema/generate/13-schema_update_15.sql
-- Generate core schema \i schema/generate/01-schema.sql \i schema/generate/02-augur_data.sql \i schema/generate/03-augur_operations.sql \i schema/generate/04-spdx.sql \i schema/generate/05-seed_data.sql -- Update scripts \i schema/generate/06-schema_update_8.sql \i schema/generate/07-schema_update_9.sql \i schema/generate/08-schema_update_10.sql \i schema/generate/09-schema_update_11.sql \i schema/generate/10-schema_update_12.sql \i schema/generate/10-schema_update_12.sql \i schema/generate/11-schema_update_13.sql \i schema/generate/12-schema_update_14.sql \i schema/generate/13-schema_update_15.sql \i schema/generate/13-schema_update_15.sql \i schema/generate/15-schema_update_16.sql
Add schema v16 update script to schema install
Add schema v16 update script to schema install Signed-off-by: Carter Landis <84a516841ba77a5b4648de2cd0dfcb30ea46dbb4@carterlandis.com>
SQL
mit
OSSHealth/ghdata,OSSHealth/ghdata,OSSHealth/ghdata
sql
## Code Before: -- Generate core schema \i schema/generate/01-schema.sql \i schema/generate/02-augur_data.sql \i schema/generate/03-augur_operations.sql \i schema/generate/04-spdx.sql \i schema/generate/05-seed_data.sql -- Update scripts \i schema/generate/06-schema_update_8.sql \i schema/generate/07-schema_update_9.sql \i schema/generate/08-schema_update_10.sql \i schema/generate/09-schema_update_11.sql \i schema/generate/10-schema_update_12.sql \i schema/generate/10-schema_update_12.sql \i schema/generate/11-schema_update_13.sql \i schema/generate/12-schema_update_14.sql \i schema/generate/13-schema_update_15.sql ## Instruction: Add schema v16 update script to schema install Signed-off-by: Carter Landis <84a516841ba77a5b4648de2cd0dfcb30ea46dbb4@carterlandis.com> ## Code After: -- Generate core schema \i schema/generate/01-schema.sql \i schema/generate/02-augur_data.sql \i schema/generate/03-augur_operations.sql \i schema/generate/04-spdx.sql \i schema/generate/05-seed_data.sql -- Update scripts \i schema/generate/06-schema_update_8.sql \i schema/generate/07-schema_update_9.sql \i schema/generate/08-schema_update_10.sql \i schema/generate/09-schema_update_11.sql \i schema/generate/10-schema_update_12.sql \i schema/generate/10-schema_update_12.sql \i schema/generate/11-schema_update_13.sql \i schema/generate/12-schema_update_14.sql \i schema/generate/13-schema_update_15.sql \i schema/generate/13-schema_update_15.sql \i schema/generate/15-schema_update_16.sql
5122f3faf6b2e0612054edc6293242c7384a66ca
dev_requirements.txt
dev_requirements.txt
unittest2 https://github.com/nucleic/enaml/archive/0.8.8.tar.gz#egg=enaml -e git+http://github.com/enthought/traits.git#egg=traits -e git+http://github.com/enthought/traitsui.git@feature/python3#egg=traitsui -e git+http://github.com/enthought/traits_enaml.git#egg=traits_enaml
unittest2 https://github.com/nucleic/enaml/archive/0.8.8.tar.gz#egg=enaml -e git+http://github.com/enthought/traits.git#egg=traits -e git+http://github.com/enthought/traitsui.git#egg=traitsui -e git+http://github.com/enthought/traits_enaml.git#egg=traits_enaml
Use traitsui master instead of Python 3 branch.
Use traitsui master instead of Python 3 branch.
Text
bsd-3-clause
geggo/pyface,geggo/pyface
text
## Code Before: unittest2 https://github.com/nucleic/enaml/archive/0.8.8.tar.gz#egg=enaml -e git+http://github.com/enthought/traits.git#egg=traits -e git+http://github.com/enthought/traitsui.git@feature/python3#egg=traitsui -e git+http://github.com/enthought/traits_enaml.git#egg=traits_enaml ## Instruction: Use traitsui master instead of Python 3 branch. ## Code After: unittest2 https://github.com/nucleic/enaml/archive/0.8.8.tar.gz#egg=enaml -e git+http://github.com/enthought/traits.git#egg=traits -e git+http://github.com/enthought/traitsui.git#egg=traitsui -e git+http://github.com/enthought/traits_enaml.git#egg=traits_enaml
aec2bda9ff624c530ebab6a7055ec2d7b4518aca
README.md
README.md
== List It (CodeFellows - App A Day) ===Description This app allows you to have all in one place all of your lists such as grocery lists and craft lists or whatever. ===Concepts Utalized Nested Resources - Each list has a nested resource of items. Authentication - You need to log in before creating or modifying lists or their items. ===ScreenShot ![Screenshot](lib/assets/list_it_app.png)
This app allows you to have all in one place all of your lists such as grocery lists and craft lists or whatever. ###Concepts Utalized Nested Resources - Each list has a nested resource of items. Authentication - You need to log in before creating or modifying lists or their items. ###ScreenShot ![Screenshot](lib/assets/list_it_app.png)
Update readme to be markdown format
Update readme to be markdown format
Markdown
mit
tuckerd/list_it,tuckerd/list_it
markdown
## Code Before: == List It (CodeFellows - App A Day) ===Description This app allows you to have all in one place all of your lists such as grocery lists and craft lists or whatever. ===Concepts Utalized Nested Resources - Each list has a nested resource of items. Authentication - You need to log in before creating or modifying lists or their items. ===ScreenShot ![Screenshot](lib/assets/list_it_app.png) ## Instruction: Update readme to be markdown format ## Code After: This app allows you to have all in one place all of your lists such as grocery lists and craft lists or whatever. ###Concepts Utalized Nested Resources - Each list has a nested resource of items. Authentication - You need to log in before creating or modifying lists or their items. ###ScreenShot ![Screenshot](lib/assets/list_it_app.png)
ec0b8c937fb2079c0b4a29b3fa48feb76634d404
README.md
README.md
A hopefully compelling example to use Reactive Extensions in WPF projects ## Build steps 1. Restore NuGet packages: `nuget restore .` * Build project: `msbuild WpfRxSample.sln`
A hopefully compelling example to use Reactive Extensions in WPF projects. ## Build steps 1. Restore NuGet packages: `nuget restore .` 1. Build project: `msbuild WpfRxSample.sln` ## A short introduction to Reactive Programming There are two interfaces in the .NET BCL that are heavily used for Reactive Programming: `System.IObservable<T>` and `System.IObserver<T>`. ``` public interface IObservable<out T> { IDisposable Subscribe(IObserver<T> observer); } public interface IObserver<in T> { void OnNext(T value); void OnError(Exception error); void OnCompleted(); } ``` `IObservable<T>` represents data that can change over time (e.g. sensor values, mouse location) or events that occured (e.g. button click, timer elapsed). `IObserver<T>` is the sink for this data (`OnNext` is like an event handler). An observer can _subscribe_ to and _unsubscribe_ from (using the returned `IDisposable`) an observable. While subscribed the observable notifies the observer about new data (`OnNext`) and about the termination of the observable sequence (both successful (`OnCompleted`) or due to an error (`OnError`)). ### What's the difference to .NET events? We previously noticed that `IObserver<T>.OnNext` is like an event handler, so why not just use plain old .NET events? Because .NET events are missing a type for the event source, which means we can't pass e.g. `INotifyPropertyChanged.PropertyChanged` around to e.g. filter its data or combine it with other events before subscribing to it. ### But wait! `IObservable<T>` defines only a single method. How can I do cool stuff like filtering data and combining observables? In this case `IObservable<T>` is very similar to `IEnumerable<T>`. The interface itself has a very small surface, but it is big enough that concrete implementations of `IObservable<T>` can wrap an underlying observable and modify its data. E.g. when calling `source.Where(i => i > 10)` we wrap `source` inside a special implementation of `IObservable<T>`, that, when subscribed to, subscribes to `source` and only passes numbers greater than 10 to the subscribed observer. The de-facto standard for Reactive Programming in .NET using `IObservable<T>` and `IObserver<T>` is [Rx.NET](https://github.com/Reactive-Extensions/Rx.NET).
Add short introduction to Rx
Add short introduction to Rx
Markdown
mit
johannesegger/Rx-WPF-Sample
markdown
## Code Before: A hopefully compelling example to use Reactive Extensions in WPF projects ## Build steps 1. Restore NuGet packages: `nuget restore .` * Build project: `msbuild WpfRxSample.sln` ## Instruction: Add short introduction to Rx ## Code After: A hopefully compelling example to use Reactive Extensions in WPF projects. ## Build steps 1. Restore NuGet packages: `nuget restore .` 1. Build project: `msbuild WpfRxSample.sln` ## A short introduction to Reactive Programming There are two interfaces in the .NET BCL that are heavily used for Reactive Programming: `System.IObservable<T>` and `System.IObserver<T>`. ``` public interface IObservable<out T> { IDisposable Subscribe(IObserver<T> observer); } public interface IObserver<in T> { void OnNext(T value); void OnError(Exception error); void OnCompleted(); } ``` `IObservable<T>` represents data that can change over time (e.g. sensor values, mouse location) or events that occured (e.g. button click, timer elapsed). `IObserver<T>` is the sink for this data (`OnNext` is like an event handler). An observer can _subscribe_ to and _unsubscribe_ from (using the returned `IDisposable`) an observable. While subscribed the observable notifies the observer about new data (`OnNext`) and about the termination of the observable sequence (both successful (`OnCompleted`) or due to an error (`OnError`)). ### What's the difference to .NET events? We previously noticed that `IObserver<T>.OnNext` is like an event handler, so why not just use plain old .NET events? Because .NET events are missing a type for the event source, which means we can't pass e.g. `INotifyPropertyChanged.PropertyChanged` around to e.g. filter its data or combine it with other events before subscribing to it. ### But wait! `IObservable<T>` defines only a single method. How can I do cool stuff like filtering data and combining observables? In this case `IObservable<T>` is very similar to `IEnumerable<T>`. The interface itself has a very small surface, but it is big enough that concrete implementations of `IObservable<T>` can wrap an underlying observable and modify its data. E.g. when calling `source.Where(i => i > 10)` we wrap `source` inside a special implementation of `IObservable<T>`, that, when subscribed to, subscribes to `source` and only passes numbers greater than 10 to the subscribed observer. The de-facto standard for Reactive Programming in .NET using `IObservable<T>` and `IObserver<T>` is [Rx.NET](https://github.com/Reactive-Extensions/Rx.NET).
3625db9391b4c35cf51c720e4568536583534db2
source/ref/stmts.rst
source/ref/stmts.rst
************** BQL Statements ************** .. include:: /ref/stmts/create_source.rst .. include:: /ref/stmts/resume_source.rst .. include:: /ref/stmts/select.rst
************** BQL Statements ************** .. include:: /ref/stmts/create_sink.rst .. include:: /ref/stmts/create_source.rst .. include:: /ref/stmts/resume_source.rst .. include:: /ref/stmts/select.rst
Add a missing link to CREATE SINK statement
Add a missing link to CREATE SINK statement
reStructuredText
mit
sensorbee/docs
restructuredtext
## Code Before: ************** BQL Statements ************** .. include:: /ref/stmts/create_source.rst .. include:: /ref/stmts/resume_source.rst .. include:: /ref/stmts/select.rst ## Instruction: Add a missing link to CREATE SINK statement ## Code After: ************** BQL Statements ************** .. include:: /ref/stmts/create_sink.rst .. include:: /ref/stmts/create_source.rst .. include:: /ref/stmts/resume_source.rst .. include:: /ref/stmts/select.rst
0381607c6e03bd43de4102d7f7b5ceb3766552bf
components/inquiry_questionnaire/views/specialist.coffee
components/inquiry_questionnaire/views/specialist.coffee
StepView = require './step.coffee' Form = require '../../form/index.coffee' Feedback = require '../../../models/feedback.coffee' Representatives = require '../../../collections/representatives.coffee' template = -> require('../templates/specialist.jade') arguments... module.exports = class Specialist extends StepView template: -> template arguments... __events__: 'click button': 'serialize' initialize: -> @feedback = new Feedback @representatives = new Representatives @representatives.fetch() .then => (@representative = @representatives.first()).fetch() .then => @render() super serialize: (e) -> form = new Form model: @feedback, $form: @$('form') form.submit e, success: => @next() render: -> @$el.html @template user: @user representative: @representative @autofocus() this
StepView = require './step.coffee' Form = require '../../form/index.coffee' Feedback = require '../../../models/feedback.coffee' Representatives = require '../../../collections/representatives.coffee' template = -> require('../templates/specialist.jade') arguments... module.exports = class Specialist extends StepView template: -> template arguments... __events__: 'click button': 'serialize' initialize: -> @feedback = new Feedback @representatives = new Representatives super setup: -> @representatives.fetch() .then => (@representative = @representatives.first()).fetch() .then => @render() serialize: (e) -> form = new Form model: @feedback, $form: @$('form') form.submit e, success: => @next() render: -> @$el.html @template user: @user representative: @representative @autofocus() this
Use the explicit setup step
Use the explicit setup step
CoffeeScript
mit
oxaudo/force,mzikherman/force,xtina-starr/force,eessex/force,erikdstock/force,kanaabe/force,joeyAghion/force,oxaudo/force,oxaudo/force,dblock/force,mzikherman/force,erikdstock/force,damassi/force,yuki24/force,artsy/force-public,anandaroop/force,erikdstock/force,anandaroop/force,damassi/force,eessex/force,artsy/force,dblock/force,TribeMedia/force-public,dblock/force,cavvia/force-1,artsy/force,artsy/force,joeyAghion/force,mzikherman/force,damassi/force,mzikherman/force,izakp/force,yuki24/force,kanaabe/force,joeyAghion/force,xtina-starr/force,artsy/force,erikdstock/force,cavvia/force-1,yuki24/force,anandaroop/force,eessex/force,kanaabe/force,TribeMedia/force-public,cavvia/force-1,joeyAghion/force,kanaabe/force,izakp/force,artsy/force-public,yuki24/force,izakp/force,oxaudo/force,xtina-starr/force,kanaabe/force,xtina-starr/force,damassi/force,izakp/force,anandaroop/force,cavvia/force-1,eessex/force
coffeescript
## Code Before: StepView = require './step.coffee' Form = require '../../form/index.coffee' Feedback = require '../../../models/feedback.coffee' Representatives = require '../../../collections/representatives.coffee' template = -> require('../templates/specialist.jade') arguments... module.exports = class Specialist extends StepView template: -> template arguments... __events__: 'click button': 'serialize' initialize: -> @feedback = new Feedback @representatives = new Representatives @representatives.fetch() .then => (@representative = @representatives.first()).fetch() .then => @render() super serialize: (e) -> form = new Form model: @feedback, $form: @$('form') form.submit e, success: => @next() render: -> @$el.html @template user: @user representative: @representative @autofocus() this ## Instruction: Use the explicit setup step ## Code After: StepView = require './step.coffee' Form = require '../../form/index.coffee' Feedback = require '../../../models/feedback.coffee' Representatives = require '../../../collections/representatives.coffee' template = -> require('../templates/specialist.jade') arguments... module.exports = class Specialist extends StepView template: -> template arguments... __events__: 'click button': 'serialize' initialize: -> @feedback = new Feedback @representatives = new Representatives super setup: -> @representatives.fetch() .then => (@representative = @representatives.first()).fetch() .then => @render() serialize: (e) -> form = new Form model: @feedback, $form: @$('form') form.submit e, success: => @next() render: -> @$el.html @template user: @user representative: @representative @autofocus() this
23f406ace16c7434f5536aba6e5b8b4ba1252212
app/controllers/jmd/appearances_controller.rb
app/controllers/jmd/appearances_controller.rb
class Jmd::AppearancesController < Jmd::BaseController load_and_authorize_resource :competition, only: :index # Set up filters has_scope :in_competition, only: :index has_scope :advanced_from_competition, only: :index has_scope :in_category, only: :index has_scope :in_age_group, only: :index def index authorize! :update, Performance # Users can see points only if authorized to change them @performances = apply_scopes(Performance).in_competition(@competition) .accessible_by(current_ability) .browsing_order .paginate(page: params[:page], per_page: 15) end def update @appearance = Appearance.find(params[:id]) authorize! :update, @appearance.performance # Authorize through associated performance @appearance.points = params[:appearance][:points] if @appearance.save flash[:success] = "Die Punktzahl für #{@appearance.participant.full_name} wurde gespeichert." else flash[:error] = "Die Punktzahl für #{@appearance.participant.full_name} konnte nicht gespeichert werden." end redirect_to :back end end
class Jmd::AppearancesController < Jmd::BaseController load_and_authorize_resource :competition, only: :index # Set up filters has_scope :in_competition, only: :index has_scope :advanced_from_competition, only: :index has_scope :in_category, only: :index has_scope :in_age_group, only: :index has_scope :on_date, only: :index has_scope :in_genre, only: :index def index authorize! :update, Performance # Users can see points only if authorized to change them @performances = apply_scopes(Performance).in_competition(@competition) .accessible_by(current_ability) .browsing_order .paginate(page: params[:page], per_page: 15) end def update @appearance = Appearance.find(params[:id]) authorize! :update, @appearance.performance # Authorize through associated performance @appearance.points = params[:appearance][:points] if @appearance.save flash[:success] = "Die Punktzahl für #{@appearance.participant.full_name} wurde gespeichert." else flash[:error] = "Die Punktzahl für #{@appearance.participant.full_name} konnte nicht gespeichert werden." end redirect_to :back end end
Enable day and genre filtering for result list
Enable day and genre filtering for result list
Ruby
mit
richeterre/jumubase-rails,richeterre/jumubase-rails,richeterre/jumubase-rails
ruby
## Code Before: class Jmd::AppearancesController < Jmd::BaseController load_and_authorize_resource :competition, only: :index # Set up filters has_scope :in_competition, only: :index has_scope :advanced_from_competition, only: :index has_scope :in_category, only: :index has_scope :in_age_group, only: :index def index authorize! :update, Performance # Users can see points only if authorized to change them @performances = apply_scopes(Performance).in_competition(@competition) .accessible_by(current_ability) .browsing_order .paginate(page: params[:page], per_page: 15) end def update @appearance = Appearance.find(params[:id]) authorize! :update, @appearance.performance # Authorize through associated performance @appearance.points = params[:appearance][:points] if @appearance.save flash[:success] = "Die Punktzahl für #{@appearance.participant.full_name} wurde gespeichert." else flash[:error] = "Die Punktzahl für #{@appearance.participant.full_name} konnte nicht gespeichert werden." end redirect_to :back end end ## Instruction: Enable day and genre filtering for result list ## Code After: class Jmd::AppearancesController < Jmd::BaseController load_and_authorize_resource :competition, only: :index # Set up filters has_scope :in_competition, only: :index has_scope :advanced_from_competition, only: :index has_scope :in_category, only: :index has_scope :in_age_group, only: :index has_scope :on_date, only: :index has_scope :in_genre, only: :index def index authorize! :update, Performance # Users can see points only if authorized to change them @performances = apply_scopes(Performance).in_competition(@competition) .accessible_by(current_ability) .browsing_order .paginate(page: params[:page], per_page: 15) end def update @appearance = Appearance.find(params[:id]) authorize! :update, @appearance.performance # Authorize through associated performance @appearance.points = params[:appearance][:points] if @appearance.save flash[:success] = "Die Punktzahl für #{@appearance.participant.full_name} wurde gespeichert." else flash[:error] = "Die Punktzahl für #{@appearance.participant.full_name} konnte nicht gespeichert werden." end redirect_to :back end end
a1044507a2f2db4141b2871222c105149d621316
fzf/export.sh
fzf/export.sh
export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS' --prompt "❯ " --pointer "❯" --marker "❯"'
export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS' --prompt "❯ " --pointer "❯" --marker "❯" --color "fg:7,bg:-1,hl:2" --color "fg+:7,bg+:-1,hl+:2" --color "info:3,prompt:6,pointer:1" --color "marker:1,spinner:2,header:4"'
Customize fzf colors to match terminal
Customize fzf colors to match terminal
Shell
mit
ahaasler/dotfiles,ahaasler/dotfiles,ahaasler/dotfiles
shell
## Code Before: export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS' --prompt "❯ " --pointer "❯" --marker "❯"' ## Instruction: Customize fzf colors to match terminal ## Code After: export FZF_DEFAULT_OPTS=$FZF_DEFAULT_OPTS' --prompt "❯ " --pointer "❯" --marker "❯" --color "fg:7,bg:-1,hl:2" --color "fg+:7,bg+:-1,hl+:2" --color "info:3,prompt:6,pointer:1" --color "marker:1,spinner:2,header:4"'
9b3d0d68a7bfd8c461a278e934e7162c40bfeb11
setup/docker/supplement/alt_rrsenv_init.sh
setup/docker/supplement/alt_rrsenv_init.sh
cd $(dirname ${0}) mkdir workspace AGENT MAP LOG git clone https://github.com/roborescue/rcrs-server.git roborescue sed --in-place 's/apache-ant-\*\/bin\/ant .*"/gradlew completeBuild"/' \ script/rrscluster
cd $(dirname ${0}) mkdir workspace AGENT MAP LOG git clone https://github.com/roborescue/rcrs-server.git roborescue sed --in-place 's/apache-ant-\*\/bin\/ant .*"/gradlew completeBuild"/' \ script/rrscluster sed --in-place '/connect-time/s/^/#/' script/rrscluster
FIX for the bug the server cannot shut down on a map image generation
FIX for the bug the server cannot shut down on a map image generation
Shell
bsd-3-clause
rrs-oacis/rrs-oacis,rrs-oacis/rrs-oacis,rrs-oacis/rrs-oacis,rrs-oacis/rrs-oacis,rrs-oacis/rrs-oacis,rrs-oacis/rrs-oacis,rrs-oacis/rrs-oacis
shell
## Code Before: cd $(dirname ${0}) mkdir workspace AGENT MAP LOG git clone https://github.com/roborescue/rcrs-server.git roborescue sed --in-place 's/apache-ant-\*\/bin\/ant .*"/gradlew completeBuild"/' \ script/rrscluster ## Instruction: FIX for the bug the server cannot shut down on a map image generation ## Code After: cd $(dirname ${0}) mkdir workspace AGENT MAP LOG git clone https://github.com/roborescue/rcrs-server.git roborescue sed --in-place 's/apache-ant-\*\/bin\/ant .*"/gradlew completeBuild"/' \ script/rrscluster sed --in-place '/connect-time/s/^/#/' script/rrscluster
c9ca274a1a5e9596de553d2ae16950a845359321
examples/plotting/file/geojson_points.py
examples/plotting/file/geojson_points.py
from bokeh.io import output_file, show from bokeh.models import GeoJSONDataSource from bokeh.plotting import figure from bokeh.sampledata.sample_geojson import geojson output_file("geojson_points.html", title="GeoJSON Points") p = figure() p.circle(line_color=None, fill_alpha=0.8, source=GeoJSONDataSource(geojson=geojson)) show(p)
from bokeh.io import output_file, show from bokeh.models import GeoJSONDataSource, HoverTool from bokeh.plotting import figure from bokeh.sampledata.sample_geojson import geojson output_file("geojson_points.html", title="GeoJSON Points") p = figure() p.circle(line_color=None, fill_alpha=0.8, size=20, source=GeoJSONDataSource(geojson=geojson)) p.add_tools(HoverTool(tooltips=[("Organisation Name", "@OrganisationName")])) show(p)
Add HoverTool to show off properties availability
Add HoverTool to show off properties availability
Python
bsd-3-clause
draperjames/bokeh,bokeh/bokeh,timsnyder/bokeh,dennisobrien/bokeh,maxalbert/bokeh,phobson/bokeh,jakirkham/bokeh,stonebig/bokeh,jakirkham/bokeh,bokeh/bokeh,DuCorey/bokeh,justacec/bokeh,dennisobrien/bokeh,clairetang6/bokeh,azjps/bokeh,timsnyder/bokeh,aiguofer/bokeh,timsnyder/bokeh,ericmjl/bokeh,DuCorey/bokeh,rs2/bokeh,bokeh/bokeh,jakirkham/bokeh,justacec/bokeh,Karel-van-de-Plassche/bokeh,azjps/bokeh,mindriot101/bokeh,philippjfr/bokeh,aiguofer/bokeh,timsnyder/bokeh,draperjames/bokeh,clairetang6/bokeh,percyfal/bokeh,stonebig/bokeh,philippjfr/bokeh,DuCorey/bokeh,schoolie/bokeh,ptitjano/bokeh,mindriot101/bokeh,schoolie/bokeh,jakirkham/bokeh,aiguofer/bokeh,stonebig/bokeh,percyfal/bokeh,phobson/bokeh,phobson/bokeh,dennisobrien/bokeh,azjps/bokeh,quasiben/bokeh,clairetang6/bokeh,draperjames/bokeh,ericmjl/bokeh,aavanian/bokeh,msarahan/bokeh,aiguofer/bokeh,ericmjl/bokeh,philippjfr/bokeh,htygithub/bokeh,dennisobrien/bokeh,ericmjl/bokeh,rs2/bokeh,percyfal/bokeh,quasiben/bokeh,ptitjano/bokeh,KasperPRasmussen/bokeh,timsnyder/bokeh,dennisobrien/bokeh,maxalbert/bokeh,aavanian/bokeh,msarahan/bokeh,percyfal/bokeh,htygithub/bokeh,rs2/bokeh,DuCorey/bokeh,msarahan/bokeh,ptitjano/bokeh,philippjfr/bokeh,clairetang6/bokeh,draperjames/bokeh,maxalbert/bokeh,azjps/bokeh,aiguofer/bokeh,Karel-van-de-Plassche/bokeh,ptitjano/bokeh,mindriot101/bokeh,KasperPRasmussen/bokeh,jakirkham/bokeh,rs2/bokeh,bokeh/bokeh,schoolie/bokeh,phobson/bokeh,KasperPRasmussen/bokeh,draperjames/bokeh,aavanian/bokeh,phobson/bokeh,Karel-van-de-Plassche/bokeh,htygithub/bokeh,philippjfr/bokeh,justacec/bokeh,rs2/bokeh,Karel-van-de-Plassche/bokeh,quasiben/bokeh,aavanian/bokeh,DuCorey/bokeh,stonebig/bokeh,ericmjl/bokeh,schoolie/bokeh,msarahan/bokeh,justacec/bokeh,Karel-van-de-Plassche/bokeh,KasperPRasmussen/bokeh,KasperPRasmussen/bokeh,htygithub/bokeh,mindriot101/bokeh,azjps/bokeh,bokeh/bokeh,maxalbert/bokeh,percyfal/bokeh,schoolie/bokeh,aavanian/bokeh,ptitjano/bokeh
python
## Code Before: from bokeh.io import output_file, show from bokeh.models import GeoJSONDataSource from bokeh.plotting import figure from bokeh.sampledata.sample_geojson import geojson output_file("geojson_points.html", title="GeoJSON Points") p = figure() p.circle(line_color=None, fill_alpha=0.8, source=GeoJSONDataSource(geojson=geojson)) show(p) ## Instruction: Add HoverTool to show off properties availability ## Code After: from bokeh.io import output_file, show from bokeh.models import GeoJSONDataSource, HoverTool from bokeh.plotting import figure from bokeh.sampledata.sample_geojson import geojson output_file("geojson_points.html", title="GeoJSON Points") p = figure() p.circle(line_color=None, fill_alpha=0.8, size=20, source=GeoJSONDataSource(geojson=geojson)) p.add_tools(HoverTool(tooltips=[("Organisation Name", "@OrganisationName")])) show(p)
22206f89db4febcd2a91db473969961df0e71ba8
data/common.yaml
data/common.yaml
--- lookup_options: profiles::bootstrap::accounts::accounts: merge: strategy: deep merge_hash_arrays: true profiles::bootstrap::accounts::groups: merge: strategy: deep merge_hash_arrays: true profiles::bootstrap::accounts::sudo_confs: merge: strategy: deep merge_hash_arrays: true profiles::bootstrap::repositories::repositories: merge: strategy: deep merge_hash_arrays: true profiles::monitoring::logstash::config_files: merge: strategy: deep merge_hash_arrays: true profiles::orchestration::consul::services: merge: strategy: deep merge_hash_arrays: true
--- lookup_options: profiles::bootstrap::accounts::accounts: merge: strategy: deep merge_hash_arrays: true profiles::bootstrap::accounts::groups: merge: strategy: deep merge_hash_arrays: true profiles::bootstrap::accounts::sudo_confs: merge: strategy: deep merge_hash_arrays: true profiles::bootstrap::repositories::repositories: merge: strategy: deep merge_hash_arrays: true profiles::monitoring::logstash::config_files: merge: strategy: deep merge_hash_arrays: true profiles::orchestration::consul::services: merge: strategy: deep merge_hash_arrays: true profiles::monitoring::icinga2::vars: merge: strategy: deep merge_hash_arrays: true
Move the merge strategy to hiera
Move the merge strategy to hiera Signed-off-by: bjanssens <1de01ef34db889bba7c0d96b507b3f1cf757d74d@inuits.eu>
YAML
mit
attachmentgenie/attachmentgenie-profiles,attachmentgenie/attachmentgenie-profiles
yaml
## Code Before: --- lookup_options: profiles::bootstrap::accounts::accounts: merge: strategy: deep merge_hash_arrays: true profiles::bootstrap::accounts::groups: merge: strategy: deep merge_hash_arrays: true profiles::bootstrap::accounts::sudo_confs: merge: strategy: deep merge_hash_arrays: true profiles::bootstrap::repositories::repositories: merge: strategy: deep merge_hash_arrays: true profiles::monitoring::logstash::config_files: merge: strategy: deep merge_hash_arrays: true profiles::orchestration::consul::services: merge: strategy: deep merge_hash_arrays: true ## Instruction: Move the merge strategy to hiera Signed-off-by: bjanssens <1de01ef34db889bba7c0d96b507b3f1cf757d74d@inuits.eu> ## Code After: --- lookup_options: profiles::bootstrap::accounts::accounts: merge: strategy: deep merge_hash_arrays: true profiles::bootstrap::accounts::groups: merge: strategy: deep merge_hash_arrays: true profiles::bootstrap::accounts::sudo_confs: merge: strategy: deep merge_hash_arrays: true profiles::bootstrap::repositories::repositories: merge: strategy: deep merge_hash_arrays: true profiles::monitoring::logstash::config_files: merge: strategy: deep merge_hash_arrays: true profiles::orchestration::consul::services: merge: strategy: deep merge_hash_arrays: true profiles::monitoring::icinga2::vars: merge: strategy: deep merge_hash_arrays: true
b5596817c757062ab1e6531080d249fee68071f7
object_permissions/templates/object_permissions/group/detail.html
object_permissions/templates/object_permissions/group/detail.html
{% extends "menu_base.html" %} {% load i18n %} {% block title %} User Group: {{ object.name }}{% endblock %} {% block head %} <link href="{{MEDIA_URL}}/css/jquery-ui.css" rel="stylesheet" type="text/css"/> <style> #users {width:100%;} </style> <script src="{{MEDIA_URL}}/js/jquery-ui.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#tabs').tabs({ spinner: false, cache: true, select: function(event, ui) { window.location.hash = ui.tab.hash; }, ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible."); } } }); }); </script> {% endblock %} {% block content %} <h1><a class="breadcrumb" href="{%url group-list %}">{% trans "Groups" %}</a> : {{ group.name }}</h1> <div id="tabs"> <ul> <li><a href="#users"><span>Users</span></a></li> <li><a title="permissions" href="{% url group-all-permissions group.pk %}"><span>Permissions</span></a></li> {% block tabs %}{% endblock %} </ul> <div id="users"> {% include "object_permissions/group/users.html" %} </div> </div> {% endblock %}
{% extends "menu_base.html" %} {% load i18n %} {% block title %}{% trans "Group: " %}{{ object.name }}{% endblock %} {% block head %} <link href="{{MEDIA_URL}}/css/jquery-ui.css" rel="stylesheet" type="text/css"/> <style> #users {width:100%;} </style> <script src="{{MEDIA_URL}}/js/jquery-ui.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#tabs').tabs({ spinner: false, cache: true, select: function(event, ui) { window.location.hash = ui.tab.hash; }, ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible."); } } }); }); </script> {% endblock %} {% block content %} <h1><a class="breadcrumb" href="{%url group-list %}">{% trans "Groups" %}</a> : {{ group.name }}</h1> <div id="tabs"> <ul> <li><a href="#users"><span>Users</span></a></li> <li><a title="permissions" href="{% url group-all-permissions group.pk %}"><span>Permissions</span></a></li> {% block tabs %}{% endblock %} </ul> <div id="users"> {% include "object_permissions/group/users.html" %} </div> </div> {% endblock %}
Change title User Group to Group
Change title User Group to Group Also adding title translation, to standardize with other pages
HTML
mit
osuosl/django_object_permissions,osuosl/django_object_permissions
html
## Code Before: {% extends "menu_base.html" %} {% load i18n %} {% block title %} User Group: {{ object.name }}{% endblock %} {% block head %} <link href="{{MEDIA_URL}}/css/jquery-ui.css" rel="stylesheet" type="text/css"/> <style> #users {width:100%;} </style> <script src="{{MEDIA_URL}}/js/jquery-ui.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#tabs').tabs({ spinner: false, cache: true, select: function(event, ui) { window.location.hash = ui.tab.hash; }, ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible."); } } }); }); </script> {% endblock %} {% block content %} <h1><a class="breadcrumb" href="{%url group-list %}">{% trans "Groups" %}</a> : {{ group.name }}</h1> <div id="tabs"> <ul> <li><a href="#users"><span>Users</span></a></li> <li><a title="permissions" href="{% url group-all-permissions group.pk %}"><span>Permissions</span></a></li> {% block tabs %}{% endblock %} </ul> <div id="users"> {% include "object_permissions/group/users.html" %} </div> </div> {% endblock %} ## Instruction: Change title User Group to Group Also adding title translation, to standardize with other pages ## Code After: {% extends "menu_base.html" %} {% load i18n %} {% block title %}{% trans "Group: " %}{{ object.name }}{% endblock %} {% block head %} <link href="{{MEDIA_URL}}/css/jquery-ui.css" rel="stylesheet" type="text/css"/> <style> #users {width:100%;} </style> <script src="{{MEDIA_URL}}/js/jquery-ui.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#tabs').tabs({ spinner: false, cache: true, select: function(event, ui) { window.location.hash = ui.tab.hash; }, ajaxOptions: { error: function(xhr, status, index, anchor) { $(anchor.hash).html("Couldn't load this tab. We'll try to fix this as soon as possible."); } } }); }); </script> {% endblock %} {% block content %} <h1><a class="breadcrumb" href="{%url group-list %}">{% trans "Groups" %}</a> : {{ group.name }}</h1> <div id="tabs"> <ul> <li><a href="#users"><span>Users</span></a></li> <li><a title="permissions" href="{% url group-all-permissions group.pk %}"><span>Permissions</span></a></li> {% block tabs %}{% endblock %} </ul> <div id="users"> {% include "object_permissions/group/users.html" %} </div> </div> {% endblock %}
fd734eed0df967aff5c2e2ac57bce7be1373da0c
Cargo.toml
Cargo.toml
[workspace] members = ["mockall", "mockall_derive"] [patch.crates-io] predicates = { git = "https://github.com/assert-rs/predicates-rs/", rev = "0efce97" } predicates-tree = { git = "https://github.com/assert-rs/predicates-rs/", rev = "0efce97" }
[workspace] members = ["mockall", "mockall_derive"] [patch.crates-io] predicates = { git = "https://github.com/assert-rs/predicates-rs/", rev = "0efce97" } predicates-tree = { git = "https://github.com/assert-rs/predicates-rs/", rev = "0efce97" } downcast = { git = "https://github.com/asomers/downcast-rs/", rev = "c65a1aa"}
Fix the build on the latest Rust nightly
Fix the build on the latest Rust nightly Had to patch the downcast crate.
TOML
apache-2.0
asomers/mockall,asomers/mockall
toml
## Code Before: [workspace] members = ["mockall", "mockall_derive"] [patch.crates-io] predicates = { git = "https://github.com/assert-rs/predicates-rs/", rev = "0efce97" } predicates-tree = { git = "https://github.com/assert-rs/predicates-rs/", rev = "0efce97" } ## Instruction: Fix the build on the latest Rust nightly Had to patch the downcast crate. ## Code After: [workspace] members = ["mockall", "mockall_derive"] [patch.crates-io] predicates = { git = "https://github.com/assert-rs/predicates-rs/", rev = "0efce97" } predicates-tree = { git = "https://github.com/assert-rs/predicates-rs/", rev = "0efce97" } downcast = { git = "https://github.com/asomers/downcast-rs/", rev = "c65a1aa"}
54d5389e5a2ac79212a54e479d01323e53265237
docs/_includes/header.html
docs/_includes/header.html
<meta charset="utf-8"> <!-- Fonts --> <link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400italic,700italic,400,700" rel="stylesheet" type="text/css"> <link href="{{ site.cdn.font_awesome }}" rel="stylesheet" type="text/css"> <link href="{{ site.cdn.bootstrap_css }}" rel="stylesheet" type="text/css"> <!-- docs --> <link href="/assets/css/docs.min.css" rel="stylesheet">
<meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="2015 perl-kr advent calendar"> <meta name="keywords" content="perl, perl-kr, advent calendar, 2015"> <meta name="author" content="perl-kr mongers"> <!-- Fonts --> <link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400italic,700italic,400,700" rel="stylesheet" type="text/css"> <link href="{{ site.cdn.font_awesome }}" rel="stylesheet" type="text/css"> <link href="{{ site.cdn.bootstrap_css }}" rel="stylesheet" type="text/css"> <!-- docs --> <link href="/assets/css/docs.min.css" rel="stylesheet">
Add meta tags for seach engine
Add meta tags for seach engine
HTML
mit
aanoaa/advcal,aanoaa/advcal
html
## Code Before: <meta charset="utf-8"> <!-- Fonts --> <link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400italic,700italic,400,700" rel="stylesheet" type="text/css"> <link href="{{ site.cdn.font_awesome }}" rel="stylesheet" type="text/css"> <link href="{{ site.cdn.bootstrap_css }}" rel="stylesheet" type="text/css"> <!-- docs --> <link href="/assets/css/docs.min.css" rel="stylesheet"> ## Instruction: Add meta tags for seach engine ## Code After: <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="2015 perl-kr advent calendar"> <meta name="keywords" content="perl, perl-kr, advent calendar, 2015"> <meta name="author" content="perl-kr mongers"> <!-- Fonts --> <link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400italic,700italic,400,700" rel="stylesheet" type="text/css"> <link href="{{ site.cdn.font_awesome }}" rel="stylesheet" type="text/css"> <link href="{{ site.cdn.bootstrap_css }}" rel="stylesheet" type="text/css"> <!-- docs --> <link href="/assets/css/docs.min.css" rel="stylesheet">
3d62e6c641632427713a6ea6fe1192c01f8948e0
app/jobs/list_cleanup_job.rb
app/jobs/list_cleanup_job.rb
class ListCleanupJob < ActiveJob::Base queue_as :default # rescue_from(Gibbon::MailChimpError) do |exception| # end def perform(lists) gibbon_service = GibbonService.new contacts_data = gibbon_service.delete_lists(lists.pluck(:uid)) lists.destroy_all end end
class ListCleanupJob < ActiveJob::Base queue_as :default # rescue_from(Gibbon::MailChimpError) do |exception| # end def perform(list_uids = []) gibbon_service = GibbonService.new contacts_data = gibbon_service.delete_lists(list_uids) Spree::Marketing::List.where(uid: list_uids).destroy_all end end
Modify list clean up job
Modify list clean up job
Ruby
bsd-3-clause
vinsol-spree-contrib/spree_marketing,vinsol-spree-contrib/spree_marketing,vinsol-spree-contrib/spree_marketing
ruby
## Code Before: class ListCleanupJob < ActiveJob::Base queue_as :default # rescue_from(Gibbon::MailChimpError) do |exception| # end def perform(lists) gibbon_service = GibbonService.new contacts_data = gibbon_service.delete_lists(lists.pluck(:uid)) lists.destroy_all end end ## Instruction: Modify list clean up job ## Code After: class ListCleanupJob < ActiveJob::Base queue_as :default # rescue_from(Gibbon::MailChimpError) do |exception| # end def perform(list_uids = []) gibbon_service = GibbonService.new contacts_data = gibbon_service.delete_lists(list_uids) Spree::Marketing::List.where(uid: list_uids).destroy_all end end
42c9b6b124955a68f37517f72a20203eaaa3eb6c
src/store.js
src/store.js
import { compose, createStore } from 'redux'; import middleware from './middleware'; import reducers from './reducers'; function configureStore() { return compose(middleware)(createStore)(reducers); } export var store = configureStore();
import { compose, createStore } from 'redux'; import middleware from './middleware'; import reducers from './reducers'; // Poor man's hot reloader. var lastState = JSON.parse(localStorage["farmbot"] || "{auth: {}}"); export var store = compose(middleware)(createStore)(reducers, lastState); if (lastState.auth.authenticated) { store.dispatch({ type: "LOGIN_OK", payload: lastState.auth }); }; function saveState(){ localStorage["farmbot"] = JSON.stringify(store.getState()); } store.subscribe(saveState);
Add improvised localstorage saving mechanism
[STABLE] Add improvised localstorage saving mechanism
JavaScript
mit
roryaronson/farmbot-web-frontend,FarmBot/farmbot-web-frontend,RickCarlino/farmbot-web-frontend,MrChristofferson/farmbot-web-frontend,RickCarlino/farmbot-web-frontend,roryaronson/farmbot-web-frontend,roryaronson/farmbot-web-frontend,MrChristofferson/farmbot-web-frontend,FarmBot/farmbot-web-frontend
javascript
## Code Before: import { compose, createStore } from 'redux'; import middleware from './middleware'; import reducers from './reducers'; function configureStore() { return compose(middleware)(createStore)(reducers); } export var store = configureStore(); ## Instruction: [STABLE] Add improvised localstorage saving mechanism ## Code After: import { compose, createStore } from 'redux'; import middleware from './middleware'; import reducers from './reducers'; // Poor man's hot reloader. var lastState = JSON.parse(localStorage["farmbot"] || "{auth: {}}"); export var store = compose(middleware)(createStore)(reducers, lastState); if (lastState.auth.authenticated) { store.dispatch({ type: "LOGIN_OK", payload: lastState.auth }); }; function saveState(){ localStorage["farmbot"] = JSON.stringify(store.getState()); } store.subscribe(saveState);
a62f65880841099130543f48407c3008a097539c
.travis.yml
.travis.yml
language: php cache: directories: - $HOME/.composer/cache/files php: - 5.4 - 5.5 - 5.6 - 7.0 - 7.1 - 7.2 - nightly install: - ./travis-init.sh - composer install -n script: - ./vendor/bin/phpunit --exclude-group permissions - export phploc=~/.phpenv/versions/$(phpenv version-name)/bin/php - sudo $phploc ./vendor/bin/phpunit --group permissions
language: php cache: directories: - $HOME/.composer/cache/files php: - 5.4 - 5.5 - 5.6 - 7.0 - 7.1 - 7.2 - nightly matrix: allow_failures: - php: 5.4 install: - ./travis-init.sh - composer install -n script: - ./vendor/bin/phpunit --exclude-group permissions - export phploc=~/.phpenv/versions/$(phpenv version-name)/bin/php - sudo $phploc ./vendor/bin/phpunit --group permissions
Allow PHP 5.4 to fail
Allow PHP 5.4 to fail PHPUnit on PHP 5.4 seems to hang at the end of it's execution for no apparent reason. (Even when successful.)
YAML
mit
reactphp/filesystem,reactphp/filesystem
yaml
## Code Before: language: php cache: directories: - $HOME/.composer/cache/files php: - 5.4 - 5.5 - 5.6 - 7.0 - 7.1 - 7.2 - nightly install: - ./travis-init.sh - composer install -n script: - ./vendor/bin/phpunit --exclude-group permissions - export phploc=~/.phpenv/versions/$(phpenv version-name)/bin/php - sudo $phploc ./vendor/bin/phpunit --group permissions ## Instruction: Allow PHP 5.4 to fail PHPUnit on PHP 5.4 seems to hang at the end of it's execution for no apparent reason. (Even when successful.) ## Code After: language: php cache: directories: - $HOME/.composer/cache/files php: - 5.4 - 5.5 - 5.6 - 7.0 - 7.1 - 7.2 - nightly matrix: allow_failures: - php: 5.4 install: - ./travis-init.sh - composer install -n script: - ./vendor/bin/phpunit --exclude-group permissions - export phploc=~/.phpenv/versions/$(phpenv version-name)/bin/php - sudo $phploc ./vendor/bin/phpunit --group permissions
1a35da1096567cb9daaa7b2343b77fc12536d78f
README.md
README.md
A Flash audio recorder with javascript hooks ... because apparently it's still 2008.
A Flash audio recorder with javascript hooks ... because apparently it's still 2008. ## Quickstart ### Get Volume Level [Get Volume](https://mhotwagner.github.io/anachrony/examples/get-volume.html) ```html <html> <body> <center> <div id="flashContainer"></div> <h1>ACTIVITY LEVEL: <span id="volume">NO MICROPHONE AVAILABLE</span></h1> </center> </body> <script src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> <script> flashVars = {}; params = {allowScriptAccess: true}; attrs = {id: 'flashRecorder'}; swfobject.embedSWF( "assets/anachrony.swf", "flashContainer", "300", "300", "10.0.0", false, flashVars, params, attrs ); function flashRecorderGetVolume(volume) { document.getElementById('volume').innerHTML = volume.toString() + '%'; } </script> </html> ```
Update readme to include getVolume quickstart
Update readme to include getVolume quickstart
Markdown
mit
mhotwagner/anachrony
markdown
## Code Before: A Flash audio recorder with javascript hooks ... because apparently it's still 2008. ## Instruction: Update readme to include getVolume quickstart ## Code After: A Flash audio recorder with javascript hooks ... because apparently it's still 2008. ## Quickstart ### Get Volume Level [Get Volume](https://mhotwagner.github.io/anachrony/examples/get-volume.html) ```html <html> <body> <center> <div id="flashContainer"></div> <h1>ACTIVITY LEVEL: <span id="volume">NO MICROPHONE AVAILABLE</span></h1> </center> </body> <script src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> <script> flashVars = {}; params = {allowScriptAccess: true}; attrs = {id: 'flashRecorder'}; swfobject.embedSWF( "assets/anachrony.swf", "flashContainer", "300", "300", "10.0.0", false, flashVars, params, attrs ); function flashRecorderGetVolume(volume) { document.getElementById('volume').innerHTML = volume.toString() + '%'; } </script> </html> ```
965a70bc4e8732fe02e83b9074698732253d5289
environ.py
environ.py
import os.path EXTRA_SCRIPTS_DIR = '/tmp/extra-scripts' def installerRunning(): return os.path.isdir(EXTRA_SCRIPTS_DIR)
import os EXTRA_SCRIPTS_DIR = '/mnt' def installerRunning(): return os.environ.get('XS_INSTALLATION', '0') != '0'
Use env variable to indicate installer
Use env variable to indicate installer
Python
bsd-2-clause
xenserver/python-libs,xenserver/python-libs
python
## Code Before: import os.path EXTRA_SCRIPTS_DIR = '/tmp/extra-scripts' def installerRunning(): return os.path.isdir(EXTRA_SCRIPTS_DIR) ## Instruction: Use env variable to indicate installer ## Code After: import os EXTRA_SCRIPTS_DIR = '/mnt' def installerRunning(): return os.environ.get('XS_INSTALLATION', '0') != '0'
36c13bf7b7320205f610b077a41f0c9ba41979cf
README.md
README.md
Create `terraform.tfvars` in project root. ``` aws_access_key="<your_aws_access_key>" aws_secret_key="<your_aws_secret_key>" aws_account_id="<your_aws_account_id>" aws_region="<aws_region>" s3_bucket="<aws_s3_bucket>" ``` ``` $ ./shmenkins build ``` Will build lambda. ## How To Deploy ``` $ ./shmenkins upload $ ./shmenkins plan-deploy $ ./shmenkins do-deploy ``` ## Directory Layout Directory | Description ----------|---------------- src/lambda | Lambda source code (python) src/infra | Infrastructure source code (terraform) src/util | Various utilities (bash, python) cfg | Configuration files
``` cd util sudo ./install ``` ## How to build individual service ``` cd service/<service_name> metaconfig terraform.tfvars ``` This will generate `terraform.tfvars` in the current directory. Deploy to AWS ``` terraform get terraform plan terraform apply ``` ## How To Build ### Prerequisites Create `terraform.tfvars` in project root. ``` aws_access_key="<your_aws_access_key>" aws_secret_key="<your_aws_secret_key>" aws_account_id="<your_aws_account_id>" aws_region="<aws_region>" s3_bucket="<aws_s3_bucket>" ``` ``` $ ./shmenkins build ``` Will build lambda. ## How To Deploy ``` $ ./shmenkins upload $ ./shmenkins plan-deploy $ ./shmenkins do-deploy ``` ## Directory Layout Directory | Description ----------|---------------- src/lambda | Lambda source code (python) src/infra | Infrastructure source code (terraform) src/util | Various utilities (bash, python) cfg | Configuration files
Update how to build info
Update how to build info
Markdown
mit
shmenkins/build-requester-vcs,rzhilkibaev/shmenkins,rzhilkibaev/shmenkins
markdown
## Code Before: Create `terraform.tfvars` in project root. ``` aws_access_key="<your_aws_access_key>" aws_secret_key="<your_aws_secret_key>" aws_account_id="<your_aws_account_id>" aws_region="<aws_region>" s3_bucket="<aws_s3_bucket>" ``` ``` $ ./shmenkins build ``` Will build lambda. ## How To Deploy ``` $ ./shmenkins upload $ ./shmenkins plan-deploy $ ./shmenkins do-deploy ``` ## Directory Layout Directory | Description ----------|---------------- src/lambda | Lambda source code (python) src/infra | Infrastructure source code (terraform) src/util | Various utilities (bash, python) cfg | Configuration files ## Instruction: Update how to build info ## Code After: ``` cd util sudo ./install ``` ## How to build individual service ``` cd service/<service_name> metaconfig terraform.tfvars ``` This will generate `terraform.tfvars` in the current directory. Deploy to AWS ``` terraform get terraform plan terraform apply ``` ## How To Build ### Prerequisites Create `terraform.tfvars` in project root. ``` aws_access_key="<your_aws_access_key>" aws_secret_key="<your_aws_secret_key>" aws_account_id="<your_aws_account_id>" aws_region="<aws_region>" s3_bucket="<aws_s3_bucket>" ``` ``` $ ./shmenkins build ``` Will build lambda. ## How To Deploy ``` $ ./shmenkins upload $ ./shmenkins plan-deploy $ ./shmenkins do-deploy ``` ## Directory Layout Directory | Description ----------|---------------- src/lambda | Lambda source code (python) src/infra | Infrastructure source code (terraform) src/util | Various utilities (bash, python) cfg | Configuration files
25b84238204d3970c72d0ac133b0ff59ae4696bd
social/models.py
social/models.py
from django.db import models # Create your models here. class User(models.Model): username = models.CharField(max_length=20) display_name = models.CharField(max_length=30) password = models.TextField() join_date = models.DateField('date joined') def __str__(self): return self.display_name def set_password(self, new_password): self.password = new_password class Post(models.Model): author = models.ForeignKey(User) post_text = models.CharField(max_length=500) post_time = models.DateTimeField('time posted') def __str__(self): return self.post_text
from django.contrib.auth.models import AbstractBaseUser from django.db import models # Create your models here. class User(AbstractBaseUser): username = models.CharField(max_length=20) display_name = models.CharField(max_length=30) join_date = models.DateField('date joined') USERNAME_FIELD = 'username' REQUIRED_FIELDS = [] def get_full_name(self): return self.display_name def get_short_name(self): return self.display_name def __str__(self): return self.display_name class Post(models.Model): author = models.ForeignKey(User) post_text = models.CharField(max_length=500) post_time = models.DateTimeField('time posted') def __str__(self): return self.post_text
Implement User that extends Django's AbstractBaseUser.
Implement User that extends Django's AbstractBaseUser.
Python
mit
eyohansa/temu,eyohansa/temu,eyohansa/temu
python
## Code Before: from django.db import models # Create your models here. class User(models.Model): username = models.CharField(max_length=20) display_name = models.CharField(max_length=30) password = models.TextField() join_date = models.DateField('date joined') def __str__(self): return self.display_name def set_password(self, new_password): self.password = new_password class Post(models.Model): author = models.ForeignKey(User) post_text = models.CharField(max_length=500) post_time = models.DateTimeField('time posted') def __str__(self): return self.post_text ## Instruction: Implement User that extends Django's AbstractBaseUser. ## Code After: from django.contrib.auth.models import AbstractBaseUser from django.db import models # Create your models here. class User(AbstractBaseUser): username = models.CharField(max_length=20) display_name = models.CharField(max_length=30) join_date = models.DateField('date joined') USERNAME_FIELD = 'username' REQUIRED_FIELDS = [] def get_full_name(self): return self.display_name def get_short_name(self): return self.display_name def __str__(self): return self.display_name class Post(models.Model): author = models.ForeignKey(User) post_text = models.CharField(max_length=500) post_time = models.DateTimeField('time posted') def __str__(self): return self.post_text
72b9ff43daaf88f43ec4397cfed8fb860d4ad850
rest-api/test/client_test/base.py
rest-api/test/client_test/base.py
import copy import json import os import unittest from client.client import Client # To run the tests against the test instance instead, # set environment variable PMI_DRC_RDR_INSTANCE. _DEFAULT_INSTANCE = 'http://localhost:8080' _OFFLINE_BASE_PATH = 'offline' class BaseClientTest(unittest.TestCase): def setUp(self): super(BaseClientTest, self).setUp() self.maxDiff = None instance = os.environ.get('PMI_DRC_RDR_INSTANCE') or _DEFAULT_INSTANCE creds_file = os.environ.get('TESTING_CREDS_FILE') self.client = Client(parse_cli=False, default_instance=instance, creds_file=creds_file) self.offline_client = Client( base_path=_OFFLINE_BASE_PATH, parse_cli=False, default_instance=instance, creds_file=creds_file) def assertJsonEquals(self, obj_a, obj_b): obj_b = copy.deepcopy(obj_b) for transient_key in ('etag', 'kind', 'meta'): if transient_key in obj_b: del obj_b[transient_key] self.assertMultiLineEqual(_pretty(obj_a), _pretty(obj_b)) def _pretty(obj): return json.dumps(obj, sort_keys=True, indent=4, separators=(',', ': '))
import copy import json import os import unittest from client.client import Client from tools.main_util import configure_logging # To run the tests against the test instance instead, # set environment variable PMI_DRC_RDR_INSTANCE. _DEFAULT_INSTANCE = 'http://localhost:8080' _OFFLINE_BASE_PATH = 'offline' class BaseClientTest(unittest.TestCase): def setUp(self): super(BaseClientTest, self).setUp() configure_logging() self.maxDiff = None instance = os.environ.get('PMI_DRC_RDR_INSTANCE') or _DEFAULT_INSTANCE creds_file = os.environ.get('TESTING_CREDS_FILE') self.client = Client(parse_cli=False, default_instance=instance, creds_file=creds_file) self.offline_client = Client( base_path=_OFFLINE_BASE_PATH, parse_cli=False, default_instance=instance, creds_file=creds_file) def assertJsonEquals(self, obj_a, obj_b): obj_b = copy.deepcopy(obj_b) for transient_key in ('etag', 'kind', 'meta'): if transient_key in obj_b: del obj_b[transient_key] self.assertMultiLineEqual(_pretty(obj_a), _pretty(obj_b)) def _pretty(obj): return json.dumps(obj, sort_keys=True, indent=4, separators=(',', ': '))
Configure logging in client tests, so client logs show up.
Configure logging in client tests, so client logs show up.
Python
bsd-3-clause
all-of-us/raw-data-repository,all-of-us/raw-data-repository,all-of-us/raw-data-repository
python
## Code Before: import copy import json import os import unittest from client.client import Client # To run the tests against the test instance instead, # set environment variable PMI_DRC_RDR_INSTANCE. _DEFAULT_INSTANCE = 'http://localhost:8080' _OFFLINE_BASE_PATH = 'offline' class BaseClientTest(unittest.TestCase): def setUp(self): super(BaseClientTest, self).setUp() self.maxDiff = None instance = os.environ.get('PMI_DRC_RDR_INSTANCE') or _DEFAULT_INSTANCE creds_file = os.environ.get('TESTING_CREDS_FILE') self.client = Client(parse_cli=False, default_instance=instance, creds_file=creds_file) self.offline_client = Client( base_path=_OFFLINE_BASE_PATH, parse_cli=False, default_instance=instance, creds_file=creds_file) def assertJsonEquals(self, obj_a, obj_b): obj_b = copy.deepcopy(obj_b) for transient_key in ('etag', 'kind', 'meta'): if transient_key in obj_b: del obj_b[transient_key] self.assertMultiLineEqual(_pretty(obj_a), _pretty(obj_b)) def _pretty(obj): return json.dumps(obj, sort_keys=True, indent=4, separators=(',', ': ')) ## Instruction: Configure logging in client tests, so client logs show up. ## Code After: import copy import json import os import unittest from client.client import Client from tools.main_util import configure_logging # To run the tests against the test instance instead, # set environment variable PMI_DRC_RDR_INSTANCE. _DEFAULT_INSTANCE = 'http://localhost:8080' _OFFLINE_BASE_PATH = 'offline' class BaseClientTest(unittest.TestCase): def setUp(self): super(BaseClientTest, self).setUp() configure_logging() self.maxDiff = None instance = os.environ.get('PMI_DRC_RDR_INSTANCE') or _DEFAULT_INSTANCE creds_file = os.environ.get('TESTING_CREDS_FILE') self.client = Client(parse_cli=False, default_instance=instance, creds_file=creds_file) self.offline_client = Client( base_path=_OFFLINE_BASE_PATH, parse_cli=False, default_instance=instance, creds_file=creds_file) def assertJsonEquals(self, obj_a, obj_b): obj_b = copy.deepcopy(obj_b) for transient_key in ('etag', 'kind', 'meta'): if transient_key in obj_b: del obj_b[transient_key] self.assertMultiLineEqual(_pretty(obj_a), _pretty(obj_b)) def _pretty(obj): return json.dumps(obj, sort_keys=True, indent=4, separators=(',', ': '))
71cb83dcded9bd1d52a10fa1814b3a7e4db80700
README.md
README.md
[![Build Status](https://travis-ci.org/jaubourg/wires.svg?branch=master)](https://travis-ci.org/jaubourg/wires) [![Coverage Status](https://img.shields.io/coveralls/jaubourg/wires.svg)](https://coveralls.io/r/jaubourg/wires) [![Dependency Status](https://david-dm.org/jaubourg/wires.svg)](https://david-dm.org/jaubourg/wires) [![devDependency Status](https://david-dm.org/jaubourg/wires/dev-status.svg)](https://david-dm.org/jaubourg/wires#info=devDependencies) [![Gittip](https://img.shields.io/gittip/jaubourg.svg)](https://www.gittip.com/jaubourg/) [![NPM](https://nodei.co/npm/wires.png?downloads=true&stars=true)](https://www.npmjs.org/package/wires) # wires A simple configuration utility with smart module wiring for unobtrusive dependency injection. ## License Copyright (c) 2012 - 2015 [Julian Aubourg](mailto:j@ubourg.net) Licensed under the [MIT license](https://raw.githubusercontent.com/jaubourg/wires/master/LICENSE-MIT).
[![NPM](https://img.shields.io/npm/v/wires.svg)](https://img.shields.io/npm/v/wires.svg) [![Build Status](https://travis-ci.org/jaubourg/wires.svg?branch=master)](https://travis-ci.org/jaubourg/wires) [![Coverage Status](https://img.shields.io/coveralls/jaubourg/wires.svg)](https://coveralls.io/r/jaubourg/wires) [![Dependency Status](https://david-dm.org/jaubourg/wires.svg)](https://david-dm.org/jaubourg/wires) [![devDependency Status](https://david-dm.org/jaubourg/wires/dev-status.svg)](https://david-dm.org/jaubourg/wires#info=devDependencies) [![Gittip](https://img.shields.io/gittip/jaubourg.svg)](https://www.gittip.com/jaubourg/) # wires A simple configuration utility with smart module wiring for unobtrusive dependency injection. ## License Copyright (c) 2012 - 2015 [Julian Aubourg](mailto:j@ubourg.net) Licensed under the [MIT license](https://raw.githubusercontent.com/jaubourg/wires/master/LICENSE-MIT).
Use small button for NPM
Use small button for NPM
Markdown
mit
jaubourg/wires
markdown
## Code Before: [![Build Status](https://travis-ci.org/jaubourg/wires.svg?branch=master)](https://travis-ci.org/jaubourg/wires) [![Coverage Status](https://img.shields.io/coveralls/jaubourg/wires.svg)](https://coveralls.io/r/jaubourg/wires) [![Dependency Status](https://david-dm.org/jaubourg/wires.svg)](https://david-dm.org/jaubourg/wires) [![devDependency Status](https://david-dm.org/jaubourg/wires/dev-status.svg)](https://david-dm.org/jaubourg/wires#info=devDependencies) [![Gittip](https://img.shields.io/gittip/jaubourg.svg)](https://www.gittip.com/jaubourg/) [![NPM](https://nodei.co/npm/wires.png?downloads=true&stars=true)](https://www.npmjs.org/package/wires) # wires A simple configuration utility with smart module wiring for unobtrusive dependency injection. ## License Copyright (c) 2012 - 2015 [Julian Aubourg](mailto:j@ubourg.net) Licensed under the [MIT license](https://raw.githubusercontent.com/jaubourg/wires/master/LICENSE-MIT). ## Instruction: Use small button for NPM ## Code After: [![NPM](https://img.shields.io/npm/v/wires.svg)](https://img.shields.io/npm/v/wires.svg) [![Build Status](https://travis-ci.org/jaubourg/wires.svg?branch=master)](https://travis-ci.org/jaubourg/wires) [![Coverage Status](https://img.shields.io/coveralls/jaubourg/wires.svg)](https://coveralls.io/r/jaubourg/wires) [![Dependency Status](https://david-dm.org/jaubourg/wires.svg)](https://david-dm.org/jaubourg/wires) [![devDependency Status](https://david-dm.org/jaubourg/wires/dev-status.svg)](https://david-dm.org/jaubourg/wires#info=devDependencies) [![Gittip](https://img.shields.io/gittip/jaubourg.svg)](https://www.gittip.com/jaubourg/) # wires A simple configuration utility with smart module wiring for unobtrusive dependency injection. ## License Copyright (c) 2012 - 2015 [Julian Aubourg](mailto:j@ubourg.net) Licensed under the [MIT license](https://raw.githubusercontent.com/jaubourg/wires/master/LICENSE-MIT).
b42381968ae84c2bab5faf41b9f12bd63f5c8927
lib/tritium/parser/instructions/literal.rb
lib/tritium/parser/instructions/literal.rb
module Tritium module Parser module Instructions class Literal < Instruction def initialize(filename, line_num, value) super(filename, line_num) @value = value end def to_s(depth = 0) "#{@@tab * depth}#{@value.inspect}" end def unquote val = eval(self.to_s) Regexp === val ? val.inspect : val end end end end end
module Tritium module Parser module Instructions class Literal < Instruction attr :value def initialize(filename, line_num, value) super(filename, line_num) @value = value end def to_s(depth = 0) "#{@@tab * depth}#{@value.inspect}" end def unquote val = eval(self.to_s) Regexp === val ? val.inspect : val end end end end end
Make value's from Literals available
Make value's from Literals available
Ruby
mpl-2.0
moovweb/tritium,moovweb/tritium,moovweb/tritium,moovweb/tritium,moovweb/tritium
ruby
## Code Before: module Tritium module Parser module Instructions class Literal < Instruction def initialize(filename, line_num, value) super(filename, line_num) @value = value end def to_s(depth = 0) "#{@@tab * depth}#{@value.inspect}" end def unquote val = eval(self.to_s) Regexp === val ? val.inspect : val end end end end end ## Instruction: Make value's from Literals available ## Code After: module Tritium module Parser module Instructions class Literal < Instruction attr :value def initialize(filename, line_num, value) super(filename, line_num) @value = value end def to_s(depth = 0) "#{@@tab * depth}#{@value.inspect}" end def unquote val = eval(self.to_s) Regexp === val ? val.inspect : val end end end end end
0cb89b29468e51bc0a1f6735b38e53d2436a2e23
_includes/javascripts/social-links.js
_includes/javascripts/social-links.js
function windowPopup(url, width, height) { // Calculate the position of the popup so // it’s centered on the screen. var left = screen.width / 2 - width / 2, top = screen.height / 2 - height / 2; window.open( url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left ); } $('.js-social-share').on('click', function(e) { e.preventDefault(); windowPopup($(this).attr('href'), 500, 300); });
function windowPopup(url, width, height) { // Calculate the position of the popup so // it’s centered on the screen. var left = screen.width / 2 - width / 2, top = screen.height / 2 - height / 2; window.open( url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left ); } var socialLink = document.querySelector('.js-social-share'); if (socialLink) { socialLink.addEventListener('click', function(e) { e.preventDefault(); windowPopup(this.getAttribute('href'), 500, 300); }); }
Move social links code to vanilla js
Move social links code to vanilla js
JavaScript
mit
smithtimmytim/brightlycolored.org,smithtimmytim/brightlycolored.org,smithtimmytim/brightlycolored.org
javascript
## Code Before: function windowPopup(url, width, height) { // Calculate the position of the popup so // it’s centered on the screen. var left = screen.width / 2 - width / 2, top = screen.height / 2 - height / 2; window.open( url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left ); } $('.js-social-share').on('click', function(e) { e.preventDefault(); windowPopup($(this).attr('href'), 500, 300); }); ## Instruction: Move social links code to vanilla js ## Code After: function windowPopup(url, width, height) { // Calculate the position of the popup so // it’s centered on the screen. var left = screen.width / 2 - width / 2, top = screen.height / 2 - height / 2; window.open( url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left ); } var socialLink = document.querySelector('.js-social-share'); if (socialLink) { socialLink.addEventListener('click', function(e) { e.preventDefault(); windowPopup(this.getAttribute('href'), 500, 300); }); }
07c5fc51544b93493d392f06b5c9b3632a6b2572
code/GlobalNavIteratorProperties.php
code/GlobalNavIteratorProperties.php
<?php class GlobalNavIteratorProperties implements TemplateIteratorProvider { public static function get_template_iterator_variables() { return array( 'GlobalNav', ); } public function iteratorProperties($pos, $totalItems) { $host = GlobalNavSiteTreeExtension::get_toolbar_hostname(); $path = Config::inst()->get('GlobalNav','snippet_path'); $html = @file_get_contents(Controller::join_links($host,$path)); if (empty($html)) { $this->globalNav = ''; } $this->globalNav = $html; } public function GlobalNav() { Requirements::css(Controller::join_links(GlobalNavSiteTreeExtension::get_toolbar_hostname(), Config::inst()->get('GlobalNav','css_path'))); $html = DBField::create_field('HTMLText',$this->globalNav); $html->setOptions(array('shortcodes' => false)); return $html; } }
<?php class GlobalNavIteratorProperties implements TemplateIteratorProvider { public static function get_template_iterator_variables() { return array( 'GlobalNav', ); } public function iteratorProperties($pos, $totalItems) { // If we're already in a toolbarrequest, don't recurse further // This is most likely to happen during a 404 if (!empty($_GET['globaltoolbar'])) { $this->globalNav = ''; return; } $host = GlobalNavSiteTreeExtension::get_toolbar_hostname(); $path = Config::inst()->get('GlobalNav','snippet_path'); $html = @file_get_contents(Controller::join_links($host, $path, '?globaltoolbar=true')); if (empty($html)) { $this->globalNav = ''; } $this->globalNav = $html; } public function GlobalNav() { Requirements::css(Controller::join_links(GlobalNavSiteTreeExtension::get_toolbar_hostname(), Config::inst()->get('GlobalNav','css_path'))); $html = DBField::create_field('HTMLText',$this->globalNav); $html->setOptions(array('shortcodes' => false)); return $html; } }
Fix recursive inclusion of the toolbar page
Fix recursive inclusion of the toolbar page This is most likely to happen during a 404 page which includes the toolbar, which includes the toolbar which is a 404 page, which includes...
PHP
bsd-3-clause
mandrew/silverstripe-globaltoolbar,silverstripe/silverstripe-globaltoolbar,mandrew/silverstripe-globaltoolbar,mandrew/silverstripe-globaltoolbar,silverstripe/silverstripe-globaltoolbar,mandrew/silverstripe-globaltoolbar,silverstripe/silverstripe-globaltoolbar,silverstripe/silverstripe-globaltoolbar
php
## Code Before: <?php class GlobalNavIteratorProperties implements TemplateIteratorProvider { public static function get_template_iterator_variables() { return array( 'GlobalNav', ); } public function iteratorProperties($pos, $totalItems) { $host = GlobalNavSiteTreeExtension::get_toolbar_hostname(); $path = Config::inst()->get('GlobalNav','snippet_path'); $html = @file_get_contents(Controller::join_links($host,$path)); if (empty($html)) { $this->globalNav = ''; } $this->globalNav = $html; } public function GlobalNav() { Requirements::css(Controller::join_links(GlobalNavSiteTreeExtension::get_toolbar_hostname(), Config::inst()->get('GlobalNav','css_path'))); $html = DBField::create_field('HTMLText',$this->globalNav); $html->setOptions(array('shortcodes' => false)); return $html; } } ## Instruction: Fix recursive inclusion of the toolbar page This is most likely to happen during a 404 page which includes the toolbar, which includes the toolbar which is a 404 page, which includes... ## Code After: <?php class GlobalNavIteratorProperties implements TemplateIteratorProvider { public static function get_template_iterator_variables() { return array( 'GlobalNav', ); } public function iteratorProperties($pos, $totalItems) { // If we're already in a toolbarrequest, don't recurse further // This is most likely to happen during a 404 if (!empty($_GET['globaltoolbar'])) { $this->globalNav = ''; return; } $host = GlobalNavSiteTreeExtension::get_toolbar_hostname(); $path = Config::inst()->get('GlobalNav','snippet_path'); $html = @file_get_contents(Controller::join_links($host, $path, '?globaltoolbar=true')); if (empty($html)) { $this->globalNav = ''; } $this->globalNav = $html; } public function GlobalNav() { Requirements::css(Controller::join_links(GlobalNavSiteTreeExtension::get_toolbar_hostname(), Config::inst()->get('GlobalNav','css_path'))); $html = DBField::create_field('HTMLText',$this->globalNav); $html->setOptions(array('shortcodes' => false)); return $html; } }
4eb4c20d7ab61d4457364ce25b6e54e01fb4145a
src/rill/cli.clj
src/rill/cli.clj
(ns rill.cli (:require [rill.event-store.atom-store :refer [atom-event-store]] [rill.event-channel :refer [event-channel]] [rill.event-stream :refer [all-events-stream-id]] [rill.event-store.atom-store.event :refer [unprocessable?]] [clojure.core.async :refer [<!!]]) (:gen-class)) (defn -main [url user password] {:pre [url user password]} (let [ch (event-channel (atom-event-store url {:user user :password password}) all-events-stream-id -1 0)] (println "Printing all events...") (loop [] (if-let [e (<!! ch)] (do (if (unprocessable? e) (println "Skipped message.") (prn e)) (recur))))))
(ns rill.cli (:require [rill.event-store.psql :refer [psql-event-store]] [rill.event-channel :refer [event-channel]] [rill.event-stream :refer [all-events-stream-id]] [rill.event-store.atom-store.event :refer [unprocessable?]] [clojure.core.async :refer [<!!]]) (:gen-class)) (defn -main [url] {:pre [url]} (let [ch (event-channel (psql-event-store url) all-events-stream-id -1 0)] (println "Printing all events...") (loop [] (if-let [e (<!! ch)] (do (if (unprocessable? e) (println "Skipped message.") (prn e)) (recur))))))
Make it possible to use the psql event store
Make it possible to use the psql event store
Clojure
epl-1.0
rill-event-sourcing/rill
clojure
## Code Before: (ns rill.cli (:require [rill.event-store.atom-store :refer [atom-event-store]] [rill.event-channel :refer [event-channel]] [rill.event-stream :refer [all-events-stream-id]] [rill.event-store.atom-store.event :refer [unprocessable?]] [clojure.core.async :refer [<!!]]) (:gen-class)) (defn -main [url user password] {:pre [url user password]} (let [ch (event-channel (atom-event-store url {:user user :password password}) all-events-stream-id -1 0)] (println "Printing all events...") (loop [] (if-let [e (<!! ch)] (do (if (unprocessable? e) (println "Skipped message.") (prn e)) (recur)))))) ## Instruction: Make it possible to use the psql event store ## Code After: (ns rill.cli (:require [rill.event-store.psql :refer [psql-event-store]] [rill.event-channel :refer [event-channel]] [rill.event-stream :refer [all-events-stream-id]] [rill.event-store.atom-store.event :refer [unprocessable?]] [clojure.core.async :refer [<!!]]) (:gen-class)) (defn -main [url] {:pre [url]} (let [ch (event-channel (psql-event-store url) all-events-stream-id -1 0)] (println "Printing all events...") (loop [] (if-let [e (<!! ch)] (do (if (unprocessable? e) (println "Skipped message.") (prn e)) (recur))))))
9969a2e89bd6a9072c5389b25c747ce82104848c
stockflux-watchlist/README.md
stockflux-watchlist/README.md
StockFlux Watchlist is a part of StockFlux app suite intended to work with StockFlux Launcher, Chart, and News apps. Watchlist is an app containing the list of symbols the user is watching. These symbols are displayed as cards containing key symbol information and a minichart of the symbol's price fluctuations in the last 30 days. ### Opening Watchlist App - The watchlist app can be launched/opened through the launcher app by clicking on StockFlux-watchlist app icon in the top left corner of the launcher. - It can be launched/opened through the launcher's search: search for a symbol, then when the list of symbols is loaded click on watchlist-icon of a particular symbol and that wymbol will be added to the watchlist subsequently openning the watchlist window. - It can be launched/opened on its own by doing `npm start` inside the `stockflux-watchlist` folder. ### Watchlist Card Functionality - Dragging a Watchlist card out of the Watchlist borders opens the StockFlux Chart app. - Each card has a News app icon, clicking on it opens the list of news regarding that symbol. - Each card also has the 'X' icon, clicking on it removes the symbol from the watchlist.
StockFlux Watchlist is a part of StockFlux app suite intended to work with StockFlux Launcher, Chart, and News apps. Watchlist is an app containing the list of symbols the user is watching. These symbols are displayed as cards containing key symbol information and a minichart of the symbol's price fluctuations in the last 30 days. ### Opening Watchlist App - The watchlist app can be launched through the launcher app by clicking on StockFlux-watchlist app icon in the top left corner of the launcher. - It can be launched through the launcher's search: search for a symbol, then when the list of symbols is loaded click on watchlist-icon of a particular symbol and that wymbol will be added to the watchlist subsequently openning the watchlist window. - It can be launched locally. To do this folow these steps: ``` cd stockflux-core npm run build cd stockflux-components npm run build cd stockflux-watchlist npm install npm start ``` ### Watchlist Card Functionality - Dragging a Watchlist card out of the Watchlist borders opens the StockFlux Chart app. - Each card has a News app icon, clicking on it opens the list of news regarding that symbol. - Each card also has the 'X' icon, clicking on it removes the symbol from the watchlist.
Add instructions to launch the watchlist app locally
Add instructions to launch the watchlist app locally
Markdown
mit
ScottLogic/StockFlux,ScottLogic/bitflux-openfin,ScottLogic/StockFlux,ScottLogic/bitflux-openfin,owennw/OpenFinD3FC,owennw/OpenFinD3FC
markdown
## Code Before: StockFlux Watchlist is a part of StockFlux app suite intended to work with StockFlux Launcher, Chart, and News apps. Watchlist is an app containing the list of symbols the user is watching. These symbols are displayed as cards containing key symbol information and a minichart of the symbol's price fluctuations in the last 30 days. ### Opening Watchlist App - The watchlist app can be launched/opened through the launcher app by clicking on StockFlux-watchlist app icon in the top left corner of the launcher. - It can be launched/opened through the launcher's search: search for a symbol, then when the list of symbols is loaded click on watchlist-icon of a particular symbol and that wymbol will be added to the watchlist subsequently openning the watchlist window. - It can be launched/opened on its own by doing `npm start` inside the `stockflux-watchlist` folder. ### Watchlist Card Functionality - Dragging a Watchlist card out of the Watchlist borders opens the StockFlux Chart app. - Each card has a News app icon, clicking on it opens the list of news regarding that symbol. - Each card also has the 'X' icon, clicking on it removes the symbol from the watchlist. ## Instruction: Add instructions to launch the watchlist app locally ## Code After: StockFlux Watchlist is a part of StockFlux app suite intended to work with StockFlux Launcher, Chart, and News apps. Watchlist is an app containing the list of symbols the user is watching. These symbols are displayed as cards containing key symbol information and a minichart of the symbol's price fluctuations in the last 30 days. ### Opening Watchlist App - The watchlist app can be launched through the launcher app by clicking on StockFlux-watchlist app icon in the top left corner of the launcher. - It can be launched through the launcher's search: search for a symbol, then when the list of symbols is loaded click on watchlist-icon of a particular symbol and that wymbol will be added to the watchlist subsequently openning the watchlist window. - It can be launched locally. To do this folow these steps: ``` cd stockflux-core npm run build cd stockflux-components npm run build cd stockflux-watchlist npm install npm start ``` ### Watchlist Card Functionality - Dragging a Watchlist card out of the Watchlist borders opens the StockFlux Chart app. - Each card has a News app icon, clicking on it opens the list of news regarding that symbol. - Each card also has the 'X' icon, clicking on it removes the symbol from the watchlist.
09ed0e911e530e9b907ac92f2892248b6af245fa
vcr/errors.py
vcr/errors.py
class CannotOverwriteExistingCassetteException(Exception): def __init__(self, *args, **kwargs): message = self._get_message(kwargs["cassette"], kwargs["failed_request"]) super(CannotOverwriteExistingCassetteException, self).__init__(message) def _get_message(self, cassette, failed_request): """Get the final message related to the exception""" # Get the similar requests in the cassette that # have match the most with the request. best_matches = cassette.find_requests_with_most_matches(failed_request) # Build a comprehensible message to put in the exception. best_matches_msg = "" for best_match in best_matches: request, _, failed_matchers_assertion_msgs = best_match best_matches_msg += "Similar request found : (%r).\n" % request for failed_matcher, assertion_msg in failed_matchers_assertion_msgs: best_matches_msg += "Matcher failed : %s\n" "%s\n" % ( failed_matcher, assertion_msg, ) return ( "Can't overwrite existing cassette (%r) in " "your current record mode (%r).\n" "No match for the request (%r) was found.\n" "%s" % (cassette._path, cassette.record_mode, failed_request, best_matches_msg) ) class UnhandledHTTPRequestError(KeyError): """Raised when a cassette does not contain the request we want.""" pass
class CannotOverwriteExistingCassetteException(Exception): def __init__(self, *args, **kwargs): self.cassette = kwargs["cassette"] self.failed_request = kwargs["failed_request"] message = self._get_message(kwargs["cassette"], kwargs["failed_request"]) super(CannotOverwriteExistingCassetteException, self).__init__(message) def _get_message(self, cassette, failed_request): """Get the final message related to the exception""" # Get the similar requests in the cassette that # have match the most with the request. best_matches = cassette.find_requests_with_most_matches(failed_request) # Build a comprehensible message to put in the exception. best_matches_msg = "" for best_match in best_matches: request, _, failed_matchers_assertion_msgs = best_match best_matches_msg += "Similar request found : (%r).\n" % request for failed_matcher, assertion_msg in failed_matchers_assertion_msgs: best_matches_msg += "Matcher failed : %s\n" "%s\n" % ( failed_matcher, assertion_msg, ) return ( "Can't overwrite existing cassette (%r) in " "your current record mode (%r).\n" "No match for the request (%r) was found.\n" "%s" % (cassette._path, cassette.record_mode, failed_request, best_matches_msg) ) class UnhandledHTTPRequestError(KeyError): """Raised when a cassette does not contain the request we want.""" pass
Add cassette and failed request as properties of thrown CannotOverwriteCassetteException
Add cassette and failed request as properties of thrown CannotOverwriteCassetteException
Python
mit
kevin1024/vcrpy,graingert/vcrpy,graingert/vcrpy,kevin1024/vcrpy
python
## Code Before: class CannotOverwriteExistingCassetteException(Exception): def __init__(self, *args, **kwargs): message = self._get_message(kwargs["cassette"], kwargs["failed_request"]) super(CannotOverwriteExistingCassetteException, self).__init__(message) def _get_message(self, cassette, failed_request): """Get the final message related to the exception""" # Get the similar requests in the cassette that # have match the most with the request. best_matches = cassette.find_requests_with_most_matches(failed_request) # Build a comprehensible message to put in the exception. best_matches_msg = "" for best_match in best_matches: request, _, failed_matchers_assertion_msgs = best_match best_matches_msg += "Similar request found : (%r).\n" % request for failed_matcher, assertion_msg in failed_matchers_assertion_msgs: best_matches_msg += "Matcher failed : %s\n" "%s\n" % ( failed_matcher, assertion_msg, ) return ( "Can't overwrite existing cassette (%r) in " "your current record mode (%r).\n" "No match for the request (%r) was found.\n" "%s" % (cassette._path, cassette.record_mode, failed_request, best_matches_msg) ) class UnhandledHTTPRequestError(KeyError): """Raised when a cassette does not contain the request we want.""" pass ## Instruction: Add cassette and failed request as properties of thrown CannotOverwriteCassetteException ## Code After: class CannotOverwriteExistingCassetteException(Exception): def __init__(self, *args, **kwargs): self.cassette = kwargs["cassette"] self.failed_request = kwargs["failed_request"] message = self._get_message(kwargs["cassette"], kwargs["failed_request"]) super(CannotOverwriteExistingCassetteException, self).__init__(message) def _get_message(self, cassette, failed_request): """Get the final message related to the exception""" # Get the similar requests in the cassette that # have match the most with the request. best_matches = cassette.find_requests_with_most_matches(failed_request) # Build a comprehensible message to put in the exception. best_matches_msg = "" for best_match in best_matches: request, _, failed_matchers_assertion_msgs = best_match best_matches_msg += "Similar request found : (%r).\n" % request for failed_matcher, assertion_msg in failed_matchers_assertion_msgs: best_matches_msg += "Matcher failed : %s\n" "%s\n" % ( failed_matcher, assertion_msg, ) return ( "Can't overwrite existing cassette (%r) in " "your current record mode (%r).\n" "No match for the request (%r) was found.\n" "%s" % (cassette._path, cassette.record_mode, failed_request, best_matches_msg) ) class UnhandledHTTPRequestError(KeyError): """Raised when a cassette does not contain the request we want.""" pass
2dce17ceec81774626ad982e1e94dd653374eee3
gradle.properties
gradle.properties
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 android.enableBuildCache=true org.gradle.daemon=true GROUP=com.volkhart.feedback VERSION_NAME=1.0.0-SNAPSHOT POM_DESCRIPTION=A feedback library aimed at replicating the Google feedback mechanism. POM_URL=http://github.com/MariusVolkhart/feedback/ POM_SCM_URL=http://github.com/MariusVolkhart/feedback/ POM_SCM_CONNECTION=scm:git:git://github.com/MariusVolkhart/feedback.git POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/MariusVolkhart/feedback.git POM_LICENCE_NAME=The MIT License POM_LICENCE_URL=https://opensource.org/licenses/MIT POM_LICENCE_DIST=repo POM_DEVELOPER_ID=MariusVolkhart POM_DEVELOPER_NAME=Marius Volkhart
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 android.enableBuildCache=true org.gradle.daemon=true GROUP=com.volkhart.feedback VERSION_NAME=1.0.0-SNAPSHOT POM_DESCRIPTION=An opinionated, batteries-included feedback library aimed at replicating the Google feedback mechanism circa early 2017. POM_URL=http://github.com/MariusVolkhart/feedback/ POM_SCM_URL=http://github.com/MariusVolkhart/feedback/ POM_SCM_CONNECTION=scm:git:git://github.com/MariusVolkhart/feedback.git POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/MariusVolkhart/feedback.git POM_LICENCE_NAME=The MIT License POM_LICENCE_URL=https://opensource.org/licenses/MIT POM_LICENCE_DIST=repo POM_DEVELOPER_ID=MariusVolkhart POM_DEVELOPER_NAME=Marius Volkhart
Update library description in POM
Update library description in POM
INI
mit
MariusVolkhart/feedback,MariusVolkhart/feedback
ini
## Code Before: org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 android.enableBuildCache=true org.gradle.daemon=true GROUP=com.volkhart.feedback VERSION_NAME=1.0.0-SNAPSHOT POM_DESCRIPTION=A feedback library aimed at replicating the Google feedback mechanism. POM_URL=http://github.com/MariusVolkhart/feedback/ POM_SCM_URL=http://github.com/MariusVolkhart/feedback/ POM_SCM_CONNECTION=scm:git:git://github.com/MariusVolkhart/feedback.git POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/MariusVolkhart/feedback.git POM_LICENCE_NAME=The MIT License POM_LICENCE_URL=https://opensource.org/licenses/MIT POM_LICENCE_DIST=repo POM_DEVELOPER_ID=MariusVolkhart POM_DEVELOPER_NAME=Marius Volkhart ## Instruction: Update library description in POM ## Code After: org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 android.enableBuildCache=true org.gradle.daemon=true GROUP=com.volkhart.feedback VERSION_NAME=1.0.0-SNAPSHOT POM_DESCRIPTION=An opinionated, batteries-included feedback library aimed at replicating the Google feedback mechanism circa early 2017. POM_URL=http://github.com/MariusVolkhart/feedback/ POM_SCM_URL=http://github.com/MariusVolkhart/feedback/ POM_SCM_CONNECTION=scm:git:git://github.com/MariusVolkhart/feedback.git POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/MariusVolkhart/feedback.git POM_LICENCE_NAME=The MIT License POM_LICENCE_URL=https://opensource.org/licenses/MIT POM_LICENCE_DIST=repo POM_DEVELOPER_ID=MariusVolkhart POM_DEVELOPER_NAME=Marius Volkhart
35138bbeffdc1689881c43a3db2abadafabde14b
spec/helpers/collection_spec.rb
spec/helpers/collection_spec.rb
module Fog::CollectionSpec extend Minitest::Spec::DSL # this should be reimplemented in the subject's spec if the subject has required params def params {} end it "can do ::new, #save, ::create, #all, #identity, ::get, and #destroy" do instance_one = subject.new(params) instance_one.save instance_two = subject.create(params) # XXX HACK compares identities # should be replaced with simple includes? when `==` is properly implemented in fog-core; see fog/fog-core#148 assert_includes subject.all.map(&:identity), instance_one.identity assert_includes subject.all.map(&:identity), instance_two.identity assert_equal instance_one.identity, subject.get(instance_one.identity).identity assert_equal instance_two.identity, subject.get(instance_two.identity).identity instance_one.destroy instance_two.destroy Fog.wait_for { !subject.all.map(&:identity).include? instance_one.identity } Fog.wait_for { !subject.all.map(&:identity).include? instance_two.identity } assert_nil subject.get(subject.new(params).identity) end it "is Enumerable" do assert_respond_to subject, :each end end
module Fog::CollectionSpec extend Minitest::Spec::DSL # this should be reimplemented in the subject's spec if the subject has required params def params {} end it "can do ::new, #save, ::create, #all, #identity, ::get, and #destroy" do instance_one = subject.new(params) instance_one.save instance_two = subject.create(params) # XXX HACK compares identities # should be replaced with simple includes? when `==` is properly implemented in fog-core; see fog/fog-core#148 assert_includes subject.all.map(&:identity), instance_one.identity assert_includes subject.all.map(&:identity), instance_two.identity assert_equal instance_one.identity, subject.get(instance_one.identity).identity assert_equal instance_two.identity, subject.get(instance_two.identity).identity instance_one.destroy instance_two.destroy Fog.wait_for { !subject.all.map(&:identity).include? instance_one.identity } Fog.wait_for { !subject.all.map(&:identity).include? instance_two.identity } end it "has no identity if it has not been persisted" do assert_nil subject.get(subject.new(params).identity) end it "is Enumerable" do assert_respond_to subject, :each end end
Split up CollectionSpec tests into smaller bits
[shindo-minitest] Split up CollectionSpec tests into smaller bits
Ruby
mit
mbrukman/fog-google,danbroudy/fog-google,mlazarov/fog-google,Temikus/fog-google,plribeiro3000/fog-google,canausa/fog-google,ihmccreery/fog-google,budnik/fog-google,Temikus/fog-google,fog/fog-google
ruby
## Code Before: module Fog::CollectionSpec extend Minitest::Spec::DSL # this should be reimplemented in the subject's spec if the subject has required params def params {} end it "can do ::new, #save, ::create, #all, #identity, ::get, and #destroy" do instance_one = subject.new(params) instance_one.save instance_two = subject.create(params) # XXX HACK compares identities # should be replaced with simple includes? when `==` is properly implemented in fog-core; see fog/fog-core#148 assert_includes subject.all.map(&:identity), instance_one.identity assert_includes subject.all.map(&:identity), instance_two.identity assert_equal instance_one.identity, subject.get(instance_one.identity).identity assert_equal instance_two.identity, subject.get(instance_two.identity).identity instance_one.destroy instance_two.destroy Fog.wait_for { !subject.all.map(&:identity).include? instance_one.identity } Fog.wait_for { !subject.all.map(&:identity).include? instance_two.identity } assert_nil subject.get(subject.new(params).identity) end it "is Enumerable" do assert_respond_to subject, :each end end ## Instruction: [shindo-minitest] Split up CollectionSpec tests into smaller bits ## Code After: module Fog::CollectionSpec extend Minitest::Spec::DSL # this should be reimplemented in the subject's spec if the subject has required params def params {} end it "can do ::new, #save, ::create, #all, #identity, ::get, and #destroy" do instance_one = subject.new(params) instance_one.save instance_two = subject.create(params) # XXX HACK compares identities # should be replaced with simple includes? when `==` is properly implemented in fog-core; see fog/fog-core#148 assert_includes subject.all.map(&:identity), instance_one.identity assert_includes subject.all.map(&:identity), instance_two.identity assert_equal instance_one.identity, subject.get(instance_one.identity).identity assert_equal instance_two.identity, subject.get(instance_two.identity).identity instance_one.destroy instance_two.destroy Fog.wait_for { !subject.all.map(&:identity).include? instance_one.identity } Fog.wait_for { !subject.all.map(&:identity).include? instance_two.identity } end it "has no identity if it has not been persisted" do assert_nil subject.get(subject.new(params).identity) end it "is Enumerable" do assert_respond_to subject, :each end end
5effcb2e9187643b690e7c35c3fcc34d67061bad
_config.yml
_config.yml
markdown: redcarpet highlighter: pygments # Permalinks # # Use of `relative_permalinks` ensures post links from the index work properly. permalink: pretty relative_permalinks: true # Setup title: Burak Aktas tagline: 'Software Engineer' description: All about programming url: http://buraktas.com baseurl: / paginate: 5 excerpt_separator: <!--more--> # About/contact author: name: Burak Aktas email: buraktas@gmail.com linkedin: burakaktas # url: https://twitter.com/mdo # Custom vars version: 1.0.0
plugins: [jekyll-paginate] markdown: redcarpet highlighter: pygments.rb # Permalinks # # Use of `relative_permalinks` ensures post links from the index work properly. permalink: pretty #relative_permalinks: true future: true # Setup title: Burak Aktas tagline: 'Software Engineer' description: All about programming url: http://buraktas.com baseurl: / paginate: 5 excerpt_separator: <!--more--> # About/contact author: name: Burak Aktas email: buraktas@gmail.com linkedin: burakaktas # url: https://twitter.com/mdo # Custom vars version: 1.0.0
Update config after moving to new jekyll version
Update config after moving to new jekyll version
YAML
mit
flexelem/flexelem.github.io,flexelem/flexelem.github.io,flexelem/flexelem.github.io,flexelem/flexelem.github.io
yaml
## Code Before: markdown: redcarpet highlighter: pygments # Permalinks # # Use of `relative_permalinks` ensures post links from the index work properly. permalink: pretty relative_permalinks: true # Setup title: Burak Aktas tagline: 'Software Engineer' description: All about programming url: http://buraktas.com baseurl: / paginate: 5 excerpt_separator: <!--more--> # About/contact author: name: Burak Aktas email: buraktas@gmail.com linkedin: burakaktas # url: https://twitter.com/mdo # Custom vars version: 1.0.0 ## Instruction: Update config after moving to new jekyll version ## Code After: plugins: [jekyll-paginate] markdown: redcarpet highlighter: pygments.rb # Permalinks # # Use of `relative_permalinks` ensures post links from the index work properly. permalink: pretty #relative_permalinks: true future: true # Setup title: Burak Aktas tagline: 'Software Engineer' description: All about programming url: http://buraktas.com baseurl: / paginate: 5 excerpt_separator: <!--more--> # About/contact author: name: Burak Aktas email: buraktas@gmail.com linkedin: burakaktas # url: https://twitter.com/mdo # Custom vars version: 1.0.0
1183ea3956809bc156eb9a16a6bf35e8ed284ef6
utils/auth.js
utils/auth.js
var Promise = require('bluebird'), redis = require('redis'), client = Promise.promisifyAll(redis.createClient()), privateKey = process.env.secret || 'BbZJjyoXAdr8BUZuiKKARWimKfrSmQ6fv8kZ7OFfc'; module.exports = { createToken : createToken, clearToken : clearToken }; function createToken(userObj) { var authObj = {'userId' : userObj.id, scope : userObj.scope}, token1 = jwt.sign(authObj, privateKey), token2; authObj.token = token1; token2 = jwt.sign(authObj, privateKey); client.HMSET(token1,authObj); return token2; } function clearToken() { }
var Promise = require('bluebird'), redis = require('redis'), client = Promise.promisifyAll(redis.createClient()), privateKey = process.env.secret || 'BbZJjyoXAdr8BUZuiKKARWimKfrSmQ6fv8kZ7OFfc'; module.exports = { createToken : createToken, clearToken : clearToken }; function createToken(userObj) { var authObj = {'userId' : userObj.id, scope : userObj.scope.toLowerCase()}, token1 = jwt.sign(authObj, privateKey), token2; authObj.token = token1; token2 = jwt.sign(authObj, privateKey); client.HMSET(token1,authObj); return token2; } function clearToken() { }
Convert scope to lower case before generating token
Convert scope to lower case before generating token
JavaScript
mit
Pranay92/lets-chat,Pranay92/collaborate
javascript
## Code Before: var Promise = require('bluebird'), redis = require('redis'), client = Promise.promisifyAll(redis.createClient()), privateKey = process.env.secret || 'BbZJjyoXAdr8BUZuiKKARWimKfrSmQ6fv8kZ7OFfc'; module.exports = { createToken : createToken, clearToken : clearToken }; function createToken(userObj) { var authObj = {'userId' : userObj.id, scope : userObj.scope}, token1 = jwt.sign(authObj, privateKey), token2; authObj.token = token1; token2 = jwt.sign(authObj, privateKey); client.HMSET(token1,authObj); return token2; } function clearToken() { } ## Instruction: Convert scope to lower case before generating token ## Code After: var Promise = require('bluebird'), redis = require('redis'), client = Promise.promisifyAll(redis.createClient()), privateKey = process.env.secret || 'BbZJjyoXAdr8BUZuiKKARWimKfrSmQ6fv8kZ7OFfc'; module.exports = { createToken : createToken, clearToken : clearToken }; function createToken(userObj) { var authObj = {'userId' : userObj.id, scope : userObj.scope.toLowerCase()}, token1 = jwt.sign(authObj, privateKey), token2; authObj.token = token1; token2 = jwt.sign(authObj, privateKey); client.HMSET(token1,authObj); return token2; } function clearToken() { }
67af76cbe46f3123e14a936ea213adce25f21037
templates/rsyslog.conf.erb
templates/rsyslog.conf.erb
$ModLoad imuxsock # provides support for local system logging $ModLoad imklog # provides kernel logging support (previously done by rklogd) #$ModLoad immark # provides --MARK-- message capability ########################### #### GLOBAL DIRECTIVES #### ########################### # # Set the default permissions for all log files. # $FileOwner <%= scope.lookupvar('rsyslog::log_user') %> $FileGroup <%= scope.lookupvar('rsyslog::log_group') %> $FileCreateMode <%= scope.lookupvar('rsyslog::perm_file') %> $DirCreateMode <%= scope.lookupvar('rsyslog::perm_dir') %> $PrivDropToUser <%= scope.lookupvar('rsyslog::run_user') %> $PrivDropToGroup <%= scope.lookupvar('rsyslog::run_group') %> # # Include all config files in <%= scope.lookupvar('rsyslog::rsyslog_d') %> # $IncludeConfig <%= scope.lookupvar('rsyslog::rsyslog_d') -%>*.conf # # Emergencies are sent to everybody logged in. # *.emerg *
$ModLoad imuxsock # provides support for local system logging $ModLoad imklog # provides kernel logging support (previously done by rklogd) #$ModLoad immark # provides --MARK-- message capability ########################### #### GLOBAL DIRECTIVES #### ########################### # # Set the default permissions for all log files. # $FileOwner <%= scope.lookupvar('rsyslog::log_user') %> $FileGroup <%= scope.lookupvar('rsyslog::log_group') %> $FileCreateMode <%= scope.lookupvar('rsyslog::perm_file') %> $DirOwner <%= scope.lookupvar('rsyslog::log_user') %> $DirGroup <%= scope.lookupvar('rsyslog::log_group') %> $DirCreateMode <%= scope.lookupvar('rsyslog::perm_dir') %> $PrivDropToUser <%= scope.lookupvar('rsyslog::run_user') %> $PrivDropToGroup <%= scope.lookupvar('rsyslog::run_group') %> # # Include all config files in <%= scope.lookupvar('rsyslog::rsyslog_d') %> # $IncludeConfig <%= scope.lookupvar('rsyslog::rsyslog_d') -%>*.conf # # Emergencies are sent to everybody logged in. # *.emerg *
Create log directories with same ownership as files
Create log directories with same ownership as files
HTML+ERB
apache-2.0
sedan07/puppet-rsyslog,cybercom-finland/puppet-rsyslog,redhat-cip/puppet-rsyslog,TelekomCloud/puppet-rsyslog,fuel-infra/puppet-rsyslog,icann-dns/puppet-rsyslog,icann-dns/puppet-rsyslog,saz/puppet-rsyslog,vmule/puppet-rsyslog,madkiss/puppet-rsyslog,mrobbert/puppet-rsyslog,TelekomCloud/puppet-rsyslog,vmule/puppet-rsyslog,plambert/puppet-rsyslog,saz/puppet-rsyslog,sedan07/puppet-rsyslog,cybercom-finland/puppet-rsyslog,tbeitter/puppet-rsyslog,triforce/puppet-rsyslog,tbeitter/puppet-rsyslog,nickchappell/puppet-rsyslog,alphagov/puppet-rsyslog,redhat-cip/puppet-rsyslog,nesi/puppet-rsyslog,coffeecoco/puppet-rsyslog,triforce/puppet-rsyslog,plambert/puppet-rsyslog,mrobbert/puppet-rsyslog,elmerfud/puppet-rsyslog_rs,nickchappell/puppet-rsyslog,ekini/puppet-rsyslog,lclair/puppet-rsyslog,ekini/puppet-rsyslog,lclair/puppet-rsyslog,madkiss/puppet-rsyslog,raphink/puppet-rsyslog,elmerfud/puppet-rsyslog_rs,fuel-infra/puppet-rsyslog
html+erb
## Code Before: $ModLoad imuxsock # provides support for local system logging $ModLoad imklog # provides kernel logging support (previously done by rklogd) #$ModLoad immark # provides --MARK-- message capability ########################### #### GLOBAL DIRECTIVES #### ########################### # # Set the default permissions for all log files. # $FileOwner <%= scope.lookupvar('rsyslog::log_user') %> $FileGroup <%= scope.lookupvar('rsyslog::log_group') %> $FileCreateMode <%= scope.lookupvar('rsyslog::perm_file') %> $DirCreateMode <%= scope.lookupvar('rsyslog::perm_dir') %> $PrivDropToUser <%= scope.lookupvar('rsyslog::run_user') %> $PrivDropToGroup <%= scope.lookupvar('rsyslog::run_group') %> # # Include all config files in <%= scope.lookupvar('rsyslog::rsyslog_d') %> # $IncludeConfig <%= scope.lookupvar('rsyslog::rsyslog_d') -%>*.conf # # Emergencies are sent to everybody logged in. # *.emerg * ## Instruction: Create log directories with same ownership as files ## Code After: $ModLoad imuxsock # provides support for local system logging $ModLoad imklog # provides kernel logging support (previously done by rklogd) #$ModLoad immark # provides --MARK-- message capability ########################### #### GLOBAL DIRECTIVES #### ########################### # # Set the default permissions for all log files. # $FileOwner <%= scope.lookupvar('rsyslog::log_user') %> $FileGroup <%= scope.lookupvar('rsyslog::log_group') %> $FileCreateMode <%= scope.lookupvar('rsyslog::perm_file') %> $DirOwner <%= scope.lookupvar('rsyslog::log_user') %> $DirGroup <%= scope.lookupvar('rsyslog::log_group') %> $DirCreateMode <%= scope.lookupvar('rsyslog::perm_dir') %> $PrivDropToUser <%= scope.lookupvar('rsyslog::run_user') %> $PrivDropToGroup <%= scope.lookupvar('rsyslog::run_group') %> # # Include all config files in <%= scope.lookupvar('rsyslog::rsyslog_d') %> # $IncludeConfig <%= scope.lookupvar('rsyslog::rsyslog_d') -%>*.conf # # Emergencies are sent to everybody logged in. # *.emerg *
c0eac93d5703869d3d734683b3ef890882f47ce8
src/scss/elements/_forms-and-labels.scss
src/scss/elements/_forms-and-labels.scss
.form { &__label { display: block; margin-bottom: $lineheight / 3; } &__input { margin-bottom: $lineheight; &--error { .input { border-color: $night-shadz; background-color: lighten($night-shadz, 50); } .error-msg { font-weight: 600; color: $night-shadz; } } &--flush { margin: 0; } } &__loader { top: 6px; left: 16px; } }
.form { &__label { display: block; margin-bottom: $lineheight / 3; } &__input { margin-bottom: $lineheight; &--error { .input { border-color: $night-shadz; background-color: lighten($night-shadz, 50); } .error-msg { font-weight: 600; color: $night-shadz; } } &--flush { margin: 0; } } &__loader { top: 6px; left: 16px; } } .fieldset { margin-bottom: $lineheight / 2; border: 0; }
Add simple styling to fiedlset elements used on radio groups
Add simple styling to fiedlset elements used on radio groups Former-commit-id: 30ff97f33a12dae6f77a3a1f478e3ad109f8600c Former-commit-id: e9133f55bfc49ca841a58f731737bcea2dc81c73 Former-commit-id: 6c19782e5ad72d67e469aeaa3028dbda83e3a84d
SCSS
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
scss
## Code Before: .form { &__label { display: block; margin-bottom: $lineheight / 3; } &__input { margin-bottom: $lineheight; &--error { .input { border-color: $night-shadz; background-color: lighten($night-shadz, 50); } .error-msg { font-weight: 600; color: $night-shadz; } } &--flush { margin: 0; } } &__loader { top: 6px; left: 16px; } } ## Instruction: Add simple styling to fiedlset elements used on radio groups Former-commit-id: 30ff97f33a12dae6f77a3a1f478e3ad109f8600c Former-commit-id: e9133f55bfc49ca841a58f731737bcea2dc81c73 Former-commit-id: 6c19782e5ad72d67e469aeaa3028dbda83e3a84d ## Code After: .form { &__label { display: block; margin-bottom: $lineheight / 3; } &__input { margin-bottom: $lineheight; &--error { .input { border-color: $night-shadz; background-color: lighten($night-shadz, 50); } .error-msg { font-weight: 600; color: $night-shadz; } } &--flush { margin: 0; } } &__loader { top: 6px; left: 16px; } } .fieldset { margin-bottom: $lineheight / 2; border: 0; }
10f9cc8c8a6a21b1cf9669acdbb6f3d5c01cdc85
src/Hook/Message/Validator/Rule/Base.php
src/Hook/Message/Validator/Rule/Base.php
<?php /** * This file is part of HookMeUp. * * (c) Sebastian Feldmann <sf@sebastian.feldmann.info> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace HookMeUp\Hook\Message\Validator\Rule; use HookMeUp\Git\CommitMessage; use HookMeUp\Hook\Message\Validator\Rule; /** * Class Base * * @package HookMeUp * @author Sebastian Feldmann <sf@sebastian-feldmann.info> * @link https://github.com/sebastianfeldmann/hookmeup * @since Class available since Release 0.9.0 */ abstract class Base implements Rule { /** * Rule hint. * * @var string */ protected $hint; /** * @return string */ public function getHint() { return $this->hint; } /** * @param \HookMeUp\Git\CommitMessage $msg * @return bool */ public abstract function pass(CommitMessage $msg); }
<?php /** * This file is part of HookMeUp. * * (c) Sebastian Feldmann <sf@sebastian.feldmann.info> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace HookMeUp\Hook\Message\Validator\Rule; use HookMeUp\Git\CommitMessage; use HookMeUp\Hook\Message\Validator\Rule; /** * Class Base * * @package HookMeUp * @author Sebastian Feldmann <sf@sebastian-feldmann.info> * @link https://github.com/sebastianfeldmann/hookmeup * @since Class available since Release 0.9.0 */ abstract class Base implements Rule { /** * Rule hint. * * @var string */ protected $hint; /** * @return string */ public function getHint() { return $this->hint; } /** * @param \HookMeUp\Git\CommitMessage $msg * @return bool */ abstract public function pass(CommitMessage $msg); }
Move abstract declaration in front to precede visibility
Move abstract declaration in front to precede visibility
PHP
mit
sebastianfeldmann/captainhook,sebastianfeldmann/captainhook
php
## Code Before: <?php /** * This file is part of HookMeUp. * * (c) Sebastian Feldmann <sf@sebastian.feldmann.info> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace HookMeUp\Hook\Message\Validator\Rule; use HookMeUp\Git\CommitMessage; use HookMeUp\Hook\Message\Validator\Rule; /** * Class Base * * @package HookMeUp * @author Sebastian Feldmann <sf@sebastian-feldmann.info> * @link https://github.com/sebastianfeldmann/hookmeup * @since Class available since Release 0.9.0 */ abstract class Base implements Rule { /** * Rule hint. * * @var string */ protected $hint; /** * @return string */ public function getHint() { return $this->hint; } /** * @param \HookMeUp\Git\CommitMessage $msg * @return bool */ public abstract function pass(CommitMessage $msg); } ## Instruction: Move abstract declaration in front to precede visibility ## Code After: <?php /** * This file is part of HookMeUp. * * (c) Sebastian Feldmann <sf@sebastian.feldmann.info> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace HookMeUp\Hook\Message\Validator\Rule; use HookMeUp\Git\CommitMessage; use HookMeUp\Hook\Message\Validator\Rule; /** * Class Base * * @package HookMeUp * @author Sebastian Feldmann <sf@sebastian-feldmann.info> * @link https://github.com/sebastianfeldmann/hookmeup * @since Class available since Release 0.9.0 */ abstract class Base implements Rule { /** * Rule hint. * * @var string */ protected $hint; /** * @return string */ public function getHint() { return $this->hint; } /** * @param \HookMeUp\Git\CommitMessage $msg * @return bool */ abstract public function pass(CommitMessage $msg); }
977e33a5df684367c50f1443fd861bef4db83ba8
solutions/image.go
solutions/image.go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore package main import ( "image" "image/color" "code.google.com/p/go-tour-french/pic" ) type Image struct { Height, Width int } func (m Image) ColorModel() color.Model { return color.RGBAModel } func (m Image) Bounds() image.Rectangle { return image.Rect(0, 0, m.Height, m.Width) } func (m Image) At(x, y int) color.Color { c := uint8(x ^ y) return color.RGBA{c, c, 255, 255} } func main() { m := Image{256, 256} pic.ShowImage(m) }
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore package main import ( "image" "image/color" "github.com/dupoxy/go-tour-fr/pic" ) type Image struct { Height, Width int } func (m Image) ColorModel() color.Model { return color.RGBAModel } func (m Image) Bounds() image.Rectangle { return image.Rect(0, 0, m.Height, m.Width) } func (m Image) At(x, y int) color.Color { c := uint8(x ^ y) return color.RGBA{c, c, 255, 255} } func main() { m := Image{256, 256} pic.ShowImage(m) }
Update imports from googlecode to github
Update imports from googlecode to github
Go
bsd-3-clause
dolmen/go-tour-fr,dolmen/go-tour-fr,dupoxy/go-tour-fr,dolmen/go-tour-fr,dupoxy/go-tour-fr,dupoxy/go-tour-fr
go
## Code Before: // Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore package main import ( "image" "image/color" "code.google.com/p/go-tour-french/pic" ) type Image struct { Height, Width int } func (m Image) ColorModel() color.Model { return color.RGBAModel } func (m Image) Bounds() image.Rectangle { return image.Rect(0, 0, m.Height, m.Width) } func (m Image) At(x, y int) color.Color { c := uint8(x ^ y) return color.RGBA{c, c, 255, 255} } func main() { m := Image{256, 256} pic.ShowImage(m) } ## Instruction: Update imports from googlecode to github ## Code After: // Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore package main import ( "image" "image/color" "github.com/dupoxy/go-tour-fr/pic" ) type Image struct { Height, Width int } func (m Image) ColorModel() color.Model { return color.RGBAModel } func (m Image) Bounds() image.Rectangle { return image.Rect(0, 0, m.Height, m.Width) } func (m Image) At(x, y int) color.Color { c := uint8(x ^ y) return color.RGBA{c, c, 255, 255} } func main() { m := Image{256, 256} pic.ShowImage(m) }
7307823b5d3d5bb1bbfdeab410bddff7a3c67430
actions/campaign/getCampainListAction.js
actions/campaign/getCampainListAction.js
var readCampaignModelLogic = require('../../logic/campaign/readCampaignModelLogic') var Input = { accountHashID: { required: true } } exports.getCampaignListAction = { name: 'getCampaignListAction', description: 'Get Campaign List', inputs: Input, run: function (api, data, next) { readCampaignModelLogic.getCampaignList(api.redisClient, data.params.accountHashID, function (err, replies) { if (err) { data.response.error = err.error next(err) } data.response.result = replies next() }) } }
var readCampaignModelLogic = require('../../logic/campaign/readCampaignModelLogic') var Input = { accountHashID: { required: true }, filterObject: { required: false, formatter: function (param, connection, actionTemplate) { return JSON.parse(new Buffer(param, 'base64')) } }, complexModel: { required: flase, default: function (param, connection, actionTemplate) { return false; }, } } exports.getCampaignListAction = { name: 'getCampaignListAction', description: 'Get Campaign List', inputs: Input, run: function (api, data, next) { if (data.params.complexModel) { readCampaignModelLogic.getCampaignListComplex(api.redisClient, data.params.accountHashID, data.params.filterObject, function (err, replies) { if (err) { data.response.error = err.error next(err) } data.response.result = replies next() }) } else { readCampaignModelLogic.getCampaignList(api.redisClient, data.params.accountHashID, data.params.filterObject, function (err, replies) { if (err) { data.response.error = err.error next(err) } data.response.result = replies next() }) } } }
Add Filter Object and Complex Flag to REST Campaign List Action
Add Filter Object and Complex Flag to REST Campaign List Action
JavaScript
mit
Flieral/Announcer-Service,Flieral/Announcer-Service
javascript
## Code Before: var readCampaignModelLogic = require('../../logic/campaign/readCampaignModelLogic') var Input = { accountHashID: { required: true } } exports.getCampaignListAction = { name: 'getCampaignListAction', description: 'Get Campaign List', inputs: Input, run: function (api, data, next) { readCampaignModelLogic.getCampaignList(api.redisClient, data.params.accountHashID, function (err, replies) { if (err) { data.response.error = err.error next(err) } data.response.result = replies next() }) } } ## Instruction: Add Filter Object and Complex Flag to REST Campaign List Action ## Code After: var readCampaignModelLogic = require('../../logic/campaign/readCampaignModelLogic') var Input = { accountHashID: { required: true }, filterObject: { required: false, formatter: function (param, connection, actionTemplate) { return JSON.parse(new Buffer(param, 'base64')) } }, complexModel: { required: flase, default: function (param, connection, actionTemplate) { return false; }, } } exports.getCampaignListAction = { name: 'getCampaignListAction', description: 'Get Campaign List', inputs: Input, run: function (api, data, next) { if (data.params.complexModel) { readCampaignModelLogic.getCampaignListComplex(api.redisClient, data.params.accountHashID, data.params.filterObject, function (err, replies) { if (err) { data.response.error = err.error next(err) } data.response.result = replies next() }) } else { readCampaignModelLogic.getCampaignList(api.redisClient, data.params.accountHashID, data.params.filterObject, function (err, replies) { if (err) { data.response.error = err.error next(err) } data.response.result = replies next() }) } } }
ff85fc05e179e451dabb1f20781dfc5a90314d71
scripts/adb-wrapper.py
scripts/adb-wrapper.py
import subprocess import sys import re # Note: no output will be printed until the entire test suite has finished result = subprocess.run(sys.argv[1], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) successRegex = re.compile('OK \(\d+ tests\)') print(result.stderr) print(result.stdout) if successRegex.search(result.stderr + result.stdout): sys.exit(0) else: sys.exit(1)
import subprocess import sys import re # Note: no output will be printed until the entire test suite has finished p = subprocess.Popen(sys.argv[1], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) stdoutResult, stderrResult = p.communicate() successRegex = re.compile('OK \(\d+ tests\)') print(stdoutResult) print(stderrResult) if successRegex.search(stderrResult + stdoutResult): sys.exit(0) else: sys.exit(1)
Refactor the python wrapper script because apparently apt-get doesn't install 3.5, and subprocess.run() is only in 3.5
Refactor the python wrapper script because apparently apt-get doesn't install 3.5, and subprocess.run() is only in 3.5
Python
apache-2.0
sbosley/squidb,yahoo/squidb,yahoo/squidb,sbosley/squidb,sbosley/squidb,sbosley/squidb,sbosley/squidb,yahoo/squidb,yahoo/squidb,yahoo/squidb
python
## Code Before: import subprocess import sys import re # Note: no output will be printed until the entire test suite has finished result = subprocess.run(sys.argv[1], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) successRegex = re.compile('OK \(\d+ tests\)') print(result.stderr) print(result.stdout) if successRegex.search(result.stderr + result.stdout): sys.exit(0) else: sys.exit(1) ## Instruction: Refactor the python wrapper script because apparently apt-get doesn't install 3.5, and subprocess.run() is only in 3.5 ## Code After: import subprocess import sys import re # Note: no output will be printed until the entire test suite has finished p = subprocess.Popen(sys.argv[1], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) stdoutResult, stderrResult = p.communicate() successRegex = re.compile('OK \(\d+ tests\)') print(stdoutResult) print(stderrResult) if successRegex.search(stderrResult + stdoutResult): sys.exit(0) else: sys.exit(1)
a28a29af31b1ea604ed97544b2d84a39c9ba3e7b
automation/src/rabird/automation/selenium/webelement.py
automation/src/rabird/automation/selenium/webelement.py
''' @date 2014-11-16 @author Hong-she Liang <starofrainnight@gmail.com> ''' # Import the global selenium unit, not our selenium . global_selenium = __import__('selenium') import types import time def set_attribute(self, name, value): value = value.replace(r"'", r"\'") # Replace all r"'" with r"\'" value = value.replace("\n", r"\n") value = value.replace("\r", r"\r") value = value.replace("\t", r"\t") script = "arguments[0].setAttribute('%s', '%s')" % (name, value) self._parent.execute_script(script, self) def force_focus(self): global_selenium.webdriver.ActionChains(self._parent).move_to_element(self).perform() def force_click(self): self._parent.execute_script("arguments[0].click();", self);
''' @date 2014-11-16 @author Hong-she Liang <starofrainnight@gmail.com> ''' # Import the global selenium unit, not our selenium . global_selenium = __import__('selenium') import types import time def set_attribute(self, name, value): value = value.replace(r"'", r"\'") # Replace all r"'" with r"\'" value = value.replace("\n", r"\n") value = value.replace("\r", r"\r") value = value.replace("\t", r"\t") script = "arguments[0].setAttribute('%s', '%s');" % (name, value) self._parent.execute_script(script, self) def force_focus(self): self._parent.execute_script("arguments[0].focus();", self); def force_click(self): self._parent.execute_script("arguments[0].click();", self);
Use javascript to force focus on an element, because the action chains seems take no effect!
Use javascript to force focus on an element, because the action chains seems take no effect!
Python
apache-2.0
starofrainnight/rabird.core,starofrainnight/rabird.auto
python
## Code Before: ''' @date 2014-11-16 @author Hong-she Liang <starofrainnight@gmail.com> ''' # Import the global selenium unit, not our selenium . global_selenium = __import__('selenium') import types import time def set_attribute(self, name, value): value = value.replace(r"'", r"\'") # Replace all r"'" with r"\'" value = value.replace("\n", r"\n") value = value.replace("\r", r"\r") value = value.replace("\t", r"\t") script = "arguments[0].setAttribute('%s', '%s')" % (name, value) self._parent.execute_script(script, self) def force_focus(self): global_selenium.webdriver.ActionChains(self._parent).move_to_element(self).perform() def force_click(self): self._parent.execute_script("arguments[0].click();", self); ## Instruction: Use javascript to force focus on an element, because the action chains seems take no effect! ## Code After: ''' @date 2014-11-16 @author Hong-she Liang <starofrainnight@gmail.com> ''' # Import the global selenium unit, not our selenium . global_selenium = __import__('selenium') import types import time def set_attribute(self, name, value): value = value.replace(r"'", r"\'") # Replace all r"'" with r"\'" value = value.replace("\n", r"\n") value = value.replace("\r", r"\r") value = value.replace("\t", r"\t") script = "arguments[0].setAttribute('%s', '%s');" % (name, value) self._parent.execute_script(script, self) def force_focus(self): self._parent.execute_script("arguments[0].focus();", self); def force_click(self): self._parent.execute_script("arguments[0].click();", self);
22bc802109d29dfceb02e8b26b695cdf6bad28f0
app/mailers/spree/supplier_mailer.rb
app/mailers/spree/supplier_mailer.rb
module Spree class SupplierMailer < Spree::BaseMailer default from: Spree::Config[:mails_from] def welcome(supplier_id) @supplier = Supplier.find supplier_id mail to: @supplier.email, subject: Spree.t('supplier_mailer.welcome.subject') end end end
module Spree class SupplierMailer < Spree::BaseMailer default from: Spree::Store.current.mail_from_address def welcome(supplier_id) @supplier = Supplier.find supplier_id mail to: @supplier.email, subject: Spree.t('supplier_mailer.welcome.subject') end end end
Replace outdated Spree::Config[:mails_from] with Spree::Store.current.mail_from_address
Replace outdated Spree::Config[:mails_from] with Spree::Store.current.mail_from_address https://github.com/spree/spree/pull/6097
Ruby
bsd-3-clause
spree-contrib/spree_drop_ship,boomerdigital/solidus_marketplace,firmanm/spree_drop_ship,firman/spree_drop_ship,pjar/spree_drop_ship,firmanm/spree_drop_ship,fiftin/spree_drop_ship,boomerdigital/solidus_marketplace,firmanm/spree_drop_ship,pjar/spree_drop_ship,fiftin/spree_drop_ship,pjar/spree_drop_ship,spree-contrib/spree_drop_ship,firman/spree_drop_ship,firman/spree_drop_ship,spree-contrib/spree_drop_ship,boomerdigital/solidus_marketplace,fiftin/spree_drop_ship
ruby
## Code Before: module Spree class SupplierMailer < Spree::BaseMailer default from: Spree::Config[:mails_from] def welcome(supplier_id) @supplier = Supplier.find supplier_id mail to: @supplier.email, subject: Spree.t('supplier_mailer.welcome.subject') end end end ## Instruction: Replace outdated Spree::Config[:mails_from] with Spree::Store.current.mail_from_address https://github.com/spree/spree/pull/6097 ## Code After: module Spree class SupplierMailer < Spree::BaseMailer default from: Spree::Store.current.mail_from_address def welcome(supplier_id) @supplier = Supplier.find supplier_id mail to: @supplier.email, subject: Spree.t('supplier_mailer.welcome.subject') end end end
075645fd4152f35579fff394e49ba77e67b70a24
middleware/halParser.js
middleware/halParser.js
module.exports = function (req, res, next) { try { var rawBody = req.body; var parsedBody = JSON.parse(rawBody); req.body = parsedBody; } catch (e) { console.trace('Exception while parsing body: ', req.body, e); req.body = {}; } next(); };
module.exports = function (req, res, next) { try { var rawBody = req.body; if (typeof rawBody !== 'object') { var parsedBody = JSON.parse(rawBody); req.body = parsedBody; } } catch (e) { console.trace('Exception while parsing body: ', req.body, e); req.body = {}; } next(); };
Fix bug in parsing empty request bodies
Fix bug in parsing empty request bodies Signed-off-by: shaisachs <47bd79f9420edf5d0991d1e2710179d4e040d480@ngpvan.com>
JavaScript
apache-2.0
NGPVAN/osdi-service,joshco/osdi-service
javascript
## Code Before: module.exports = function (req, res, next) { try { var rawBody = req.body; var parsedBody = JSON.parse(rawBody); req.body = parsedBody; } catch (e) { console.trace('Exception while parsing body: ', req.body, e); req.body = {}; } next(); }; ## Instruction: Fix bug in parsing empty request bodies Signed-off-by: shaisachs <47bd79f9420edf5d0991d1e2710179d4e040d480@ngpvan.com> ## Code After: module.exports = function (req, res, next) { try { var rawBody = req.body; if (typeof rawBody !== 'object') { var parsedBody = JSON.parse(rawBody); req.body = parsedBody; } } catch (e) { console.trace('Exception while parsing body: ', req.body, e); req.body = {}; } next(); };
5a55b23077d3de5d71c4ad86716ef37f34447025
app/validators/salary_validator.rb
app/validators/salary_validator.rb
class SalaryValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) record.errors[attribute] << (options[:message] || "cannot be less than starting salary") unless valid_salary_fields?(record) end def valid_salary_fields?(record) (record.from_salary < record.to_salary) if !record.to_salary.blank? end end
class SalaryValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) record.errors[attribute] << (options[:message] || "cannot be less than starting salary") unless valid_salary_fields?(record) end def valid_salary_fields?(record) return true if record.to_salary.blank? record.from_salary < record.to_salary end end
Return true if to_salary is blank
Return true if to_salary is blank
Ruby
mit
mena-devs/tilde,mena-devs/tilde,mena-devs/tilde,mena-devs/tilde
ruby
## Code Before: class SalaryValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) record.errors[attribute] << (options[:message] || "cannot be less than starting salary") unless valid_salary_fields?(record) end def valid_salary_fields?(record) (record.from_salary < record.to_salary) if !record.to_salary.blank? end end ## Instruction: Return true if to_salary is blank ## Code After: class SalaryValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) record.errors[attribute] << (options[:message] || "cannot be less than starting salary") unless valid_salary_fields?(record) end def valid_salary_fields?(record) return true if record.to_salary.blank? record.from_salary < record.to_salary end end
65e6c0e77a0d4d78504aafff31cfe33c34cfa021
src/DependencyInjection/UmpirskyI18nRoutingExtension.php
src/DependencyInjection/UmpirskyI18nRoutingExtension.php
<?php namespace Umpirsky\I18nRoutingBundle\DependencyInjection; use Symfony\Component\Config\Definition\Processor; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpKernel\DependencyInjection\Extension; class UmpirskyI18nRoutingExtension extends Extension { public function load(array $configs, ContainerBuilder $container) { $processor = new Processor(); $config = $processor->processConfiguration(new Configuration(), $configs); $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.xml'); $container->getDefinition('umpirsky_i18n_routing.routing.loader.i18n_route_loader')->addArgument( new Reference(sprintf('umpirsky_i18n_routing.routing.strategy.%s_strategy', $config['strategy'])) ); $container->setParameter('umpirsky_i18n_routing.route_name_suffix', $config['route_name_suffix']); $container->setParameter('umpirsky_i18n_routing.default_locale', $config['default_locale']); $container->setParameter('umpirsky_i18n_routing.locales', $config['locales']); $container->setParameter('umpirsky_i18n_routing.strategy', $config['strategy']); } }
<?php namespace Umpirsky\I18nRoutingBundle\DependencyInjection; use Symfony\Component\Config\Definition\Processor; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpKernel\DependencyInjection\Extension; class UmpirskyI18nRoutingExtension extends Extension { public function load(array $configs, ContainerBuilder $container) { $processor = new Processor(); $config = $processor->processConfiguration(new Configuration(), $configs); $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.xml'); $container->getDefinition('umpirsky_i18n_routing.routing.loader.i18n_route_loader')->addArgument( new Reference(sprintf('umpirsky_i18n_routing.routing.strategy.%s_strategy', $config['strategy'])) ); $container->setParameter('umpirsky_i18n_routing.route_name_suffix', $config['route_name_suffix']); $container->setParameter('umpirsky_i18n_routing.default_locale', $config['default_locale']); if ('prefix_except_default' === $config['strategy']) { $config['locales'] = array_diff($config['locales'], [$config['default_locale']]); } $container->setParameter('umpirsky_i18n_routing.locales', $config['locales']); $container->setParameter('umpirsky_i18n_routing.strategy', $config['strategy']); } }
Remove default locale for prefix_except_default strategy
Remove default locale for prefix_except_default strategy
PHP
mit
umpirsky/UmpirskyI18nRoutingBundle
php
## Code Before: <?php namespace Umpirsky\I18nRoutingBundle\DependencyInjection; use Symfony\Component\Config\Definition\Processor; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpKernel\DependencyInjection\Extension; class UmpirskyI18nRoutingExtension extends Extension { public function load(array $configs, ContainerBuilder $container) { $processor = new Processor(); $config = $processor->processConfiguration(new Configuration(), $configs); $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.xml'); $container->getDefinition('umpirsky_i18n_routing.routing.loader.i18n_route_loader')->addArgument( new Reference(sprintf('umpirsky_i18n_routing.routing.strategy.%s_strategy', $config['strategy'])) ); $container->setParameter('umpirsky_i18n_routing.route_name_suffix', $config['route_name_suffix']); $container->setParameter('umpirsky_i18n_routing.default_locale', $config['default_locale']); $container->setParameter('umpirsky_i18n_routing.locales', $config['locales']); $container->setParameter('umpirsky_i18n_routing.strategy', $config['strategy']); } } ## Instruction: Remove default locale for prefix_except_default strategy ## Code After: <?php namespace Umpirsky\I18nRoutingBundle\DependencyInjection; use Symfony\Component\Config\Definition\Processor; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpKernel\DependencyInjection\Extension; class UmpirskyI18nRoutingExtension extends Extension { public function load(array $configs, ContainerBuilder $container) { $processor = new Processor(); $config = $processor->processConfiguration(new Configuration(), $configs); $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.xml'); $container->getDefinition('umpirsky_i18n_routing.routing.loader.i18n_route_loader')->addArgument( new Reference(sprintf('umpirsky_i18n_routing.routing.strategy.%s_strategy', $config['strategy'])) ); $container->setParameter('umpirsky_i18n_routing.route_name_suffix', $config['route_name_suffix']); $container->setParameter('umpirsky_i18n_routing.default_locale', $config['default_locale']); if ('prefix_except_default' === $config['strategy']) { $config['locales'] = array_diff($config['locales'], [$config['default_locale']]); } $container->setParameter('umpirsky_i18n_routing.locales', $config['locales']); $container->setParameter('umpirsky_i18n_routing.strategy', $config['strategy']); } }
d54ad8c46d41e897be90a8aa62cfcc6a20e8cf3b
apps/explorer/templates/explorer/_pixels_distributions.js
apps/explorer/templates/explorer/_pixels_distributions.js
{% load i18n %} <script src="//www.gstatic.com/charts/loader.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawCharts); function drawCharts() { var valuesChart = new google.visualization.Histogram(document.getElementById('values-histogram')); var scoresChart = new google.visualization.Histogram(document.getElementById('scores-histogram')); $.get('{{ url_values }}', function (data) { valuesChart.draw( new google.visualization.DataTable(data), { colors: ['#bd2222'], height: 300, legend: { position: 'none' }, title: '{% trans "Values" %}', } ); }); $.get('{{ url_scores }}', function (data) { scoresChart.draw( new google.visualization.DataTable(data), { height: 300, legend: { position: 'none' }, title: '{% trans "Quality scores" %}', } ); }); } </script>
{% load i18n %} <script src="//www.gstatic.com/charts/loader.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawCharts); function drawCharts() { var valuesChart = new google.visualization.Histogram(document.getElementById('values-histogram')); var scoresChart = new google.visualization.Histogram(document.getElementById('scores-histogram')); $.get('{{ url_values }}', function (data) { valuesChart.draw( new google.visualization.DataTable(data), { colors: ['#bd2222'], height: 300, legend: { position: 'none' }, title: '{% trans "Values" %}', } ); }).fail(function () { document.getElementById('values-histogram').textContent = '{% trans "An error occured while loading this chart." %}'; }); $.get('{{ url_scores }}', function (data) { scoresChart.draw( new google.visualization.DataTable(data), { height: 300, legend: { position: 'none' }, title: '{% trans "Quality scores" %}', } ); }).fail(function () { document.getElementById('scores-histogram').textContent = '{% trans "An error occured while loading this chart." %}'; }); } </script>
Handle error when chart does not load
Handle error when chart does not load
JavaScript
bsd-3-clause
Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel
javascript
## Code Before: {% load i18n %} <script src="//www.gstatic.com/charts/loader.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawCharts); function drawCharts() { var valuesChart = new google.visualization.Histogram(document.getElementById('values-histogram')); var scoresChart = new google.visualization.Histogram(document.getElementById('scores-histogram')); $.get('{{ url_values }}', function (data) { valuesChart.draw( new google.visualization.DataTable(data), { colors: ['#bd2222'], height: 300, legend: { position: 'none' }, title: '{% trans "Values" %}', } ); }); $.get('{{ url_scores }}', function (data) { scoresChart.draw( new google.visualization.DataTable(data), { height: 300, legend: { position: 'none' }, title: '{% trans "Quality scores" %}', } ); }); } </script> ## Instruction: Handle error when chart does not load ## Code After: {% load i18n %} <script src="//www.gstatic.com/charts/loader.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawCharts); function drawCharts() { var valuesChart = new google.visualization.Histogram(document.getElementById('values-histogram')); var scoresChart = new google.visualization.Histogram(document.getElementById('scores-histogram')); $.get('{{ url_values }}', function (data) { valuesChart.draw( new google.visualization.DataTable(data), { colors: ['#bd2222'], height: 300, legend: { position: 'none' }, title: '{% trans "Values" %}', } ); }).fail(function () { document.getElementById('values-histogram').textContent = '{% trans "An error occured while loading this chart." %}'; }); $.get('{{ url_scores }}', function (data) { scoresChart.draw( new google.visualization.DataTable(data), { height: 300, legend: { position: 'none' }, title: '{% trans "Quality scores" %}', } ); }).fail(function () { document.getElementById('scores-histogram').textContent = '{% trans "An error occured while loading this chart." %}'; }); } </script>
0910b2e959b74d623de6c1440e7848f199a3a011
config/routes.rb
config/routes.rb
Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end
Rails.application.routes.draw do resource :users, only: :show resource :badges, only: :show end
Add route for user show
Add route for user show
Ruby
mit
ECGameJam17/Greenify,pholls/Greenify,ECGameJam17/Greenify,pholls/Greenify,ECGameJam17/Greenify,pholls/Greenify
ruby
## Code Before: Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end ## Instruction: Add route for user show ## Code After: Rails.application.routes.draw do resource :users, only: :show resource :badges, only: :show end
989e1eb99f27598f93ac2c8a34ed38e1566f49dc
test/MC/X86/intel-syntax-print.ll
test/MC/X86/intel-syntax-print.ll
; RUN: llc -x86-asm-syntax=intel < %s | FileCheck %s -check-prefix=INTEL ; RUN: llc -x86-asm-syntax=att < %s | FileCheck %s -check-prefix=ATT ; INTEL: .intel_syntax noprefix ; ATT-NOT: .intel_syntax noprefix define i32 @test() { entry: ret i32 0 }
; RUN: llc -x86-asm-syntax=intel < %s | FileCheck %s -check-prefix=INTEL ; RUN: llc -x86-asm-syntax=att < %s | FileCheck %s -check-prefix=ATT ; INTEL: .intel_syntax noprefix ; ATT-NOT: .intel_syntax noprefix target triple = "x86_64-unknown-unknown" define i32 @test() { entry: ret i32 0 }
Fix test from r242886 to use the right triple.
Fix test from r242886 to use the right triple. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@242889 91177308-0d34-0410-b5e6-96231b3b80d8
LLVM
apache-2.0
GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm
llvm
## Code Before: ; RUN: llc -x86-asm-syntax=intel < %s | FileCheck %s -check-prefix=INTEL ; RUN: llc -x86-asm-syntax=att < %s | FileCheck %s -check-prefix=ATT ; INTEL: .intel_syntax noprefix ; ATT-NOT: .intel_syntax noprefix define i32 @test() { entry: ret i32 0 } ## Instruction: Fix test from r242886 to use the right triple. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@242889 91177308-0d34-0410-b5e6-96231b3b80d8 ## Code After: ; RUN: llc -x86-asm-syntax=intel < %s | FileCheck %s -check-prefix=INTEL ; RUN: llc -x86-asm-syntax=att < %s | FileCheck %s -check-prefix=ATT ; INTEL: .intel_syntax noprefix ; ATT-NOT: .intel_syntax noprefix target triple = "x86_64-unknown-unknown" define i32 @test() { entry: ret i32 0 }
1820227a189f225db16966c26cc6fdf194dc1903
modules/base/files/usr/local/sbin/rotate-tarballs.sh
modules/base/files/usr/local/sbin/rotate-tarballs.sh
find /srv/backup-data -not \( -path /srv/backup-data/lost+found -prune \) -type f -mtime +30 -delete
find /srv/backup-data -not \( -path /srv/backup-data/lost+found -prune \) -type f -mtime +30 -exec rm {} +
Switch from `-delete` to a `-exec`
Switch from `-delete` to a `-exec` This commit changes the `find` command we run on a cron to switch from `-delete` to `exec rm {} +`. The reasoning for this is that using `-delete` results in an error: `find: The -delete action atomatically turns on -depth, but -prune does nothing when -depth is in effect. If you want to carry on anyway, just explicitly use the -depth option`
Shell
mit
alphagov/govuk_offsitebackups-puppet,alphagov/govuk_offsitebackups-puppet
shell
## Code Before: find /srv/backup-data -not \( -path /srv/backup-data/lost+found -prune \) -type f -mtime +30 -delete ## Instruction: Switch from `-delete` to a `-exec` This commit changes the `find` command we run on a cron to switch from `-delete` to `exec rm {} +`. The reasoning for this is that using `-delete` results in an error: `find: The -delete action atomatically turns on -depth, but -prune does nothing when -depth is in effect. If you want to carry on anyway, just explicitly use the -depth option` ## Code After: find /srv/backup-data -not \( -path /srv/backup-data/lost+found -prune \) -type f -mtime +30 -exec rm {} +
5a6b2785bcb887c6980556b6b06b56e0ad3bf97f
src/app/browser-window/browser-window.component.css
src/app/browser-window/browser-window.component.css
.frame { border: 1px solid #dddddd; padding: 10px; margin-top: -6px; width: 498px; }
.frame { border: 1px solid #dddddd; padding: 10px; margin-top: -6px; width: 496px; background-color: #fff; }
Add white background for the browser-window
Add white background for the browser-window
CSS
apache-2.0
nycJSorg/angular-presentation,nycJSorg/angular-presentation,nycJSorg/angular-presentation
css
## Code Before: .frame { border: 1px solid #dddddd; padding: 10px; margin-top: -6px; width: 498px; } ## Instruction: Add white background for the browser-window ## Code After: .frame { border: 1px solid #dddddd; padding: 10px; margin-top: -6px; width: 496px; background-color: #fff; }
bbd88e45c8b89a926e7e66b782fa7949caa8cf15
requirements/build.txt
requirements/build.txt
sphinx sphinx-intl sphinx-rtd-theme pex wheel
sphinx sphinx-intl sphinx-rtd-theme pex wheel setuptools<20.11,>=2.2 # needed to get pex working
Use a version of setuptools compatible with pex.
Use a version of setuptools compatible with pex.
Text
mit
aronasorman/kolibri,indirectlylit/kolibri,lyw07/kolibri,DXCanas/kolibri,aronasorman/kolibri,aronasorman/kolibri,christianmemije/kolibri,indirectlylit/kolibri,aronasorman/kolibri,christianmemije/kolibri,rtibbles/kolibri,rtibbles/kolibri,indirectlylit/kolibri,lyw07/kolibri,benjaoming/kolibri,jonboiser/kolibri,mrpau/kolibri,jonboiser/kolibri,learningequality/kolibri,learningequality/kolibri,lyw07/kolibri,benjaoming/kolibri,jayoshih/kolibri,DXCanas/kolibri,learningequality/kolibri,benjaoming/kolibri,jayoshih/kolibri,mrpau/kolibri,jonboiser/kolibri,benjaoming/kolibri,christianmemije/kolibri,mrpau/kolibri,MingDai/kolibri,rtibbles/kolibri,christianmemije/kolibri,jayoshih/kolibri,mrpau/kolibri,rtibbles/kolibri,DXCanas/kolibri,lyw07/kolibri,DXCanas/kolibri,MingDai/kolibri,jayoshih/kolibri,MingDai/kolibri,MingDai/kolibri,jonboiser/kolibri,learningequality/kolibri,indirectlylit/kolibri
text
## Code Before: sphinx sphinx-intl sphinx-rtd-theme pex wheel ## Instruction: Use a version of setuptools compatible with pex. ## Code After: sphinx sphinx-intl sphinx-rtd-theme pex wheel setuptools<20.11,>=2.2 # needed to get pex working
7754edb8947c8f1e8509d9bac058bb9754915eb6
app/views/index.js
app/views/index.js
import Ember from 'ember'; import config from '../config/environment'; export default Ember.View.extend({ injectMarkup: function() { console.log(command); var content = Ember.$('#index-content').clone(); var source = $(this.$().children()[0]).clone(); content.find('#package-source-placeholder').replaceWith(source); var command = $(this.$().children()[1]).clone(); content.find('#package-source-command-placeholder').replaceWith(command); this.$().replaceWith(content); }.on('didInsertElement') });
import Ember from 'ember'; export default Ember.View.extend({ injectMarkup: function() { var content = Ember.$('#index-content').clone(); var source = Ember.$(this.$().children()[0]).clone(); content.find('#package-source-placeholder').replaceWith(source); var command = Ember.$(this.$().children()[1]).clone(); content.find('#package-source-command-placeholder').replaceWith(command); this.$().empty(); content.appendTo(this.$()); }.on('didInsertElement') });
Append content instead of replacing and clean up lint errors.
Append content instead of replacing and clean up lint errors.
JavaScript
apache-2.0
Stift/Klondike,jochenvangasse/Klondike,davidvmckay/Klondike,fhchina/Klondike,themotleyfool/Klondike,jochenvangasse/Klondike,fhchina/Klondike,themotleyfool/Klondike,themotleyfool/Klondike,davidvmckay/Klondike,jochenvangasse/Klondike,fhchina/Klondike,Stift/Klondike,davidvmckay/Klondike,Stift/Klondike
javascript
## Code Before: import Ember from 'ember'; import config from '../config/environment'; export default Ember.View.extend({ injectMarkup: function() { console.log(command); var content = Ember.$('#index-content').clone(); var source = $(this.$().children()[0]).clone(); content.find('#package-source-placeholder').replaceWith(source); var command = $(this.$().children()[1]).clone(); content.find('#package-source-command-placeholder').replaceWith(command); this.$().replaceWith(content); }.on('didInsertElement') }); ## Instruction: Append content instead of replacing and clean up lint errors. ## Code After: import Ember from 'ember'; export default Ember.View.extend({ injectMarkup: function() { var content = Ember.$('#index-content').clone(); var source = Ember.$(this.$().children()[0]).clone(); content.find('#package-source-placeholder').replaceWith(source); var command = Ember.$(this.$().children()[1]).clone(); content.find('#package-source-command-placeholder').replaceWith(command); this.$().empty(); content.appendTo(this.$()); }.on('didInsertElement') });
82243fadeb3a419e22b45e0b2226c64bd5e00de2
modules/mod_ginger_adlib/README.md
modules/mod_ginger_adlib/README.md
mod_ginger_adlib ================ This module offers integration between Zotonic and [Adlib](http://www.adlibsoft.nl). It is part of [Ginger](http://github.com/driebit/ginger). Features: * Full import of Adlib databases into Elasticsearch. * Template model for displaying Adlib data in Zotonic templates. Configuration ------------- In the admin, on the Modules page, enable the module and click the ‘Configure’ button to enter the URL to your Adlib API instance. Usage ----- ## Pulling data from the Adlib API Pull records from the Adlib API that have been changed since a moment in time (e.g., 1 week): ```erlang mod_ginger_adlib:pull_updates("-1 week", Context). ``` ## Search In your template: ```dtl {% with m.search[{adlib search="all" database="photo" pagelen=10}] as records %} {% for record in records %} {% with m.ginger_adlib[record] as record %} {{ record['object.title'] }} {# And other record properties #} {% endwith %}} {% endfor %} {% endwith %} ``` ## Models ### m.ginger_adlib
mod_ginger_adlib ================ This module offers integration between Zotonic and [Adlib](http://www.adlibsoft.nl). It is part of [Ginger](http://github.com/driebit/ginger). Features: * Full import of Adlib databases into Elasticsearch. * Template model for displaying Adlib data in Zotonic templates. Configuration ------------- In the admin, on the Modules page, enable the module and click the ‘Configure’ button to enter the URL to your Adlib API instance. Usage ----- ## Pulling data from the Adlib API Pull records from the Adlib API that have been changed since a moment in time (e.g., 1 week): ```erlang mod_ginger_adlib:pull_updates("-1 week", Context). ``` Pull a single record from Adlib (where `collect` is the Adlib database and `123` the Adlib priref): ```erlang mod_ginger_adlib:pull_record(<<"collect">>, 123, Context). ``` ## Search In your template: ```dtl {% with m.search[{adlib search="all" database="photo" pagelen=10}] as records %} {% for record in records %} {% with m.ginger_adlib[record] as record %} {{ record['object.title'] }} {# And other record properties #} {% endwith %}} {% endfor %} {% endwith %} ``` ## Models ### m.ginger_adlib
Document how to pull a single record
[doc] Document how to pull a single record
Markdown
apache-2.0
driebit/ginger,driebit/ginger,driebit/ginger
markdown
## Code Before: mod_ginger_adlib ================ This module offers integration between Zotonic and [Adlib](http://www.adlibsoft.nl). It is part of [Ginger](http://github.com/driebit/ginger). Features: * Full import of Adlib databases into Elasticsearch. * Template model for displaying Adlib data in Zotonic templates. Configuration ------------- In the admin, on the Modules page, enable the module and click the ‘Configure’ button to enter the URL to your Adlib API instance. Usage ----- ## Pulling data from the Adlib API Pull records from the Adlib API that have been changed since a moment in time (e.g., 1 week): ```erlang mod_ginger_adlib:pull_updates("-1 week", Context). ``` ## Search In your template: ```dtl {% with m.search[{adlib search="all" database="photo" pagelen=10}] as records %} {% for record in records %} {% with m.ginger_adlib[record] as record %} {{ record['object.title'] }} {# And other record properties #} {% endwith %}} {% endfor %} {% endwith %} ``` ## Models ### m.ginger_adlib ## Instruction: [doc] Document how to pull a single record ## Code After: mod_ginger_adlib ================ This module offers integration between Zotonic and [Adlib](http://www.adlibsoft.nl). It is part of [Ginger](http://github.com/driebit/ginger). Features: * Full import of Adlib databases into Elasticsearch. * Template model for displaying Adlib data in Zotonic templates. Configuration ------------- In the admin, on the Modules page, enable the module and click the ‘Configure’ button to enter the URL to your Adlib API instance. Usage ----- ## Pulling data from the Adlib API Pull records from the Adlib API that have been changed since a moment in time (e.g., 1 week): ```erlang mod_ginger_adlib:pull_updates("-1 week", Context). ``` Pull a single record from Adlib (where `collect` is the Adlib database and `123` the Adlib priref): ```erlang mod_ginger_adlib:pull_record(<<"collect">>, 123, Context). ``` ## Search In your template: ```dtl {% with m.search[{adlib search="all" database="photo" pagelen=10}] as records %} {% for record in records %} {% with m.ginger_adlib[record] as record %} {{ record['object.title'] }} {# And other record properties #} {% endwith %}} {% endfor %} {% endwith %} ``` ## Models ### m.ginger_adlib
8d1c4d0dcc81d32eed03bb2b436c00829cdf3e9c
README.rst
README.rst
gears-coffeescript ================== CoffeeScript_ compiler for Gears_. This package already includes the CoffeeScript source code for you, so you don't need to worry about installing it yourself. Installation ------------ Install ``gears-coffeescript`` with pip:: $ pip install gears-coffeescript Requirements ------------ ``gears-coffeescript`` requires node.js_ to be installed in your system. Usage ----- Add ``gears_coffeescript.CoffeeScriptCompiler`` to ``environment``'s compilers registry:: from gears_coffeescript import CoffeeScriptCompiler environment.compilers.register('.coffee', CoffeeScriptCompiler.as_handler()) If you use Gears in your Django project, add this code to its settings:: GEARS_COMPILERS = { '.coffee': 'gears_coffeescript.CoffeeScriptCompiler', } .. _CoffeeScript: http://coffeescript.org/ .. _Gears: https://github.com/gears/gears .. _node.js: http://nodejs.org/
gears-coffeescript ================== CoffeeScript_ compiler for Gears_. This package already includes the CoffeeScript source code for you, so you don't need to worry about installing it yourself. Bundled CoffeeScript version: **1.3.3** Installation ------------ Install ``gears-coffeescript`` with pip:: $ pip install gears-coffeescript Requirements ------------ ``gears-coffeescript`` requires node.js_ to be installed in your system. Usage ----- Add ``gears_coffeescript.CoffeeScriptCompiler`` to ``environment``'s compilers registry:: from gears_coffeescript import CoffeeScriptCompiler environment.compilers.register('.coffee', CoffeeScriptCompiler.as_handler()) If you use Gears in your Django project, add this code to its settings:: GEARS_COMPILERS = { '.coffee': 'gears_coffeescript.CoffeeScriptCompiler', } .. _CoffeeScript: http://coffeescript.org/ .. _Gears: https://github.com/gears/gears .. _node.js: http://nodejs.org/
Add bundled coffeescript version to readme
Add bundled coffeescript version to readme
reStructuredText
isc
gears/gears-coffeescript,gears/gears-coffeescript
restructuredtext
## Code Before: gears-coffeescript ================== CoffeeScript_ compiler for Gears_. This package already includes the CoffeeScript source code for you, so you don't need to worry about installing it yourself. Installation ------------ Install ``gears-coffeescript`` with pip:: $ pip install gears-coffeescript Requirements ------------ ``gears-coffeescript`` requires node.js_ to be installed in your system. Usage ----- Add ``gears_coffeescript.CoffeeScriptCompiler`` to ``environment``'s compilers registry:: from gears_coffeescript import CoffeeScriptCompiler environment.compilers.register('.coffee', CoffeeScriptCompiler.as_handler()) If you use Gears in your Django project, add this code to its settings:: GEARS_COMPILERS = { '.coffee': 'gears_coffeescript.CoffeeScriptCompiler', } .. _CoffeeScript: http://coffeescript.org/ .. _Gears: https://github.com/gears/gears .. _node.js: http://nodejs.org/ ## Instruction: Add bundled coffeescript version to readme ## Code After: gears-coffeescript ================== CoffeeScript_ compiler for Gears_. This package already includes the CoffeeScript source code for you, so you don't need to worry about installing it yourself. Bundled CoffeeScript version: **1.3.3** Installation ------------ Install ``gears-coffeescript`` with pip:: $ pip install gears-coffeescript Requirements ------------ ``gears-coffeescript`` requires node.js_ to be installed in your system. Usage ----- Add ``gears_coffeescript.CoffeeScriptCompiler`` to ``environment``'s compilers registry:: from gears_coffeescript import CoffeeScriptCompiler environment.compilers.register('.coffee', CoffeeScriptCompiler.as_handler()) If you use Gears in your Django project, add this code to its settings:: GEARS_COMPILERS = { '.coffee': 'gears_coffeescript.CoffeeScriptCompiler', } .. _CoffeeScript: http://coffeescript.org/ .. _Gears: https://github.com/gears/gears .. _node.js: http://nodejs.org/
a9b409cfd521eb14a77c53d56d80e26eb45b8288
decoder/src/fsalm/CMakeLists.txt
decoder/src/fsalm/CMakeLists.txt
include_directories("..") add_library( fsalm LM.cc ArpaReader.cc ) install(TARGETS fsalm DESTINATION lib) file(GLOB FSALM_HEADERS "*.hh") install(FILES ${FSALM_HEADERS} DESTINATION include/fsalm)
include_directories("..") add_executable(lm lm.cc) target_link_libraries(lm fsalm misc) add_library(fsalm LM.cc ArpaReader.cc) install(TARGETS lm DESTINATION bin) install(TARGETS fsalm DESTINATION lib) file(GLOB FSALM_HEADERS "*.hh") install(FILES ${FSALM_HEADERS} DESTINATION include/fsalm)
Build and install the lm tool for converting between ARPA and binary language models.
Build and install the lm tool for converting between ARPA and binary language models.
Text
bsd-3-clause
aalto-speech/AaltoASR,lingsoft/AaltoASR,lingsoft/AaltoASR,lingsoft/AaltoASR,phsmit/AaltoASR,phsmit/AaltoASR,aalto-speech/AaltoASR,phsmit/AaltoASR,aalto-speech/AaltoASR,lingsoft/AaltoASR,phsmit/AaltoASR,aalto-speech/AaltoASR,lingsoft/AaltoASR,aalto-speech/AaltoASR
text
## Code Before: include_directories("..") add_library( fsalm LM.cc ArpaReader.cc ) install(TARGETS fsalm DESTINATION lib) file(GLOB FSALM_HEADERS "*.hh") install(FILES ${FSALM_HEADERS} DESTINATION include/fsalm) ## Instruction: Build and install the lm tool for converting between ARPA and binary language models. ## Code After: include_directories("..") add_executable(lm lm.cc) target_link_libraries(lm fsalm misc) add_library(fsalm LM.cc ArpaReader.cc) install(TARGETS lm DESTINATION bin) install(TARGETS fsalm DESTINATION lib) file(GLOB FSALM_HEADERS "*.hh") install(FILES ${FSALM_HEADERS} DESTINATION include/fsalm)
8d5803aabd544495e631f466ca0a0272118e6bb7
Casks/alfred.rb
Casks/alfred.rb
cask :v1 => 'alfred' do version '2.7.2_400' sha256 '1d83ae18e99869d981dcbcc74a5ce0333bbf9d528cc0c8fa5e48bb74f756eaf1' url "https://cachefly.alfredapp.com/Alfred_#{version}.zip" name 'Alfred' homepage 'http://www.alfredapp.com/' license :freemium app 'Alfred 2.app' app 'Alfred 2.app/Contents/Preferences/Alfred Preferences.app' postflight do suppress_move_to_applications :key => 'suppressMoveToApplications' end uninstall :quit => 'com.runningwithcrayons.Alfred-2' zap :delete => [ '~/Library/Application Support/Alfred 2', '~/Library/Caches/com.runningwithcrayons.Alfred-2', '~/Library/Caches/com.runningwithcrayons.Alfred-Preferences', '~/Library/Preferences/com.runningwithcrayons.Alfred-2.plist', '~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences.plist', '~/Library/Saved Application State/com.runningwithcrayons.Alfred-Preferences.savedState' ] end
cask :v1 => 'alfred' do version '2.7.2_407' sha256 '303f4a0f7965d20e8ca86408f120c3dc01fcd13f5379aab2f4d7ef4e3f8d07a9' url "https://cachefly.alfredapp.com/Alfred_#{version}.zip" name 'Alfred' homepage 'http://www.alfredapp.com/' license :freemium app 'Alfred 2.app' app 'Alfred 2.app/Contents/Preferences/Alfred Preferences.app' postflight do suppress_move_to_applications :key => 'suppressMoveToApplications' end uninstall :quit => 'com.runningwithcrayons.Alfred-2' zap :delete => [ '~/Library/Application Support/Alfred 2', '~/Library/Caches/com.runningwithcrayons.Alfred-2', '~/Library/Caches/com.runningwithcrayons.Alfred-Preferences', '~/Library/Preferences/com.runningwithcrayons.Alfred-2.plist', '~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences.plist', '~/Library/Saved Application State/com.runningwithcrayons.Alfred-Preferences.savedState' ] end
Update Alfred to 2.7.2 (407).
Update Alfred to 2.7.2 (407).
Ruby
bsd-2-clause
tsparber/homebrew-cask,hanxue/caskroom,mingzhi22/homebrew-cask,esebastian/homebrew-cask,phpwutz/homebrew-cask,royalwang/homebrew-cask,xcezx/homebrew-cask,boydj/homebrew-cask,bcomnes/homebrew-cask,mwek/homebrew-cask,stephenwade/homebrew-cask,anbotero/homebrew-cask,0xadada/homebrew-cask,mattrobenolt/homebrew-cask,imgarylai/homebrew-cask,cfillion/homebrew-cask,wastrachan/homebrew-cask,jalaziz/homebrew-cask,xtian/homebrew-cask,kirikiriyamama/homebrew-cask,slack4u/homebrew-cask,winkelsdorf/homebrew-cask,antogg/homebrew-cask,chino/homebrew-cask,zmwangx/homebrew-cask,stonehippo/homebrew-cask,wKovacs64/homebrew-cask,JikkuJose/homebrew-cask,casidiablo/homebrew-cask,tangestani/homebrew-cask,perfide/homebrew-cask,mattrobenolt/homebrew-cask,cblecker/homebrew-cask,otaran/homebrew-cask,skyyuan/homebrew-cask,ksato9700/homebrew-cask,jellyfishcoder/homebrew-cask,mindriot101/homebrew-cask,mahori/homebrew-cask,nysthee/homebrew-cask,norio-nomura/homebrew-cask,xakraz/homebrew-cask,coeligena/homebrew-customized,zmwangx/homebrew-cask,ninjahoahong/homebrew-cask,nathanielvarona/homebrew-cask,christophermanning/homebrew-cask,hakamadare/homebrew-cask,shonjir/homebrew-cask,asbachb/homebrew-cask,dwkns/homebrew-cask,tedbundyjr/homebrew-cask,cprecioso/homebrew-cask,MatzFan/homebrew-cask,dictcp/homebrew-cask,KosherBacon/homebrew-cask,chadcatlett/caskroom-homebrew-cask,bosr/homebrew-cask,tarwich/homebrew-cask,hovancik/homebrew-cask,jayshao/homebrew-cask,6uclz1/homebrew-cask,samdoran/homebrew-cask,exherb/homebrew-cask,jeroenj/homebrew-cask,kingthorin/homebrew-cask,Amorymeltzer/homebrew-cask,johndbritton/homebrew-cask,hristozov/homebrew-cask,diogodamiani/homebrew-cask,kievechua/homebrew-cask,fly19890211/homebrew-cask,shonjir/homebrew-cask,yutarody/homebrew-cask,Ngrd/homebrew-cask,FredLackeyOfficial/homebrew-cask,dwihn0r/homebrew-cask,moimikey/homebrew-cask,lantrix/homebrew-cask,tangestani/homebrew-cask,franklouwers/homebrew-cask,Amorymeltzer/homebrew-cask,forevergenin/homebrew-cask,coneman/homebrew-cask,lumaxis/homebrew-cask,akiomik/homebrew-cask,Gasol/homebrew-cask,buo/homebrew-cask,kuno/homebrew-cask,dvdoliveira/homebrew-cask,kostasdizas/homebrew-cask,JikkuJose/homebrew-cask,sanchezm/homebrew-cask,riyad/homebrew-cask,crzrcn/homebrew-cask,shonjir/homebrew-cask,deiga/homebrew-cask,mathbunnyru/homebrew-cask,Amorymeltzer/homebrew-cask,Saklad5/homebrew-cask,vitorgalvao/homebrew-cask,yurikoles/homebrew-cask,tmoreira2020/homebrew,syscrusher/homebrew-cask,cedwardsmedia/homebrew-cask,forevergenin/homebrew-cask,victorpopkov/homebrew-cask,AnastasiaSulyagina/homebrew-cask,a-x-/homebrew-cask,moimikey/homebrew-cask,skyyuan/homebrew-cask,ebraminio/homebrew-cask,nathancahill/homebrew-cask,joshka/homebrew-cask,fkrone/homebrew-cask,JosephViolago/homebrew-cask,diogodamiani/homebrew-cask,bric3/homebrew-cask,coeligena/homebrew-customized,zeusdeux/homebrew-cask,retrography/homebrew-cask,singingwolfboy/homebrew-cask,gilesdring/homebrew-cask,jhowtan/homebrew-cask,onlynone/homebrew-cask,mkozjak/homebrew-cask,m3nu/homebrew-cask,dieterdemeyer/homebrew-cask,moogar0880/homebrew-cask,lifepillar/homebrew-cask,sebcode/homebrew-cask,gibsjose/homebrew-cask,deiga/homebrew-cask,CameronGarrett/homebrew-cask,cfillion/homebrew-cask,mazehall/homebrew-cask,toonetown/homebrew-cask,tjnycum/homebrew-cask,Saklad5/homebrew-cask,elyscape/homebrew-cask,githubutilities/homebrew-cask,sanyer/homebrew-cask,lvicentesanchez/homebrew-cask,Labutin/homebrew-cask,nickpellant/homebrew-cask,claui/homebrew-cask,zerrot/homebrew-cask,julionc/homebrew-cask,joshka/homebrew-cask,ftiff/homebrew-cask,larseggert/homebrew-cask,vin047/homebrew-cask,lucasmezencio/homebrew-cask,puffdad/homebrew-cask,chrisRidgers/homebrew-cask,MoOx/homebrew-cask,sebcode/homebrew-cask,muan/homebrew-cask,larseggert/homebrew-cask,tedbundyjr/homebrew-cask,mlocher/homebrew-cask,leipert/homebrew-cask,fanquake/homebrew-cask,christophermanning/homebrew-cask,scottsuch/homebrew-cask,MerelyAPseudonym/homebrew-cask,xtian/homebrew-cask,mwean/homebrew-cask,kiliankoe/homebrew-cask,kingthorin/homebrew-cask,qbmiller/homebrew-cask,nrlquaker/homebrew-cask,imgarylai/homebrew-cask,mariusbutuc/homebrew-cask,nysthee/homebrew-cask,jonathanwiesel/homebrew-cask,esebastian/homebrew-cask,ebraminio/homebrew-cask,singingwolfboy/homebrew-cask,winkelsdorf/homebrew-cask,sjackman/homebrew-cask,goxberry/homebrew-cask,kkdd/homebrew-cask,adriweb/homebrew-cask,paour/homebrew-cask,Ibuprofen/homebrew-cask,muan/homebrew-cask,corbt/homebrew-cask,deanmorin/homebrew-cask,MerelyAPseudonym/homebrew-cask,taherio/homebrew-cask,feigaochn/homebrew-cask,artdevjs/homebrew-cask,chrisfinazzo/homebrew-cask,fly19890211/homebrew-cask,JoelLarson/homebrew-cask,gerrypower/homebrew-cask,remko/homebrew-cask,guylabs/homebrew-cask,amatos/homebrew-cask,githubutilities/homebrew-cask,aguynamedryan/homebrew-cask,sohtsuka/homebrew-cask,ddm/homebrew-cask,stevehedrick/homebrew-cask,yumitsu/homebrew-cask,aguynamedryan/homebrew-cask,daften/homebrew-cask,nathansgreen/homebrew-cask,rickychilcott/homebrew-cask,leipert/homebrew-cask,pacav69/homebrew-cask,m3nu/homebrew-cask,mkozjak/homebrew-cask,axodys/homebrew-cask,sscotth/homebrew-cask,mauricerkelly/homebrew-cask,guylabs/homebrew-cask,rubenerd/homebrew-cask,fharbe/homebrew-cask,ahundt/homebrew-cask,dictcp/homebrew-cask,Fedalto/homebrew-cask,jacobbednarz/homebrew-cask,slack4u/homebrew-cask,johan/homebrew-cask,jgarber623/homebrew-cask,bkono/homebrew-cask,sosedoff/homebrew-cask,mathbunnyru/homebrew-cask,samshadwell/homebrew-cask,n0ts/homebrew-cask,kongslund/homebrew-cask,yuhki50/homebrew-cask,inta/homebrew-cask,flaviocamilo/homebrew-cask,underyx/homebrew-cask,pinut/homebrew-cask,miccal/homebrew-cask,xyb/homebrew-cask,cobyism/homebrew-cask,Ibuprofen/homebrew-cask,mathbunnyru/homebrew-cask,danielbayley/homebrew-cask,kingthorin/homebrew-cask,robertgzr/homebrew-cask,norio-nomura/homebrew-cask,coeligena/homebrew-customized,zhuzihhhh/homebrew-cask,drostron/homebrew-cask,koenrh/homebrew-cask,doits/homebrew-cask,0rax/homebrew-cask,okket/homebrew-cask,miccal/homebrew-cask,yutarody/homebrew-cask,kesara/homebrew-cask,feniix/homebrew-cask,mchlrmrz/homebrew-cask,bdhess/homebrew-cask,ericbn/homebrew-cask,Bombenleger/homebrew-cask,mhubig/homebrew-cask,andrewdisley/homebrew-cask,lvicentesanchez/homebrew-cask,MircoT/homebrew-cask,faun/homebrew-cask,arronmabrey/homebrew-cask,inta/homebrew-cask,chino/homebrew-cask,rhendric/homebrew-cask,josa42/homebrew-cask,dustinblackman/homebrew-cask,tan9/homebrew-cask,remko/homebrew-cask,bosr/homebrew-cask,stephenwade/homebrew-cask,fanquake/homebrew-cask,renaudguerin/homebrew-cask,robertgzr/homebrew-cask,scottsuch/homebrew-cask,mjdescy/homebrew-cask,gyndav/homebrew-cask,opsdev-ws/homebrew-cask,dictcp/homebrew-cask,wickles/homebrew-cask,sscotth/homebrew-cask,shoichiaizawa/homebrew-cask,jconley/homebrew-cask,mhubig/homebrew-cask,scribblemaniac/homebrew-cask,linc01n/homebrew-cask,bric3/homebrew-cask,rajiv/homebrew-cask,shorshe/homebrew-cask,yurikoles/homebrew-cask,kiliankoe/homebrew-cask,lukeadams/homebrew-cask,shorshe/homebrew-cask,stephenwade/homebrew-cask,syscrusher/homebrew-cask,n8henrie/homebrew-cask,asins/homebrew-cask,samdoran/homebrew-cask,illusionfield/homebrew-cask,mchlrmrz/homebrew-cask,stevehedrick/homebrew-cask,andersonba/homebrew-cask,maxnordlund/homebrew-cask,afh/homebrew-cask,jpodlech/homebrew-cask,albertico/homebrew-cask,robbiethegeek/homebrew-cask,atsuyim/homebrew-cask,kpearson/homebrew-cask,julionc/homebrew-cask,nshemonsky/homebrew-cask,gerrymiller/homebrew-cask,dcondrey/homebrew-cask,sgnh/homebrew-cask,johnjelinek/homebrew-cask,yurrriq/homebrew-cask,hyuna917/homebrew-cask,adrianchia/homebrew-cask,zhuzihhhh/homebrew-cask,rogeriopradoj/homebrew-cask,Ephemera/homebrew-cask,codeurge/homebrew-cask,reitermarkus/homebrew-cask,neverfox/homebrew-cask,lcasey001/homebrew-cask,yumitsu/homebrew-cask,mlocher/homebrew-cask,boecko/homebrew-cask,lifepillar/homebrew-cask,shoichiaizawa/homebrew-cask,Ketouem/homebrew-cask,opsdev-ws/homebrew-cask,scottsuch/homebrew-cask,danielbayley/homebrew-cask,blainesch/homebrew-cask,miku/homebrew-cask,Ephemera/homebrew-cask,mgryszko/homebrew-cask,toonetown/homebrew-cask,ptb/homebrew-cask,boecko/homebrew-cask,johan/homebrew-cask,My2ndAngelic/homebrew-cask,doits/homebrew-cask,MichaelPei/homebrew-cask,jhowtan/homebrew-cask,lukasbestle/homebrew-cask,diguage/homebrew-cask,patresi/homebrew-cask,jpodlech/homebrew-cask,athrunsun/homebrew-cask,tan9/homebrew-cask,MisumiRize/homebrew-cask,lucasmezencio/homebrew-cask,Keloran/homebrew-cask,tolbkni/homebrew-cask,jasmas/homebrew-cask,cliffcotino/homebrew-cask,wmorin/homebrew-cask,pacav69/homebrew-cask,lukasbestle/homebrew-cask,ajbw/homebrew-cask,haha1903/homebrew-cask,JoelLarson/homebrew-cask,andyli/homebrew-cask,gyndav/homebrew-cask,guerrero/homebrew-cask,seanzxx/homebrew-cask,klane/homebrew-cask,ianyh/homebrew-cask,hanxue/caskroom,ksato9700/homebrew-cask,reelsense/homebrew-cask,kostasdizas/homebrew-cask,MircoT/homebrew-cask,mattrobenolt/homebrew-cask,pkq/homebrew-cask,nrlquaker/homebrew-cask,albertico/homebrew-cask,optikfluffel/homebrew-cask,cedwardsmedia/homebrew-cask,sanchezm/homebrew-cask,adrianchia/homebrew-cask,sjackman/homebrew-cask,paour/homebrew-cask,colindunn/homebrew-cask,inz/homebrew-cask,CameronGarrett/homebrew-cask,jaredsampson/homebrew-cask,nightscape/homebrew-cask,williamboman/homebrew-cask,mindriot101/homebrew-cask,jeroenseegers/homebrew-cask,tangestani/homebrew-cask,genewoo/homebrew-cask,gabrielizaias/homebrew-cask,Gasol/homebrew-cask,alebcay/homebrew-cask,tolbkni/homebrew-cask,reitermarkus/homebrew-cask,af/homebrew-cask,xyb/homebrew-cask,mishari/homebrew-cask,xakraz/homebrew-cask,wmorin/homebrew-cask,renaudguerin/homebrew-cask,FinalDes/homebrew-cask,blogabe/homebrew-cask,n0ts/homebrew-cask,wastrachan/homebrew-cask,gerrymiller/homebrew-cask,stigkj/homebrew-caskroom-cask,joshka/homebrew-cask,hanxue/caskroom,y00rb/homebrew-cask,helloIAmPau/homebrew-cask,gilesdring/homebrew-cask,malob/homebrew-cask,mwean/homebrew-cask,troyxmccall/homebrew-cask,n8henrie/homebrew-cask,tmoreira2020/homebrew,a1russell/homebrew-cask,ericbn/homebrew-cask,xyb/homebrew-cask,sohtsuka/homebrew-cask,lantrix/homebrew-cask,kamilboratynski/homebrew-cask,malob/homebrew-cask,afdnlw/homebrew-cask,d/homebrew-cask,troyxmccall/homebrew-cask,greg5green/homebrew-cask,alexg0/homebrew-cask,danielbayley/homebrew-cask,dcondrey/homebrew-cask,diguage/homebrew-cask,BahtiyarB/homebrew-cask,kassi/homebrew-cask,Ephemera/homebrew-cask,farmerchris/homebrew-cask,dieterdemeyer/homebrew-cask,samnung/homebrew-cask,janlugt/homebrew-cask,markthetech/homebrew-cask,bendoerr/homebrew-cask,optikfluffel/homebrew-cask,mwek/homebrew-cask,englishm/homebrew-cask,hovancik/homebrew-cask,deanmorin/homebrew-cask,SentinelWarren/homebrew-cask,a1russell/homebrew-cask,cliffcotino/homebrew-cask,usami-k/homebrew-cask,athrunsun/homebrew-cask,kassi/homebrew-cask,linc01n/homebrew-cask,tjt263/homebrew-cask,kesara/homebrew-cask,julionc/homebrew-cask,0xadada/homebrew-cask,neverfox/homebrew-cask,tjnycum/homebrew-cask,colindean/homebrew-cask,retbrown/homebrew-cask,yurrriq/homebrew-cask,mokagio/homebrew-cask,atsuyim/homebrew-cask,paulombcosta/homebrew-cask,sanyer/homebrew-cask,LaurentFough/homebrew-cask,jeroenseegers/homebrew-cask,samshadwell/homebrew-cask,mahori/homebrew-cask,renard/homebrew-cask,jen20/homebrew-cask,alexg0/homebrew-cask,mokagio/homebrew-cask,6uclz1/homebrew-cask,retbrown/homebrew-cask,kievechua/homebrew-cask,yurikoles/homebrew-cask,tyage/homebrew-cask,daften/homebrew-cask,SentinelWarren/homebrew-cask,drostron/homebrew-cask,moonboots/homebrew-cask,BenjaminHCCarr/homebrew-cask,akiomik/homebrew-cask,andersonba/homebrew-cask,seanzxx/homebrew-cask,cprecioso/homebrew-cask,stonehippo/homebrew-cask,howie/homebrew-cask,jalaziz/homebrew-cask,aktau/homebrew-cask,wickles/homebrew-cask,jasmas/homebrew-cask,asbachb/homebrew-cask,jeanregisser/homebrew-cask,alebcay/homebrew-cask,crzrcn/homebrew-cask,taherio/homebrew-cask,malford/homebrew-cask,mikem/homebrew-cask,moogar0880/homebrew-cask,riyad/homebrew-cask,adriweb/homebrew-cask,slnovak/homebrew-cask,aktau/homebrew-cask,cobyism/homebrew-cask,victorpopkov/homebrew-cask,MatzFan/homebrew-cask,tedski/homebrew-cask,yuhki50/homebrew-cask,robbiethegeek/homebrew-cask,malford/homebrew-cask,miku/homebrew-cask,morganestes/homebrew-cask,mariusbutuc/homebrew-cask,pablote/homebrew-cask,dvdoliveira/homebrew-cask,ksylvan/homebrew-cask,theoriginalgri/homebrew-cask,timsutton/homebrew-cask,LaurentFough/homebrew-cask,RJHsiao/homebrew-cask,xight/homebrew-cask,samnung/homebrew-cask,kTitan/homebrew-cask,tjt263/homebrew-cask,mjgardner/homebrew-cask,okket/homebrew-cask,jangalinski/homebrew-cask,ddm/homebrew-cask,elnappo/homebrew-cask,gyndav/homebrew-cask,rickychilcott/homebrew-cask,mjdescy/homebrew-cask,kTitan/homebrew-cask,napaxton/homebrew-cask,kesara/homebrew-cask,bcaceiro/homebrew-cask,ninjahoahong/homebrew-cask,mrmachine/homebrew-cask,anbotero/homebrew-cask,Ngrd/homebrew-cask,mjgardner/homebrew-cask,royalwang/homebrew-cask,jmeridth/homebrew-cask,kpearson/homebrew-cask,bcomnes/homebrew-cask,jalaziz/homebrew-cask,joschi/homebrew-cask,djakarta-trap/homebrew-myCask,arronmabrey/homebrew-cask,gurghet/homebrew-cask,rogeriopradoj/homebrew-cask,hellosky806/homebrew-cask,jpmat296/homebrew-cask,a-x-/homebrew-cask,howie/homebrew-cask,scribblemaniac/homebrew-cask,flaviocamilo/homebrew-cask,phpwutz/homebrew-cask,napaxton/homebrew-cask,FinalDes/homebrew-cask,thomanq/homebrew-cask,jacobbednarz/homebrew-cask,joschi/homebrew-cask,neverfox/homebrew-cask,thomanq/homebrew-cask,dustinblackman/homebrew-cask,scribblemaniac/homebrew-cask,antogg/homebrew-cask,a1russell/homebrew-cask,FranklinChen/homebrew-cask,franklouwers/homebrew-cask,jconley/homebrew-cask,kongslund/homebrew-cask,timsutton/homebrew-cask,andrewdisley/homebrew-cask,mjgardner/homebrew-cask,kirikiriyamama/homebrew-cask,perfide/homebrew-cask,afdnlw/homebrew-cask,shoichiaizawa/homebrew-cask,faun/homebrew-cask,zorosteven/homebrew-cask,paour/homebrew-cask,andrewdisley/homebrew-cask,seanorama/homebrew-cask,My2ndAngelic/homebrew-cask,Bombenleger/homebrew-cask,boydj/homebrew-cask,lumaxis/homebrew-cask,kronicd/homebrew-cask,mgryszko/homebrew-cask,uetchy/homebrew-cask,exherb/homebrew-cask,wuman/homebrew-cask,guerrero/homebrew-cask,johnjelinek/homebrew-cask,elnappo/homebrew-cask,johndbritton/homebrew-cask,squid314/homebrew-cask,winkelsdorf/homebrew-cask,rogeriopradoj/homebrew-cask,retrography/homebrew-cask,yutarody/homebrew-cask,d/homebrew-cask,brianshumate/homebrew-cask,bkono/homebrew-cask,caskroom/homebrew-cask,asins/homebrew-cask,devmynd/homebrew-cask,goxberry/homebrew-cask,jiashuw/homebrew-cask,thehunmonkgroup/homebrew-cask,AnastasiaSulyagina/homebrew-cask,coneman/homebrew-cask,rajiv/homebrew-cask,schneidmaster/homebrew-cask,nathancahill/homebrew-cask,vuquoctuan/homebrew-cask,casidiablo/homebrew-cask,vigosan/homebrew-cask,jaredsampson/homebrew-cask,dwkns/homebrew-cask,genewoo/homebrew-cask,RickWong/homebrew-cask,rhendric/homebrew-cask,josa42/homebrew-cask,stigkj/homebrew-caskroom-cask,hristozov/homebrew-cask,sosedoff/homebrew-cask,jedahan/homebrew-cask,dwihn0r/homebrew-cask,elyscape/homebrew-cask,brianshumate/homebrew-cask,buo/homebrew-cask,Keloran/homebrew-cask,englishm/homebrew-cask,BenjaminHCCarr/homebrew-cask,jen20/homebrew-cask,ldong/homebrew-cask,rubenerd/homebrew-cask,chuanxd/homebrew-cask,SamiHiltunen/homebrew-cask,mahori/homebrew-cask,colindunn/homebrew-cask,seanorama/homebrew-cask,adrianchia/homebrew-cask,bric3/homebrew-cask,christer155/homebrew-cask,zeusdeux/homebrew-cask,tsparber/homebrew-cask,kteru/homebrew-cask,blainesch/homebrew-cask,codeurge/homebrew-cask,jeroenj/homebrew-cask,BahtiyarB/homebrew-cask,colindean/homebrew-cask,illusionfield/homebrew-cask,nightscape/homebrew-cask,alebcay/homebrew-cask,pkq/homebrew-cask,leonmachadowilcox/homebrew-cask,jppelteret/homebrew-cask,vuquoctuan/homebrew-cask,skatsuta/homebrew-cask,Dremora/homebrew-cask,gmkey/homebrew-cask,blogabe/homebrew-cask,rajiv/homebrew-cask,antogg/homebrew-cask,ajbw/homebrew-cask,xcezx/homebrew-cask,kronicd/homebrew-cask,mazehall/homebrew-cask,moimikey/homebrew-cask,bendoerr/homebrew-cask,thii/homebrew-cask,kkdd/homebrew-cask,JosephViolago/homebrew-cask,vitorgalvao/homebrew-cask,giannitm/homebrew-cask,gmkey/homebrew-cask,alexg0/homebrew-cask,Dremora/homebrew-cask,zerrot/homebrew-cask,malob/homebrew-cask,nshemonsky/homebrew-cask,andyli/homebrew-cask,JacopKane/homebrew-cask,ywfwj2008/homebrew-cask,farmerchris/homebrew-cask,sgnh/homebrew-cask,esebastian/homebrew-cask,chadcatlett/caskroom-homebrew-cask,schneidmaster/homebrew-cask,jgarber623/homebrew-cask,santoshsahoo/homebrew-cask,gabrielizaias/homebrew-cask,markthetech/homebrew-cask,SamiHiltunen/homebrew-cask,ksylvan/homebrew-cask,kuno/homebrew-cask,wmorin/homebrew-cask,jpmat296/homebrew-cask,wuman/homebrew-cask,haha1903/homebrew-cask,morganestes/homebrew-cask,ayohrling/homebrew-cask,hellosky806/homebrew-cask,deiga/homebrew-cask,otaran/homebrew-cask,gurghet/homebrew-cask,thii/homebrew-cask,klane/homebrew-cask,josa42/homebrew-cask,ayohrling/homebrew-cask,ptb/homebrew-cask,jiashuw/homebrew-cask,devmynd/homebrew-cask,gibsjose/homebrew-cask,RickWong/homebrew-cask,gerrypower/homebrew-cask,chrisRidgers/homebrew-cask,y00rb/homebrew-cask,onlynone/homebrew-cask,stonehippo/homebrew-cask,mingzhi22/homebrew-cask,santoshsahoo/homebrew-cask,cblecker/homebrew-cask,fkrone/homebrew-cask,nickpellant/homebrew-cask,qbmiller/homebrew-cask,greg5green/homebrew-cask,kteru/homebrew-cask,thehunmonkgroup/homebrew-cask,wKovacs64/homebrew-cask,MoOx/homebrew-cask,ianyh/homebrew-cask,zorosteven/homebrew-cask,slnovak/homebrew-cask,leonmachadowilcox/homebrew-cask,xight/homebrew-cask,vigosan/homebrew-cask,FranklinChen/homebrew-cask,pinut/homebrew-cask,decrement/homebrew-cask,jellyfishcoder/homebrew-cask,KosherBacon/homebrew-cask,FredLackeyOfficial/homebrew-cask,0rax/homebrew-cask,reitermarkus/homebrew-cask,JosephViolago/homebrew-cask,moonboots/homebrew-cask,uetchy/homebrew-cask,feigaochn/homebrew-cask,ldong/homebrew-cask,bdhess/homebrew-cask,tedski/homebrew-cask,af/homebrew-cask,jawshooah/homebrew-cask,jayshao/homebrew-cask,MichaelPei/homebrew-cask,ahundt/homebrew-cask,bcaceiro/homebrew-cask,amatos/homebrew-cask,Fedalto/homebrew-cask,lcasey001/homebrew-cask,chrisfinazzo/homebrew-cask,jawshooah/homebrew-cask,optikfluffel/homebrew-cask,sscotth/homebrew-cask,joschi/homebrew-cask,ericbn/homebrew-cask,miguelfrde/homebrew-cask,sanyer/homebrew-cask,markhuber/homebrew-cask,pkq/homebrew-cask,Cottser/homebrew-cask,janlugt/homebrew-cask,djakarta-trap/homebrew-myCask,mikem/homebrew-cask,psibre/homebrew-cask,blogabe/homebrew-cask,maxnordlund/homebrew-cask,jangalinski/homebrew-cask,jbeagley52/homebrew-cask,hakamadare/homebrew-cask,pablote/homebrew-cask,christer155/homebrew-cask,jppelteret/homebrew-cask,hyuna917/homebrew-cask,feniix/homebrew-cask,ftiff/homebrew-cask,michelegera/homebrew-cask,giannitm/homebrew-cask,JacopKane/homebrew-cask,jgarber623/homebrew-cask,vin047/homebrew-cask,Labutin/homebrew-cask,jbeagley52/homebrew-cask,afh/homebrew-cask,timsutton/homebrew-cask,uetchy/homebrew-cask,axodys/homebrew-cask,Ketouem/homebrew-cask,singingwolfboy/homebrew-cask,renard/homebrew-cask,miccal/homebrew-cask,markhuber/homebrew-cask,claui/homebrew-cask,chuanxd/homebrew-cask,caskroom/homebrew-cask,13k/homebrew-cask,artdevjs/homebrew-cask,corbt/homebrew-cask,imgarylai/homebrew-cask,ywfwj2008/homebrew-cask,xight/homebrew-cask,jeanregisser/homebrew-cask,Cottser/homebrew-cask,skatsuta/homebrew-cask,koenrh/homebrew-cask,theoriginalgri/homebrew-cask,chrisfinazzo/homebrew-cask,cblecker/homebrew-cask,psibre/homebrew-cask,fharbe/homebrew-cask,squid314/homebrew-cask,nrlquaker/homebrew-cask,williamboman/homebrew-cask,underyx/homebrew-cask,reelsense/homebrew-cask,nathanielvarona/homebrew-cask,jedahan/homebrew-cask,tjnycum/homebrew-cask,claui/homebrew-cask,usami-k/homebrew-cask,mrmachine/homebrew-cask,paulombcosta/homebrew-cask,mchlrmrz/homebrew-cask,michelegera/homebrew-cask,JacopKane/homebrew-cask,m3nu/homebrew-cask,MisumiRize/homebrew-cask,RJHsiao/homebrew-cask,mishari/homebrew-cask,cobyism/homebrew-cask,puffdad/homebrew-cask,helloIAmPau/homebrew-cask,kamilboratynski/homebrew-cask,jonathanwiesel/homebrew-cask,inz/homebrew-cask,wickedsp1d3r/homebrew-cask,mauricerkelly/homebrew-cask,nathansgreen/homebrew-cask,BenjaminHCCarr/homebrew-cask,miguelfrde/homebrew-cask,13k/homebrew-cask,tyage/homebrew-cask,patresi/homebrew-cask,lukeadams/homebrew-cask,jmeridth/homebrew-cask,nathanielvarona/homebrew-cask,wickedsp1d3r/homebrew-cask,tarwich/homebrew-cask,decrement/homebrew-cask
ruby
## Code Before: cask :v1 => 'alfred' do version '2.7.2_400' sha256 '1d83ae18e99869d981dcbcc74a5ce0333bbf9d528cc0c8fa5e48bb74f756eaf1' url "https://cachefly.alfredapp.com/Alfred_#{version}.zip" name 'Alfred' homepage 'http://www.alfredapp.com/' license :freemium app 'Alfred 2.app' app 'Alfred 2.app/Contents/Preferences/Alfred Preferences.app' postflight do suppress_move_to_applications :key => 'suppressMoveToApplications' end uninstall :quit => 'com.runningwithcrayons.Alfred-2' zap :delete => [ '~/Library/Application Support/Alfred 2', '~/Library/Caches/com.runningwithcrayons.Alfred-2', '~/Library/Caches/com.runningwithcrayons.Alfred-Preferences', '~/Library/Preferences/com.runningwithcrayons.Alfred-2.plist', '~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences.plist', '~/Library/Saved Application State/com.runningwithcrayons.Alfred-Preferences.savedState' ] end ## Instruction: Update Alfred to 2.7.2 (407). ## Code After: cask :v1 => 'alfred' do version '2.7.2_407' sha256 '303f4a0f7965d20e8ca86408f120c3dc01fcd13f5379aab2f4d7ef4e3f8d07a9' url "https://cachefly.alfredapp.com/Alfred_#{version}.zip" name 'Alfred' homepage 'http://www.alfredapp.com/' license :freemium app 'Alfred 2.app' app 'Alfred 2.app/Contents/Preferences/Alfred Preferences.app' postflight do suppress_move_to_applications :key => 'suppressMoveToApplications' end uninstall :quit => 'com.runningwithcrayons.Alfred-2' zap :delete => [ '~/Library/Application Support/Alfred 2', '~/Library/Caches/com.runningwithcrayons.Alfred-2', '~/Library/Caches/com.runningwithcrayons.Alfred-Preferences', '~/Library/Preferences/com.runningwithcrayons.Alfred-2.plist', '~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences.plist', '~/Library/Saved Application State/com.runningwithcrayons.Alfred-Preferences.savedState' ] end
fc4862f1b795f70a4aa3446b680386574bb14037
app/views/canteens/_show_section.html.haml
app/views/canteens/_show_section.html.haml
%header.page-header - if @date > Time.zone.now.to_date.beginning_of_week = link_to canteen_path(@canteen, date: (@date - 1.day)), remote: true, 'data-push' => 'true', class: :prev do %span - if @date < (Time.zone.now.to_date + 2.days).end_of_week = link_to canteen_path(@canteen, date: (@date + 1.day)), remote: true, 'data-push' => 'true', class: :next do %span %h2.centered - if @date.to_date == Time.zone.now.to_date = "Today" - else = l @date.to_date, format: :with_weekday %ul.meals - if @meals.any? - @meals.group_by(&:category).each do |category, meals| %li %h3= category - meals.each do |meal| %p= meal.name - else %li %h3 Kein Angebot %p Leider liegen uns für diesen Tag keine Angebote vor.
%header.page-header = link_to canteen_path(@canteen, date: (@date - 1.day)), remote: true, 'data-push' => 'true', class: :prev do %span = link_to canteen_path(@canteen, date: (@date + 1.day)), remote: true, 'data-push' => 'true', class: :next do %span %h2.centered - if @date.to_date == Time.zone.now.to_date = "Today" - else = l @date.to_date, format: :with_weekday %ul.meals - if @meals.any? - @meals.group_by(&:category).each do |category, meals| %li %h3= category - meals.each do |meal| %p= meal.name - else %li %h3 Kein Angebot %p Leider liegen uns für diesen Tag keine Angebote vor.
Remove canteen view date limits
Remove canteen view date limits
Haml
agpl-3.0
openmensa/openmensa,openmensa/openmensa,openmensa/openmensa,chk1/openmensa,openmensa/openmensa,chk1/openmensa
haml
## Code Before: %header.page-header - if @date > Time.zone.now.to_date.beginning_of_week = link_to canteen_path(@canteen, date: (@date - 1.day)), remote: true, 'data-push' => 'true', class: :prev do %span - if @date < (Time.zone.now.to_date + 2.days).end_of_week = link_to canteen_path(@canteen, date: (@date + 1.day)), remote: true, 'data-push' => 'true', class: :next do %span %h2.centered - if @date.to_date == Time.zone.now.to_date = "Today" - else = l @date.to_date, format: :with_weekday %ul.meals - if @meals.any? - @meals.group_by(&:category).each do |category, meals| %li %h3= category - meals.each do |meal| %p= meal.name - else %li %h3 Kein Angebot %p Leider liegen uns für diesen Tag keine Angebote vor. ## Instruction: Remove canteen view date limits ## Code After: %header.page-header = link_to canteen_path(@canteen, date: (@date - 1.day)), remote: true, 'data-push' => 'true', class: :prev do %span = link_to canteen_path(@canteen, date: (@date + 1.day)), remote: true, 'data-push' => 'true', class: :next do %span %h2.centered - if @date.to_date == Time.zone.now.to_date = "Today" - else = l @date.to_date, format: :with_weekday %ul.meals - if @meals.any? - @meals.group_by(&:category).each do |category, meals| %li %h3= category - meals.each do |meal| %p= meal.name - else %li %h3 Kein Angebot %p Leider liegen uns für diesen Tag keine Angebote vor.
d84a485df7e796ce5f0c7f05aa4a6adcf6a0fd9c
tests/unit/initializers/ember-cli-uuid-test.js
tests/unit/initializers/ember-cli-uuid-test.js
import Ember from 'ember'; import DS from 'ember-data'; import EmberCliUuidInitializer from '../../../initializers/ember-cli-uuid'; import { module, test } from 'qunit'; let application; const regexIsUUID = /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i; module('Unit | Initializer | ember cli uuid', { beforeEach() { Ember.run(function() { application = Ember.Application.create(); application.deferReadiness(); }); } }); // Replace this with your real tests. test('The DS.Adapter.generateIdForRecord now returns proper UUIDs v4', function(assert) { EmberCliUuidInitializer.initialize(application); const adapter = new DS.Adapter(); const generateIdForRecord = adapter.generateIdForRecord(); assert.ok(regexIsUUID.test(generateIdForRecord)); });
import Ember from 'ember'; import DS from 'ember-data'; import EmberCliUuidInitializer from '../../../initializers/ember-cli-uuid'; import { module, test } from 'qunit'; let application; const regexIsUUID = /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i; module('Unit | Initializer | ember cli uuid', { beforeEach() { Ember.run(function() { application = Ember.Application.create(); application.deferReadiness(); }); } }); test('The DS.Adapter.generateIdForRecord now returns proper UUIDs v4', function(assert) { EmberCliUuidInitializer.initialize(application); const adapter = new DS.Adapter(); const generateIdForRecord = adapter.generateIdForRecord(); assert.ok(regexIsUUID.test(generateIdForRecord)); });
Remove blueprint comment in tests
Remove blueprint comment in tests
JavaScript
mit
thaume/ember-cli-uuid,thaume/ember-cli-uuid
javascript
## Code Before: import Ember from 'ember'; import DS from 'ember-data'; import EmberCliUuidInitializer from '../../../initializers/ember-cli-uuid'; import { module, test } from 'qunit'; let application; const regexIsUUID = /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i; module('Unit | Initializer | ember cli uuid', { beforeEach() { Ember.run(function() { application = Ember.Application.create(); application.deferReadiness(); }); } }); // Replace this with your real tests. test('The DS.Adapter.generateIdForRecord now returns proper UUIDs v4', function(assert) { EmberCliUuidInitializer.initialize(application); const adapter = new DS.Adapter(); const generateIdForRecord = adapter.generateIdForRecord(); assert.ok(regexIsUUID.test(generateIdForRecord)); }); ## Instruction: Remove blueprint comment in tests ## Code After: import Ember from 'ember'; import DS from 'ember-data'; import EmberCliUuidInitializer from '../../../initializers/ember-cli-uuid'; import { module, test } from 'qunit'; let application; const regexIsUUID = /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i; module('Unit | Initializer | ember cli uuid', { beforeEach() { Ember.run(function() { application = Ember.Application.create(); application.deferReadiness(); }); } }); test('The DS.Adapter.generateIdForRecord now returns proper UUIDs v4', function(assert) { EmberCliUuidInitializer.initialize(application); const adapter = new DS.Adapter(); const generateIdForRecord = adapter.generateIdForRecord(); assert.ok(regexIsUUID.test(generateIdForRecord)); });
4038434cfb68718d038be9d2d5c90ac174d83e27
extensions/vault/runtime/src/main/java/io/quarkus/vault/runtime/config/VaultConfigSourceProvider.java
extensions/vault/runtime/src/main/java/io/quarkus/vault/runtime/config/VaultConfigSourceProvider.java
package io.quarkus.vault.runtime.config; import java.util.Arrays; import org.eclipse.microprofile.config.spi.ConfigSource; import org.eclipse.microprofile.config.spi.ConfigSourceProvider; import org.jboss.logging.Logger; public class VaultConfigSourceProvider implements ConfigSourceProvider { private static final Logger log = Logger.getLogger(VaultConfigSourceProvider.class); private VaultBootstrapConfig vaultBootstrapConfig; public VaultConfigSourceProvider(VaultBootstrapConfig vaultBootstrapConfig) { this.vaultBootstrapConfig = vaultBootstrapConfig; } @Override public Iterable<ConfigSource> getConfigSources(ClassLoader forClassLoader) { return Arrays.asList(new VaultConfigSource(150, vaultBootstrapConfig)); } }
package io.quarkus.vault.runtime.config; import java.util.Arrays; import org.eclipse.microprofile.config.spi.ConfigSource; import org.eclipse.microprofile.config.spi.ConfigSourceProvider; import org.jboss.logging.Logger; public class VaultConfigSourceProvider implements ConfigSourceProvider { private static final Logger log = Logger.getLogger(VaultConfigSourceProvider.class); private VaultBootstrapConfig vaultBootstrapConfig; public VaultConfigSourceProvider(VaultBootstrapConfig vaultBootstrapConfig) { this.vaultBootstrapConfig = vaultBootstrapConfig; } @Override public Iterable<ConfigSource> getConfigSources(ClassLoader forClassLoader) { // 270 is higher than the file system or jar ordinals, but lower than env vars return Arrays.asList(new VaultConfigSource(270, vaultBootstrapConfig)); } }
Change ordinal from 150 to 270 in Vault config source
Change ordinal from 150 to 270 in Vault config source
Java
apache-2.0
quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus
java
## Code Before: package io.quarkus.vault.runtime.config; import java.util.Arrays; import org.eclipse.microprofile.config.spi.ConfigSource; import org.eclipse.microprofile.config.spi.ConfigSourceProvider; import org.jboss.logging.Logger; public class VaultConfigSourceProvider implements ConfigSourceProvider { private static final Logger log = Logger.getLogger(VaultConfigSourceProvider.class); private VaultBootstrapConfig vaultBootstrapConfig; public VaultConfigSourceProvider(VaultBootstrapConfig vaultBootstrapConfig) { this.vaultBootstrapConfig = vaultBootstrapConfig; } @Override public Iterable<ConfigSource> getConfigSources(ClassLoader forClassLoader) { return Arrays.asList(new VaultConfigSource(150, vaultBootstrapConfig)); } } ## Instruction: Change ordinal from 150 to 270 in Vault config source ## Code After: package io.quarkus.vault.runtime.config; import java.util.Arrays; import org.eclipse.microprofile.config.spi.ConfigSource; import org.eclipse.microprofile.config.spi.ConfigSourceProvider; import org.jboss.logging.Logger; public class VaultConfigSourceProvider implements ConfigSourceProvider { private static final Logger log = Logger.getLogger(VaultConfigSourceProvider.class); private VaultBootstrapConfig vaultBootstrapConfig; public VaultConfigSourceProvider(VaultBootstrapConfig vaultBootstrapConfig) { this.vaultBootstrapConfig = vaultBootstrapConfig; } @Override public Iterable<ConfigSource> getConfigSources(ClassLoader forClassLoader) { // 270 is higher than the file system or jar ordinals, but lower than env vars return Arrays.asList(new VaultConfigSource(270, vaultBootstrapConfig)); } }
4196af17e1fabc95351ae9a93e6bab1fa09cb31c
qtip2.js
qtip2.js
angular.module('qtip2', []) .directive('qtip', function($rootScope, $timeout, $window) { return { restrict: 'A', link: function(scope, element, attrs) { var my = attrs.my || 'bottom center' , at = attrs.at || 'top center' element.qtip({ content: attrs.content, position: { my: my, at: at, target: element }, hide: { fixed : true, delay : 100 }, style: 'qtip' }) } } })
!function($) { 'use strict'; angular.module('qtip2', []) .directive('qtip', function() { return { restrict: 'A', link: function(scope, element, attrs) { var my = attrs.my || 'bottom center' , at = attrs.at || 'top center' $(element).qtip({ content: attrs.content, position: { my: my, at: at, target: element }, hide: { fixed : true, delay : 100 }, style: 'qtip' }) } } }) }(window.jQuery);
Remove useless variables + iife
Remove useless variables + iife
JavaScript
mit
romainberger/angular-qtip2-directive,vasekch/angular-qtip2-directive
javascript
## Code Before: angular.module('qtip2', []) .directive('qtip', function($rootScope, $timeout, $window) { return { restrict: 'A', link: function(scope, element, attrs) { var my = attrs.my || 'bottom center' , at = attrs.at || 'top center' element.qtip({ content: attrs.content, position: { my: my, at: at, target: element }, hide: { fixed : true, delay : 100 }, style: 'qtip' }) } } }) ## Instruction: Remove useless variables + iife ## Code After: !function($) { 'use strict'; angular.module('qtip2', []) .directive('qtip', function() { return { restrict: 'A', link: function(scope, element, attrs) { var my = attrs.my || 'bottom center' , at = attrs.at || 'top center' $(element).qtip({ content: attrs.content, position: { my: my, at: at, target: element }, hide: { fixed : true, delay : 100 }, style: 'qtip' }) } } }) }(window.jQuery);
d6c61225a97d01ec481fb61094fbd45fda083091
.travis.yml
.travis.yml
language: node_js node_js: - 6 sudo: required env: - NODE_ENV=test addons: rethinkdb: '2.3.5' apt: packages: - oracle-java8-installer - oracle-java8-set-default before_script: - npm run start:rethinkdb - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - sleep 3 # give xvfb some time to start - rethinkdb --bind all --http-port 9090 & # start rethinkdb on background process after_success: - npm run coveralls - npm run build && npm run e2e
language: node_js node_js: - 6 sudo: required env: - NODE_ENV=test addons: rethinkdb: '2.3.5' apt: packages: - oracle-java8-installer - oracle-java8-set-default before_script: - npm run start:rethinkdb - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - sleep 3 # give xvfb some time to start - rethinkdb & # start rethinkdb on background process after_success: - npm run coveralls - npm run build && npm run e2e
Use background process for rethinkdb.
Use background process for rethinkdb.
YAML
mit
jbelmont/continuous-integration-with-jenkins-travis-and-circleci,jbelmont/continuous-integration-with-jenkins-travis-and-circleci,jbelmont/continuous-integration-with-jenkins-travis-and-circleci
yaml
## Code Before: language: node_js node_js: - 6 sudo: required env: - NODE_ENV=test addons: rethinkdb: '2.3.5' apt: packages: - oracle-java8-installer - oracle-java8-set-default before_script: - npm run start:rethinkdb - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - sleep 3 # give xvfb some time to start - rethinkdb --bind all --http-port 9090 & # start rethinkdb on background process after_success: - npm run coveralls - npm run build && npm run e2e ## Instruction: Use background process for rethinkdb. ## Code After: language: node_js node_js: - 6 sudo: required env: - NODE_ENV=test addons: rethinkdb: '2.3.5' apt: packages: - oracle-java8-installer - oracle-java8-set-default before_script: - npm run start:rethinkdb - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - sleep 3 # give xvfb some time to start - rethinkdb & # start rethinkdb on background process after_success: - npm run coveralls - npm run build && npm run e2e
5adaece96cd609c83d129c1f16747c29b22c546c
app/models/unit_activity_set.rb
app/models/unit_activity_set.rb
class UnitActivitySet < ActiveRecord::Base belongs_to :unit belongs_to :activity_type validates :activity_type, presence: true validates :unit_id, presence: true end
class UnitActivitySet < ActiveRecord::Base belongs_to :unit belongs_to :activity_type validates :activity_type, presence: true validates :unit, presence: true end
Validate the presence of unit in unit activity set
ENHANCE: Validate the presence of unit in unit activity set
Ruby
agpl-3.0
doubtfire-lms/doubtfire-api,jakerenzella/doubtfire-api,jakerenzella/doubtfire-api,doubtfire-lms/doubtfire-api,doubtfire-lms/doubtfire-api,jakerenzella/doubtfire-api,jakerenzella/doubtfire-api,doubtfire-lms/doubtfire-api,jakerenzella/doubtfire-api,jakerenzella/doubtfire-api,jakerenzella/doubtfire-api,doubtfire-lms/doubtfire-api,doubtfire-lms/doubtfire-api,doubtfire-lms/doubtfire-api
ruby
## Code Before: class UnitActivitySet < ActiveRecord::Base belongs_to :unit belongs_to :activity_type validates :activity_type, presence: true validates :unit_id, presence: true end ## Instruction: ENHANCE: Validate the presence of unit in unit activity set ## Code After: class UnitActivitySet < ActiveRecord::Base belongs_to :unit belongs_to :activity_type validates :activity_type, presence: true validates :unit, presence: true end
953e0fca7fbaf28a65decb342c6cb48e761e3e26
sky/sdk/pubspec.yaml
sky/sdk/pubspec.yaml
author: Chromium Authors <sky-dev@googlegroups.com> dependencies: mojo: '>=0.0.1 <1.0.0' mojo_services: '>=0.0.4 <1.0.0' mojom: '>=0.0.4 <1.0.0' vector_math: '>=1.4.3 <2.0.0' cassowary: '^0.1.7' description: Dart files to support executing inside Sky. homepage: https://github.com/domokit/mojo/tree/master/sky environment: sdk: ">=1.8.0 <2.0.0" name: sky version: 0.0.17
author: Chromium Authors <sky-dev@googlegroups.com> dependencies: cassowary: '^0.1.7' mojo_services: '^0.0.17' mojo: '^0.0.17' mojom: '^0.0.17' newton: '^0.1.0' vector_math: '^1.4.3' description: Dart files to support executing inside Sky. homepage: https://github.com/domokit/mojo/tree/master/sky environment: sdk: ">=1.8.0 <2.0.0" name: sky version: 0.0.17
Add package:newton as a dependency of package:sky
Add package:newton as a dependency of package:sky Also, update the dependency versions for other packages to be more realistic. R=chinmaygarde@google.com Review URL: https://codereview.chromium.org/1233663002 .
YAML
bsd-3-clause
jianglu/mojo,afandria/mojo,afandria/mojo,jianglu/mojo,jianglu/mojo,afandria/mojo,afandria/mojo,afandria/mojo,afandria/mojo,jianglu/mojo,afandria/mojo,jianglu/mojo,jianglu/mojo,jianglu/mojo,afandria/mojo,jianglu/mojo
yaml
## Code Before: author: Chromium Authors <sky-dev@googlegroups.com> dependencies: mojo: '>=0.0.1 <1.0.0' mojo_services: '>=0.0.4 <1.0.0' mojom: '>=0.0.4 <1.0.0' vector_math: '>=1.4.3 <2.0.0' cassowary: '^0.1.7' description: Dart files to support executing inside Sky. homepage: https://github.com/domokit/mojo/tree/master/sky environment: sdk: ">=1.8.0 <2.0.0" name: sky version: 0.0.17 ## Instruction: Add package:newton as a dependency of package:sky Also, update the dependency versions for other packages to be more realistic. R=chinmaygarde@google.com Review URL: https://codereview.chromium.org/1233663002 . ## Code After: author: Chromium Authors <sky-dev@googlegroups.com> dependencies: cassowary: '^0.1.7' mojo_services: '^0.0.17' mojo: '^0.0.17' mojom: '^0.0.17' newton: '^0.1.0' vector_math: '^1.4.3' description: Dart files to support executing inside Sky. homepage: https://github.com/domokit/mojo/tree/master/sky environment: sdk: ">=1.8.0 <2.0.0" name: sky version: 0.0.17
a5e90e2b7ea6adedbf80c05bbb84425a02c63da0
db/migrate/094_remove_old_tags_foreign_key.rb
db/migrate/094_remove_old_tags_foreign_key.rb
class RemoveOldTagsForeignKey < ActiveRecord::Migration def self.up if ActiveRecord::Base.connection.adapter_name == "PostgreSQL" execute "ALTER TABLE has_tag_string_tags DROP CONSTRAINT fk_public_body_tags_public_body" end remove_index :public_body_tags, [:public_body_id, :name, :value] remove_index :public_body_tags, :name add_index :has_tag_string_tags, [:model, :model_id, :name, :value] add_index :has_tag_string_tags, :name end def self.down raise "no reverse migration" end end
class RemoveOldTagsForeignKey < ActiveRecord::Migration def self.up if ActiveRecord::Base.connection.adapter_name == "PostgreSQL" execute "ALTER TABLE has_tag_string_tags DROP CONSTRAINT fk_public_body_tags_public_body" end # This table was already removed in the previous migration # remove_index :public_body_tags, [:public_body_id, :name, :value] # remove_index :public_body_tags, :name add_index :has_tag_string_tags, [:model, :model_id, :name, :value], :name => 'by_model_and_model_id_and_name_and_value' add_index :has_tag_string_tags, :name end def self.down raise "no reverse migration" end end
Fix up some DB migration issues with Rails 3
Fix up some DB migration issues with Rails 3 * The public_body_tags table had already been removed * The index has_tag_string_tags generated a name longer than the Postgres maximum of 63 characters. It was ignored in earlier Rails versions, see: https://rails.lighthouseapp.com/projects/8994/tickets/6187-postgresql-and-rails-303-migrations-fail-with-index-name-length-64-chars
Ruby
agpl-3.0
10layer/alaveteli,4bic/alaveteli,hasadna/alaveteli,petterreinholdtsen/alaveteli,codeforcroatia/alaveteli,andreicristianpetcu/alaveteli_old,andreicristianpetcu/alaveteli,Br3nda/alaveteli,4bic/alaveteli,obshtestvo/alaveteli-bulgaria,datauy/alaveteli,petterreinholdtsen/alaveteli,petterreinholdtsen/alaveteli,andreicristianpetcu/alaveteli,4bic/alaveteli,obshtestvo/alaveteli-bulgaria,hasadna/alaveteli,andreicristianpetcu/alaveteli_old,obshtestvo/alaveteli-bulgaria,codeforcroatia/alaveteli,andreicristianpetcu/alaveteli_old,nzherald/alaveteli,nzherald/alaveteli,TEDICpy/QueremoSaber,andreicristianpetcu/alaveteli,TEDICpy/QueremoSaber,datauy/alaveteli,10layer/alaveteli,4bic/alaveteli,hasadna/alaveteli,andreicristianpetcu/alaveteli_old,datauy/alaveteli,TEDICpy/QueremoSaber,codeforcroatia/alaveteli,nzherald/alaveteli,Br3nda/alaveteli,Br3nda/alaveteli,4bic/alaveteli,nzherald/alaveteli,petterreinholdtsen/alaveteli,TEDICpy/QueremoSaber,petterreinholdtsen/alaveteli,hasadna/alaveteli,andreicristianpetcu/alaveteli,obshtestvo/alaveteli-bulgaria,hasadna/alaveteli,andreicristianpetcu/alaveteli,andreicristianpetcu/alaveteli_old,TEDICpy/QueremoSaber,Br3nda/alaveteli,Br3nda/alaveteli,codeforcroatia/alaveteli,nzherald/alaveteli,10layer/alaveteli,obshtestvo/alaveteli-bulgaria,hasadna/alaveteli
ruby
## Code Before: class RemoveOldTagsForeignKey < ActiveRecord::Migration def self.up if ActiveRecord::Base.connection.adapter_name == "PostgreSQL" execute "ALTER TABLE has_tag_string_tags DROP CONSTRAINT fk_public_body_tags_public_body" end remove_index :public_body_tags, [:public_body_id, :name, :value] remove_index :public_body_tags, :name add_index :has_tag_string_tags, [:model, :model_id, :name, :value] add_index :has_tag_string_tags, :name end def self.down raise "no reverse migration" end end ## Instruction: Fix up some DB migration issues with Rails 3 * The public_body_tags table had already been removed * The index has_tag_string_tags generated a name longer than the Postgres maximum of 63 characters. It was ignored in earlier Rails versions, see: https://rails.lighthouseapp.com/projects/8994/tickets/6187-postgresql-and-rails-303-migrations-fail-with-index-name-length-64-chars ## Code After: class RemoveOldTagsForeignKey < ActiveRecord::Migration def self.up if ActiveRecord::Base.connection.adapter_name == "PostgreSQL" execute "ALTER TABLE has_tag_string_tags DROP CONSTRAINT fk_public_body_tags_public_body" end # This table was already removed in the previous migration # remove_index :public_body_tags, [:public_body_id, :name, :value] # remove_index :public_body_tags, :name add_index :has_tag_string_tags, [:model, :model_id, :name, :value], :name => 'by_model_and_model_id_and_name_and_value' add_index :has_tag_string_tags, :name end def self.down raise "no reverse migration" end end
1fcd89221f8d4287a20be9ef4cddcf6b175bd396
templates/sample_stubs/infrastructure-aws.yml
templates/sample_stubs/infrastructure-aws.yml
--- meta: ~ compilation: cloud_properties: instance_type: m3.medium resource_pools: - name: redis_z1 stemcell: name: bosh-aws-xen-hvm-ubuntu-trusty-go_agent version: (( merge || "latest" )) cloud_properties: instance_type: m3.medium networks: - name: redis_z1 type: manual subnets: - range: 10.0.16.0/20 gateway: 10.0.16.1 reserved: - 10.0.16.2 - 10.0.16.254 static: - 10.0.17.1 - 10.0.17.100 dns: - 10.0.0.2 cloud_properties: subnet: YOUR_SUBNET_ID security_group: YOUR_SECURITY_GROUP_NAME
--- meta: ~ compilation: cloud_properties: availability_zone: YOUR_AVAILABILITY_ZONE instance_type: m3.medium resource_pools: - name: redis_z1 stemcell: name: bosh-aws-xen-hvm-ubuntu-trusty-go_agent version: (( merge || "latest" )) cloud_properties: availability_zone: YOUR_AVAILABILITY_ZONE instance_type: m3.medium networks: - name: redis_z1 type: manual subnets: - range: 10.0.16.0/20 gateway: 10.0.16.1 reserved: - 10.0.16.2 - 10.0.16.254 static: - 10.0.17.1 - 10.0.17.100 dns: - 10.0.0.2 cloud_properties: subnet: YOUR_SUBNET_ID security_group: YOUR_SECURITY_GROUP_NAME
Include availability zone for newer BOSH directors
Include availability zone for newer BOSH directors [#126978979] Signed-off-by: Jonathan Qiwen Tsang <3d227aa6bffde73f6e08f0ffd3491f423c329e82@pivotal.io>
YAML
apache-2.0
pivotal-cf/cf-redis-release,pivotal-cf/cf-redis-release,pivotal-cf/cf-redis-release
yaml
## Code Before: --- meta: ~ compilation: cloud_properties: instance_type: m3.medium resource_pools: - name: redis_z1 stemcell: name: bosh-aws-xen-hvm-ubuntu-trusty-go_agent version: (( merge || "latest" )) cloud_properties: instance_type: m3.medium networks: - name: redis_z1 type: manual subnets: - range: 10.0.16.0/20 gateway: 10.0.16.1 reserved: - 10.0.16.2 - 10.0.16.254 static: - 10.0.17.1 - 10.0.17.100 dns: - 10.0.0.2 cloud_properties: subnet: YOUR_SUBNET_ID security_group: YOUR_SECURITY_GROUP_NAME ## Instruction: Include availability zone for newer BOSH directors [#126978979] Signed-off-by: Jonathan Qiwen Tsang <3d227aa6bffde73f6e08f0ffd3491f423c329e82@pivotal.io> ## Code After: --- meta: ~ compilation: cloud_properties: availability_zone: YOUR_AVAILABILITY_ZONE instance_type: m3.medium resource_pools: - name: redis_z1 stemcell: name: bosh-aws-xen-hvm-ubuntu-trusty-go_agent version: (( merge || "latest" )) cloud_properties: availability_zone: YOUR_AVAILABILITY_ZONE instance_type: m3.medium networks: - name: redis_z1 type: manual subnets: - range: 10.0.16.0/20 gateway: 10.0.16.1 reserved: - 10.0.16.2 - 10.0.16.254 static: - 10.0.17.1 - 10.0.17.100 dns: - 10.0.0.2 cloud_properties: subnet: YOUR_SUBNET_ID security_group: YOUR_SECURITY_GROUP_NAME
0afb066ae9df5ad9349b87d635623932ec74f629
features/support/env.rb
features/support/env.rb
require 'aruba/cucumber' PROJECT_ROOT = File.dirname(File.expand_path('../../', __FILE__)) ENV['PATH'] = File.join(PROJECT_ROOT, '/exe') + File::PATH_SEPARATOR + ENV['PATH'] puts ENV['PATH']
require 'aruba/cucumber' PROJECT_ROOT = File.dirname(File.expand_path('../../', __FILE__)) ENV['PATH'] = File.join(PROJECT_ROOT, '/exe') + File::PATH_SEPARATOR + ENV['PATH']
Remove debug statements from cucumber.
Remove debug statements from cucumber.
Ruby
mit
RobotDisco/doting
ruby
## Code Before: require 'aruba/cucumber' PROJECT_ROOT = File.dirname(File.expand_path('../../', __FILE__)) ENV['PATH'] = File.join(PROJECT_ROOT, '/exe') + File::PATH_SEPARATOR + ENV['PATH'] puts ENV['PATH'] ## Instruction: Remove debug statements from cucumber. ## Code After: require 'aruba/cucumber' PROJECT_ROOT = File.dirname(File.expand_path('../../', __FILE__)) ENV['PATH'] = File.join(PROJECT_ROOT, '/exe') + File::PATH_SEPARATOR + ENV['PATH']
168247d73ce8ea1c4d21e04e3a462fe6120b3d30
app/js/arethusa.core/navigator_ctrl.js
app/js/arethusa.core/navigator_ctrl.js
'use strict'; angular.module('arethusa.core').controller('NavigatorCtrl', [ '$scope', 'navigator', function ($scope, navigator) { $scope.next = function () { navigator.nextSentence(); }; $scope.prev = function () { navigator.prevSentence(); }; $scope.hasNext = function() { return navigator.hasNext(); }; $scope.hasPrev = function() { return navigator.hasPrev(); }; $scope.goToFirst = function() { navigator.goToFirst(); }; $scope.goToLast = function() { navigator.goToLast(); }; $scope.goTo = function(id) { navigator.goTo(id); }; $scope.navStat = navigator.status; } ]);
'use strict'; angular.module('arethusa.core').controller('NavigatorCtrl', [ '$scope', 'navigator', function ($scope, navigator) { $scope.next = function () { navigator.nextSentence(); }; $scope.prev = function () { navigator.prevSentence(); }; $scope.goToFirst = function() { navigator.goToFirst(); }; $scope.goToLast = function() { navigator.goToLast(); }; $scope.goTo = function(id) { navigator.goTo(id); }; $scope.navStat = navigator.status; } ]);
Remove obsolete functions from NavigatorCtrl
Remove obsolete functions from NavigatorCtrl
JavaScript
mit
Masoumeh/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa
javascript
## Code Before: 'use strict'; angular.module('arethusa.core').controller('NavigatorCtrl', [ '$scope', 'navigator', function ($scope, navigator) { $scope.next = function () { navigator.nextSentence(); }; $scope.prev = function () { navigator.prevSentence(); }; $scope.hasNext = function() { return navigator.hasNext(); }; $scope.hasPrev = function() { return navigator.hasPrev(); }; $scope.goToFirst = function() { navigator.goToFirst(); }; $scope.goToLast = function() { navigator.goToLast(); }; $scope.goTo = function(id) { navigator.goTo(id); }; $scope.navStat = navigator.status; } ]); ## Instruction: Remove obsolete functions from NavigatorCtrl ## Code After: 'use strict'; angular.module('arethusa.core').controller('NavigatorCtrl', [ '$scope', 'navigator', function ($scope, navigator) { $scope.next = function () { navigator.nextSentence(); }; $scope.prev = function () { navigator.prevSentence(); }; $scope.goToFirst = function() { navigator.goToFirst(); }; $scope.goToLast = function() { navigator.goToLast(); }; $scope.goTo = function(id) { navigator.goTo(id); }; $scope.navStat = navigator.status; } ]);
c6166b8ae8ae3f31260496d3fc88d32c7c4cdfa3
client-src/meta/components/landing-page/landing-page.css
client-src/meta/components/landing-page/landing-page.css
.landingPage_heroTextContainer { padding-top: 80px; background-image: linear-gradient(-134deg, #3023ae 0%, #c96dd8 100%); height: calc(100vh - $headerHeight - $footerHeight); text-align: center; @media screen and (width >= $md-screen) { height: calc(100vh - $headerHeight - $expandedFooterHeight); } } .landingPage-heroText { font-size: 25px; color: #fff; margin-bottom: 40px; }
.landingPage_heroTextContainer { padding-top: calc(50vh - 200px); background-image: linear-gradient(-134deg, #3023ae 0%, #c96dd8 100%); height: calc(100vh - $headerHeight - $footerHeight); text-align: center; @media screen and (width >= $md-screen) { height: calc(100vh - $headerHeight - $expandedFooterHeight); } } .landingPage-heroText { font-size: 25px; color: #fff; margin-bottom: 40px; }
Adjust location of landing page text
Adjust location of landing page text
CSS
mit
jmeas/moolah,jmeas/moolah,jmeas/finance-app,jmeas/finance-app
css
## Code Before: .landingPage_heroTextContainer { padding-top: 80px; background-image: linear-gradient(-134deg, #3023ae 0%, #c96dd8 100%); height: calc(100vh - $headerHeight - $footerHeight); text-align: center; @media screen and (width >= $md-screen) { height: calc(100vh - $headerHeight - $expandedFooterHeight); } } .landingPage-heroText { font-size: 25px; color: #fff; margin-bottom: 40px; } ## Instruction: Adjust location of landing page text ## Code After: .landingPage_heroTextContainer { padding-top: calc(50vh - 200px); background-image: linear-gradient(-134deg, #3023ae 0%, #c96dd8 100%); height: calc(100vh - $headerHeight - $footerHeight); text-align: center; @media screen and (width >= $md-screen) { height: calc(100vh - $headerHeight - $expandedFooterHeight); } } .landingPage-heroText { font-size: 25px; color: #fff; margin-bottom: 40px; }
3e0cc45d104e891d21a3063e1dc52e1ccbfd8f3d
docs/libssh2_channel_forward_accept.3
docs/libssh2_channel_forward_accept.3
.\" $Id: libssh2_channel_forward_accept.3,v 1.3 2007/06/13 12:51:10 jehousley Exp $ .\" .TH libssh2_channel_forward_accept 3 "1 June 2007" "libssh2 0.15" "libssh2 manual" .SH NAME libssh2_channel_forward_accept - accept a queued connection .SH SYNOPSIS .B #include <libssh2.h> .B LIBSSH2_CHANNEL * libssh2_channel_forward_accept(LIBSSH2_LISTENER *listener); .SH DESCRIPTION \fIlistener\fP is a forwarding listener instance as returned by \fBlibssh2_channel_forward_listen(3)\fP. .SH RETURN VALUE A newly allocated channel instance or NULL on failure. .SH ERRORS LIBSSH2_ERROR_EAGAIN Marked for non-blocking I/O but the call would block. .SH SEE ALSO .BI libssh2_channel_forward_listen(3)
.\" $Id: libssh2_channel_forward_accept.3,v 1.4 2007/06/13 12:58:58 jehousley Exp $ .\" .TH libssh2_channel_forward_accept 3 "1 June 2007" "libssh2 0.15" "libssh2 manual" .SH NAME libssh2_channel_forward_accept - accept a queued connection .SH SYNOPSIS #include <libssh2.h> LIBSSH2_CHANNEL * libssh2_channel_forward_accept(LIBSSH2_LISTENER *listener); .SH DESCRIPTION \fIlistener\fP is a forwarding listener instance as returned by \fBlibssh2_channel_forward_listen(3)\fP. .SH RETURN VALUE A newly allocated channel instance or NULL on failure. .SH ERRORS \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. .SH SEE ALSO .BR libssh2_channel_forward_listen(3)
Update to match current code and add errors
Update to match current code and add errors
Groff
bsd-3-clause
libssh2/libssh2,libssh2/libssh2,libssh2/libssh2,libssh2/libssh2
groff
## Code Before: .\" $Id: libssh2_channel_forward_accept.3,v 1.3 2007/06/13 12:51:10 jehousley Exp $ .\" .TH libssh2_channel_forward_accept 3 "1 June 2007" "libssh2 0.15" "libssh2 manual" .SH NAME libssh2_channel_forward_accept - accept a queued connection .SH SYNOPSIS .B #include <libssh2.h> .B LIBSSH2_CHANNEL * libssh2_channel_forward_accept(LIBSSH2_LISTENER *listener); .SH DESCRIPTION \fIlistener\fP is a forwarding listener instance as returned by \fBlibssh2_channel_forward_listen(3)\fP. .SH RETURN VALUE A newly allocated channel instance or NULL on failure. .SH ERRORS LIBSSH2_ERROR_EAGAIN Marked for non-blocking I/O but the call would block. .SH SEE ALSO .BI libssh2_channel_forward_listen(3) ## Instruction: Update to match current code and add errors ## Code After: .\" $Id: libssh2_channel_forward_accept.3,v 1.4 2007/06/13 12:58:58 jehousley Exp $ .\" .TH libssh2_channel_forward_accept 3 "1 June 2007" "libssh2 0.15" "libssh2 manual" .SH NAME libssh2_channel_forward_accept - accept a queued connection .SH SYNOPSIS #include <libssh2.h> LIBSSH2_CHANNEL * libssh2_channel_forward_accept(LIBSSH2_LISTENER *listener); .SH DESCRIPTION \fIlistener\fP is a forwarding listener instance as returned by \fBlibssh2_channel_forward_listen(3)\fP. .SH RETURN VALUE A newly allocated channel instance or NULL on failure. .SH ERRORS \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block. .SH SEE ALSO .BR libssh2_channel_forward_listen(3)
82d037c27cb5a0200af2b21602f1bc901353415d
_includes/site-favicons.html
_includes/site-favicons.html
{% if site.favicons %} {% for icon in site.favicons %} <link rel="icon" type="image/png" href="{{ icon[1] }}" sizes="{{ icon[0] }}x{{ icon[0] }}"> {% endfor %} {% endif %} <link rel="shortcut icon" href="{{ site.avatarurl + '?s=32' | default: site.logo }}">
{% if site.favicons %} {% for icon in site.favicons %} <link rel="icon" type="image/png" href="{{ icon[1] }}" sizes="{{ icon[0] }}x{{ icon[0] }}"> <link rel="apple-touch-icon" sizes="{{ icon[0] }}x{{ icon[0] }}" href="{{ icon[1] }}"> {% endfor %} {% endif %} <link rel="shortcut icon" href="{{ site.avatarurl + '?s=32' | default: site.logo }}">
Test apple touch icon meta
Test apple touch icon meta
HTML
mit
daviddarnes/alembic,daviddarnes/alembic,daviddarnes/alembic
html
## Code Before: {% if site.favicons %} {% for icon in site.favicons %} <link rel="icon" type="image/png" href="{{ icon[1] }}" sizes="{{ icon[0] }}x{{ icon[0] }}"> {% endfor %} {% endif %} <link rel="shortcut icon" href="{{ site.avatarurl + '?s=32' | default: site.logo }}"> ## Instruction: Test apple touch icon meta ## Code After: {% if site.favicons %} {% for icon in site.favicons %} <link rel="icon" type="image/png" href="{{ icon[1] }}" sizes="{{ icon[0] }}x{{ icon[0] }}"> <link rel="apple-touch-icon" sizes="{{ icon[0] }}x{{ icon[0] }}" href="{{ icon[1] }}"> {% endfor %} {% endif %} <link rel="shortcut icon" href="{{ site.avatarurl + '?s=32' | default: site.logo }}">
742b2725245158bd5d9051ed00f6afcb593c5b7d
packages/chatbox/src/index.ts
packages/chatbox/src/index.ts
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. export * from './panel'; export * from './chatbox'; export * from './entry'
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. import '../style/index.css'; export * from './panel'; export * from './chatbox'; export * from './entry'
Update theme loading for chatbox.
Update theme loading for chatbox.
TypeScript
bsd-3-clause
jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab
typescript
## Code Before: // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. export * from './panel'; export * from './chatbox'; export * from './entry' ## Instruction: Update theme loading for chatbox. ## Code After: // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. import '../style/index.css'; export * from './panel'; export * from './chatbox'; export * from './entry'