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
b0bb6b921338f6ffa2cfb0ab71225f2c05d4d8cc
README.md
README.md
[![Build Status](https://travis-ci.org/katosys/docker-jenkins-slave.svg?branch=master)](https://travis-ci.org/katosys/docker-jenkins-slave) Containerized jenkins slave server. ``` docker run -it --rm \ --env SSL_TRUST=foo:443,bar:443 \ katosys/jenkins-slave \ /bin/bash ```
[![Build Status](https://travis-ci.org/katosys/jenkins-slave.svg?branch=master)](https://travis-ci.org/katosys/jenkins-slave) Containerized jenkins slave server. ``` docker run -it --rm \ --env SSL_TRUST=foo:443,bar:443 \ katosys/jenkins-slave \ /bin/bash ```
Rename from docker-jenkins-slave to jenkins-slave
Rename from docker-jenkins-slave to jenkins-slave
Markdown
apache-2.0
h0tbird/docker-jenkins-slave
markdown
## Code Before: [![Build Status](https://travis-ci.org/katosys/docker-jenkins-slave.svg?branch=master)](https://travis-ci.org/katosys/docker-jenkins-slave) Containerized jenkins slave server. ``` docker run -it --rm \ --env SSL_TRUST=foo:443,bar:443 \ katosys/jenkins-slave \ /bin/bash ``` ## Instruction: Rename from docker-jenkins-slave to jenkins-slave ## Code After: [![Build Status](https://travis-ci.org/katosys/jenkins-slave.svg?branch=master)](https://travis-ci.org/katosys/jenkins-slave) Containerized jenkins slave server. ``` docker run -it --rm \ --env SSL_TRUST=foo:443,bar:443 \ katosys/jenkins-slave \ /bin/bash ```
c3a34b481a749fc8f361cc205fdec5181aad307b
circle.yml
circle.yml
machine: pre: - cat /etc/*release - pyenv global 2.7.11 3.5.1 # # python: # version: 3.5.1 # test: pre: - which python - python --version - which python2 - python2 --version - which python3 - python3 --version override: - python3 -c 'print("OK")'
machine: pre: - cat /etc/*release - pyenv global 2.7.11 3.5.1 tlocalest: pre: - which python - v=$(python --version 2>& 1); if [ "$v" == "Python 2.7.11" ]; then echo "$v OK"; else ! echo "$v ERR"; fi - which python2 - v=$(python2 --version 2>& 1); if [ "$v" == "Python 2.7.11" ]; then echo "$v OK"; else ! echo "$v ERR"; fi - which python3 - v=$(python3 --version 2>& 1); if [ "$v" == "Python 3.5.1" ]; then echo "$v OK"; else ! echo "$v ERR"; fi override: - python3 -c 'print("OK")'
Add actual tests for expected python versions.
Add actual tests for expected python versions.
YAML
apache-2.0
winksaville/circleci-python3
yaml
## Code Before: machine: pre: - cat /etc/*release - pyenv global 2.7.11 3.5.1 # # python: # version: 3.5.1 # test: pre: - which python - python --version - which python2 - python2 --version - which python3 - python3 --version override: - python3 -c 'print("OK")' ## Instruction: Add actual tests for expected python versions. ## Code After: machine: pre: - cat /etc/*release - pyenv global 2.7.11 3.5.1 tlocalest: pre: - which python - v=$(python --version 2>& 1); if [ "$v" == "Python 2.7.11" ]; then echo "$v OK"; else ! echo "$v ERR"; fi - which python2 - v=$(python2 --version 2>& 1); if [ "$v" == "Python 2.7.11" ]; then echo "$v OK"; else ! echo "$v ERR"; fi - which python3 - v=$(python3 --version 2>& 1); if [ "$v" == "Python 3.5.1" ]; then echo "$v OK"; else ! echo "$v ERR"; fi override: - python3 -c 'print("OK")'
58c0f63f7c2bb3c49c268ab65b394f7a92078d1a
assets/main.scss
assets/main.scss
--- # Only the main Sass file needs front matter (the dashes are enough) --- // Define defaults for each variable. $base-font-family: "Ubuntu Mono", "Helvetica Neue", Helvetica, Arial, sans-serif !default; $base-font-size: 16px !default; $base-font-weight: 400 !default; $small-font-size: $base-font-size * 0.875 !default; $base-line-height: 1.5 !default; @import "minima";
--- # Only the main Sass file needs front matter (the dashes are enough) --- // Define defaults for each variable. // $base-font-family: "Ubuntu Mono", "Helvetica Neue", Helvetica, Arial, sans-serif !default; $base-font-family: "Ubuntu Mono"; $base-font-size: 16px !default; $base-font-weight: 400 !default; $small-font-size: $base-font-size * 0.875 !default; $base-line-height: 1.5 !default; $brand-color: red; @import "minima";
Change brand color to red
Change brand color to red
SCSS
mit
jasonrhaas/jasonrhaas.github.io,jasonrhaas/jasonrhaas.github.io
scss
## Code Before: --- # Only the main Sass file needs front matter (the dashes are enough) --- // Define defaults for each variable. $base-font-family: "Ubuntu Mono", "Helvetica Neue", Helvetica, Arial, sans-serif !default; $base-font-size: 16px !default; $base-font-weight: 400 !default; $small-font-size: $base-font-size * 0.875 !default; $base-line-height: 1.5 !default; @import "minima"; ## Instruction: Change brand color to red ## Code After: --- # Only the main Sass file needs front matter (the dashes are enough) --- // Define defaults for each variable. // $base-font-family: "Ubuntu Mono", "Helvetica Neue", Helvetica, Arial, sans-serif !default; $base-font-family: "Ubuntu Mono"; $base-font-size: 16px !default; $base-font-weight: 400 !default; $small-font-size: $base-font-size * 0.875 !default; $base-line-height: 1.5 !default; $brand-color: red; @import "minima";
836425f709023adaa26f06301b7de22e5fa784a7
client/js/libs/apiHelper.js
client/js/libs/apiHelper.js
require('isomorphic-fetch') export function checkStatus(response) { if (response.ok) { return response } if (response.body || response._bodyBlob) { return response.json().then(err => { const error = new Error(response.statusText) error.error = err error.response = response return Promise.reject(error) }) } return Promise.reject(response) } export function parseJSON(response) { return response.json() }
global.fetch = undefined require('isomorphic-fetch') export function checkStatus(response) { if (response.ok) { return response } if (response.body || response._bodyBlob) { return response.json().then(err => { const error = new Error(response.statusText) error.error = err error.response = response return Promise.reject(error) }) } return Promise.reject(response) } export function parseJSON(response) { return response.json() }
Fix for Firefox fetch api implementation
Fix for Firefox fetch api implementation
JavaScript
bsd-3-clause
spark-solutions/spark-starter-kit,spark-solutions/spark-starter-kit,spark-solutions/spark-starter-kit
javascript
## Code Before: require('isomorphic-fetch') export function checkStatus(response) { if (response.ok) { return response } if (response.body || response._bodyBlob) { return response.json().then(err => { const error = new Error(response.statusText) error.error = err error.response = response return Promise.reject(error) }) } return Promise.reject(response) } export function parseJSON(response) { return response.json() } ## Instruction: Fix for Firefox fetch api implementation ## Code After: global.fetch = undefined require('isomorphic-fetch') export function checkStatus(response) { if (response.ok) { return response } if (response.body || response._bodyBlob) { return response.json().then(err => { const error = new Error(response.statusText) error.error = err error.response = response return Promise.reject(error) }) } return Promise.reject(response) } export function parseJSON(response) { return response.json() }
2cdf6a8e17d1320bd199f3309c777d0a4fedadd4
.travis.yml
.travis.yml
language: ruby rvm: - "1.9.3" - "2.0.0" - "2.1.2" notifications: email: on_failure: change gemfiles: - gemfiles/Gemfile.sinatra-1.0
language: ruby rvm: - "1.9.3" - "2.0.0" - "2.1.2" notifications: email: on_failure: change gemfiles: - Gemfile - gemfiles/Gemfile.sinatra-1.0
Add normal Gemfile to build matrix
Add normal Gemfile to build matrix
YAML
mit
danascheider/sinatra-sequel_extension
yaml
## Code Before: language: ruby rvm: - "1.9.3" - "2.0.0" - "2.1.2" notifications: email: on_failure: change gemfiles: - gemfiles/Gemfile.sinatra-1.0 ## Instruction: Add normal Gemfile to build matrix ## Code After: language: ruby rvm: - "1.9.3" - "2.0.0" - "2.1.2" notifications: email: on_failure: change gemfiles: - Gemfile - gemfiles/Gemfile.sinatra-1.0
393a2f5f0ccfedc1c5ebd7de987c870419ca2d89
scripts/calculate_lqr_gain.py
scripts/calculate_lqr_gain.py
import numpy as np import scipy import control from dtk.bicycle import benchmark_state_space_vs_speed, benchmark_matrices def compute_whipple_lqr_gain(velocity): _, A, B = benchmark_state_space_vs_speed(*benchmark_matrices(), velocity) Q = np.diag([1e5, 1e3, 1e3, 1e2]) R = np.eye(2) gains = [control.lqr(Ai, Bi, Q, R)[0] for Ai, Bi in zip(A, B)] return gains if __name__ == '__main__': import sys v_low = 0 # m/s if len(sys.argv) > 1: v_high = int(sys.argv[1]) else: v_high = 1 # m/s velocities = [v_low, v_high] gains = compute_whipple_lqr_gain(velocities) for v, K in zip(velocities, gains): print('computed LQR controller feedback gain for v = {}'.format(v)) print(-K) print()
import numpy as np import scipy import control from dtk.bicycle import benchmark_state_space_vs_speed, benchmark_matrices def compute_whipple_lqr_gain(velocity): _, A, B = benchmark_state_space_vs_speed(*benchmark_matrices(), velocity) Q = np.diag([1e5, 1e3, 1e3, 1e2]) R = np.eye(2) gains = [control.lqr(Ai, Bi, Q, R)[0] for Ai, Bi in zip(A, B)] return gains if __name__ == '__main__': import sys v_low = 0 # m/s if len(sys.argv) > 1: v_high = int(sys.argv[1]) else: v_high = 1 # m/s velocities = [v_low, v_high] gains = compute_whipple_lqr_gain(velocities) for v, K in zip(velocities, gains): print('computed LQR controller feedback gain for v = {}'.format(v)) K = -K for r in range(K.shape[0]): row = ', '.join(str(elem) for elem in K[r, :]) if r != K.shape[0] - 1: row += ',' print(row) print()
Change LQR gain element printing
Change LQR gain element printing Change printing of LQR gain elements for easier copying.
Python
bsd-2-clause
oliverlee/phobos,oliverlee/phobos,oliverlee/phobos,oliverlee/phobos
python
## Code Before: import numpy as np import scipy import control from dtk.bicycle import benchmark_state_space_vs_speed, benchmark_matrices def compute_whipple_lqr_gain(velocity): _, A, B = benchmark_state_space_vs_speed(*benchmark_matrices(), velocity) Q = np.diag([1e5, 1e3, 1e3, 1e2]) R = np.eye(2) gains = [control.lqr(Ai, Bi, Q, R)[0] for Ai, Bi in zip(A, B)] return gains if __name__ == '__main__': import sys v_low = 0 # m/s if len(sys.argv) > 1: v_high = int(sys.argv[1]) else: v_high = 1 # m/s velocities = [v_low, v_high] gains = compute_whipple_lqr_gain(velocities) for v, K in zip(velocities, gains): print('computed LQR controller feedback gain for v = {}'.format(v)) print(-K) print() ## Instruction: Change LQR gain element printing Change printing of LQR gain elements for easier copying. ## Code After: import numpy as np import scipy import control from dtk.bicycle import benchmark_state_space_vs_speed, benchmark_matrices def compute_whipple_lqr_gain(velocity): _, A, B = benchmark_state_space_vs_speed(*benchmark_matrices(), velocity) Q = np.diag([1e5, 1e3, 1e3, 1e2]) R = np.eye(2) gains = [control.lqr(Ai, Bi, Q, R)[0] for Ai, Bi in zip(A, B)] return gains if __name__ == '__main__': import sys v_low = 0 # m/s if len(sys.argv) > 1: v_high = int(sys.argv[1]) else: v_high = 1 # m/s velocities = [v_low, v_high] gains = compute_whipple_lqr_gain(velocities) for v, K in zip(velocities, gains): print('computed LQR controller feedback gain for v = {}'.format(v)) K = -K for r in range(K.shape[0]): row = ', '.join(str(elem) for elem in K[r, :]) if r != K.shape[0] - 1: row += ',' print(row) print()
a2ffa3d02ef4b7cd345602b475f86ac172bd7c6c
support/jenkins/buildAllModuleCombination.py
support/jenkins/buildAllModuleCombination.py
import os from subprocess import call from itertools import product, repeat # To be called from the main OpenSpace modules = os.listdir("modules") modules.remove("base") # Get 2**len(modules) combinatorical combinations of ON/OFF settings = [] for args in product(*repeat(("ON", "OFF"), len(modules))): settings.append(args) # Create all commands cmds = [] for s in settings: cmd = ["cmake", "-DGHOUL_USE_DEVIL=NO", "-DOPENSPACE_MODULE_BASE=ON"] for m,s in zip(modules, s): cmd.append("-DOPENSPACE_MODULE_" + m.upper() + "=" + s) cmd.append("..") cmds.append(cmd) # Build cmake and compile for c in cmds: print "CMake:" , cmd call(["rm", "-rf", "build", "bin"]) call(["mkdir", "build"]) call(["cd", "build"]) call(cmd) call(["make", "-j4"]) call(["cd", ".."])
import os from subprocess import call from itertools import product, repeat import shutil # To be called from the main OpenSpace modules = os.listdir("modules") modules.remove("base") # Get 2**len(modules) combinatorical combinations of ON/OFF settings = [] for args in product(*repeat(("ON", "OFF"), len(modules))): settings.append(args) # Create all commands cmds = [] for s in settings: cmd = ["cmake", "-DGHOUL_USE_DEVIL=NO", "-DOPENSPACE_MODULE_BASE=ON"] for m,s in zip(modules, s): cmd.append("-DOPENSPACE_MODULE_" + m.upper() + "=" + s) cmd.append("..") cmds.append(cmd) # Build cmake and compile for c in cmds: print "CMake:" , cmd shutil.rmtree("build") shutil.rmtree("bin") os.makedirs("build") os.chdir("build") call(cmd) call(["make", "-j4"]) os.chdir("..")
Use python internal functions for generating, removing and changing directories
Use python internal functions for generating, removing and changing directories
Python
mit
OpenSpace/OpenSpace,OpenSpace/OpenSpace,OpenSpace/OpenSpace,OpenSpace/OpenSpace
python
## Code Before: import os from subprocess import call from itertools import product, repeat # To be called from the main OpenSpace modules = os.listdir("modules") modules.remove("base") # Get 2**len(modules) combinatorical combinations of ON/OFF settings = [] for args in product(*repeat(("ON", "OFF"), len(modules))): settings.append(args) # Create all commands cmds = [] for s in settings: cmd = ["cmake", "-DGHOUL_USE_DEVIL=NO", "-DOPENSPACE_MODULE_BASE=ON"] for m,s in zip(modules, s): cmd.append("-DOPENSPACE_MODULE_" + m.upper() + "=" + s) cmd.append("..") cmds.append(cmd) # Build cmake and compile for c in cmds: print "CMake:" , cmd call(["rm", "-rf", "build", "bin"]) call(["mkdir", "build"]) call(["cd", "build"]) call(cmd) call(["make", "-j4"]) call(["cd", ".."]) ## Instruction: Use python internal functions for generating, removing and changing directories ## Code After: import os from subprocess import call from itertools import product, repeat import shutil # To be called from the main OpenSpace modules = os.listdir("modules") modules.remove("base") # Get 2**len(modules) combinatorical combinations of ON/OFF settings = [] for args in product(*repeat(("ON", "OFF"), len(modules))): settings.append(args) # Create all commands cmds = [] for s in settings: cmd = ["cmake", "-DGHOUL_USE_DEVIL=NO", "-DOPENSPACE_MODULE_BASE=ON"] for m,s in zip(modules, s): cmd.append("-DOPENSPACE_MODULE_" + m.upper() + "=" + s) cmd.append("..") cmds.append(cmd) # Build cmake and compile for c in cmds: print "CMake:" , cmd shutil.rmtree("build") shutil.rmtree("bin") os.makedirs("build") os.chdir("build") call(cmd) call(["make", "-j4"]) os.chdir("..")
fe267d6beec91c3816e2c3afef2856eb3446a6d6
cmake/externals/vkcpp/CMakeLists.txt
cmake/externals/vkcpp/CMakeLists.txt
set(EXTERNAL_NAME vkcpp) string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER) include(ExternalProject) ExternalProject_Add( ${EXTERNAL_NAME} DOWNLOAD_NAME vkcpp-cmake.zip URL https://codeload.github.com/jherico/vkcpp/zip/cmake #URL_MD5 1ede613de5b3596d7530d4706c546d5b CMAKE_ARGS ${PLATFORM_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DVK_SPEC_URL:STRING=https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/2656f459333b3a1dc63619a9ebd83490eea22e93/src/spec/vk.xml LOG_DOWNLOAD 1 ) # Hide this external target (for ide users) set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "externals") ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR) set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${INSTALL_DIR}/include CACHE TYPE INTERNAL)
set(EXTERNAL_NAME vkcpp) string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER) include(ExternalProject) ExternalProject_Add( ${EXTERNAL_NAME} DOWNLOAD_NAME vkcpp-cmake.zip URL https://codeload.github.com/jherico/vkcpp/zip/cmake URL_MD5 bf5d960fbaa9ff520bbfd97d9a9191ea CMAKE_ARGS ${PLATFORM_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DVK_SPEC_URL:STRING=https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/2656f459333b3a1dc63619a9ebd83490eea22e93/src/spec/vk.xml LOG_DOWNLOAD 1 ) # Hide this external target (for ide users) set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "externals") ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR) set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${INSTALL_DIR}/include CACHE TYPE INTERNAL)
Add MD5 sum to vkcpp dependency
Add MD5 sum to vkcpp dependency
Text
mit
jherico/Vulkan,jherico/Vulkan
text
## Code Before: set(EXTERNAL_NAME vkcpp) string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER) include(ExternalProject) ExternalProject_Add( ${EXTERNAL_NAME} DOWNLOAD_NAME vkcpp-cmake.zip URL https://codeload.github.com/jherico/vkcpp/zip/cmake #URL_MD5 1ede613de5b3596d7530d4706c546d5b CMAKE_ARGS ${PLATFORM_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DVK_SPEC_URL:STRING=https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/2656f459333b3a1dc63619a9ebd83490eea22e93/src/spec/vk.xml LOG_DOWNLOAD 1 ) # Hide this external target (for ide users) set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "externals") ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR) set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${INSTALL_DIR}/include CACHE TYPE INTERNAL) ## Instruction: Add MD5 sum to vkcpp dependency ## Code After: set(EXTERNAL_NAME vkcpp) string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER) include(ExternalProject) ExternalProject_Add( ${EXTERNAL_NAME} DOWNLOAD_NAME vkcpp-cmake.zip URL https://codeload.github.com/jherico/vkcpp/zip/cmake URL_MD5 bf5d960fbaa9ff520bbfd97d9a9191ea CMAKE_ARGS ${PLATFORM_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DVK_SPEC_URL:STRING=https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/2656f459333b3a1dc63619a9ebd83490eea22e93/src/spec/vk.xml LOG_DOWNLOAD 1 ) # Hide this external target (for ide users) set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "externals") ExternalProject_Get_Property(${EXTERNAL_NAME} INSTALL_DIR) set(${EXTERNAL_NAME_UPPER}_INCLUDE_DIRS ${INSTALL_DIR}/include CACHE TYPE INTERNAL)
4da48474b0427113c7ee8c400491c32000ae038b
util/ansible/roles/azuracast-db/tasks/main.yml
util/ansible/roles/azuracast-db/tasks/main.yml
--- - name: Assign PHP User set_fact: php_become_user: "{{ 'root' if testing_mode == true else 'azuracast' }}" - name: Clear AzuraCast Cache become: true become_user: "{{ php_become_user }}" shell: php {{ util_base }}/cli.php cache:clear when: azuracast_db_created.changed - name: Install Initial Database mysql_db: state=import name="azuracast" target="{{ util_base }}/azuracast_db.sql" when: azuracast_db_created.changed - name: Apply All DB Migrations become: true become_user: "{{ php_become_user }}" shell: php {{ util_base }}/cli.php migrations:migrate --no-interaction --allow-no-migration when: azuracast_db_created.changed
--- - name: Clear AzuraCast Cache become: true become_user: azuracast shell: php {{ util_base }}/cli.php cache:clear when: azuracast_db_created.changed and testing_mode == false - name: Install Initial Database mysql_db: state=import name="azuracast" target="{{ util_base }}/azuracast_db.sql" when: azuracast_db_created.changed - name: Apply All DB Migrations become: true become_user: azuracast shell: php {{ util_base }}/cli.php migrations:migrate --no-interaction --allow-no-migration when: azuracast_db_created.changed and testing_mode == false - name: Apply DB Migrations (Testing Mode) become: true shell: php {{ util_base }}/cli.php migrations:migrate --no-interaction --allow-no-migration when: azuracast_db_created.changed and testing_mode == true
Revert Ansible DB operator to fix Travis issues.
Revert Ansible DB operator to fix Travis issues.
YAML
agpl-3.0
SlvrEagle23/AzuraCast,AzuraCast/AzuraCast,SlvrEagle23/AzuraCast,AzuraCast/AzuraCast,AzuraCast/AzuraCast,AzuraCast/AzuraCast,SlvrEagle23/AzuraCast,SlvrEagle23/AzuraCast,SlvrEagle23/AzuraCast
yaml
## Code Before: --- - name: Assign PHP User set_fact: php_become_user: "{{ 'root' if testing_mode == true else 'azuracast' }}" - name: Clear AzuraCast Cache become: true become_user: "{{ php_become_user }}" shell: php {{ util_base }}/cli.php cache:clear when: azuracast_db_created.changed - name: Install Initial Database mysql_db: state=import name="azuracast" target="{{ util_base }}/azuracast_db.sql" when: azuracast_db_created.changed - name: Apply All DB Migrations become: true become_user: "{{ php_become_user }}" shell: php {{ util_base }}/cli.php migrations:migrate --no-interaction --allow-no-migration when: azuracast_db_created.changed ## Instruction: Revert Ansible DB operator to fix Travis issues. ## Code After: --- - name: Clear AzuraCast Cache become: true become_user: azuracast shell: php {{ util_base }}/cli.php cache:clear when: azuracast_db_created.changed and testing_mode == false - name: Install Initial Database mysql_db: state=import name="azuracast" target="{{ util_base }}/azuracast_db.sql" when: azuracast_db_created.changed - name: Apply All DB Migrations become: true become_user: azuracast shell: php {{ util_base }}/cli.php migrations:migrate --no-interaction --allow-no-migration when: azuracast_db_created.changed and testing_mode == false - name: Apply DB Migrations (Testing Mode) become: true shell: php {{ util_base }}/cli.php migrations:migrate --no-interaction --allow-no-migration when: azuracast_db_created.changed and testing_mode == true
fb792452d27be4c6015f417520c600a4b902b721
learning_journal/tests/test_views.py
learning_journal/tests/test_views.py
from pyramid.testing import DummyRequest from learning_journal.models import Entry, DBSession import pytest from learning_journal import main import webtest from learning_journal.views import ( list_view, detail_view, add_view, edit_view ) @pytest.fixture() def app(): settings = {'sqlalchemy.url': 'postgres://danielzwelling:@localhost:5432/learning_journal'} app = main({}, **settings) return webtest.TestApp(app) def test_access_to_view(app): response = app.get('/login') assert response.status_code == 200
from pyramid.testing import DummyRequest from learning_journal.models import Entry, DBSession import pytest from learning_journal import main import webtest from learning_journal.views import ( list_view, detail_view, add_view, edit_view ) @pytest.fixture() def app(): settings = {'sqlalchemy.url': 'postgres://danielzwelling:@localhost:5432/learning_journal'} app = main({}, **settings) return webtest.TestApp(app) def test_access_to_view(app): response = app.get('/login') assert response.status_code == 200 def test_no_access_to_view(app): response = app.get('/login') assert response.status_code == 403
Add test to assert no access to app
Add test to assert no access to app
Python
mit
DZwell/learning_journal,DZwell/learning_journal,DZwell/learning_journal
python
## Code Before: from pyramid.testing import DummyRequest from learning_journal.models import Entry, DBSession import pytest from learning_journal import main import webtest from learning_journal.views import ( list_view, detail_view, add_view, edit_view ) @pytest.fixture() def app(): settings = {'sqlalchemy.url': 'postgres://danielzwelling:@localhost:5432/learning_journal'} app = main({}, **settings) return webtest.TestApp(app) def test_access_to_view(app): response = app.get('/login') assert response.status_code == 200 ## Instruction: Add test to assert no access to app ## Code After: from pyramid.testing import DummyRequest from learning_journal.models import Entry, DBSession import pytest from learning_journal import main import webtest from learning_journal.views import ( list_view, detail_view, add_view, edit_view ) @pytest.fixture() def app(): settings = {'sqlalchemy.url': 'postgres://danielzwelling:@localhost:5432/learning_journal'} app = main({}, **settings) return webtest.TestApp(app) def test_access_to_view(app): response = app.get('/login') assert response.status_code == 200 def test_no_access_to_view(app): response = app.get('/login') assert response.status_code == 403
b68a03323e6a0817cacd9efdbba04c05d69e2122
Kwc/User/Login/Component.twig
Kwc/User/Login/Component.twig
<div class="{{ cssClass }}"> {% block header %} <h1>{{ data.trlKwf('Please login') }}</h1> <p>{{ data.trlKwf('You have to login to see the requested page.') }}</p> {% if register %} <p>{{ data.trlKwf("If you don't have an account, you can") }} {{ renderer.componentLink(register, data.trlKwf('register here')) }}. </p> {% endif %} {% endblock %} {% block lostPassword %} {% if lostPassword %} <p>{{ data.trlKwf("If you have lost your password,") }} {{ renderer.componentLink(lostPassword, data.trlKwf('request a new one here')) }}. </p> {% endif %} {% endblock %} {% block redirects %} {% if redirects %} <ul class="redirects"> {% for r in redirects %} <li> <form method="GET" action="{{ r.url|escape }}"> <input type="hidden" name="redirectAuth" value="{{ r.authMethod|escape }}" /> <input type="hidden" name="redirect" value="{{ r.redirect|escape }}" /> {{ r.formOptions }} <button> {% if r.icon %} <img src="{{ r.icon|escape }}" /> {% else %} {{ r.name|escape }} {% endif %} </button> </form> </li> {% endfor %} </ul> {% endif %} {% endblock %} {% block form %} {{ renderer.component(form) }} {% endblock %} </div>
<div class="{{ cssClass }}"> {% block header %} <h1>{{ data.trlKwf('Please login') }}</h1> <p>{{ data.trlKwf('You have to login to see the requested page.') }}</p> {% if register %} <p>{{ data.trlKwf("If you don't have an account, you can") }} {{ renderer.componentLink(register, data.trlKwf('register here')) }}. </p> {% endif %} {% endblock %} {% block redirects %} {% if redirects %} <ul class="redirects"> {% for r in redirects %} <li> <form method="GET" action="{{ r.url|escape }}"> <input type="hidden" name="redirectAuth" value="{{ r.authMethod|escape }}" /> <input type="hidden" name="redirect" value="{{ r.redirect|escape }}" /> {{ r.formOptions }} <button> {% if r.icon %} <img src="{{ r.icon|escape }}" /> {% else %} {{ r.name|escape }} {% endif %} </button> </form> </li> {% endfor %} </ul> {% endif %} {% endblock %} {% block form %} {{ renderer.component(form) }} {% endblock %} {% block lostPassword %} {% if lostPassword %} <p>{{ data.trlKwf("If you have lost your password,") }} {{ renderer.componentLink(lostPassword, data.trlKwf('request a new one here')) }}. </p> {% endif %} {% endblock %} </div>
Move lostpassword block below form block
Move lostpassword block below form block This block doesn't make sense above everything else.
Twig
bsd-2-clause
koala-framework/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework,kaufmo/koala-framework
twig
## Code Before: <div class="{{ cssClass }}"> {% block header %} <h1>{{ data.trlKwf('Please login') }}</h1> <p>{{ data.trlKwf('You have to login to see the requested page.') }}</p> {% if register %} <p>{{ data.trlKwf("If you don't have an account, you can") }} {{ renderer.componentLink(register, data.trlKwf('register here')) }}. </p> {% endif %} {% endblock %} {% block lostPassword %} {% if lostPassword %} <p>{{ data.trlKwf("If you have lost your password,") }} {{ renderer.componentLink(lostPassword, data.trlKwf('request a new one here')) }}. </p> {% endif %} {% endblock %} {% block redirects %} {% if redirects %} <ul class="redirects"> {% for r in redirects %} <li> <form method="GET" action="{{ r.url|escape }}"> <input type="hidden" name="redirectAuth" value="{{ r.authMethod|escape }}" /> <input type="hidden" name="redirect" value="{{ r.redirect|escape }}" /> {{ r.formOptions }} <button> {% if r.icon %} <img src="{{ r.icon|escape }}" /> {% else %} {{ r.name|escape }} {% endif %} </button> </form> </li> {% endfor %} </ul> {% endif %} {% endblock %} {% block form %} {{ renderer.component(form) }} {% endblock %} </div> ## Instruction: Move lostpassword block below form block This block doesn't make sense above everything else. ## Code After: <div class="{{ cssClass }}"> {% block header %} <h1>{{ data.trlKwf('Please login') }}</h1> <p>{{ data.trlKwf('You have to login to see the requested page.') }}</p> {% if register %} <p>{{ data.trlKwf("If you don't have an account, you can") }} {{ renderer.componentLink(register, data.trlKwf('register here')) }}. </p> {% endif %} {% endblock %} {% block redirects %} {% if redirects %} <ul class="redirects"> {% for r in redirects %} <li> <form method="GET" action="{{ r.url|escape }}"> <input type="hidden" name="redirectAuth" value="{{ r.authMethod|escape }}" /> <input type="hidden" name="redirect" value="{{ r.redirect|escape }}" /> {{ r.formOptions }} <button> {% if r.icon %} <img src="{{ r.icon|escape }}" /> {% else %} {{ r.name|escape }} {% endif %} </button> </form> </li> {% endfor %} </ul> {% endif %} {% endblock %} {% block form %} {{ renderer.component(form) }} {% endblock %} {% block lostPassword %} {% if lostPassword %} <p>{{ data.trlKwf("If you have lost your password,") }} {{ renderer.componentLink(lostPassword, data.trlKwf('request a new one here')) }}. </p> {% endif %} {% endblock %} </div>
f1b08f0cb59acdb91a9d900fe8d88408cdce4dc5
app/services/level_access.rb
app/services/level_access.rb
class LevelAccess < Struct.new(:team) def can_access?(level) return true if level == 1 score = get_score_for(level-1) required = get_required_for(level-1) score >= required end def get_required_for(level) count = get_count_for(level) count > 1 ? count-1 : count end private def get_count_for(level) counts[level] || 0 end def get_score_for(level) scores[level] || 0 end def scores @scores ||= Puzzle.where(:id => guessed_puzzle_ids).group(:level).count end def counts @counts ||= Puzzle.group(:level).count end def guessed_puzzle_ids Guess.where(:team_id => team.id, :correct => true).select('distinct(puzzle_id)') end end
class LevelAccess < Struct.new(:team) def can_access?(level) return true if level == 1 return true if level == 2 score = get_score_for(level-1) required = get_required_for(level-1) score >= required end def get_required_for(level) count = get_count_for(level) count > 1 ? count-1 : count end private def get_count_for(level) counts[level] || 0 end def get_score_for(level) scores[level] || 0 end def scores @scores ||= Puzzle.where(:id => guessed_puzzle_ids).group(:level).count end def counts @counts ||= Puzzle.group(:level).count end def guessed_puzzle_ids Guess.where(:team_id => team.id, :correct => true).select('distinct(puzzle_id)') end end
Enable level 2 for everyone
Enable level 2 for everyone
Ruby
mit
marcinbunsch/beat-the-riddler,marcinbunsch/beat-the-riddler,marcinbunsch/beat-the-riddler
ruby
## Code Before: class LevelAccess < Struct.new(:team) def can_access?(level) return true if level == 1 score = get_score_for(level-1) required = get_required_for(level-1) score >= required end def get_required_for(level) count = get_count_for(level) count > 1 ? count-1 : count end private def get_count_for(level) counts[level] || 0 end def get_score_for(level) scores[level] || 0 end def scores @scores ||= Puzzle.where(:id => guessed_puzzle_ids).group(:level).count end def counts @counts ||= Puzzle.group(:level).count end def guessed_puzzle_ids Guess.where(:team_id => team.id, :correct => true).select('distinct(puzzle_id)') end end ## Instruction: Enable level 2 for everyone ## Code After: class LevelAccess < Struct.new(:team) def can_access?(level) return true if level == 1 return true if level == 2 score = get_score_for(level-1) required = get_required_for(level-1) score >= required end def get_required_for(level) count = get_count_for(level) count > 1 ? count-1 : count end private def get_count_for(level) counts[level] || 0 end def get_score_for(level) scores[level] || 0 end def scores @scores ||= Puzzle.where(:id => guessed_puzzle_ids).group(:level).count end def counts @counts ||= Puzzle.group(:level).count end def guessed_puzzle_ids Guess.where(:team_id => team.id, :correct => true).select('distinct(puzzle_id)') end end
64e52e3339fd2ce2650816aa44bf282e5395a4c2
src/maze_utility_test.php
src/maze_utility_test.php
<?php require('maze_utility.php'); assert(coordinate_to_column('a1n') == 0); assert(coordinate_to_column('b3s') == 1); assert(coordinate_to_column('c5e') == 2); assert(coordinate_to_column('d1s') == 3); assert(coordinate_to_column('e4w') == 4); assert(coordinate_to_row('a1n') == 0); assert(coordinate_to_row('b3s') == 2); assert(coordinate_to_row('c5e') == 4); assert(coordinate_to_row('d1s') == 0); assert(coordinate_to_row('e4w') == 3); echo 'All OK.' . PHP_EOL;
<?php require_once('maze_utility.php'); error_reporting(E_ALL); assert_options(ASSERT_ACTIVE, 1); assert_options(ASSERT_BAIL, 1); assert(coordinate_to_column('a1n') == 0); assert(coordinate_to_column('b3s') == 1); assert(coordinate_to_column('c5e') == 2); assert(coordinate_to_column('d1s') == 3); assert(coordinate_to_column('e4w') == 4); assert(coordinate_to_row('a1n') == 0); assert(coordinate_to_row('b3s') == 2); assert(coordinate_to_row('c5e') == 4); assert(coordinate_to_row('d1s') == 0); assert(coordinate_to_row('e4w') == 3); echo 'All OK.' . PHP_EOL;
Fix maze utility test script
Fix maze utility test script
PHP
mit
CodeMOOC/CodyMazeBot,CodeMOOC/CodyMazeBot,CodeMOOC/CodyMazeBot
php
## Code Before: <?php require('maze_utility.php'); assert(coordinate_to_column('a1n') == 0); assert(coordinate_to_column('b3s') == 1); assert(coordinate_to_column('c5e') == 2); assert(coordinate_to_column('d1s') == 3); assert(coordinate_to_column('e4w') == 4); assert(coordinate_to_row('a1n') == 0); assert(coordinate_to_row('b3s') == 2); assert(coordinate_to_row('c5e') == 4); assert(coordinate_to_row('d1s') == 0); assert(coordinate_to_row('e4w') == 3); echo 'All OK.' . PHP_EOL; ## Instruction: Fix maze utility test script ## Code After: <?php require_once('maze_utility.php'); error_reporting(E_ALL); assert_options(ASSERT_ACTIVE, 1); assert_options(ASSERT_BAIL, 1); assert(coordinate_to_column('a1n') == 0); assert(coordinate_to_column('b3s') == 1); assert(coordinate_to_column('c5e') == 2); assert(coordinate_to_column('d1s') == 3); assert(coordinate_to_column('e4w') == 4); assert(coordinate_to_row('a1n') == 0); assert(coordinate_to_row('b3s') == 2); assert(coordinate_to_row('c5e') == 4); assert(coordinate_to_row('d1s') == 0); assert(coordinate_to_row('e4w') == 3); echo 'All OK.' . PHP_EOL;
54d9429a42cb5b5ec0d10b394e12fc854030cf8b
tasks/go-common.yml
tasks/go-common.yml
--- - name: Install Java 1.7 and some basic dependencies, RH edition yum: name={{item}} state=present with_items: - unzip - which - java-1.7.0-openjdk-devel when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' - name: Install Java 1.7 and some basic dependencies, deb edition. Must be installed before repo. sudo: yes apt: name={{item}} state=present with_items: - python-pycurl - unzip - openjdk-7-jdk when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' - name: thoughtworks go repository, rh edition copy: src=thoughtworks-go-download.repo dest=/etc/yum.repos.d/ owner=root group=root mode=0644 when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' - name: thoughtworks go repository, deb edition sudo: yes apt_repository: repo='deb http://download01.thoughtworks.com/go/debian/ contrib/' state=present when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
--- - name: 'Fail if not using Apt or Yum. Do a manual install for now :-(' fail: msg='This role only supports Yum or Apt package managers at the moment. Please do a manual install instead.' when: ansible_pkg_mgr != 'yum' and ansible_pkg_mgr != 'apt' - name: Install Java 1.7 and some basic dependencies, RH edition yum: name={{item}} state=present with_items: - unzip - which - java-1.7.0-openjdk-devel when: ansible_pkg_mgr == 'yum' - name: Install Java 1.7 and some basic dependencies, deb edition. Must be installed before repo. sudo: yes apt: name={{item}} state=present with_items: - python-pycurl - unzip - openjdk-7-jdk when: ansible_pkg_mgr == 'apt' - name: thoughtworks go repository, rh edition copy: src=thoughtworks-go-download.repo dest=/etc/yum.repos.d/ owner=root group=root mode=0644 when: ansible_pkg_mgr == 'yum' - name: thoughtworks go repository, deb edition sudo: yes apt_repository: repo='deb http://download01.thoughtworks.com/go/debian/ contrib/' state=present when: ansible_pkg_mgr == 'apt'
Use default package manager for the conditioanl.
Use default package manager for the conditioanl.
YAML
mit
Tpbrown/ansible-gocd,lampo/ansible-gocd,mfriedenhagen/ansible-gocd,jonwolski/ansible-gocd,MFAnderson/ansible-gocd,gocd-contrib/ansible-gocd
yaml
## Code Before: --- - name: Install Java 1.7 and some basic dependencies, RH edition yum: name={{item}} state=present with_items: - unzip - which - java-1.7.0-openjdk-devel when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' - name: Install Java 1.7 and some basic dependencies, deb edition. Must be installed before repo. sudo: yes apt: name={{item}} state=present with_items: - python-pycurl - unzip - openjdk-7-jdk when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' - name: thoughtworks go repository, rh edition copy: src=thoughtworks-go-download.repo dest=/etc/yum.repos.d/ owner=root group=root mode=0644 when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' - name: thoughtworks go repository, deb edition sudo: yes apt_repository: repo='deb http://download01.thoughtworks.com/go/debian/ contrib/' state=present when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' ## Instruction: Use default package manager for the conditioanl. ## Code After: --- - name: 'Fail if not using Apt or Yum. Do a manual install for now :-(' fail: msg='This role only supports Yum or Apt package managers at the moment. Please do a manual install instead.' when: ansible_pkg_mgr != 'yum' and ansible_pkg_mgr != 'apt' - name: Install Java 1.7 and some basic dependencies, RH edition yum: name={{item}} state=present with_items: - unzip - which - java-1.7.0-openjdk-devel when: ansible_pkg_mgr == 'yum' - name: Install Java 1.7 and some basic dependencies, deb edition. Must be installed before repo. sudo: yes apt: name={{item}} state=present with_items: - python-pycurl - unzip - openjdk-7-jdk when: ansible_pkg_mgr == 'apt' - name: thoughtworks go repository, rh edition copy: src=thoughtworks-go-download.repo dest=/etc/yum.repos.d/ owner=root group=root mode=0644 when: ansible_pkg_mgr == 'yum' - name: thoughtworks go repository, deb edition sudo: yes apt_repository: repo='deb http://download01.thoughtworks.com/go/debian/ contrib/' state=present when: ansible_pkg_mgr == 'apt'
dd22888b74f9c474652bf0ef5cf7d897dfcadcec
composer.json
composer.json
{ "name": "dominionenterprises/image-util", "description": "A collection of image utilities", "keywords": ["utility", "image"], "authors": [ { "name": "Chad Gray", "email": "[email protected]", "role": "Developer" }, { "name": "Spencer Rinehart", "email": "[email protected]", "role": "Developer" }, { "name": "Jonathan Gaillard", "email": "[email protected]", "role": "Developer" } ], "license": "MIT", "config": { "sort-packages": true }, "require": { "php": "^7.0", "ext-imagick": "~3.0" }, "require-dev": { "php-coveralls/php-coveralls": "^1.0", "phpunit/phpunit": "^6.0", "squizlabs/php_codesniffer": "^3.2" }, "autoload": { "psr-4": { "TraderInteractive\\Util\\": "src" } } }
{ "name": "traderinteractive/image-util", "description": "A collection of image utilities", "keywords": ["utility", "image"], "authors": [ { "name": "Chad Gray", "email": "[email protected]", "role": "Developer" }, { "name": "Spencer Rinehart", "email": "[email protected]", "role": "Developer" }, { "name": "Jonathan Gaillard", "email": "[email protected]", "role": "Developer" } ], "license": "MIT", "config": { "sort-packages": true }, "require": { "php": "^7.0", "ext-imagick": "~3.0" }, "require-dev": { "php-coveralls/php-coveralls": "^1.0", "phpunit/phpunit": "^6.0", "squizlabs/php_codesniffer": "^3.2" }, "autoload": { "psr-4": { "TraderInteractive\\Util\\": "src" } } }
Change package owner to traderinteractive
Change package owner to traderinteractive
JSON
mit
chadicus/image-util-php
json
## Code Before: { "name": "dominionenterprises/image-util", "description": "A collection of image utilities", "keywords": ["utility", "image"], "authors": [ { "name": "Chad Gray", "email": "[email protected]", "role": "Developer" }, { "name": "Spencer Rinehart", "email": "[email protected]", "role": "Developer" }, { "name": "Jonathan Gaillard", "email": "[email protected]", "role": "Developer" } ], "license": "MIT", "config": { "sort-packages": true }, "require": { "php": "^7.0", "ext-imagick": "~3.0" }, "require-dev": { "php-coveralls/php-coveralls": "^1.0", "phpunit/phpunit": "^6.0", "squizlabs/php_codesniffer": "^3.2" }, "autoload": { "psr-4": { "TraderInteractive\\Util\\": "src" } } } ## Instruction: Change package owner to traderinteractive ## Code After: { "name": "traderinteractive/image-util", "description": "A collection of image utilities", "keywords": ["utility", "image"], "authors": [ { "name": "Chad Gray", "email": "[email protected]", "role": "Developer" }, { "name": "Spencer Rinehart", "email": "[email protected]", "role": "Developer" }, { "name": "Jonathan Gaillard", "email": "[email protected]", "role": "Developer" } ], "license": "MIT", "config": { "sort-packages": true }, "require": { "php": "^7.0", "ext-imagick": "~3.0" }, "require-dev": { "php-coveralls/php-coveralls": "^1.0", "phpunit/phpunit": "^6.0", "squizlabs/php_codesniffer": "^3.2" }, "autoload": { "psr-4": { "TraderInteractive\\Util\\": "src" } } }
6176fac570a41c8e5743ae98ce3d0c03cd2e86fa
.travis.yml
.travis.yml
language: php php: [5.3.3, 5.3, 5.4, 5.5, 5.6, hhvm] matrix: allow_failures: - php: 5.6 before_script: - composer selfupdate - export COMPOSER_ROOT_VERSION=2.0.0-RC3 - composer install --prefer-source script: - bin/phpspec run - ./vendor/bin/behat --format=pretty
language: php php: [5.3.3, 5.3, 5.4, 5.5, 5.6, hhvm, hhvm-nightly] matrix: allow_failures: - php: 5.6 - php: hhvm before_script: - composer selfupdate - export COMPOSER_ROOT_VERSION=2.0.0-RC3 - composer install --prefer-source script: - bin/phpspec run - ./vendor/bin/behat --format=pretty
Use HHVM nightly since 3.1 has regressions in the Reflection API.
Use HHVM nightly since 3.1 has regressions in the Reflection API.
YAML
mit
ghamoron/phpspec,Elfiggo/phpspec,docteurklein/phpspec,javi-dev/phpspec,sroze/phpspec,ulabox/phpspec,localheinz/phpspec,localheinz/phpspec,javi-dev/phpspec,ghamoron/phpspec,gnugat-forks/phpspec,rawkode/phpspec,jon-acker/phpspec,Elfiggo/phpspec,danielkmariam/phpspec,sroze/phpspec,carlosV2/phpspec,nosun/phpspec,jon-acker/phpspec,pamil/phpspec,iakio/phpspec,danielkmariam/phpspec,pamil/phpspec,shanethehat/phpspec,Harrisonbro/phpspec,nosun/phpspec,bestform/phpspec,shanethehat/phpspec,gnugat-forks/phpspec,Dragonrun1/phpspec,iakio/phpspec,ulabox/phpspec,rawkode/phpspec,Harrisonbro/phpspec,carlosV2/phpspec,Dragonrun1/phpspec,docteurklein/phpspec,bestform/phpspec
yaml
## Code Before: language: php php: [5.3.3, 5.3, 5.4, 5.5, 5.6, hhvm] matrix: allow_failures: - php: 5.6 before_script: - composer selfupdate - export COMPOSER_ROOT_VERSION=2.0.0-RC3 - composer install --prefer-source script: - bin/phpspec run - ./vendor/bin/behat --format=pretty ## Instruction: Use HHVM nightly since 3.1 has regressions in the Reflection API. ## Code After: language: php php: [5.3.3, 5.3, 5.4, 5.5, 5.6, hhvm, hhvm-nightly] matrix: allow_failures: - php: 5.6 - php: hhvm before_script: - composer selfupdate - export COMPOSER_ROOT_VERSION=2.0.0-RC3 - composer install --prefer-source script: - bin/phpspec run - ./vendor/bin/behat --format=pretty
f01e2a5e8832f69a2c6e74127a9e1b1f095878b2
ansible/roles/common_config/tasks/rhel.yml
ansible/roles/common_config/tasks/rhel.yml
--- # Redhat/CentOS specficic actions - name: Ensure common packages are installed yum: name={{ item }} state=present with_items: rhel_common_packages - name: Change to 64-bit inodes to avoid hash collisions mount: name: "{{ item.mount }}" src: "{{ item.device }}" fstype: "xfs" opts: "defaults" state: mounted with_items: hostvars[inventory_hostname].ansible_mounts when: item.fstype == "xfs"
--- # Redhat/CentOS specficic actions - name: Ensure common packages are installed yum: name={{ item }} state=present with_items: "{{ rhel_common_packages }}"
Use the correct variables, remove issues with XFS mount points
Use the correct variables, remove issues with XFS mount points
YAML
mit
proffalken/aws-blog-framework,proffalken/aws-blog-framework,proffalken/aws-blog-framework
yaml
## Code Before: --- # Redhat/CentOS specficic actions - name: Ensure common packages are installed yum: name={{ item }} state=present with_items: rhel_common_packages - name: Change to 64-bit inodes to avoid hash collisions mount: name: "{{ item.mount }}" src: "{{ item.device }}" fstype: "xfs" opts: "defaults" state: mounted with_items: hostvars[inventory_hostname].ansible_mounts when: item.fstype == "xfs" ## Instruction: Use the correct variables, remove issues with XFS mount points ## Code After: --- # Redhat/CentOS specficic actions - name: Ensure common packages are installed yum: name={{ item }} state=present with_items: "{{ rhel_common_packages }}"
3402aba4a8ae0ca38c2bc54c5ea4e4a8d04813e1
client/layout.html
client/layout.html
<head> <title>GetReel - Application Form</title> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body class="container"></body> <template name="Layout"> <header> <nav> <a href="{{pathFor route='home'}}">home</a> </nav> </header> {{> yield}} <footer> <small> Made with &lt;3 in 2015 by <a href="http://www.ingloriouscoderz.com" target="_blank">IngloriousCoderz</a> </small> </footer> </template>
<head> <title>GetReel</title> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body class="container"></body> <template name="Layout"> <header> <nav> <a href="{{pathFor route='home'}}">home</a> </nav> </header> {{> yield}} <footer> <small> Made with &lt;3 in 2015 by <a href="http://www.ingloriouscoderz.com" target="_blank">IngloriousCoderz</a> </small> </footer> </template>
Fix incorrect spacing in HTML template
Fix incorrect spacing in HTML template
HTML
apache-2.0
IngloriousCoderz/GetReel,IngloriousCoderz/GetReel
html
## Code Before: <head> <title>GetReel - Application Form</title> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body class="container"></body> <template name="Layout"> <header> <nav> <a href="{{pathFor route='home'}}">home</a> </nav> </header> {{> yield}} <footer> <small> Made with &lt;3 in 2015 by <a href="http://www.ingloriouscoderz.com" target="_blank">IngloriousCoderz</a> </small> </footer> </template> ## Instruction: Fix incorrect spacing in HTML template ## Code After: <head> <title>GetReel</title> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body class="container"></body> <template name="Layout"> <header> <nav> <a href="{{pathFor route='home'}}">home</a> </nav> </header> {{> yield}} <footer> <small> Made with &lt;3 in 2015 by <a href="http://www.ingloriouscoderz.com" target="_blank">IngloriousCoderz</a> </small> </footer> </template>
0092065efb5ddffd4122c50eb95c867ac97468fa
_config.yml
_config.yml
name: The Digital Journal of Carlos Cuéllar tagline: 'Standard Nerd' description: 'A personal blog about design, technology, music and procrastination.' url: http://carloscuellar.net author: name: 'Carlos Cuellar' email: '[email protected]' markdown: kramdown permalink: /blog/:title/ highlighter: pygments paginate: 10 defaults: - scope: path: "" # an empty string here means all files in the project values: layout: "post" author: "Carlos Cuéllar" # Use the following plug-ins gems: - jemoji # Emoji please! - jekyll-sitemap # Create a sitemap using the official Jekyll sitemap gem - jekyll-redirect-from # Exclude these files from your production _site exclude: - Gemfile - Gemfile.lock - LICENSE - README.md # Set the Sass partials directory, as we're using @imports sass: sass_dir: _scss style: :compressed
name: The Digital Journal of Carlos Cuéllar tagline: 'Standard Nerd' description: 'A personal blog about design, technology, music and procrastination.' url: http://carloscuellar.net author: name: 'Carlos Cuellar' email: '[email protected]' markdown: kramdown permalink: /blog/:title/ highlighter: rouge paginate: 10 defaults: - scope: path: "" # an empty string here means all files in the project values: layout: "post" author: "Carlos Cuéllar" # Use the following plug-ins gems: - jemoji # Emoji please! - jekyll-sitemap # Create a sitemap using the official Jekyll sitemap gem - jekyll-redirect-from - jekyll-paginate # Exclude these files from your production _site exclude: - Gemfile - Gemfile.lock - LICENSE - README.md # Set the Sass partials directory, as we're using @imports sass: sass_dir: _scss style: :compressed
Update config so it plays nicely with github pages
Update config so it plays nicely with github pages
YAML
mit
cuellarfr/cuellarfr.github.io,cuellarfr/cuellarfr.github.io
yaml
## Code Before: name: The Digital Journal of Carlos Cuéllar tagline: 'Standard Nerd' description: 'A personal blog about design, technology, music and procrastination.' url: http://carloscuellar.net author: name: 'Carlos Cuellar' email: '[email protected]' markdown: kramdown permalink: /blog/:title/ highlighter: pygments paginate: 10 defaults: - scope: path: "" # an empty string here means all files in the project values: layout: "post" author: "Carlos Cuéllar" # Use the following plug-ins gems: - jemoji # Emoji please! - jekyll-sitemap # Create a sitemap using the official Jekyll sitemap gem - jekyll-redirect-from # Exclude these files from your production _site exclude: - Gemfile - Gemfile.lock - LICENSE - README.md # Set the Sass partials directory, as we're using @imports sass: sass_dir: _scss style: :compressed ## Instruction: Update config so it plays nicely with github pages ## Code After: name: The Digital Journal of Carlos Cuéllar tagline: 'Standard Nerd' description: 'A personal blog about design, technology, music and procrastination.' url: http://carloscuellar.net author: name: 'Carlos Cuellar' email: '[email protected]' markdown: kramdown permalink: /blog/:title/ highlighter: rouge paginate: 10 defaults: - scope: path: "" # an empty string here means all files in the project values: layout: "post" author: "Carlos Cuéllar" # Use the following plug-ins gems: - jemoji # Emoji please! - jekyll-sitemap # Create a sitemap using the official Jekyll sitemap gem - jekyll-redirect-from - jekyll-paginate # Exclude these files from your production _site exclude: - Gemfile - Gemfile.lock - LICENSE - README.md # Set the Sass partials directory, as we're using @imports sass: sass_dir: _scss style: :compressed
4cfc0967cef576ab5d6ddd0fff7d648e77739727
test_scriptrunner.py
test_scriptrunner.py
from antZoo.ant import AntJobRunner ant = AntJobRunner( None ) ant.start() class Job: def __init__( self, source ): self.source = source j = Job( "/Users/elchupa/code/school/antZoo/localenv/bin/python /Users/elchupa/code/school/antZoo/example_code/word_count.py" ) ant.push( j ) for i in range( 100 ): ant.new_task( "this is a test\n" ) print "Done sending tasks." ant.finish() ant._runner.join()
from antZoo.ant import AntJobRunner ant = AntJobRunner( None ) ant.start() class Job: def __init__( self, source ): self.source = source j = Job( "/Users/elchupa/code/school/antZoo/localenv/bin/python /Users/elchupa/code/school/antZoo/example_code/word_count.py" ) ant.push( j ) for i in range( 100 ): ant.new_task( "this is a test\n" ) print "Done sending tasks." ant.finish() ant._runner.join() j = Job( "/Users/elchupa/code/school/antZoo/localenv/bin/python /Users/elchupa/code/school/antZoo/example_code/word_count.py" ) ant.push( j ) for i in range( 100 ): ant.new_task( "this is another test that is to be run :D\n" ) print "Done sending tasks." ant.finish() ant._runner.join()
Test runs two jobs and 200 tasks
Test runs two jobs and 200 tasks
Python
mit
streed/antZoo,streed/antZoo
python
## Code Before: from antZoo.ant import AntJobRunner ant = AntJobRunner( None ) ant.start() class Job: def __init__( self, source ): self.source = source j = Job( "/Users/elchupa/code/school/antZoo/localenv/bin/python /Users/elchupa/code/school/antZoo/example_code/word_count.py" ) ant.push( j ) for i in range( 100 ): ant.new_task( "this is a test\n" ) print "Done sending tasks." ant.finish() ant._runner.join() ## Instruction: Test runs two jobs and 200 tasks ## Code After: from antZoo.ant import AntJobRunner ant = AntJobRunner( None ) ant.start() class Job: def __init__( self, source ): self.source = source j = Job( "/Users/elchupa/code/school/antZoo/localenv/bin/python /Users/elchupa/code/school/antZoo/example_code/word_count.py" ) ant.push( j ) for i in range( 100 ): ant.new_task( "this is a test\n" ) print "Done sending tasks." ant.finish() ant._runner.join() j = Job( "/Users/elchupa/code/school/antZoo/localenv/bin/python /Users/elchupa/code/school/antZoo/example_code/word_count.py" ) ant.push( j ) for i in range( 100 ): ant.new_task( "this is another test that is to be run :D\n" ) print "Done sending tasks." ant.finish() ant._runner.join()
4de44950d91da3a03128d755d9054b1bc4451aa3
.travis.yml
.travis.yml
language: python python: - "2.6" - "2.7" # command to install dependencies install: - touch README.txt - pip install . - pip install -r requirements.txt - pip install pep8 # command to run tests script: make check
language: python python: - '2.6' - '2.7' install: - touch README.txt - pip install . - pip install -r requirements.txt - pip install pep8 script: make check notifications: slack: secure: fCkmPpcIOM5Q7YFlHKaXF4SCirVmCK+CusH2jGTL7wql1OsXyooucVoB2V7IUsBuqKjR1I3aShIAuTGMZjboY6MCl+8n85cYsRpIzMWY7i4r7KKVL2EEWoX+plK6SlrzexkiteVHDJW9nwSv0bMWAtVavCyp6yxqbVaDU06oavo=
Add Travis CI-Slack integration, post onto anzdevops-ci group
Add Travis CI-Slack integration, post onto anzdevops-ci group
YAML
apache-2.0
boxidau/rax-autoscaler,rackerlabs/rax-autoscaler,boxidau/rax-autoscaler,eljrax/rax-autoscaler
yaml
## Code Before: language: python python: - "2.6" - "2.7" # command to install dependencies install: - touch README.txt - pip install . - pip install -r requirements.txt - pip install pep8 # command to run tests script: make check ## Instruction: Add Travis CI-Slack integration, post onto anzdevops-ci group ## Code After: language: python python: - '2.6' - '2.7' install: - touch README.txt - pip install . - pip install -r requirements.txt - pip install pep8 script: make check notifications: slack: secure: fCkmPpcIOM5Q7YFlHKaXF4SCirVmCK+CusH2jGTL7wql1OsXyooucVoB2V7IUsBuqKjR1I3aShIAuTGMZjboY6MCl+8n85cYsRpIzMWY7i4r7KKVL2EEWoX+plK6SlrzexkiteVHDJW9nwSv0bMWAtVavCyp6yxqbVaDU06oavo=
bce9205e430e94918476ae62579f9e3c811294d7
test/Parser/ms-inline-asm.c
test/Parser/ms-inline-asm.c
// REQUIRES: x86-registered-target // RUN: %clang_cc1 %s -verify -fasm-blocks #define M __asm int 0x2c #define M2 int void t1(void) { M } void t2(void) { __asm int 0x2c } void t3(void) { __asm M2 0x2c } void t4(void) { __asm mov eax, fs:[0x10] } void t5() { __asm { int 0x2c ; } asm comments are fun! }{ } __asm {} } int t6() { __asm int 3 ; } comments for single-line asm __asm {} __asm int 4 return 10; } void t7() { __asm { push ebx mov ebx, 0x07 pop ebx } } void t8() { __asm nop __asm nop __asm nop } void t9() { __asm nop __asm nop ; __asm nop } int t_fail() { // expected-note {{to match this}} __asm __asm { // expected-error 3 {{expected}} expected-note {{to match this}}
// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -verify -fasm-blocks #define M __asm int 0x2c #define M2 int void t1(void) { M } void t2(void) { __asm int 0x2c } void t3(void) { __asm M2 0x2c } void t4(void) { __asm mov eax, fs:[0x10] } void t5() { __asm { int 0x2c ; } asm comments are fun! }{ } __asm {} } int t6() { __asm int 3 ; } comments for single-line asm __asm {} __asm int 4 return 10; } void t7() { __asm { push ebx mov ebx, 0x07 pop ebx } } void t8() { __asm nop __asm nop __asm nop } void t9() { __asm nop __asm nop ; __asm nop } int t_fail() { // expected-note {{to match this}} __asm __asm { // expected-error 3 {{expected}} expected-note {{to match this}}
Add a triple, per Ben's suggestion.
Add a triple, per Ben's suggestion. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@173198 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
c
## Code Before: // REQUIRES: x86-registered-target // RUN: %clang_cc1 %s -verify -fasm-blocks #define M __asm int 0x2c #define M2 int void t1(void) { M } void t2(void) { __asm int 0x2c } void t3(void) { __asm M2 0x2c } void t4(void) { __asm mov eax, fs:[0x10] } void t5() { __asm { int 0x2c ; } asm comments are fun! }{ } __asm {} } int t6() { __asm int 3 ; } comments for single-line asm __asm {} __asm int 4 return 10; } void t7() { __asm { push ebx mov ebx, 0x07 pop ebx } } void t8() { __asm nop __asm nop __asm nop } void t9() { __asm nop __asm nop ; __asm nop } int t_fail() { // expected-note {{to match this}} __asm __asm { // expected-error 3 {{expected}} expected-note {{to match this}} ## Instruction: Add a triple, per Ben's suggestion. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@173198 91177308-0d34-0410-b5e6-96231b3b80d8 ## Code After: // RUN: %clang_cc1 %s -triple i386-apple-darwin10 -verify -fasm-blocks #define M __asm int 0x2c #define M2 int void t1(void) { M } void t2(void) { __asm int 0x2c } void t3(void) { __asm M2 0x2c } void t4(void) { __asm mov eax, fs:[0x10] } void t5() { __asm { int 0x2c ; } asm comments are fun! }{ } __asm {} } int t6() { __asm int 3 ; } comments for single-line asm __asm {} __asm int 4 return 10; } void t7() { __asm { push ebx mov ebx, 0x07 pop ebx } } void t8() { __asm nop __asm nop __asm nop } void t9() { __asm nop __asm nop ; __asm nop } int t_fail() { // expected-note {{to match this}} __asm __asm { // expected-error 3 {{expected}} expected-note {{to match this}}
e5c002c5135bcce5176bd82317833d45ecee2591
docker-compose.yml
docker-compose.yml
version: "3" services: build: image: node:alpine working_dir: /home/node/app environment: - NODE_ENV=production volumes: - ./:/home/node/app command: "yarn && yarn build:production"
version: "3" services: build: image: node:alpine working_dir: /home/node/app environment: - NODE_ENV=production volumes: - ./:/home/node/app command: "rm -rf /home/node/app/public && yarn && yarn build:production"
Clean build directory when deploying.
Clean build directory when deploying.
YAML
mit
jsonnull/jsonnull.com,jsonnull/jsonnull.com,jsonnull/jsonnull.com
yaml
## Code Before: version: "3" services: build: image: node:alpine working_dir: /home/node/app environment: - NODE_ENV=production volumes: - ./:/home/node/app command: "yarn && yarn build:production" ## Instruction: Clean build directory when deploying. ## Code After: version: "3" services: build: image: node:alpine working_dir: /home/node/app environment: - NODE_ENV=production volumes: - ./:/home/node/app command: "rm -rf /home/node/app/public && yarn && yarn build:production"
7bfc3ccb56a331fd1bf86606baddf1ea38f78e4a
assets/js/work2.js
assets/js/work2.js
/* * I am working on this */ (function() { var test = "test", test2 = "test2"; function log() { console.log(test + " - " + test2); } })()
/* * I am working on this */ (function() { var test = "test", test2 = "test2"; function log() { console.log(test + " - " + test2); } log(); })()
Call log() function - testing functionallity.
Call log() function - testing functionallity.
JavaScript
mit
m-xristov/opengym,m-xristov/opengym,m-xristov/opengym
javascript
## Code Before: /* * I am working on this */ (function() { var test = "test", test2 = "test2"; function log() { console.log(test + " - " + test2); } })() ## Instruction: Call log() function - testing functionallity. ## Code After: /* * I am working on this */ (function() { var test = "test", test2 = "test2"; function log() { console.log(test + " - " + test2); } log(); })()
c9fcd412450ddde9856b10a7ca08d84a7875124d
.config/emacs/core.el
.config/emacs/core.el
(setq inhibit-startup-message t) ;; theme (if (file-exists-p "~/.light") (setq-default frame-background-mode 'light) (setq-default frame-background-mode 'dark)) (if (file-exists-p "~/.light") (load-theme 'solarized-light t) (load-theme 'solarized-dark t)) ;; display (setq display-time-24hr-format t) (unless window-system (menu-bar-mode -1) (if (functionp 'scroll-bar-mode) (scroll-bar-mode 0))) (if (functionp 'tool-bar-mode) (tool-bar-mode 0)) ;; backup (setq backup-directory-alist `((".*" . ,temporary-file-directory))) ;; tab-complete (setq ac-auto-start 3) ;; whitespace (setq-default show-trailing-whitespace t) (setq require-final-newline t)
(setq inhibit-startup-message t) ;; theme (if (file-exists-p "~/.light") (setq-default frame-background-mode 'light) (setq-default frame-background-mode 'dark)) (if (file-exists-p "~/.light") (load-theme 'solarized-light t) (load-theme 'solarized-dark t)) ;; display (setq display-time-24hr-format t) (unless window-system (menu-bar-mode -1) (if (functionp 'scroll-bar-mode) (scroll-bar-mode 0))) (if (functionp 'tool-bar-mode) (tool-bar-mode 0)) ;; backup (setq backup-directory-alist `((".*" . ,temporary-file-directory))) (setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t))) ;; tab-complete (setq ac-auto-start 3) ;; whitespace (setq-default show-trailing-whitespace t) (setq require-final-newline t)
Move all emacs temp files to /tmp
Move all emacs temp files to /tmp
Emacs Lisp
mit
spapanik/configuration,spapanik/configuration
emacs-lisp
## Code Before: (setq inhibit-startup-message t) ;; theme (if (file-exists-p "~/.light") (setq-default frame-background-mode 'light) (setq-default frame-background-mode 'dark)) (if (file-exists-p "~/.light") (load-theme 'solarized-light t) (load-theme 'solarized-dark t)) ;; display (setq display-time-24hr-format t) (unless window-system (menu-bar-mode -1) (if (functionp 'scroll-bar-mode) (scroll-bar-mode 0))) (if (functionp 'tool-bar-mode) (tool-bar-mode 0)) ;; backup (setq backup-directory-alist `((".*" . ,temporary-file-directory))) ;; tab-complete (setq ac-auto-start 3) ;; whitespace (setq-default show-trailing-whitespace t) (setq require-final-newline t) ## Instruction: Move all emacs temp files to /tmp ## Code After: (setq inhibit-startup-message t) ;; theme (if (file-exists-p "~/.light") (setq-default frame-background-mode 'light) (setq-default frame-background-mode 'dark)) (if (file-exists-p "~/.light") (load-theme 'solarized-light t) (load-theme 'solarized-dark t)) ;; display (setq display-time-24hr-format t) (unless window-system (menu-bar-mode -1) (if (functionp 'scroll-bar-mode) (scroll-bar-mode 0))) (if (functionp 'tool-bar-mode) (tool-bar-mode 0)) ;; backup (setq backup-directory-alist `((".*" . ,temporary-file-directory))) (setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t))) ;; tab-complete (setq ac-auto-start 3) ;; whitespace (setq-default show-trailing-whitespace t) (setq require-final-newline t)
b023c858e6d2a77a613bb68c751ce16da7d47d48
Sources/Helpers/NSBundle+Cocoapods.swift
Sources/Helpers/NSBundle+Cocoapods.swift
// // NSBundle+Cocoapods.swift // Pods // // Created by Jelle Vandebeeck on 08/06/16. // // import Foundation class BaseBundle {} extension Bundle { static func deliriumBundle() -> Bundle { let bundlePath = Bundle(for: BaseBundle.self).path(forResource: "Delirium", ofType: "bundle")! return Bundle(path: bundlePath)! } fileprivate static func localeBundle() -> Bundle { // Fetch your current language. let components = Locale.components(fromIdentifier: Locale.current.identifier) let language = components[Locale.current.languageCode!] // When we can't find the bundle we prepare the English bunde. var path = deliriumBundle().path(forResource: language, ofType: "lproj") if path == nil { path = deliriumBundle().path(forResource: "en", ofType: "lproj") } return Bundle(path: path!)! } } extension String { var localizedString: String { return NSLocalizedString(self, bundle: Bundle.localeBundle(), comment: "") } }
// // NSBundle+Cocoapods.swift // Pods // // Created by Jelle Vandebeeck on 08/06/16. // // import Foundation class BaseBundle {} extension Bundle { static func deliriumBundle() -> Bundle { let bundlePath = Bundle(for: BaseBundle.self).path(forResource: "Delirium", ofType: "bundle")! return Bundle(path: bundlePath)! } fileprivate static func localeBundle() -> Bundle { // Fetch your current language. let components = Locale.components(fromIdentifier: Locale.current.identifier) let language = components[Locale.current.languageCode!] // When we can't find the bundle we prepare the English bunde. var path = deliriumBundle().path(forResource: language, ofType: "lproj") if path == nil { path = deliriumBundle().path(forResource: "en", ofType: "lproj") } return Bundle(path: path!)! } } extension String { var localizedString: String { return NSLocalizedString(self, tableName: "DeliriumLocalizable", bundle: Bundle.localeBundle(), comment: "") } }
Use the correct localizable file from the pod.
Use the correct localizable file from the pod.
Swift
mit
icapps/ios-delirium,icapps/ios-delirium
swift
## Code Before: // // NSBundle+Cocoapods.swift // Pods // // Created by Jelle Vandebeeck on 08/06/16. // // import Foundation class BaseBundle {} extension Bundle { static func deliriumBundle() -> Bundle { let bundlePath = Bundle(for: BaseBundle.self).path(forResource: "Delirium", ofType: "bundle")! return Bundle(path: bundlePath)! } fileprivate static func localeBundle() -> Bundle { // Fetch your current language. let components = Locale.components(fromIdentifier: Locale.current.identifier) let language = components[Locale.current.languageCode!] // When we can't find the bundle we prepare the English bunde. var path = deliriumBundle().path(forResource: language, ofType: "lproj") if path == nil { path = deliriumBundle().path(forResource: "en", ofType: "lproj") } return Bundle(path: path!)! } } extension String { var localizedString: String { return NSLocalizedString(self, bundle: Bundle.localeBundle(), comment: "") } } ## Instruction: Use the correct localizable file from the pod. ## Code After: // // NSBundle+Cocoapods.swift // Pods // // Created by Jelle Vandebeeck on 08/06/16. // // import Foundation class BaseBundle {} extension Bundle { static func deliriumBundle() -> Bundle { let bundlePath = Bundle(for: BaseBundle.self).path(forResource: "Delirium", ofType: "bundle")! return Bundle(path: bundlePath)! } fileprivate static func localeBundle() -> Bundle { // Fetch your current language. let components = Locale.components(fromIdentifier: Locale.current.identifier) let language = components[Locale.current.languageCode!] // When we can't find the bundle we prepare the English bunde. var path = deliriumBundle().path(forResource: language, ofType: "lproj") if path == nil { path = deliriumBundle().path(forResource: "en", ofType: "lproj") } return Bundle(path: path!)! } } extension String { var localizedString: String { return NSLocalizedString(self, tableName: "DeliriumLocalizable", bundle: Bundle.localeBundle(), comment: "") } }
de57268e9f92ba964aa5a35d05ef3b3af413314d
tests/wpt/mozilla/meta/mozilla/worklets/__dir__.ini
tests/wpt/mozilla/meta/mozilla/worklets/__dir__.ini
prefs: [dom.worklet.enabled:true,dom.worklet.blockingsleep.enabled:true]
prefs: [dom.worklet.enabled:true,dom.worklet.blockingsleep.enabled:true,dom.worklet.timeout_ms:5000]
Add timeout pref to the mozilla/worklets wpt tests
Add timeout pref to the mozilla/worklets wpt tests
INI
mpl-2.0
KiChjang/servo,peterjoel/servo,anthgur/servo,jimberlage/servo,splav/servo,paulrouget/servo,saneyuki/servo,saneyuki/servo,avadacatavra/servo,pyfisch/servo,jimberlage/servo,DominoTree/servo,saneyuki/servo,peterjoel/servo,paulrouget/servo,sadmansk/servo,jimberlage/servo,splav/servo,splav/servo,anthgur/servo,larsbergstrom/servo,splav/servo,canaltinova/servo,emilio/servo,emilio/servo,anthgur/servo,nnethercote/servo,paulrouget/servo,dati91/servo,emilio/servo,jimberlage/servo,upsuper/servo,nnethercote/servo,cbrewster/servo,pyfisch/servo,nnethercote/servo,mattnenterprise/servo,paulrouget/servo,szeged/servo,larsbergstrom/servo,SimonSapin/servo,upsuper/servo,splav/servo,sadmansk/servo,jimberlage/servo,KiChjang/servo,ConnorGBrewster/servo,cbrewster/servo,notriddle/servo,paulrouget/servo,splav/servo,upsuper/servo,nnethercote/servo,KiChjang/servo,DominoTree/servo,ConnorGBrewster/servo,SimonSapin/servo,DominoTree/servo,larsbergstrom/servo,KiChjang/servo,paulrouget/servo,saneyuki/servo,emilio/servo,cbrewster/servo,canaltinova/servo,canaltinova/servo,mbrubeck/servo,nnethercote/servo,notriddle/servo,KiChjang/servo,SimonSapin/servo,SimonSapin/servo,larsbergstrom/servo,emilio/servo,notriddle/servo,szeged/servo,mbrubeck/servo,upsuper/servo,notriddle/servo,saneyuki/servo,dati91/servo,DominoTree/servo,DominoTree/servo,notriddle/servo,ConnorGBrewster/servo,notriddle/servo,szeged/servo,szeged/servo,KiChjang/servo,notriddle/servo,mbrubeck/servo,szeged/servo,dati91/servo,mattnenterprise/servo,dati91/servo,anthgur/servo,mbrubeck/servo,pyfisch/servo,paulrouget/servo,pyfisch/servo,emilio/servo,saneyuki/servo,mbrubeck/servo,mattnenterprise/servo,peterjoel/servo,avadacatavra/servo,pyfisch/servo,emilio/servo,saneyuki/servo,upsuper/servo,ConnorGBrewster/servo,emilio/servo,mattnenterprise/servo,splav/servo,nnethercote/servo,SimonSapin/servo,dati91/servo,dati91/servo,DominoTree/servo,dati91/servo,cbrewster/servo,KiChjang/servo,mbrubeck/servo,sadmansk/servo,avadacatavra/servo,splav/servo,emilio/servo,larsbergstrom/servo,szeged/servo,avadacatavra/servo,DominoTree/servo,KiChjang/servo,avadacatavra/servo,anthgur/servo,jimberlage/servo,notriddle/servo,canaltinova/servo,saneyuki/servo,pyfisch/servo,peterjoel/servo,DominoTree/servo,ConnorGBrewster/servo,pyfisch/servo,peterjoel/servo,emilio/servo,avadacatavra/servo,avadacatavra/servo,KiChjang/servo,saneyuki/servo,sadmansk/servo,cbrewster/servo,cbrewster/servo,notriddle/servo,upsuper/servo,paulrouget/servo,sadmansk/servo,pyfisch/servo,mattnenterprise/servo,SimonSapin/servo,sadmansk/servo,szeged/servo,pyfisch/servo,jimberlage/servo,nnethercote/servo,jimberlage/servo,larsbergstrom/servo,pyfisch/servo,larsbergstrom/servo,ConnorGBrewster/servo,upsuper/servo,cbrewster/servo,paulrouget/servo,mattnenterprise/servo,SimonSapin/servo,DominoTree/servo,sadmansk/servo,canaltinova/servo,dati91/servo,KiChjang/servo,peterjoel/servo,szeged/servo,szeged/servo,anthgur/servo,upsuper/servo,notriddle/servo,anthgur/servo,canaltinova/servo,paulrouget/servo,splav/servo,larsbergstrom/servo,avadacatavra/servo,splav/servo,szeged/servo,peterjoel/servo,ConnorGBrewster/servo,SimonSapin/servo,saneyuki/servo,canaltinova/servo,DominoTree/servo,cbrewster/servo,larsbergstrom/servo,mbrubeck/servo,mbrubeck/servo,mattnenterprise/servo,nnethercote/servo,nnethercote/servo,mattnenterprise/servo,anthgur/servo,nnethercote/servo,canaltinova/servo,jimberlage/servo,peterjoel/servo,ConnorGBrewster/servo,sadmansk/servo,peterjoel/servo,peterjoel/servo,larsbergstrom/servo
ini
## Code Before: prefs: [dom.worklet.enabled:true,dom.worklet.blockingsleep.enabled:true] ## Instruction: Add timeout pref to the mozilla/worklets wpt tests ## Code After: prefs: [dom.worklet.enabled:true,dom.worklet.blockingsleep.enabled:true,dom.worklet.timeout_ms:5000]
77a49e17fcc506ab1e775952493a1aa9c0ad6242
app/workers/download_manuscript_worker.rb
app/workers/download_manuscript_worker.rb
class DownloadManuscriptWorker include Sidekiq::Worker def perform(manuscript_id, url) manuscript = Manuscript.find(manuscript_id) manuscript.source.download!(url) manuscript.status = "done" manuscript.save epub = EpubConverter.new manuscript.paper, User.first, true response = Typhoeus.post( "http://ihat-staging.herokuapp.com/convert/docx", body: { epub: epub.epub_stream.string } ) manuscript.paper.update JSON.parse(response.body).symbolize_keys! end end
class DownloadManuscriptWorker include Sidekiq::Worker def perform(manuscript_id, url) manuscript = Manuscript.find(manuscript_id) manuscript.source.download!(url) manuscript.status = "done" manuscript.save epub = EpubConverter.new manuscript.paper, User.first, true response = RestClient.post( "http://ihat-staging.herokuapp.com/convert/docx", {epub: epub.epub_stream.string, multipart: true} ) manuscript.paper.update JSON.parse(response.body).symbolize_keys! end end
Use RestClient instead of Typhoeus in the worker
Use RestClient instead of Typhoeus in the worker
Ruby
mit
johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi
ruby
## Code Before: class DownloadManuscriptWorker include Sidekiq::Worker def perform(manuscript_id, url) manuscript = Manuscript.find(manuscript_id) manuscript.source.download!(url) manuscript.status = "done" manuscript.save epub = EpubConverter.new manuscript.paper, User.first, true response = Typhoeus.post( "http://ihat-staging.herokuapp.com/convert/docx", body: { epub: epub.epub_stream.string } ) manuscript.paper.update JSON.parse(response.body).symbolize_keys! end end ## Instruction: Use RestClient instead of Typhoeus in the worker ## Code After: class DownloadManuscriptWorker include Sidekiq::Worker def perform(manuscript_id, url) manuscript = Manuscript.find(manuscript_id) manuscript.source.download!(url) manuscript.status = "done" manuscript.save epub = EpubConverter.new manuscript.paper, User.first, true response = RestClient.post( "http://ihat-staging.herokuapp.com/convert/docx", {epub: epub.epub_stream.string, multipart: true} ) manuscript.paper.update JSON.parse(response.body).symbolize_keys! end end
8b691aa71988e70267de1ad3352416649b8ebb16
css/main.css
css/main.css
@charset "utf-8"; body { margin: 4.5em; padding: 0; font-family: "EB Garamond", Georgia, Times, "Times New Roman", serif; font-size: 100%; line-height: 1.5; } h1, h2 { color: black; } .map { top: 0; bottom: 0; height: 400px; width: 100%; } .navbar { list-style-type: none; margin: 0; padding: 0; width: 100%; height: 50px; background-color: #dddddd; color: black; } .navitem { width: 60px; display: inline; float: right; } .navlink { display: block; padding: 8px; background-color: #dddddd; } .logo { display: inline; float: left; padding: 8px; width: 200px; }
@charset "utf-8"; body { margin: 1.5em; padding: 0; font-family: "EB Garamond", Georgia, Times, "Times New Roman", serif; font-size: 100%; line-height: 1.5; } @media (min-width: 30em) { body { margin: 3em; } } h1, h2 { color: black; } .map { top: 0; bottom: 0; height: 400px; width: 100%; } .navbar { list-style-type: none; margin: 0; padding: 0; width: 100%; height: 50px; background-color: #dddddd; color: black; } .navitem { width: 60px; display: inline; float: right; } .navlink { display: block; padding: 8px; background-color: #dddddd; } .logo { display: inline; float: left; padding: 8px; width: 200px; }
Use less margin on small screens.
Use less margin on small screens.
CSS
mit
foodoasisla/site,foodoasisla/site,SomeRandom42/site,tamurafatherree/fooddesert,kathwang21/site,tamurafatherree/fooddesert,gheulard/fichier,SomeRandom42/site,gheulard/fichier,kathwang21/site
css
## Code Before: @charset "utf-8"; body { margin: 4.5em; padding: 0; font-family: "EB Garamond", Georgia, Times, "Times New Roman", serif; font-size: 100%; line-height: 1.5; } h1, h2 { color: black; } .map { top: 0; bottom: 0; height: 400px; width: 100%; } .navbar { list-style-type: none; margin: 0; padding: 0; width: 100%; height: 50px; background-color: #dddddd; color: black; } .navitem { width: 60px; display: inline; float: right; } .navlink { display: block; padding: 8px; background-color: #dddddd; } .logo { display: inline; float: left; padding: 8px; width: 200px; } ## Instruction: Use less margin on small screens. ## Code After: @charset "utf-8"; body { margin: 1.5em; padding: 0; font-family: "EB Garamond", Georgia, Times, "Times New Roman", serif; font-size: 100%; line-height: 1.5; } @media (min-width: 30em) { body { margin: 3em; } } h1, h2 { color: black; } .map { top: 0; bottom: 0; height: 400px; width: 100%; } .navbar { list-style-type: none; margin: 0; padding: 0; width: 100%; height: 50px; background-color: #dddddd; color: black; } .navitem { width: 60px; display: inline; float: right; } .navlink { display: block; padding: 8px; background-color: #dddddd; } .logo { display: inline; float: left; padding: 8px; width: 200px; }
e2beb7ffdec2df2d3d12beaef77fa6d84f284508
partials/_default.rb
partials/_default.rb
puts "Adding default files ...".magenta copy_static_file 'app/assets/stylesheets/reset.css' copy_static_file 'app/views/layouts/application.html.haml' copy_static_file 'Procfile' %w{requires.rb}.each do |component| copy_static_file "config/initializers/#{component}" end %w{integration.rake deploy.rake}.each do |component| copy_static_file "lib/tasks/#{component}" end copy_static_file 'config/locales/pt-BR.yml' copy_static_file 'public/index.html' if ENV['RAILS_TEMPLATE_TEST'] == 'true' gsub_file 'lib/tasks/deploy.rake', /PROJECT/, @app_name gsub_file 'lib/tasks/integration.rake', /PROJECT/, @app_name copy_static_file '.gitignore' git :add => '.' git :commit => "-aqm 'Add default stuff.'" puts "\n"
puts "Adding default files ...".magenta copy_static_file 'app/assets/stylesheets/reset.css' copy_static_file 'app/views/layouts/application.html.haml' copy_static_file 'config/unicorn.rb' copy_static_file 'Procfile' %w{requires.rb}.each do |component| copy_static_file "config/initializers/#{component}" end %w{integration.rake deploy.rake}.each do |component| copy_static_file "lib/tasks/#{component}" end copy_static_file 'config/locales/pt-BR.yml' copy_static_file 'public/index.html' if ENV['RAILS_TEMPLATE_TEST'] == 'true' gsub_file 'lib/tasks/deploy.rake', /PROJECT/, @app_name gsub_file 'lib/tasks/integration.rake', /PROJECT/, @app_name copy_static_file '.gitignore' git :add => '.' git :commit => "-aqm 'Add default stuff.'" puts "\n"
Add to generator cp of config/unicorn.rb default.
Add to generator cp of config/unicorn.rb default.
Ruby
mit
Helabs/pah,ffscalco/pah,Helabs/pah,ffscalco/pah
ruby
## Code Before: puts "Adding default files ...".magenta copy_static_file 'app/assets/stylesheets/reset.css' copy_static_file 'app/views/layouts/application.html.haml' copy_static_file 'Procfile' %w{requires.rb}.each do |component| copy_static_file "config/initializers/#{component}" end %w{integration.rake deploy.rake}.each do |component| copy_static_file "lib/tasks/#{component}" end copy_static_file 'config/locales/pt-BR.yml' copy_static_file 'public/index.html' if ENV['RAILS_TEMPLATE_TEST'] == 'true' gsub_file 'lib/tasks/deploy.rake', /PROJECT/, @app_name gsub_file 'lib/tasks/integration.rake', /PROJECT/, @app_name copy_static_file '.gitignore' git :add => '.' git :commit => "-aqm 'Add default stuff.'" puts "\n" ## Instruction: Add to generator cp of config/unicorn.rb default. ## Code After: puts "Adding default files ...".magenta copy_static_file 'app/assets/stylesheets/reset.css' copy_static_file 'app/views/layouts/application.html.haml' copy_static_file 'config/unicorn.rb' copy_static_file 'Procfile' %w{requires.rb}.each do |component| copy_static_file "config/initializers/#{component}" end %w{integration.rake deploy.rake}.each do |component| copy_static_file "lib/tasks/#{component}" end copy_static_file 'config/locales/pt-BR.yml' copy_static_file 'public/index.html' if ENV['RAILS_TEMPLATE_TEST'] == 'true' gsub_file 'lib/tasks/deploy.rake', /PROJECT/, @app_name gsub_file 'lib/tasks/integration.rake', /PROJECT/, @app_name copy_static_file '.gitignore' git :add => '.' git :commit => "-aqm 'Add default stuff.'" puts "\n"
346470843cc5791ddb684eb684343ccf2d15e7eb
docker/files/elasticsearch.yml
docker/files/elasticsearch.yml
network.host: 0.0.0.0 http.port: 9200 # dev-only setting to allow client-side ES front-ends http.cors.allow-origin: "*" http.cors.enabled: true index.max_result_window: 1000000 action.auto_create_index: false
network.host: 0.0.0.0 http.port: 9200 # dev-only setting to allow client-side ES front-ends http.cors.allow-origin: "*" http.cors.enabled: true index.max_result_window: 1000000 # Eventually we want to enable this option, but currently it causes ES # timeouts due to tests referencing non-existent indices. For example, # saving a user triggers an async task that updates ES, and that fails # if the index does not exist. Many tests create and save users but few # do explicit ES index creation as is conventional for tests that # interact with ES. #action.auto_create_index: false
Enable action.auto_create_index in docker ES
Enable action.auto_create_index in docker ES Reverts a change made in https://github.com/dimagi/commcare-hq/pull/27156. Other test changes made in that PR should be kept since they perform ES index maintenance that will be necessary if (when) we eventually re-enable this option.
YAML
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
yaml
## Code Before: network.host: 0.0.0.0 http.port: 9200 # dev-only setting to allow client-side ES front-ends http.cors.allow-origin: "*" http.cors.enabled: true index.max_result_window: 1000000 action.auto_create_index: false ## Instruction: Enable action.auto_create_index in docker ES Reverts a change made in https://github.com/dimagi/commcare-hq/pull/27156. Other test changes made in that PR should be kept since they perform ES index maintenance that will be necessary if (when) we eventually re-enable this option. ## Code After: network.host: 0.0.0.0 http.port: 9200 # dev-only setting to allow client-side ES front-ends http.cors.allow-origin: "*" http.cors.enabled: true index.max_result_window: 1000000 # Eventually we want to enable this option, but currently it causes ES # timeouts due to tests referencing non-existent indices. For example, # saving a user triggers an async task that updates ES, and that fails # if the index does not exist. Many tests create and save users but few # do explicit ES index creation as is conventional for tests that # interact with ES. #action.auto_create_index: false
97d45756b0ff5ed69ebdf055199d6aa4357e6668
library/Denkmal/library/Denkmal/Form/EventAdd.php
library/Denkmal/library/Denkmal/Form/EventAdd.php
<?php class Denkmal_Form_EventAdd extends CM_Form_Abstract { public function setup () { $this->registerField(new Denkmal_FormField_Venue('venue')); $this->registerField(new CM_FormField_Text('venueAddress')); $this->registerField(new CM_FormField_Text('venueUrl')); $this->registerField(new CM_FormField_Date('date', date('Y'), (int) date('Y') + 1)); $this->registerField(new Denkmal_FormField_Time('fromTime')); $this->registerField(new Denkmal_FormField_Time('untilTime')); $this->registerField(new CM_FormField_Text('title')); $this->registerField(new CM_FormField_Text('artists')); $this->registerField(new CM_FormField_Text('genres')); $this->registerField(new CM_FormField_Text('urls')); $this->registerAction(new Denkmal_FormAction_EventAdd_Create()); } }
<?php class Denkmal_Form_EventAdd extends CM_Form_Abstract { public function setup () { $this->registerField(new Denkmal_FormField_Venue('venue')); $this->registerField(new CM_FormField_Text('venueAddress')); $this->registerField(new CM_FormField_Text('venueUrl')); $this->registerField(new CM_FormField_Date('date', date('Y'), (int) date('Y') + 1)); $this->registerField(new Denkmal_FormField_Time('fromTime')); $this->registerField(new Denkmal_FormField_Time('untilTime')); $this->registerField(new CM_FormField_Text('title')); $this->registerField(new CM_FormField_Text('artists')); $this->registerField(new CM_FormField_Text('genres')); $this->registerField(new CM_FormField_Text('urls')); $this->registerAction(new Denkmal_FormAction_EventAdd_Create()); } public function renderStart(array $params = null) { $this->getField('date')->setValue(new DateTime()); } }
Set default date to current
Set default date to current
PHP
mit
denkmal/denkmal.org,njam/denkmal.org,fvovan/denkmal.org,fvovan/denkmal.org,njam/denkmal.org,denkmal/denkmal.org,njam/denkmal.org,denkmal/denkmal.org,fvovan/denkmal.org,denkmal/denkmal.org,fvovan/denkmal.org,njam/denkmal.org,njam/denkmal.org,fvovan/denkmal.org,denkmal/denkmal.org
php
## Code Before: <?php class Denkmal_Form_EventAdd extends CM_Form_Abstract { public function setup () { $this->registerField(new Denkmal_FormField_Venue('venue')); $this->registerField(new CM_FormField_Text('venueAddress')); $this->registerField(new CM_FormField_Text('venueUrl')); $this->registerField(new CM_FormField_Date('date', date('Y'), (int) date('Y') + 1)); $this->registerField(new Denkmal_FormField_Time('fromTime')); $this->registerField(new Denkmal_FormField_Time('untilTime')); $this->registerField(new CM_FormField_Text('title')); $this->registerField(new CM_FormField_Text('artists')); $this->registerField(new CM_FormField_Text('genres')); $this->registerField(new CM_FormField_Text('urls')); $this->registerAction(new Denkmal_FormAction_EventAdd_Create()); } } ## Instruction: Set default date to current ## Code After: <?php class Denkmal_Form_EventAdd extends CM_Form_Abstract { public function setup () { $this->registerField(new Denkmal_FormField_Venue('venue')); $this->registerField(new CM_FormField_Text('venueAddress')); $this->registerField(new CM_FormField_Text('venueUrl')); $this->registerField(new CM_FormField_Date('date', date('Y'), (int) date('Y') + 1)); $this->registerField(new Denkmal_FormField_Time('fromTime')); $this->registerField(new Denkmal_FormField_Time('untilTime')); $this->registerField(new CM_FormField_Text('title')); $this->registerField(new CM_FormField_Text('artists')); $this->registerField(new CM_FormField_Text('genres')); $this->registerField(new CM_FormField_Text('urls')); $this->registerAction(new Denkmal_FormAction_EventAdd_Create()); } public function renderStart(array $params = null) { $this->getField('date')->setValue(new DateTime()); } }
24fa5d507e10c1c2d810d1a24203fde214eb49fa
ci/promote-test-to-prod.sh
ci/promote-test-to-prod.sh
git fetch docker run --rm -e ZULIP_CLI_TOKEN -v ~/.config:/home/akvo/.config -v "$(pwd)":/app \ -it akvo/akvo-devops:20201203.085214.79bec73 promote-test-to-prod.sh rsr rsr-version akvo-rsr zulip rsr
git fetch docker run --rm -e ZULIP_CLI_TOKEN -v ~/.config:/home/akvo/.config -v "$(pwd)":/app \ -it akvo/akvo-devops:20201203.085214.79bec73 promote-test-to-prod.sh rsr rsr-version akvo-rsr zulip "Everest Engine"
Move Release announcements to the Everest Engine stream
Move Release announcements to the Everest Engine stream
Shell
agpl-3.0
akvo/akvo-rsr,akvo/akvo-rsr,akvo/akvo-rsr,akvo/akvo-rsr
shell
## Code Before: git fetch docker run --rm -e ZULIP_CLI_TOKEN -v ~/.config:/home/akvo/.config -v "$(pwd)":/app \ -it akvo/akvo-devops:20201203.085214.79bec73 promote-test-to-prod.sh rsr rsr-version akvo-rsr zulip rsr ## Instruction: Move Release announcements to the Everest Engine stream ## Code After: git fetch docker run --rm -e ZULIP_CLI_TOKEN -v ~/.config:/home/akvo/.config -v "$(pwd)":/app \ -it akvo/akvo-devops:20201203.085214.79bec73 promote-test-to-prod.sh rsr rsr-version akvo-rsr zulip "Everest Engine"
0c0107a2754888594c23c9a4dce858e5932af109
README.rst
README.rst
Disqus API 1.1 Please see http://groups.google.com/group/disqus-dev/web/api-1-1 for more information. Sample usage:: require('disqus/disqus.php'); $dsq = new DisqusAPI($user_api_key, $forum_api_key); $username = $dsq->get_user_name(); To run the included unit tests you will need to install PHPUnit:: php disqus/tests.php <your user_api_key>
Disqus API 1.1 Please see http://groups.google.com/group/disqus-dev/web/api-1-1 for more information. Sample usage:: require('disqus/disqus.php'); $dsq = new DisqusAPI($user_api_key, $forum_api_key); if (($username = $dsq->get_user_name()) === false) { throw new Exception($dsq->get_last_error()); } To run the included unit tests you will need to install PHPUnit:: php disqus/tests.php <your user_api_key>
Improve example to show error handling
Improve example to show error handling
reStructuredText
apache-2.0
disqus/php-disqus
restructuredtext
## Code Before: Disqus API 1.1 Please see http://groups.google.com/group/disqus-dev/web/api-1-1 for more information. Sample usage:: require('disqus/disqus.php'); $dsq = new DisqusAPI($user_api_key, $forum_api_key); $username = $dsq->get_user_name(); To run the included unit tests you will need to install PHPUnit:: php disqus/tests.php <your user_api_key> ## Instruction: Improve example to show error handling ## Code After: Disqus API 1.1 Please see http://groups.google.com/group/disqus-dev/web/api-1-1 for more information. Sample usage:: require('disqus/disqus.php'); $dsq = new DisqusAPI($user_api_key, $forum_api_key); if (($username = $dsq->get_user_name()) === false) { throw new Exception($dsq->get_last_error()); } To run the included unit tests you will need to install PHPUnit:: php disqus/tests.php <your user_api_key>
fce5d112c3f57c7845e8a2decf9427fc48cd5b93
spec/features/sessions_spec.rb
spec/features/sessions_spec.rb
require 'rails_helper' describe 'the login process', type: :feature do before(:each) do FactoryGirl.create(:ip_cache, ip_address: '1.2.3.4') end let!(:new_user) do FactoryGirl.create(:user, email: '[email protected]') end let!(:activated_user) do FactoryGirl.create(:activated_user, email: '[email protected]') end it 'logs in an activated user' do visit '/login' fill_in 'E-mail', with: '[email protected]' fill_in 'Password', with: 'password' click_button 'Log In' expect(current_path).to eq '/' end it 'does not log in an unactivated user' do visit '/login' fill_in 'E-mail', with: '[email protected]' fill_in 'Password', with: 'password' click_button 'Log In' expect(current_path).to eq '/login' expect(page).to have_selector '.alert' end end
require 'rails_helper' describe 'the login/logout process', type: :feature do before(:each) do FactoryGirl.create(:ip_cache, ip_address: '1.2.3.4') end let!(:new_user) do FactoryGirl.create(:user, email: '[email protected]') end let!(:activated_user) do FactoryGirl.create(:activated_user, email: '[email protected]') end it 'does not log in user with invalid information' do visit '/login' fill_in 'E-mail', with: '' fill_in 'Password', with: '' click_button 'Log In' expect(current_path).to eq '/login' expect(page).to have_selector '.alert' end it 'doe snor log in an unactivated user' do visit '/login' fill_in 'E-mail', with: '[email protected]' fill_in 'Password', with: 'password' click_button 'Log In' expect(current_path).to eq '/login' expect(page).to have_selector '.alert' end it 'logs in from root_path as an activated user followed by log out' do visit '/' click_link 'Log In' expect(current_path).to eq '/login' fill_in 'E-mail', with: '[email protected]' fill_in 'Password', with: 'password' click_button 'Log In' expect(current_path).to eq '/' click_link 'Log Out' expect(current_path).to eq '/' expect(page).not_to have_link 'Log Out' end end
Add rspec logout and invalid login tests
Add rspec logout and invalid login tests
Ruby
mit
cribbles/tiktak,cribbles/tiktak,cribbles/tiktak
ruby
## Code Before: require 'rails_helper' describe 'the login process', type: :feature do before(:each) do FactoryGirl.create(:ip_cache, ip_address: '1.2.3.4') end let!(:new_user) do FactoryGirl.create(:user, email: '[email protected]') end let!(:activated_user) do FactoryGirl.create(:activated_user, email: '[email protected]') end it 'logs in an activated user' do visit '/login' fill_in 'E-mail', with: '[email protected]' fill_in 'Password', with: 'password' click_button 'Log In' expect(current_path).to eq '/' end it 'does not log in an unactivated user' do visit '/login' fill_in 'E-mail', with: '[email protected]' fill_in 'Password', with: 'password' click_button 'Log In' expect(current_path).to eq '/login' expect(page).to have_selector '.alert' end end ## Instruction: Add rspec logout and invalid login tests ## Code After: require 'rails_helper' describe 'the login/logout process', type: :feature do before(:each) do FactoryGirl.create(:ip_cache, ip_address: '1.2.3.4') end let!(:new_user) do FactoryGirl.create(:user, email: '[email protected]') end let!(:activated_user) do FactoryGirl.create(:activated_user, email: '[email protected]') end it 'does not log in user with invalid information' do visit '/login' fill_in 'E-mail', with: '' fill_in 'Password', with: '' click_button 'Log In' expect(current_path).to eq '/login' expect(page).to have_selector '.alert' end it 'doe snor log in an unactivated user' do visit '/login' fill_in 'E-mail', with: '[email protected]' fill_in 'Password', with: 'password' click_button 'Log In' expect(current_path).to eq '/login' expect(page).to have_selector '.alert' end it 'logs in from root_path as an activated user followed by log out' do visit '/' click_link 'Log In' expect(current_path).to eq '/login' fill_in 'E-mail', with: '[email protected]' fill_in 'Password', with: 'password' click_button 'Log In' expect(current_path).to eq '/' click_link 'Log Out' expect(current_path).to eq '/' expect(page).not_to have_link 'Log Out' end end
9281197bee2dd7948640b813382cfc414befe886
www/js/controllers/app_ctrl.js
www/js/controllers/app_ctrl.js
angular.module("proBebe.controllers") .controller("AppCtrl", function($scope, storage, messageHandler, Profile, ScrollPositions) { $scope.$on('$ionicView.enter', init); var profile; function init(){ reloadProfile(); } function getChildren(){ profile = storage.get("profile"); $scope.children = profile.children; } function reloadProfile () { Profile.reloadChild() .then(function(success) { if(success) getChildren(); }).catch(function(error) { messageHandler.show("Impossível recarregar o perfil"); }); } $scope.clearScroll = function(){ ScrollPositions['maintain_scroll'] = false; } });
angular.module("proBebe.controllers") .controller("AppCtrl", function($scope, $rootScope, storage, messageHandler, Profile, ScrollPositions) { $scope.$on('$ionicView.enter', init); var profile; function init(){ reloadProfile(); } function getChildren(){ profile = storage.get("profile"); $scope.children = profile.children; } function reloadProfile () { Profile.reloadChild() .then(function(success) { if(success) getChildren(); }).catch(function(error) { messageHandler.show("Impossível recarregar o perfil"); }); } $scope.clearScroll = function(){ ScrollPositions['maintain_scroll'] = false; } $scope.openFilter = function(){ console.log("calll") $rootScope.$emit("openFilter"); } });
Define emit event to open filter
Define emit event to open filter
JavaScript
mit
InstitutoZeroaSeis/probebe-app,InstitutoZeroaSeis/probebe-app
javascript
## Code Before: angular.module("proBebe.controllers") .controller("AppCtrl", function($scope, storage, messageHandler, Profile, ScrollPositions) { $scope.$on('$ionicView.enter', init); var profile; function init(){ reloadProfile(); } function getChildren(){ profile = storage.get("profile"); $scope.children = profile.children; } function reloadProfile () { Profile.reloadChild() .then(function(success) { if(success) getChildren(); }).catch(function(error) { messageHandler.show("Impossível recarregar o perfil"); }); } $scope.clearScroll = function(){ ScrollPositions['maintain_scroll'] = false; } }); ## Instruction: Define emit event to open filter ## Code After: angular.module("proBebe.controllers") .controller("AppCtrl", function($scope, $rootScope, storage, messageHandler, Profile, ScrollPositions) { $scope.$on('$ionicView.enter', init); var profile; function init(){ reloadProfile(); } function getChildren(){ profile = storage.get("profile"); $scope.children = profile.children; } function reloadProfile () { Profile.reloadChild() .then(function(success) { if(success) getChildren(); }).catch(function(error) { messageHandler.show("Impossível recarregar o perfil"); }); } $scope.clearScroll = function(){ ScrollPositions['maintain_scroll'] = false; } $scope.openFilter = function(){ console.log("calll") $rootScope.$emit("openFilter"); } });
93cd82056c709f3cb9e52b8e2860109d72e58df9
rust/test/iter/basic_test.rs
rust/test/iter/basic_test.rs
use super::TheModule; use TheModule::*; use test_tools::*; // fn basic_test() { // test.case( "basic" ); let src = vec![ 1, 2, 3 ]; let exp = ( vec![ 2, 3, 4 ], vec![ 0, 1, 2 ] ); let got : ( Vec< _ >, Vec< _ > ) = src.iter().map( | e | {( e + 1, e - 1, )}).multiunzip(); assert_eq!( got, exp ); } // test_suite! { basic, }
use super::TheModule; use TheModule::*; use test_tools::*; // tests_impls! { #[ test ] fn basic() { // test.case( "basic" ); let src = vec![ 1, 2, 3 ]; let exp = ( vec![ 2, 3, 4 ], vec![ 0, 1, 2 ] ); let got : ( Vec< _ >, Vec< _ > ) = src.iter().map( | e | {( e + 1, e - 1, )}).multiunzip(); assert_eq!( got, exp ); } } // tests_index! { basic, }
Update tests of module `iter_tools`, use new test macroses
Update tests of module `iter_tools`, use new test macroses
Rust
mit
Wandalen/wTools,Wandalen/wTools
rust
## Code Before: use super::TheModule; use TheModule::*; use test_tools::*; // fn basic_test() { // test.case( "basic" ); let src = vec![ 1, 2, 3 ]; let exp = ( vec![ 2, 3, 4 ], vec![ 0, 1, 2 ] ); let got : ( Vec< _ >, Vec< _ > ) = src.iter().map( | e | {( e + 1, e - 1, )}).multiunzip(); assert_eq!( got, exp ); } // test_suite! { basic, } ## Instruction: Update tests of module `iter_tools`, use new test macroses ## Code After: use super::TheModule; use TheModule::*; use test_tools::*; // tests_impls! { #[ test ] fn basic() { // test.case( "basic" ); let src = vec![ 1, 2, 3 ]; let exp = ( vec![ 2, 3, 4 ], vec![ 0, 1, 2 ] ); let got : ( Vec< _ >, Vec< _ > ) = src.iter().map( | e | {( e + 1, e - 1, )}).multiunzip(); assert_eq!( got, exp ); } } // tests_index! { basic, }
5577c0d64be91bc85b8c820492d9970bfa6c4237
.gitlab-ci.yml
.gitlab-ci.yml
image: ultravideo/kvazaar_ci_base:latest # Build kvazaar and run tests build-kvazaar: stage: build script: - ./autogen.sh - ./configure --enable-werror || (cat config.log && false) - make --jobs=8 V=1 artifacts: paths: - src/kvazaar - src/.libs expire_in: 1 week run-tests: stage: test script: - ./autogen.sh - ./configure - export PATH="${HOME}/bin:${PATH}" - export KVAZAAR_OVERRIDE_angular_pred=generic - export KVAZAAR_OVERRIDE_sao_band_ddistortion=generic - export KVAZAAR_OVERRIDE_sao_edge_ddistortion=generic - export KVAZAAR_OVERRIDE_calc_sao_edge_dir=generic - make check VERBOSE=1
image: ultravideo/kvazaar_ci_base:latest # Build kvazaar build-kvazaar: &build-template stage: build script: - ./autogen.sh - ./configure --enable-werror || (cat config.log && false) - make --jobs=8 V=1 artifacts: paths: - src/kvazaar - src/.libs expire_in: 1 week build-asan: <<: *build-template variables: CFLAGS: '-fsanitize=address' # LeakSanitizer doesn't work inside the container because it requires # ptrace so we disable it. ASAN_OPTIONS: 'detect_leaks=0' build-tsan: <<: *build-template variables: CFLAGS: '-fsanitize=thread' build-ubsan: <<: *build-template variables: CFLAGS: '-fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment' .test-template: &test-template stage: test script: - export PATH="${HOME}/bin:${PATH}" - ./autogen.sh - ./configure --enable-werror - make check --jobs=8 VERBOSE=1 test-valgrind: <<: *test-template dependencies: - build-kvazaar variables: KVAZAAR_OVERRIDE_angular_pred: generic KVAZAAR_OVERRIDE_sao_band_ddistortion: generic KVAZAAR_OVERRIDE_sao_edge_ddistortion: generic KVAZAAR_OVERRIDE_calc_sao_edge_dir: generic KVZ_TEST_VALGRIND: 1 test-asan: <<: *test-template dependencies: - build-asan test-tsan: <<: *test-template dependencies: - build-tsan test-ubsan: <<: *test-template dependencies: - build-ubsan
Enable sanitizers in Gitlab CI
Enable sanitizers in Gitlab CI Enables build and test with AddressSanitizer, ThreadSanitizer and UndefinedBehaviorSanitizer in Gitlab CI configuration. The LeakSanitizer component of AddressSanitizer is disabled because ptrace cannot be used inside the container.
YAML
bsd-3-clause
ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar
yaml
## Code Before: image: ultravideo/kvazaar_ci_base:latest # Build kvazaar and run tests build-kvazaar: stage: build script: - ./autogen.sh - ./configure --enable-werror || (cat config.log && false) - make --jobs=8 V=1 artifacts: paths: - src/kvazaar - src/.libs expire_in: 1 week run-tests: stage: test script: - ./autogen.sh - ./configure - export PATH="${HOME}/bin:${PATH}" - export KVAZAAR_OVERRIDE_angular_pred=generic - export KVAZAAR_OVERRIDE_sao_band_ddistortion=generic - export KVAZAAR_OVERRIDE_sao_edge_ddistortion=generic - export KVAZAAR_OVERRIDE_calc_sao_edge_dir=generic - make check VERBOSE=1 ## Instruction: Enable sanitizers in Gitlab CI Enables build and test with AddressSanitizer, ThreadSanitizer and UndefinedBehaviorSanitizer in Gitlab CI configuration. The LeakSanitizer component of AddressSanitizer is disabled because ptrace cannot be used inside the container. ## Code After: image: ultravideo/kvazaar_ci_base:latest # Build kvazaar build-kvazaar: &build-template stage: build script: - ./autogen.sh - ./configure --enable-werror || (cat config.log && false) - make --jobs=8 V=1 artifacts: paths: - src/kvazaar - src/.libs expire_in: 1 week build-asan: <<: *build-template variables: CFLAGS: '-fsanitize=address' # LeakSanitizer doesn't work inside the container because it requires # ptrace so we disable it. ASAN_OPTIONS: 'detect_leaks=0' build-tsan: <<: *build-template variables: CFLAGS: '-fsanitize=thread' build-ubsan: <<: *build-template variables: CFLAGS: '-fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment' .test-template: &test-template stage: test script: - export PATH="${HOME}/bin:${PATH}" - ./autogen.sh - ./configure --enable-werror - make check --jobs=8 VERBOSE=1 test-valgrind: <<: *test-template dependencies: - build-kvazaar variables: KVAZAAR_OVERRIDE_angular_pred: generic KVAZAAR_OVERRIDE_sao_band_ddistortion: generic KVAZAAR_OVERRIDE_sao_edge_ddistortion: generic KVAZAAR_OVERRIDE_calc_sao_edge_dir: generic KVZ_TEST_VALGRIND: 1 test-asan: <<: *test-template dependencies: - build-asan test-tsan: <<: *test-template dependencies: - build-tsan test-ubsan: <<: *test-template dependencies: - build-ubsan
089247c62a36e4a2e0c149001bd06ccf562ebc4e
src/config.js
src/config.js
export let baseUrl = 'http://rosettastack.com'; export let sites = [{ name: 'Programmers', slug: 'programmers', seUrl: 'http://programmers.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/programmers', }, { name: 'Coffee', slug: 'coffee', seUrl: 'http://coffee.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/coffee', }, { name: 'Server Fault', slug: 'serverfault', seUrl: 'http://serverfault.com/', langs: ['en', 'fr'], db: 'localhost/serverfault', }, { name: 'Super User', slug: 'superuser', seUrl: 'http://superuser.com/', langs: ['en', 'fr'], db: 'localhost/superuser', }, { name: 'Stack Overflow', slug: 'stackoverflow', seUrl: 'http://stackoverflow.com/', langs: ['en', 'fr'], db: 'localhost/programmers', }, { name: 'Android', slug: 'android', seUrl: 'http://android.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/android', }, { name: 'Tor', slug: 'tor', seUrl: 'http://tor.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/tor', }];
export let baseUrl = 'http://rosettastack.com'; export let sites = [{ name: 'Programmers', slug: 'programmers', seUrl: 'http://programmers.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/programmers', }, { name: 'Coffee', slug: 'coffee', seUrl: 'http://coffee.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/coffee', }, { name: 'Server Fault', slug: 'serverfault', seUrl: 'http://serverfault.com/', langs: ['en', 'fr'], db: 'localhost/serverfault', }, { name: 'Super User', slug: 'superuser', seUrl: 'http://superuser.com/', langs: ['en', 'fr'], db: 'localhost/superuser', }, { name: 'Stack Overflow', slug: 'stackoverflow', seUrl: 'http://stackoverflow.com/', langs: ['en', 'fr'], db: 'localhost/stackoverflow', }, { name: 'Android', slug: 'android', seUrl: 'http://android.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/android', }, { name: 'Tor', slug: 'tor', seUrl: 'http://tor.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/tor', }];
Fix db ref for SO
Fix db ref for SO
JavaScript
mpl-2.0
bbondy/stack-view,bbondy/stack-view,bbondy/stack-view
javascript
## Code Before: export let baseUrl = 'http://rosettastack.com'; export let sites = [{ name: 'Programmers', slug: 'programmers', seUrl: 'http://programmers.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/programmers', }, { name: 'Coffee', slug: 'coffee', seUrl: 'http://coffee.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/coffee', }, { name: 'Server Fault', slug: 'serverfault', seUrl: 'http://serverfault.com/', langs: ['en', 'fr'], db: 'localhost/serverfault', }, { name: 'Super User', slug: 'superuser', seUrl: 'http://superuser.com/', langs: ['en', 'fr'], db: 'localhost/superuser', }, { name: 'Stack Overflow', slug: 'stackoverflow', seUrl: 'http://stackoverflow.com/', langs: ['en', 'fr'], db: 'localhost/programmers', }, { name: 'Android', slug: 'android', seUrl: 'http://android.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/android', }, { name: 'Tor', slug: 'tor', seUrl: 'http://tor.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/tor', }]; ## Instruction: Fix db ref for SO ## Code After: export let baseUrl = 'http://rosettastack.com'; export let sites = [{ name: 'Programmers', slug: 'programmers', seUrl: 'http://programmers.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/programmers', }, { name: 'Coffee', slug: 'coffee', seUrl: 'http://coffee.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/coffee', }, { name: 'Server Fault', slug: 'serverfault', seUrl: 'http://serverfault.com/', langs: ['en', 'fr'], db: 'localhost/serverfault', }, { name: 'Super User', slug: 'superuser', seUrl: 'http://superuser.com/', langs: ['en', 'fr'], db: 'localhost/superuser', }, { name: 'Stack Overflow', slug: 'stackoverflow', seUrl: 'http://stackoverflow.com/', langs: ['en', 'fr'], db: 'localhost/stackoverflow', }, { name: 'Android', slug: 'android', seUrl: 'http://android.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/android', }, { name: 'Tor', slug: 'tor', seUrl: 'http://tor.stackexchange.com/', langs: ['en', 'fr'], db: 'localhost/tor', }];
f6d3a093a739544d7b197009619e8ae7c21e0083
client/views/layouts/basic.html
client/views/layouts/basic.html
<template name="basicLayout"> <div id="main"> <header> {{> header}} </header> {{> yield}} {{! Also a sidebar! }} <footer> {{> footer}} </footer> </div> </template>
<template name="basicLayout"> <div id="main"> <!-- header> {{> header}} </header --> {{> yield}} {{! Also a sidebar! }} <!-- footer> {{> footer}} </footer --> </div> </template>
Remove header and footer layout
Remove header and footer layout
HTML
mit
alex-accellerator/magicbottle,alex-accellerator/magicbottle,alex-accellerator/magicbottle,alex-accellerator/magicbottle
html
## Code Before: <template name="basicLayout"> <div id="main"> <header> {{> header}} </header> {{> yield}} {{! Also a sidebar! }} <footer> {{> footer}} </footer> </div> </template> ## Instruction: Remove header and footer layout ## Code After: <template name="basicLayout"> <div id="main"> <!-- header> {{> header}} </header --> {{> yield}} {{! Also a sidebar! }} <!-- footer> {{> footer}} </footer --> </div> </template>
69c83178ebdf1452602311995eaa60cf4c750702
README.md
README.md
This plugin lets you listen for when a CSS property, or properties, changes on element. It utilizes the `DOMAttrModified` or `propertychange` events, when available, and fallsback to polling utilizing `setTimeout()`. Original blog post can be found [here](http://darcyclarke.me/development/detect-attribute-changes-with-jquery/) ### Example Use More examples can be found [here](http://darcyclarke.me/dev/watch/) ```javascript // Watch for width or height changes and log values $('div').watch('width height', function(){ console.log(this.style.width, this.style.height); }); // Animated div $('div').animate({width:'100px',height:'200px'}, 500); ```` ## License Copyright (c) 2013 Darcy Clarke Dual licensed under the MIT and GPL licenses.
This plugin lets you listen for when a CSS property, or properties, changes on element. It utilizes `Mutation Observers` or the `DOMAttrModified` / `propertychange` events, when available, and fallsback to polling utilizing `setInterval()`. Original blog post can be found [here](http://darcyclarke.me/development/detect-attribute-changes-with-jquery/) ### Example Use More examples can be found [here](http://darcyclarke.me/dev/watch/) ```javascript // Watch for width or height changes and log values $('div').watch('width height', function(){ console.log(this.style.width, this.style.height); }); // Animated div $('div').animate({width:'100px',height:'200px'}, 500); ```` ## License Copyright (c) 2013 Darcy Clarke Dual licensed under the MIT and GPL licenses.
Add note about mutation observers to readme
Add note about mutation observers to readme
Markdown
mit
darcyclarke/Watch.js
markdown
## Code Before: This plugin lets you listen for when a CSS property, or properties, changes on element. It utilizes the `DOMAttrModified` or `propertychange` events, when available, and fallsback to polling utilizing `setTimeout()`. Original blog post can be found [here](http://darcyclarke.me/development/detect-attribute-changes-with-jquery/) ### Example Use More examples can be found [here](http://darcyclarke.me/dev/watch/) ```javascript // Watch for width or height changes and log values $('div').watch('width height', function(){ console.log(this.style.width, this.style.height); }); // Animated div $('div').animate({width:'100px',height:'200px'}, 500); ```` ## License Copyright (c) 2013 Darcy Clarke Dual licensed under the MIT and GPL licenses. ## Instruction: Add note about mutation observers to readme ## Code After: This plugin lets you listen for when a CSS property, or properties, changes on element. It utilizes `Mutation Observers` or the `DOMAttrModified` / `propertychange` events, when available, and fallsback to polling utilizing `setInterval()`. Original blog post can be found [here](http://darcyclarke.me/development/detect-attribute-changes-with-jquery/) ### Example Use More examples can be found [here](http://darcyclarke.me/dev/watch/) ```javascript // Watch for width or height changes and log values $('div').watch('width height', function(){ console.log(this.style.width, this.style.height); }); // Animated div $('div').animate({width:'100px',height:'200px'}, 500); ```` ## License Copyright (c) 2013 Darcy Clarke Dual licensed under the MIT and GPL licenses.
25195e3dbb1ec3e38bba3b38b4b43ecff1030e52
src/AppBundle/Resources/translations/report-action.en.yml
src/AppBundle/Resources/translations/report-action.en.yml
page: htmlTitle: "Deputy report - Concerns | GOV.UK" # safeguardInfoSaved: Your changes were saved pageSectionTitle: Actions you plan to take pageSectionDescription: "" form: contact: subSectionTitle: Decisions and concerns save: label: Save doYouExpectFinancialDecisions: label: | Do you expect to make any significant financial decisions on behalf of %client% in the next 12 months? hint: | For example, moving to other accommodation, buying or selling property or making adaptations to %client%'s home, changing investments, taking funds out of the Courts Funds Office, seeking NHS continuing care funding, making large gifts (such as a 21st birthday present for their child) doYouExpectFinancialDecisionsDetails: label: Tell us more doYouHaveConcerns: label: Do you have any concerns about your deputyship? hint: | For example, paying care home fees if %client%’s money runs low, managing %client%’s property, making gifts, other family members’ involvement with %client%’s funds, what expenses you can claim doYouHaveConcernsDetails: label: Tell us more
page: htmlTitle: "Deputy report - Concerns | GOV.UK" # safeguardInfoSaved: Your changes were saved pageSectionTitle: Actions you plan to take pageSectionDescription: "" form: contact: subSectionTitle: Decisions and concerns save: label: Save doYouExpectFinancialDecisions: label: | Do you expect to make any significant financial decisions on behalf of %client% in the next 12 months? hint: | For example, moving to other accommodation, buying or selling property or making adaptations to %client%'s home, changing investments, taking funds out of the Courts Funds Office, seeking NHS continuing care funding, making large gifts (such as a 21st birthday present for a relative) doYouExpectFinancialDecisionsDetails: label: Tell us more doYouHaveConcerns: label: Do you have any concerns about your deputyship? hint: | For example, paying care home fees if %client%’s money runs low, managing %client%’s property, making gifts, other family members’ involvement with %client%’s funds, what expenses you can claim doYouHaveConcernsDetails: label: Tell us more
Change 'their child' to 'a relative'
Change 'their child' to 'a relative' Not clear who the ‘their’ will be in this context
YAML
mit
ministryofjustice/opg-digi-deps-client,ministryofjustice/opg-digi-deps-client,ministryofjustice/opg-digi-deps-client,ministryofjustice/opg-digi-deps-client
yaml
## Code Before: page: htmlTitle: "Deputy report - Concerns | GOV.UK" # safeguardInfoSaved: Your changes were saved pageSectionTitle: Actions you plan to take pageSectionDescription: "" form: contact: subSectionTitle: Decisions and concerns save: label: Save doYouExpectFinancialDecisions: label: | Do you expect to make any significant financial decisions on behalf of %client% in the next 12 months? hint: | For example, moving to other accommodation, buying or selling property or making adaptations to %client%'s home, changing investments, taking funds out of the Courts Funds Office, seeking NHS continuing care funding, making large gifts (such as a 21st birthday present for their child) doYouExpectFinancialDecisionsDetails: label: Tell us more doYouHaveConcerns: label: Do you have any concerns about your deputyship? hint: | For example, paying care home fees if %client%’s money runs low, managing %client%’s property, making gifts, other family members’ involvement with %client%’s funds, what expenses you can claim doYouHaveConcernsDetails: label: Tell us more ## Instruction: Change 'their child' to 'a relative' Not clear who the ‘their’ will be in this context ## Code After: page: htmlTitle: "Deputy report - Concerns | GOV.UK" # safeguardInfoSaved: Your changes were saved pageSectionTitle: Actions you plan to take pageSectionDescription: "" form: contact: subSectionTitle: Decisions and concerns save: label: Save doYouExpectFinancialDecisions: label: | Do you expect to make any significant financial decisions on behalf of %client% in the next 12 months? hint: | For example, moving to other accommodation, buying or selling property or making adaptations to %client%'s home, changing investments, taking funds out of the Courts Funds Office, seeking NHS continuing care funding, making large gifts (such as a 21st birthday present for a relative) doYouExpectFinancialDecisionsDetails: label: Tell us more doYouHaveConcerns: label: Do you have any concerns about your deputyship? hint: | For example, paying care home fees if %client%’s money runs low, managing %client%’s property, making gifts, other family members’ involvement with %client%’s funds, what expenses you can claim doYouHaveConcernsDetails: label: Tell us more
85d036ebbb87a5c9ad9265331a2cc0c4fca91c58
cross/arm64cl.txt
cross/arm64cl.txt
[binaries] c = 'cl' cpp = 'cl' ar = 'lib' windres = 'rc' [properties] c_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP'] c_link_args = ['-APPCONTAINER', 'WindowsApp.lib'] cpp_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP'] cpp_link_args = ['-APPCONTAINER', 'WindowsApp.lib'] [host_machine] system = 'windows' cpu_family = 'aarch64' cpu = 'armv8' endian = 'little'
[binaries] c = 'cl' cpp = 'cl' ar = 'lib' windres = 'rc' [built-in options] c_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP'] c_link_args = ['-APPCONTAINER', 'WindowsApp.lib'] cpp_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP'] cpp_link_args = ['-APPCONTAINER', 'WindowsApp.lib'] [host_machine] system = 'windows' cpu_family = 'aarch64' cpu = 'armv8' endian = 'little'
Rename [properties] to [built-in options]
Rename [properties] to [built-in options] This is the new syntax. Avoids loud deprecation warnings.
Text
apache-2.0
jpakkane/meson,pexip/meson,jpakkane/meson,mesonbuild/meson,mesonbuild/meson,pexip/meson,mesonbuild/meson,pexip/meson,QuLogic/meson,pexip/meson,QuLogic/meson,mesonbuild/meson,mesonbuild/meson,mesonbuild/meson,pexip/meson,pexip/meson,QuLogic/meson,QuLogic/meson,jpakkane/meson,jpakkane/meson,jpakkane/meson,jpakkane/meson,jpakkane/meson,QuLogic/meson,pexip/meson,pexip/meson,mesonbuild/meson,QuLogic/meson,QuLogic/meson,jpakkane/meson,jpakkane/meson,mesonbuild/meson,QuLogic/meson,mesonbuild/meson,QuLogic/meson,pexip/meson,pexip/meson,mesonbuild/meson
text
## Code Before: [binaries] c = 'cl' cpp = 'cl' ar = 'lib' windres = 'rc' [properties] c_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP'] c_link_args = ['-APPCONTAINER', 'WindowsApp.lib'] cpp_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP'] cpp_link_args = ['-APPCONTAINER', 'WindowsApp.lib'] [host_machine] system = 'windows' cpu_family = 'aarch64' cpu = 'armv8' endian = 'little' ## Instruction: Rename [properties] to [built-in options] This is the new syntax. Avoids loud deprecation warnings. ## Code After: [binaries] c = 'cl' cpp = 'cl' ar = 'lib' windres = 'rc' [built-in options] c_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP'] c_link_args = ['-APPCONTAINER', 'WindowsApp.lib'] cpp_args = ['-DWINAPI_FAMILY=WINAPI_FAMILY_APP'] cpp_link_args = ['-APPCONTAINER', 'WindowsApp.lib'] [host_machine] system = 'windows' cpu_family = 'aarch64' cpu = 'armv8' endian = 'little'
eaa4c73dcc4013ea929377fc40f94c4d52aa32ab
docker-compose.yml
docker-compose.yml
app: build: . dockerfile: ./docker/Dockerfile.web environment: PORT: 3001 links: - mongo - redis ports: - "3001:3001" volumes: - .:/var/www/ekorp mongo: image: mongo:3.0.2 volumes: - ./data:/data/db redis: image: redis nginx: image: nginx:1.9 ports: - 443:443 - 80:80 links: - app volumes: - ./docker/nginx/:/etc/nginx/conf.d
app: build: . dockerfile: ./docker/Dockerfile.web environment: PORT: 3001 links: - mongo - redis ports: - "3001:3001" volumes: - .:/var/www/ekorp mongo: image: mongo:3.0.2 redis: image: redis nginx: image: nginx:1.9 ports: - 443:443 - 80:80 links: - app volumes: - ./docker/nginx/:/etc/nginx/conf.d
Revert "Added mountpoint for mongodb"
Revert "Added mountpoint for mongodb" This reverts commit 2bdb3247b5af30c8ae2ad688b02e3b4f8989eb13.
YAML
mit
e-korp/e-korp,e-korp/e-korp
yaml
## Code Before: app: build: . dockerfile: ./docker/Dockerfile.web environment: PORT: 3001 links: - mongo - redis ports: - "3001:3001" volumes: - .:/var/www/ekorp mongo: image: mongo:3.0.2 volumes: - ./data:/data/db redis: image: redis nginx: image: nginx:1.9 ports: - 443:443 - 80:80 links: - app volumes: - ./docker/nginx/:/etc/nginx/conf.d ## Instruction: Revert "Added mountpoint for mongodb" This reverts commit 2bdb3247b5af30c8ae2ad688b02e3b4f8989eb13. ## Code After: app: build: . dockerfile: ./docker/Dockerfile.web environment: PORT: 3001 links: - mongo - redis ports: - "3001:3001" volumes: - .:/var/www/ekorp mongo: image: mongo:3.0.2 redis: image: redis nginx: image: nginx:1.9 ports: - 443:443 - 80:80 links: - app volumes: - ./docker/nginx/:/etc/nginx/conf.d
57ca59e225119a031dee6b0c10a27c43a41f56ce
settings.py
settings.py
PROTOCOL = "http" HOSTNAME = "localhost" AUTHSERVERPORT = 1234 CHARSERVERPORT = 1235 MASTERZONESERVERPORT = 1236 ZONESTARTUPTIME = 10 DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S:%f' ADMINISTRATORS = ['admin'] CLIENT_TIMEOUT = 10 # Client gives up connecting after 10 seconds. MSPERSEC = 1000 CLIENT_NETWORK_FPS = 10 CLIENT_UPDATE_FREQ = MSPERSEC/CLIENT_NETWORK_FPS
PROTOCOL = "http" HOSTNAME = "localhost" AUTHSERVERPORT = 1234 CHARSERVERPORT = 1235 MASTERZONESERVERPORT = 1236 ZONESTARTPORT = 1300 ZONEENDPORT = 1400 ZONESTARTUPTIME = 10 DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S:%f' ADMINISTRATORS = ['admin'] CLIENT_TIMEOUT = 10 # Client gives up connecting after 10 seconds. MSPERSEC = 1000 CLIENT_NETWORK_FPS = 10 CLIENT_UPDATE_FREQ = MSPERSEC/CLIENT_NETWORK_FPS
Add a zone port range.
Add a zone port range.
Python
agpl-3.0
cnelsonsic/SimpleMMO,cnelsonsic/SimpleMMO,cnelsonsic/SimpleMMO
python
## Code Before: PROTOCOL = "http" HOSTNAME = "localhost" AUTHSERVERPORT = 1234 CHARSERVERPORT = 1235 MASTERZONESERVERPORT = 1236 ZONESTARTUPTIME = 10 DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S:%f' ADMINISTRATORS = ['admin'] CLIENT_TIMEOUT = 10 # Client gives up connecting after 10 seconds. MSPERSEC = 1000 CLIENT_NETWORK_FPS = 10 CLIENT_UPDATE_FREQ = MSPERSEC/CLIENT_NETWORK_FPS ## Instruction: Add a zone port range. ## Code After: PROTOCOL = "http" HOSTNAME = "localhost" AUTHSERVERPORT = 1234 CHARSERVERPORT = 1235 MASTERZONESERVERPORT = 1236 ZONESTARTPORT = 1300 ZONEENDPORT = 1400 ZONESTARTUPTIME = 10 DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S:%f' ADMINISTRATORS = ['admin'] CLIENT_TIMEOUT = 10 # Client gives up connecting after 10 seconds. MSPERSEC = 1000 CLIENT_NETWORK_FPS = 10 CLIENT_UPDATE_FREQ = MSPERSEC/CLIENT_NETWORK_FPS
ea7f952fe90fe05965348cbd57bf4109b2e0afb7
components/DefaultSettings.js
components/DefaultSettings.js
const ALL_COMPILERS = ['clang-3.8', 'clang-3.9', 'clang-4.0', 'clang-5.0', 'clang-6.0', 'clang-7.0', 'clang-7.1', 'clang-8.0', 'clang-9.0', 'clang-10.0', 'clang-11.0', 'clang-12.0', 'gcc-5.5', 'gcc-6.4', 'gcc-6.5', 'gcc-7.2', 'gcc-7.3', 'gcc-7.4', 'gcc-7.5', 'gcc-8.1', 'gcc-8.2', 'gcc-8.3', 'gcc-8.4', 'gcc-9.1', 'gcc-9.2', 'gcc-9.3', 'gcc-10.1', 'gcc-10.2', 'gcc-10.3']; export default { allCompilers: ALL_COMPILERS, latestCompiler: 'clang-12.0' };
const ALL_COMPILERS = ['clang-3.8', 'clang-3.9', 'clang-4.0', 'clang-5.0', 'clang-6.0', 'clang-7.0', 'clang-7.1', 'clang-8.0', 'clang-9.0', 'clang-10.0', 'clang-11.0', 'clang-11.1', 'clang-12.0', 'clang-13.0', 'gcc-5.5', 'gcc-6.4', 'gcc-6.5', 'gcc-7.2', 'gcc-7.3', 'gcc-7.4', 'gcc-7.5', 'gcc-8.1', 'gcc-8.2', 'gcc-8.3', 'gcc-8.4', 'gcc-8.5', 'gcc-9.1', 'gcc-9.2', 'gcc-9.3', 'gcc-9.4', 'gcc-10.1', 'gcc-10.2', 'gcc-10.3', 'gcc-11.1', 'gcc-11.2']; export default { allCompilers: ALL_COMPILERS, latestCompiler: 'clang-13.0' };
Change default compiler and default compilers list.
Change default compiler and default compilers list.
JavaScript
bsd-2-clause
FredTingaud/quick-bench-front-end,FredTingaud/quick-bench-front-end,FredTingaud/quick-bench-front-end
javascript
## Code Before: const ALL_COMPILERS = ['clang-3.8', 'clang-3.9', 'clang-4.0', 'clang-5.0', 'clang-6.0', 'clang-7.0', 'clang-7.1', 'clang-8.0', 'clang-9.0', 'clang-10.0', 'clang-11.0', 'clang-12.0', 'gcc-5.5', 'gcc-6.4', 'gcc-6.5', 'gcc-7.2', 'gcc-7.3', 'gcc-7.4', 'gcc-7.5', 'gcc-8.1', 'gcc-8.2', 'gcc-8.3', 'gcc-8.4', 'gcc-9.1', 'gcc-9.2', 'gcc-9.3', 'gcc-10.1', 'gcc-10.2', 'gcc-10.3']; export default { allCompilers: ALL_COMPILERS, latestCompiler: 'clang-12.0' }; ## Instruction: Change default compiler and default compilers list. ## Code After: const ALL_COMPILERS = ['clang-3.8', 'clang-3.9', 'clang-4.0', 'clang-5.0', 'clang-6.0', 'clang-7.0', 'clang-7.1', 'clang-8.0', 'clang-9.0', 'clang-10.0', 'clang-11.0', 'clang-11.1', 'clang-12.0', 'clang-13.0', 'gcc-5.5', 'gcc-6.4', 'gcc-6.5', 'gcc-7.2', 'gcc-7.3', 'gcc-7.4', 'gcc-7.5', 'gcc-8.1', 'gcc-8.2', 'gcc-8.3', 'gcc-8.4', 'gcc-8.5', 'gcc-9.1', 'gcc-9.2', 'gcc-9.3', 'gcc-9.4', 'gcc-10.1', 'gcc-10.2', 'gcc-10.3', 'gcc-11.1', 'gcc-11.2']; export default { allCompilers: ALL_COMPILERS, latestCompiler: 'clang-13.0' };
bc8843db00d7b2630fecb1380844627f4dd8ba76
.github/workflows/build-and-deploy.yml
.github/workflows/build-and-deploy.yml
name: Deploy each push on: push: branches: [master] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 # - name: Build site # uses: docker://jekyll/builder:4.1.0 # with: # args: jekyll build - name: Archive built site uses: actions/upload-artifact@v2 with: name: site path: out deploy: name: Deploy needs: build runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v1 - name: Download Artifact uses: actions/download-artifact@v2 with: name: site path: out - name: Deploy to Firebase uses: w9jds/firebase-action@master with: args: deploy --only hosting env: FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
name: Deploy each push on: push: branches: [master] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ uses: actions/checkout@v2 with: persist-credentials: false # See https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn config get cacheFolder)" - uses: actions/cache@v2 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install and Build 🔧 uses: actions/setup-node@v1 with: node-version: "15.x" - run: yarn install - run: yarn run build # env: # CI: false - name: Archive built site uses: actions/upload-artifact@v2 with: name: site path: out deploy: name: Deploy needs: build runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v1 - name: Download Artifact uses: actions/download-artifact@v2 with: name: site path: out - name: Deploy to Firebase uses: w9jds/firebase-action@master with: args: deploy --only hosting env: FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
Change github action to build next.js site instead of jekyll
Change github action to build next.js site instead of jekyll
YAML
mit
teelahti/kerkesix.fi,teelahti/kerkesix.fi
yaml
## Code Before: name: Deploy each push on: push: branches: [master] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 # - name: Build site # uses: docker://jekyll/builder:4.1.0 # with: # args: jekyll build - name: Archive built site uses: actions/upload-artifact@v2 with: name: site path: out deploy: name: Deploy needs: build runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v1 - name: Download Artifact uses: actions/download-artifact@v2 with: name: site path: out - name: Deploy to Firebase uses: w9jds/firebase-action@master with: args: deploy --only hosting env: FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} ## Instruction: Change github action to build next.js site instead of jekyll ## Code After: name: Deploy each push on: push: branches: [master] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ uses: actions/checkout@v2 with: persist-credentials: false # See https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn config get cacheFolder)" - uses: actions/cache@v2 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Install and Build 🔧 uses: actions/setup-node@v1 with: node-version: "15.x" - run: yarn install - run: yarn run build # env: # CI: false - name: Archive built site uses: actions/upload-artifact@v2 with: name: site path: out deploy: name: Deploy needs: build runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v1 - name: Download Artifact uses: actions/download-artifact@v2 with: name: site path: out - name: Deploy to Firebase uses: w9jds/firebase-action@master with: args: deploy --only hosting env: FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
20512a52efc5bf3e2c850995792a67860837e557
CHANGELOG.md
CHANGELOG.md
1.0.0 ------ Initial release
1.0.1 ----- * Fix issue #6: Standard Log Appender handles missing exception argument. 1.0.0 ------ Initial release
Add fixed issue to change log.
Add fixed issue to change log.
Markdown
apache-2.0
garrypolley/canadarm,cerner/canadarm,loganom/canadarm,cerner/canadarm,loganom/canadarm,garrypolley/canadarm
markdown
## Code Before: 1.0.0 ------ Initial release ## Instruction: Add fixed issue to change log. ## Code After: 1.0.1 ----- * Fix issue #6: Standard Log Appender handles missing exception argument. 1.0.0 ------ Initial release
d244f1ebd089094e3d4c062a9b681426d610103f
src/AccordionItemBody/accordion-item-body.js
src/AccordionItemBody/accordion-item-body.js
// @flow import React from 'react'; import type { Node } from 'react'; import classNames from 'classnames'; import { inject, observer } from 'mobx-react'; import { type Store } from '../accordionStore/accordionStore'; const defaultProps = { className: 'accordion__body', hideBodyClassName: 'accordion__body--hidden', }; type AccordionItemBodyProps = { children: Node, className: string, hideBodyClassName: string, accordionStore: Store, uuid: string | number, }; const AccordionItemBody = (props: AccordionItemBodyProps) => { const { uuid, children, className, hideBodyClassName } = props; const { items, accordion } = props.accordionStore; const foundItem = items.find(item => item.uuid === uuid); if (!foundItem) return null; const { expanded } = foundItem; const id = `accordion__body-${uuid}`; const ariaLabelledby = `accordion__title-${uuid}`; const role = accordion ? 'tabpanel' : null; const bodyClass = classNames(className, { [hideBodyClassName]: !expanded, }); const ariaHidden = !expanded; return ( <div id={id} className={bodyClass} aria-hidden={ariaHidden} aria-labelledby={ariaLabelledby} role={role} > {children} </div> ); }; AccordionItemBody.defaultProps = defaultProps; export default inject('accordionStore', 'uuid')(observer(AccordionItemBody));
// @flow import React, { type ElementProps } from 'react'; import classNames from 'classnames'; import { inject, observer } from 'mobx-react'; import { type Store } from '../accordionStore/accordionStore'; const defaultProps = { className: 'accordion__body', hideBodyClassName: 'accordion__body--hidden', }; type AccordionItemBodyProps = ElementProps<'div'> & { hideBodyClassName: string, accordionStore: Store, uuid: string | number, }; const AccordionItemBody = (props: AccordionItemBodyProps) => { const { accordionStore, uuid, className, hideBodyClassName, ...rest } = props; const { items, accordion } = props.accordionStore; const foundItem = items.find(item => item.uuid === uuid); if (!foundItem) return null; const { expanded } = foundItem; const id = `accordion__body-${uuid}`; const ariaLabelledby = `accordion__title-${uuid}`; const role = accordion ? 'tabpanel' : null; const bodyClass = classNames(className, { [hideBodyClassName]: !expanded, }); const ariaHidden = !expanded; return ( <div id={id} className={bodyClass} aria-hidden={ariaHidden} aria-labelledby={ariaLabelledby} role={role} {...rest} /> ); }; AccordionItemBody.defaultProps = defaultProps; export default inject('accordionStore', 'uuid')(observer(AccordionItemBody));
Update AccordionItemBody to respect arbitrary user-defined props
Update AccordionItemBody to respect arbitrary user-defined props
JavaScript
mit
springload/react-accessible-accordion,springload/react-accessible-accordion,springload/react-accessible-accordion
javascript
## Code Before: // @flow import React from 'react'; import type { Node } from 'react'; import classNames from 'classnames'; import { inject, observer } from 'mobx-react'; import { type Store } from '../accordionStore/accordionStore'; const defaultProps = { className: 'accordion__body', hideBodyClassName: 'accordion__body--hidden', }; type AccordionItemBodyProps = { children: Node, className: string, hideBodyClassName: string, accordionStore: Store, uuid: string | number, }; const AccordionItemBody = (props: AccordionItemBodyProps) => { const { uuid, children, className, hideBodyClassName } = props; const { items, accordion } = props.accordionStore; const foundItem = items.find(item => item.uuid === uuid); if (!foundItem) return null; const { expanded } = foundItem; const id = `accordion__body-${uuid}`; const ariaLabelledby = `accordion__title-${uuid}`; const role = accordion ? 'tabpanel' : null; const bodyClass = classNames(className, { [hideBodyClassName]: !expanded, }); const ariaHidden = !expanded; return ( <div id={id} className={bodyClass} aria-hidden={ariaHidden} aria-labelledby={ariaLabelledby} role={role} > {children} </div> ); }; AccordionItemBody.defaultProps = defaultProps; export default inject('accordionStore', 'uuid')(observer(AccordionItemBody)); ## Instruction: Update AccordionItemBody to respect arbitrary user-defined props ## Code After: // @flow import React, { type ElementProps } from 'react'; import classNames from 'classnames'; import { inject, observer } from 'mobx-react'; import { type Store } from '../accordionStore/accordionStore'; const defaultProps = { className: 'accordion__body', hideBodyClassName: 'accordion__body--hidden', }; type AccordionItemBodyProps = ElementProps<'div'> & { hideBodyClassName: string, accordionStore: Store, uuid: string | number, }; const AccordionItemBody = (props: AccordionItemBodyProps) => { const { accordionStore, uuid, className, hideBodyClassName, ...rest } = props; const { items, accordion } = props.accordionStore; const foundItem = items.find(item => item.uuid === uuid); if (!foundItem) return null; const { expanded } = foundItem; const id = `accordion__body-${uuid}`; const ariaLabelledby = `accordion__title-${uuid}`; const role = accordion ? 'tabpanel' : null; const bodyClass = classNames(className, { [hideBodyClassName]: !expanded, }); const ariaHidden = !expanded; return ( <div id={id} className={bodyClass} aria-hidden={ariaHidden} aria-labelledby={ariaLabelledby} role={role} {...rest} /> ); }; AccordionItemBody.defaultProps = defaultProps; export default inject('accordionStore', 'uuid')(observer(AccordionItemBody));
01dd232947895052939d7279ba699565db6a8d77
services/value-stat-getter.js
services/value-stat-getter.js
'use strict'; var _ = require('lodash'); var P = require('bluebird'); var FilterParser = require('./filter-parser'); function ValueStatGetter(model, params, opts) { function getAggregateField() { // jshint sub: true return params['aggregate_field'] || '_id'; } this.perform = function () { return new P(function (resolve, reject) { var query = model.aggregate(); if (params.filters) { _.each(params.filters, function (filter) { query = new FilterParser(model, opts).perform(query, filter.field, filter.value, 'match'); }); } var sum = 1; if (params['aggregate_field']) { sum = '$' + params['aggregate_field']; } query .group({ _id: null, total: { $sum: sum } }) .exec(function (err, records) { if (err) { return reject(err); } resolve({ value: records[0].total }); }); }); }; } module.exports = ValueStatGetter;
'use strict'; var _ = require('lodash'); var P = require('bluebird'); var FilterParser = require('./filter-parser'); function ValueStatGetter(model, params, opts) { function getAggregateField() { // jshint sub: true return params['aggregate_field'] || '_id'; } this.perform = function () { return new P(function (resolve, reject) { var query = model.aggregate(); if (params.filters) { _.each(params.filters, function (filter) { query = new FilterParser(model, opts).perform(query, filter.field, filter.value, 'match'); }); } var sum = 1; if (params['aggregate_field']) { sum = '$' + params['aggregate_field']; } query .group({ _id: null, total: { $sum: sum } }) .exec(function (err, records) { if (err) { return reject(err); } if (!records || !records.length) { return resolve({ value: 0 }); } resolve({ value: records[0].total }); }); }); }; } module.exports = ValueStatGetter;
Fix the value stat getter when no records available
Fix the value stat getter when no records available
JavaScript
mit
SeyZ/forest-express-mongoose
javascript
## Code Before: 'use strict'; var _ = require('lodash'); var P = require('bluebird'); var FilterParser = require('./filter-parser'); function ValueStatGetter(model, params, opts) { function getAggregateField() { // jshint sub: true return params['aggregate_field'] || '_id'; } this.perform = function () { return new P(function (resolve, reject) { var query = model.aggregate(); if (params.filters) { _.each(params.filters, function (filter) { query = new FilterParser(model, opts).perform(query, filter.field, filter.value, 'match'); }); } var sum = 1; if (params['aggregate_field']) { sum = '$' + params['aggregate_field']; } query .group({ _id: null, total: { $sum: sum } }) .exec(function (err, records) { if (err) { return reject(err); } resolve({ value: records[0].total }); }); }); }; } module.exports = ValueStatGetter; ## Instruction: Fix the value stat getter when no records available ## Code After: 'use strict'; var _ = require('lodash'); var P = require('bluebird'); var FilterParser = require('./filter-parser'); function ValueStatGetter(model, params, opts) { function getAggregateField() { // jshint sub: true return params['aggregate_field'] || '_id'; } this.perform = function () { return new P(function (resolve, reject) { var query = model.aggregate(); if (params.filters) { _.each(params.filters, function (filter) { query = new FilterParser(model, opts).perform(query, filter.field, filter.value, 'match'); }); } var sum = 1; if (params['aggregate_field']) { sum = '$' + params['aggregate_field']; } query .group({ _id: null, total: { $sum: sum } }) .exec(function (err, records) { if (err) { return reject(err); } if (!records || !records.length) { return resolve({ value: 0 }); } resolve({ value: records[0].total }); }); }); }; } module.exports = ValueStatGetter;
c87d4577b720798a26ca1a731347790dcc0353eb
_config.yml
_config.yml
title: Stephen Melinyshyn email: [email protected] description: > # this means to ignore newlines until "baseurl:" This is my personal site for my blog, information about what I'm working on, and more. These are things that are interesting to me and, possibly, to you. baseurl: "" # the subpath of your site, e.g. /blog/ url: "https://melinysh.me" # the base hostname & protocol for your site twitter_username: melinysh github_username: melinysh # Build settings markdown: redcarpet markdown_ext: markdown,mkdown,mkdn,mkd,md # Gems to include gems: - jekyll-redirect-from redcarpet: extensions: ["tables", "autolink", "strikethrough", "space_after_headers", "fenced_code_blocks"]
title: Stephen Melinyshyn email: [email protected] description: > # this means to ignore newlines until "baseurl:" This is my personal site for my blog, information about what I'm working on, and more. These are things that are interesting to me and, possibly, to you. baseurl: "" # the subpath of your site, e.g. /blog/ url: "https://melinysh.me" # the base hostname & protocol for your site twitter_username: melinysh github_username: melinysh # Build settings markdown_ext: markdown,mkdown,mkdn,mkd,md markdown: kramdown kramdown: input: GFM syntax_highlighter: rouge # Gems to include #gems: # - jekyll-redirect-from #redcarpet: # extensions: ["tables", "autolink", "strikethrough", "space_after_headers", "fenced_code_blocks"]
Move to Kramdown for Jekyll 3, removed redirect gem
Move to Kramdown for Jekyll 3, removed redirect gem
YAML
mit
Melinysh/melinysh.github.io,Melinysh/melinysh.github.io
yaml
## Code Before: title: Stephen Melinyshyn email: [email protected] description: > # this means to ignore newlines until "baseurl:" This is my personal site for my blog, information about what I'm working on, and more. These are things that are interesting to me and, possibly, to you. baseurl: "" # the subpath of your site, e.g. /blog/ url: "https://melinysh.me" # the base hostname & protocol for your site twitter_username: melinysh github_username: melinysh # Build settings markdown: redcarpet markdown_ext: markdown,mkdown,mkdn,mkd,md # Gems to include gems: - jekyll-redirect-from redcarpet: extensions: ["tables", "autolink", "strikethrough", "space_after_headers", "fenced_code_blocks"] ## Instruction: Move to Kramdown for Jekyll 3, removed redirect gem ## Code After: title: Stephen Melinyshyn email: [email protected] description: > # this means to ignore newlines until "baseurl:" This is my personal site for my blog, information about what I'm working on, and more. These are things that are interesting to me and, possibly, to you. baseurl: "" # the subpath of your site, e.g. /blog/ url: "https://melinysh.me" # the base hostname & protocol for your site twitter_username: melinysh github_username: melinysh # Build settings markdown_ext: markdown,mkdown,mkdn,mkd,md markdown: kramdown kramdown: input: GFM syntax_highlighter: rouge # Gems to include #gems: # - jekyll-redirect-from #redcarpet: # extensions: ["tables", "autolink", "strikethrough", "space_after_headers", "fenced_code_blocks"]
43a1214a1cc0e92eeabf1ee0b6fd73d7929b762c
builder/templates/modules/default.all.all.xul.tpl
builder/templates/modules/default.all.all.xul.tpl
<hbox flex="1"> <stack width="250"> <vbox flex="1" style="opacity:0.99"> <cnavigationtree flex="1" id="navigationTree"/> </vbox> <chelppanel hidden="true" flex="1" /> </stack> <splitter collapse="before"> <wsplitterbutton /> </splitter> <deck flex="1" anonid="mainViewDeck"> <vbox flex="1" anonid="documentlistmode"> <cmoduletoolbar id="moduletoolbar" /> <cmodulelist id="documentlist" flex="1" /> </vbox> <tal:block change:documenteditors="module <{$name}>" /> </deck> <splitter collapse="after"> <wsplitterbutton /> </splitter> <cressourcesselector width="210" id="ressourcesSelector" collapsed="true" /> </hbox>
<hbox flex="1"> <stack width="250"> <vbox flex="1" style="opacity:0.99"> <cnavigationtree flex="1" id="navigationTree"/> </vbox> <chelppanel hidden="true" flex="1" /> </stack> <splitter collapse="before"> <wsplitterbutton /> </splitter> <deck flex="1" anonid="mainViewDeck"> <vbox flex="1" anonid="documentlistmode"> <cmoduletoolbar id="moduletoolbar" /> <cmodulelist id="documentlist" flex="1" /> </vbox> <tal:block change:documenteditors="module <{$name}>" /> </deck> </hbox>
Remove old rsc tree in the perspective.default.all.all.xml file generated by add-module.
[CLEAN] Remove old rsc tree in the perspective.default.all.all.xml file generated by add-module.
Smarty
agpl-3.0
RBSWebFactory/framework,RBSChange/framework,RBSChange/framework,RBSWebFactory/framework,RBSWebFactory/framework,RBSChange/framework
smarty
## Code Before: <hbox flex="1"> <stack width="250"> <vbox flex="1" style="opacity:0.99"> <cnavigationtree flex="1" id="navigationTree"/> </vbox> <chelppanel hidden="true" flex="1" /> </stack> <splitter collapse="before"> <wsplitterbutton /> </splitter> <deck flex="1" anonid="mainViewDeck"> <vbox flex="1" anonid="documentlistmode"> <cmoduletoolbar id="moduletoolbar" /> <cmodulelist id="documentlist" flex="1" /> </vbox> <tal:block change:documenteditors="module <{$name}>" /> </deck> <splitter collapse="after"> <wsplitterbutton /> </splitter> <cressourcesselector width="210" id="ressourcesSelector" collapsed="true" /> </hbox> ## Instruction: [CLEAN] Remove old rsc tree in the perspective.default.all.all.xml file generated by add-module. ## Code After: <hbox flex="1"> <stack width="250"> <vbox flex="1" style="opacity:0.99"> <cnavigationtree flex="1" id="navigationTree"/> </vbox> <chelppanel hidden="true" flex="1" /> </stack> <splitter collapse="before"> <wsplitterbutton /> </splitter> <deck flex="1" anonid="mainViewDeck"> <vbox flex="1" anonid="documentlistmode"> <cmoduletoolbar id="moduletoolbar" /> <cmodulelist id="documentlist" flex="1" /> </vbox> <tal:block change:documenteditors="module <{$name}>" /> </deck> </hbox>
d317d378c269805b417096cce50174c1e7c78a62
metadata/org.dynalogin.android.txt
metadata/org.dynalogin.android.txt
Category:System License:GPLv3+ Web Site:http://www.dynalogin.org Source Code:https://github.com/dynalogin/dynalogin-android Issue Tracker:https://github.com/dynalogin/dynalogin-android/issues Summary:Soft-token for two-factor HOTP authentication Description: Soft-token implementing the HOTP algorithm from the Open Authentication (OATH) initiative. Works well with the dynalogin server platform for secure Single Sign On (SSO) and OpenID use cases. . Repo Type:git Repo:https://github.com/dynalogin/dynalogin-android.git Build Version:1.0.1,2,f4043c9bc6d63b98de734b3d8ec5ef91d6852815 Update Check Mode:Market
Category:System License:GPLv3+ Web Site:http://www.dynalogin.org Source Code:https://github.com/dynalogin/dynalogin-android Issue Tracker:https://github.com/dynalogin/dynalogin-android/issues Summary:Soft-token for two-factor HOTP authentication Description: Soft-token implementing the HOTP algorithm from the Open Authentication (OATH) initiative. Works well with the dynalogin server platform for secure Single Sign On (SSO) and OpenID use cases. . Repo Type:git Repo:https://github.com/dynalogin/dynalogin-android.git Build Version:1.0.1,2,f4043c9bc6d63b98de734b3d8ec5ef91d6852815 Update Check Mode:Market Current Version:1.0.1 Current Version Code:2
Set current version for dynalogin
Set current version for dynalogin
Text
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata,f-droid/fdroid-data
text
## Code Before: Category:System License:GPLv3+ Web Site:http://www.dynalogin.org Source Code:https://github.com/dynalogin/dynalogin-android Issue Tracker:https://github.com/dynalogin/dynalogin-android/issues Summary:Soft-token for two-factor HOTP authentication Description: Soft-token implementing the HOTP algorithm from the Open Authentication (OATH) initiative. Works well with the dynalogin server platform for secure Single Sign On (SSO) and OpenID use cases. . Repo Type:git Repo:https://github.com/dynalogin/dynalogin-android.git Build Version:1.0.1,2,f4043c9bc6d63b98de734b3d8ec5ef91d6852815 Update Check Mode:Market ## Instruction: Set current version for dynalogin ## Code After: Category:System License:GPLv3+ Web Site:http://www.dynalogin.org Source Code:https://github.com/dynalogin/dynalogin-android Issue Tracker:https://github.com/dynalogin/dynalogin-android/issues Summary:Soft-token for two-factor HOTP authentication Description: Soft-token implementing the HOTP algorithm from the Open Authentication (OATH) initiative. Works well with the dynalogin server platform for secure Single Sign On (SSO) and OpenID use cases. . Repo Type:git Repo:https://github.com/dynalogin/dynalogin-android.git Build Version:1.0.1,2,f4043c9bc6d63b98de734b3d8ec5ef91d6852815 Update Check Mode:Market Current Version:1.0.1 Current Version Code:2
6d23f3bd1ccd45a6e739264e8d041282e6baaf0b
hassio/dock/util.py
hassio/dock/util.py
"""HassIO docker utilitys.""" import re from ..const import ARCH_AARCH64, ARCH_ARMHF, ARCH_I386, ARCH_AMD64 RESIN_BASE_IMAGE = { ARCH_ARMHF: "resin/armhf-alpine:3.5", ARCH_AARCH64: "resin/aarch64-alpine:3.5", ARCH_I386: "resin/i386-alpine:3.5", ARCH_AMD64: "resin/amd64-alpine:3.5", } TMPL_IMAGE = re.compile(r"%%BASE_IMAGE%%") def dockerfile_template(dockerfile, arch, version, meta_type): """Prepare a Hass.IO dockerfile.""" buff = [] resin_image = RESIN_BASE_IMAGE[arch] # read docker with dockerfile.open('r') as dock_input: for line in dock_input: line = TMPL_IMAGE.sub(resin_image, line) buff.append(line) # add metadata buff.append(create_metadata(version, arch, meta_type)) # write docker with dockerfile.open('w') as dock_output: dock_output.writelines(buff) def create_metadata(version, arch, meta_type): """Generate docker label layer for hassio.""" return ('LABEL io.hass.version="{}" ' 'io.hass.arch="{}" ' 'io.hass.type="{}"').format(version, arch, meta_type)
"""HassIO docker utilitys.""" import re from ..const import ARCH_AARCH64, ARCH_ARMHF, ARCH_I386, ARCH_AMD64 RESIN_BASE_IMAGE = { ARCH_ARMHF: "homeassistant/armhf-base:latest", ARCH_AARCH64: "homeassistant/aarch64-base:latest", ARCH_I386: "homeassistant/i386-base:latest", ARCH_AMD64: "homeassistant/amd64-base:latest", } TMPL_IMAGE = re.compile(r"%%BASE_IMAGE%%") def dockerfile_template(dockerfile, arch, version, meta_type): """Prepare a Hass.IO dockerfile.""" buff = [] resin_image = RESIN_BASE_IMAGE[arch] # read docker with dockerfile.open('r') as dock_input: for line in dock_input: line = TMPL_IMAGE.sub(resin_image, line) buff.append(line) # add metadata buff.append(create_metadata(version, arch, meta_type)) # write docker with dockerfile.open('w') as dock_output: dock_output.writelines(buff) def create_metadata(version, arch, meta_type): """Generate docker label layer for hassio.""" return ('LABEL io.hass.version="{}" ' 'io.hass.arch="{}" ' 'io.hass.type="{}"').format(version, arch, meta_type)
Use our new base image
Use our new base image
Python
bsd-3-clause
pvizeli/hassio,pvizeli/hassio
python
## Code Before: """HassIO docker utilitys.""" import re from ..const import ARCH_AARCH64, ARCH_ARMHF, ARCH_I386, ARCH_AMD64 RESIN_BASE_IMAGE = { ARCH_ARMHF: "resin/armhf-alpine:3.5", ARCH_AARCH64: "resin/aarch64-alpine:3.5", ARCH_I386: "resin/i386-alpine:3.5", ARCH_AMD64: "resin/amd64-alpine:3.5", } TMPL_IMAGE = re.compile(r"%%BASE_IMAGE%%") def dockerfile_template(dockerfile, arch, version, meta_type): """Prepare a Hass.IO dockerfile.""" buff = [] resin_image = RESIN_BASE_IMAGE[arch] # read docker with dockerfile.open('r') as dock_input: for line in dock_input: line = TMPL_IMAGE.sub(resin_image, line) buff.append(line) # add metadata buff.append(create_metadata(version, arch, meta_type)) # write docker with dockerfile.open('w') as dock_output: dock_output.writelines(buff) def create_metadata(version, arch, meta_type): """Generate docker label layer for hassio.""" return ('LABEL io.hass.version="{}" ' 'io.hass.arch="{}" ' 'io.hass.type="{}"').format(version, arch, meta_type) ## Instruction: Use our new base image ## Code After: """HassIO docker utilitys.""" import re from ..const import ARCH_AARCH64, ARCH_ARMHF, ARCH_I386, ARCH_AMD64 RESIN_BASE_IMAGE = { ARCH_ARMHF: "homeassistant/armhf-base:latest", ARCH_AARCH64: "homeassistant/aarch64-base:latest", ARCH_I386: "homeassistant/i386-base:latest", ARCH_AMD64: "homeassistant/amd64-base:latest", } TMPL_IMAGE = re.compile(r"%%BASE_IMAGE%%") def dockerfile_template(dockerfile, arch, version, meta_type): """Prepare a Hass.IO dockerfile.""" buff = [] resin_image = RESIN_BASE_IMAGE[arch] # read docker with dockerfile.open('r') as dock_input: for line in dock_input: line = TMPL_IMAGE.sub(resin_image, line) buff.append(line) # add metadata buff.append(create_metadata(version, arch, meta_type)) # write docker with dockerfile.open('w') as dock_output: dock_output.writelines(buff) def create_metadata(version, arch, meta_type): """Generate docker label layer for hassio.""" return ('LABEL io.hass.version="{}" ' 'io.hass.arch="{}" ' 'io.hass.type="{}"').format(version, arch, meta_type)
44ccf57e62f60454a40dfbbf61d213011664e2cb
spec/models/professor_spec.rb
spec/models/professor_spec.rb
require 'rails_helper' RSpec.describe Professor, type: :model do describe '::TBA', slow: true do it 'creates a TBA record when called the first time' do Professor.where(name: 'TBA').destroy_all expect { Professor.TBA }.to change { Professor.count }.by(1) end it 'does not create a new record when it has already been called' do Professor.TBA expect { Professor.TBA }.to_not change { Professor.count } end end end
require 'rails_helper' RSpec.describe Professor, type: :model do describe '::TBA', slow: true do it 'creates a TBA record when called the first time' do safe_delete_professors('TBA') expect { Professor.TBA }.to change { Professor.count }.by(1) end it 'does not create a new record when it has already been called' do Professor.TBA expect { Professor.TBA }.to_not change { Professor.count } end end end
Update professor spec to use safe deletion
Update professor spec to use safe deletion
Ruby
mit
hacsoc/the_jolly_advisor,hacsoc/the_jolly_advisor,hacsoc/the_jolly_advisor
ruby
## Code Before: require 'rails_helper' RSpec.describe Professor, type: :model do describe '::TBA', slow: true do it 'creates a TBA record when called the first time' do Professor.where(name: 'TBA').destroy_all expect { Professor.TBA }.to change { Professor.count }.by(1) end it 'does not create a new record when it has already been called' do Professor.TBA expect { Professor.TBA }.to_not change { Professor.count } end end end ## Instruction: Update professor spec to use safe deletion ## Code After: require 'rails_helper' RSpec.describe Professor, type: :model do describe '::TBA', slow: true do it 'creates a TBA record when called the first time' do safe_delete_professors('TBA') expect { Professor.TBA }.to change { Professor.count }.by(1) end it 'does not create a new record when it has already been called' do Professor.TBA expect { Professor.TBA }.to_not change { Professor.count } end end end
fe40da77375cdc3ef6e500857f8d5cadc1dfdbe8
lib/active_record_where_assoc.rb
lib/active_record_where_assoc.rb
require_relative "active_record_where_assoc/version" require "active_record" module ActiveRecordWhereAssoc # Default options for the gem. Meant to be modified in place by external code def self.default_options @default_options ||= { ignore_limit: false, never_alias_limit: false, poly_belongs_to: :raise, } end end require_relative "active_record_where_assoc/core_logic" require_relative "active_record_where_assoc/query_methods" require_relative "active_record_where_assoc/querying" ActiveSupport.on_load(:active_record) do ActiveRecord.eager_load! # Need to use #send for the include to support Ruby 2.0 ActiveRecord::Relation.send(:include, ActiveRecordWhereAssoc::QueryMethods) ActiveRecord::Base.extend(ActiveRecordWhereAssoc::Querying) end
require_relative "active_record_where_assoc/version" require "active_record" module ActiveRecordWhereAssoc # Default options for the gem. Meant to be modified in place by external code, such as in # an initializer. # Ex: # ActiveRecordWhereAssoc[:ignore_limit] = true # # A description for each can be found in ActiveRecordWhereAssoc::QueryMethods#where_assoc_exists. # # The only one that truly makes sense to change is :ignore_limit, when you are using MySQL, since # limit are never supported on it. def self.default_options @default_options ||= { ignore_limit: false, never_alias_limit: false, poly_belongs_to: :raise, } end end require_relative "active_record_where_assoc/core_logic" require_relative "active_record_where_assoc/query_methods" require_relative "active_record_where_assoc/querying" ActiveSupport.on_load(:active_record) do ActiveRecord.eager_load! # Need to use #send for the include to support Ruby 2.0 ActiveRecord::Relation.send(:include, ActiveRecordWhereAssoc::QueryMethods) ActiveRecord::Base.extend(ActiveRecordWhereAssoc::Querying) end
Add information about the default_options directly in the code
Add information about the default_options directly in the code
Ruby
mit
MaxLap/activerecord_where_assoc,MaxLap/activerecord_where_assoc
ruby
## Code Before: require_relative "active_record_where_assoc/version" require "active_record" module ActiveRecordWhereAssoc # Default options for the gem. Meant to be modified in place by external code def self.default_options @default_options ||= { ignore_limit: false, never_alias_limit: false, poly_belongs_to: :raise, } end end require_relative "active_record_where_assoc/core_logic" require_relative "active_record_where_assoc/query_methods" require_relative "active_record_where_assoc/querying" ActiveSupport.on_load(:active_record) do ActiveRecord.eager_load! # Need to use #send for the include to support Ruby 2.0 ActiveRecord::Relation.send(:include, ActiveRecordWhereAssoc::QueryMethods) ActiveRecord::Base.extend(ActiveRecordWhereAssoc::Querying) end ## Instruction: Add information about the default_options directly in the code ## Code After: require_relative "active_record_where_assoc/version" require "active_record" module ActiveRecordWhereAssoc # Default options for the gem. Meant to be modified in place by external code, such as in # an initializer. # Ex: # ActiveRecordWhereAssoc[:ignore_limit] = true # # A description for each can be found in ActiveRecordWhereAssoc::QueryMethods#where_assoc_exists. # # The only one that truly makes sense to change is :ignore_limit, when you are using MySQL, since # limit are never supported on it. def self.default_options @default_options ||= { ignore_limit: false, never_alias_limit: false, poly_belongs_to: :raise, } end end require_relative "active_record_where_assoc/core_logic" require_relative "active_record_where_assoc/query_methods" require_relative "active_record_where_assoc/querying" ActiveSupport.on_load(:active_record) do ActiveRecord.eager_load! # Need to use #send for the include to support Ruby 2.0 ActiveRecord::Relation.send(:include, ActiveRecordWhereAssoc::QueryMethods) ActiveRecord::Base.extend(ActiveRecordWhereAssoc::Querying) end
eec3a4e10bda946679c333e601268efc6dc5e1d4
source/Tabs.js
source/Tabs.js
enyo.kind({ name: "bootstrap.TabHolder", handlers: { onNavItemClicked: "showTabContent" }, showTabContent: function(inSender, inEvent){ this.waterfall("showTabContent", inEvent); } }); enyo.kind({ name: "bootstrap.TabContent", classes: "tab-content", published: { active: false }, handlers: { showTabContent: "showTab" }, showTab: function(inSender, inEvent){ var tabPanes = this.children, id = inEvent.originator.getAttribute('href').slice(1); tabPanes.forEach(function(pane){ if(pane.getAttribute('id') === id){ pane.setActive(true); } else{ pane.setActive(false); } }); } }); enyo.kind({ name: "bootstrap.TabPane", classes: "tab-pane fade", attributes: { id: '' }, published: { active: false }, create: function(){ this.inherited(arguments); this.activeChanged(); }, activeChanged: function(){ var $this = this; if($this.active) { $this.addRemoveClass('active', $this.active); setTimeout(function(){ $this.addRemoveClass('in', $this.active); },150); } else { $this.addRemoveClass('in', $this.active); $this.addRemoveClass('active', $this.active); } } });
enyo.kind({ name: "bootstrap.TabHolder", handlers: { onNavItemClicked: "showTabContent" }, showTabContent: function(inSender, inEvent){ this.waterfall("showTabContent", inEvent); } }); enyo.kind({ name: "bootstrap.TabContent", classes: "tab-content", published: { active: false }, handlers: { showTabContent: "showTab" }, showTab: function(inSender, inEvent){ var tabPanes = this.children, id = inEvent.originator.getAttribute('href').slice(1); tabPanes.forEach(function(pane){ if(pane.getAttribute('id') === id){ pane.setActive(true); } else{ pane.setActive(false); } }); } }); enyo.kind({ name: "bootstrap.TabPane", classes: "tab-pane fade", attributes: { id: '' }, published: { active: false }, create: function(){ this.inherited(arguments); this.activeChanged(); }, activeChanged: function(){ var $this = this; if($this.active) { $this.addRemoveClass('active', $this.active); $this.waterfall('tabShown'); setTimeout(function(){ $this.addRemoveClass('in', $this.active); },150); } else { $this.addRemoveClass('in', $this.active); $this.addRemoveClass('active', $this.active); } } });
Add a waterfalled event on active tab change
Add a waterfalled event on active tab change This allows us to do extra bullshit since Enyo doesn't tend to like being shown/hidden.
JavaScript
mit
pangea/bootstrap-enyo,pangea/bootstrap-enyo
javascript
## Code Before: enyo.kind({ name: "bootstrap.TabHolder", handlers: { onNavItemClicked: "showTabContent" }, showTabContent: function(inSender, inEvent){ this.waterfall("showTabContent", inEvent); } }); enyo.kind({ name: "bootstrap.TabContent", classes: "tab-content", published: { active: false }, handlers: { showTabContent: "showTab" }, showTab: function(inSender, inEvent){ var tabPanes = this.children, id = inEvent.originator.getAttribute('href').slice(1); tabPanes.forEach(function(pane){ if(pane.getAttribute('id') === id){ pane.setActive(true); } else{ pane.setActive(false); } }); } }); enyo.kind({ name: "bootstrap.TabPane", classes: "tab-pane fade", attributes: { id: '' }, published: { active: false }, create: function(){ this.inherited(arguments); this.activeChanged(); }, activeChanged: function(){ var $this = this; if($this.active) { $this.addRemoveClass('active', $this.active); setTimeout(function(){ $this.addRemoveClass('in', $this.active); },150); } else { $this.addRemoveClass('in', $this.active); $this.addRemoveClass('active', $this.active); } } }); ## Instruction: Add a waterfalled event on active tab change This allows us to do extra bullshit since Enyo doesn't tend to like being shown/hidden. ## Code After: enyo.kind({ name: "bootstrap.TabHolder", handlers: { onNavItemClicked: "showTabContent" }, showTabContent: function(inSender, inEvent){ this.waterfall("showTabContent", inEvent); } }); enyo.kind({ name: "bootstrap.TabContent", classes: "tab-content", published: { active: false }, handlers: { showTabContent: "showTab" }, showTab: function(inSender, inEvent){ var tabPanes = this.children, id = inEvent.originator.getAttribute('href').slice(1); tabPanes.forEach(function(pane){ if(pane.getAttribute('id') === id){ pane.setActive(true); } else{ pane.setActive(false); } }); } }); enyo.kind({ name: "bootstrap.TabPane", classes: "tab-pane fade", attributes: { id: '' }, published: { active: false }, create: function(){ this.inherited(arguments); this.activeChanged(); }, activeChanged: function(){ var $this = this; if($this.active) { $this.addRemoveClass('active', $this.active); $this.waterfall('tabShown'); setTimeout(function(){ $this.addRemoveClass('in', $this.active); },150); } else { $this.addRemoveClass('in', $this.active); $this.addRemoveClass('active', $this.active); } } });
27ba1a9363fd5f7a11b8356177e0a817d1f8b0da
app/controllers/webmail/cache_settings_controller.rb
app/controllers/webmail/cache_settings_controller.rb
class Webmail::CacheSettingsController < ApplicationController include Webmail::BaseFilter menu_view false private def set_crumbs @crumbs << [t("webmail.settings.cache") , { action: :show } ] @webmail_other_account_path = :webmail_cache_setting_path end public def show # render end def update if params[:model] == 'mail' clear_cache_mail elsif params[:model] == 'mailbox' clear_cache_mailbox end end def clear_cache_mail if params[:target] == 'all' items = Webmail::Mail.all items.each(&:destroy_rfc822) items.delete_all else items = Webmail::Mail.imap_setting(@imap_setting) items.each(&:destroy_rfc822) items.delete_all end render_destroy end def clear_cache_mailbox if params[:target] == 'all' Webmail::Mailbox.delete_all else Webmail::Mailbox.imap_setting(@imap_setting).delete_all end render_destroy end def render_destroy location = { action: :show } respond_to do |format| format.html { redirect_to location, notice: t('webmail.notice.deleted_cache') } format.json { head :no_content } end end end
class Webmail::CacheSettingsController < ApplicationController include Webmail::BaseFilter menu_view false private def set_crumbs @crumbs << [t("webmail.settings.cache") , { action: :show } ] @webmail_other_account_path = :webmail_cache_setting_path end public def show # render end def update if params[:model] == 'mail' clear_cache_mail elsif params[:model] == 'mailbox' clear_cache_mailbox end end def clear_cache_mail if params[:target] == 'all' items = Webmail::Mail.all else items = Webmail::Mail.imap_setting(@imap_setting) end items.each(&:destroy_rfc822) items.delete_all render_destroy end def clear_cache_mailbox if params[:target] == 'all' Webmail::Mailbox.delete_all else Webmail::Mailbox.imap_setting(@imap_setting).delete_all end render_destroy end def render_destroy location = { action: :show } respond_to do |format| format.html { redirect_to location, notice: t('webmail.notice.deleted_cache') } format.json { head :no_content } end end end
Move items.delete_all out of the conditional.
[rubocop] C: Move items.delete_all out of the conditional.
Ruby
mit
mizoki/shirasagi,itowtips/shirasagi,sunny4381/shirasagi,MasakiInaya/shirasagi,ShinjiTanimoto/shirasagi,shirasagi/ss-handson,shirasagi/ss-handson,tany/ss,sunny4381/shirasagi,itowtips/shirasagi,sunny4381/shirasagi,shirasagi/ss-handson,MasakiInaya/shirasagi,ShinjiTanimoto/shirasagi,shirasagi/shirasagi,ShinjiTanimoto/shirasagi,shirasagi/ss-handson,mizoki/shirasagi,sunny4381/shirasagi,MasakiInaya/shirasagi,shirasagi/shirasagi,itowtips/shirasagi,itowtips/shirasagi,mizoki/shirasagi,ShinjiTanimoto/shirasagi,mizoki/shirasagi,shirasagi/shirasagi,MasakiInaya/shirasagi,tany/ss,tany/ss,tany/ss,shirasagi/shirasagi
ruby
## Code Before: class Webmail::CacheSettingsController < ApplicationController include Webmail::BaseFilter menu_view false private def set_crumbs @crumbs << [t("webmail.settings.cache") , { action: :show } ] @webmail_other_account_path = :webmail_cache_setting_path end public def show # render end def update if params[:model] == 'mail' clear_cache_mail elsif params[:model] == 'mailbox' clear_cache_mailbox end end def clear_cache_mail if params[:target] == 'all' items = Webmail::Mail.all items.each(&:destroy_rfc822) items.delete_all else items = Webmail::Mail.imap_setting(@imap_setting) items.each(&:destroy_rfc822) items.delete_all end render_destroy end def clear_cache_mailbox if params[:target] == 'all' Webmail::Mailbox.delete_all else Webmail::Mailbox.imap_setting(@imap_setting).delete_all end render_destroy end def render_destroy location = { action: :show } respond_to do |format| format.html { redirect_to location, notice: t('webmail.notice.deleted_cache') } format.json { head :no_content } end end end ## Instruction: [rubocop] C: Move items.delete_all out of the conditional. ## Code After: class Webmail::CacheSettingsController < ApplicationController include Webmail::BaseFilter menu_view false private def set_crumbs @crumbs << [t("webmail.settings.cache") , { action: :show } ] @webmail_other_account_path = :webmail_cache_setting_path end public def show # render end def update if params[:model] == 'mail' clear_cache_mail elsif params[:model] == 'mailbox' clear_cache_mailbox end end def clear_cache_mail if params[:target] == 'all' items = Webmail::Mail.all else items = Webmail::Mail.imap_setting(@imap_setting) end items.each(&:destroy_rfc822) items.delete_all render_destroy end def clear_cache_mailbox if params[:target] == 'all' Webmail::Mailbox.delete_all else Webmail::Mailbox.imap_setting(@imap_setting).delete_all end render_destroy end def render_destroy location = { action: :show } respond_to do |format| format.html { redirect_to location, notice: t('webmail.notice.deleted_cache') } format.json { head :no_content } end end end
763fa5b58d82b23426d4e7296cde8b7c4eba2be4
src/Socket/AdapterSocket/DirectAdapter.swift
src/Socket/AdapterSocket/DirectAdapter.swift
import Foundation import CocoaLumberjackSwift /// This adapter connects to remote directly. class DirectAdapter: AdapterSocket { /// If this is set to `false`, then the IP address will be resolved by system. var resolveHost = false /** Connect to remote according to the `ConnectRequest`. - parameter request: The connect request. */ override func openSocketWithRequest(request: ConnectRequest) { super.openSocketWithRequest(request) let host: String if resolveHost { host = request.ipAddress if host == "" { DDLogError("DNS look up failed for direct connect to \(request.host), disconnect now.") delegate?.didDisconnect(self) } } else { host = request.host } do { try socket.connectTo(host, port: Int(request.port), enableTLS: false, tlsSettings: nil) } catch {} } /** The socket did connect to remote. - parameter socket: The connected socket. */ override func didConnect(socket: RawTCPSocketProtocol) { super.didConnect(socket) delegate?.readyToForward(self) } }
import Foundation import CocoaLumberjackSwift /// This adapter connects to remote directly. class DirectAdapter: AdapterSocket { /// If this is set to `false`, then the IP address will be resolved by system. var resolveHost = false /** Connect to remote according to the `ConnectRequest`. - parameter request: The connect request. */ override func openSocketWithRequest(request: ConnectRequest) { super.openSocketWithRequest(request) let host: String if resolveHost { host = request.ipAddress if host == "" { DDLogError("DNS look up failed for direct connect to \(request.host), disconnect now.") delegate?.didDisconnect(self) } } else { host = request.host } do { try socket.connectTo(host, port: Int(request.port), enableTLS: false, tlsSettings: nil) } catch {} } /** The socket did connect to remote. - parameter socket: The connected socket. */ override func didConnect(socket: RawTCPSocketProtocol) { super.didConnect(socket) delegate?.readyToForward(self) } override func didReadData(data: NSData, withTag tag: Int, from rawSocket: RawTCPSocketProtocol) { super.didReadData(data, withTag: tag, from: rawSocket) delegate?.didReadData(data, withTag: tag, from: self) } override func didWriteData(data: NSData?, withTag tag: Int, from rawSocket: RawTCPSocketProtocol) { super.didWriteData(data, withTag: tag, from: rawSocket) delegate?.didWriteData(data, withTag: tag, from: self) } }
Fix that delegate is not called
Fix that delegate is not called
Swift
bsd-3-clause
zhuhaow/NEKit,playstones/NEKit,playstones/NEKit,playstones/NEKit,zhuhaow/NEKit
swift
## Code Before: import Foundation import CocoaLumberjackSwift /// This adapter connects to remote directly. class DirectAdapter: AdapterSocket { /// If this is set to `false`, then the IP address will be resolved by system. var resolveHost = false /** Connect to remote according to the `ConnectRequest`. - parameter request: The connect request. */ override func openSocketWithRequest(request: ConnectRequest) { super.openSocketWithRequest(request) let host: String if resolveHost { host = request.ipAddress if host == "" { DDLogError("DNS look up failed for direct connect to \(request.host), disconnect now.") delegate?.didDisconnect(self) } } else { host = request.host } do { try socket.connectTo(host, port: Int(request.port), enableTLS: false, tlsSettings: nil) } catch {} } /** The socket did connect to remote. - parameter socket: The connected socket. */ override func didConnect(socket: RawTCPSocketProtocol) { super.didConnect(socket) delegate?.readyToForward(self) } } ## Instruction: Fix that delegate is not called ## Code After: import Foundation import CocoaLumberjackSwift /// This adapter connects to remote directly. class DirectAdapter: AdapterSocket { /// If this is set to `false`, then the IP address will be resolved by system. var resolveHost = false /** Connect to remote according to the `ConnectRequest`. - parameter request: The connect request. */ override func openSocketWithRequest(request: ConnectRequest) { super.openSocketWithRequest(request) let host: String if resolveHost { host = request.ipAddress if host == "" { DDLogError("DNS look up failed for direct connect to \(request.host), disconnect now.") delegate?.didDisconnect(self) } } else { host = request.host } do { try socket.connectTo(host, port: Int(request.port), enableTLS: false, tlsSettings: nil) } catch {} } /** The socket did connect to remote. - parameter socket: The connected socket. */ override func didConnect(socket: RawTCPSocketProtocol) { super.didConnect(socket) delegate?.readyToForward(self) } override func didReadData(data: NSData, withTag tag: Int, from rawSocket: RawTCPSocketProtocol) { super.didReadData(data, withTag: tag, from: rawSocket) delegate?.didReadData(data, withTag: tag, from: self) } override func didWriteData(data: NSData?, withTag tag: Int, from rawSocket: RawTCPSocketProtocol) { super.didWriteData(data, withTag: tag, from: rawSocket) delegate?.didWriteData(data, withTag: tag, from: self) } }
e209af7560d16bdce6f70c161dbe6a5a042a6f55
app/containers/IllustPreview/IllustPreview.js
app/containers/IllustPreview/IllustPreview.js
// @flow import * as React from 'react' import styled from 'styled-components' import LazyImg from './LazyImg' type Props = { from: string, original: string, width: number, height: number, isLoaded: boolean, onLoad: () => void, onUnLoad: () => void, onClose: () => void, } export default class IllustPreview extends React.PureComponent<Props> { componentWillUnmount() { this.props.onUnLoad() } handleOnClose = () => { this.props.onClose() } render() { const { width, height, from, original } = this.props return ( <StyledPreview onClick={this.handleOnClose}> <LazyImg from={from} original={original} width={width} height={height} isLoaded={this.props.isLoaded} onLoad={this.props.onLoad} onClose={this.props.onClose} /> </StyledPreview> ) } } const StyledPreview = styled.div` display: flex; position: fixed; width: 100%; height: 100%; margin: 0; padding: 0; top: 0; left: 0; background: rgba(24, 24, 24, 0.97); cursor: pointer; overflow: auto; z-index: 999; `
// @flow import * as React from 'react' import styled from 'styled-components' import LazyImg from './LazyImg' type Props = { from: string, original: string, width: number, height: number, isLoaded: boolean, onLoad: () => void, onUnLoad: () => void, onClose: () => void, } export default class IllustPreview extends React.PureComponent<Props> { componentWillUnmount() { this.props.onUnLoad() window.removeEventListener('keydown', this.escToClose, false) } componentDidMount() { window.addEventListener('keydown', this.escToClose.bind(this), false) } handleOnClose = () => { this.props.onClose() } escToClose = (event: Event) => { if (event.keyCode === 27) { this.handleOnClose() } } render() { const { width, height, from, original } = this.props return ( <StyledPreview onClick={this.handleOnClose}> <LazyImg from={from} original={original} width={width} height={height} isLoaded={this.props.isLoaded} onLoad={this.props.onLoad} onClose={this.props.onClose} /> </StyledPreview> ) } } const StyledPreview = styled.div` display: flex; position: fixed; width: 100%; height: 100%; margin: 0; padding: 0; top: 0; left: 0; background: rgba(24, 24, 24, 0.97); cursor: pointer; overflow: auto; z-index: 999; `
Implement the function to close modal with ESC key
Implement the function to close modal with ESC key
JavaScript
mit
akameco/PixivDeck,akameco/PixivDeck
javascript
## Code Before: // @flow import * as React from 'react' import styled from 'styled-components' import LazyImg from './LazyImg' type Props = { from: string, original: string, width: number, height: number, isLoaded: boolean, onLoad: () => void, onUnLoad: () => void, onClose: () => void, } export default class IllustPreview extends React.PureComponent<Props> { componentWillUnmount() { this.props.onUnLoad() } handleOnClose = () => { this.props.onClose() } render() { const { width, height, from, original } = this.props return ( <StyledPreview onClick={this.handleOnClose}> <LazyImg from={from} original={original} width={width} height={height} isLoaded={this.props.isLoaded} onLoad={this.props.onLoad} onClose={this.props.onClose} /> </StyledPreview> ) } } const StyledPreview = styled.div` display: flex; position: fixed; width: 100%; height: 100%; margin: 0; padding: 0; top: 0; left: 0; background: rgba(24, 24, 24, 0.97); cursor: pointer; overflow: auto; z-index: 999; ` ## Instruction: Implement the function to close modal with ESC key ## Code After: // @flow import * as React from 'react' import styled from 'styled-components' import LazyImg from './LazyImg' type Props = { from: string, original: string, width: number, height: number, isLoaded: boolean, onLoad: () => void, onUnLoad: () => void, onClose: () => void, } export default class IllustPreview extends React.PureComponent<Props> { componentWillUnmount() { this.props.onUnLoad() window.removeEventListener('keydown', this.escToClose, false) } componentDidMount() { window.addEventListener('keydown', this.escToClose.bind(this), false) } handleOnClose = () => { this.props.onClose() } escToClose = (event: Event) => { if (event.keyCode === 27) { this.handleOnClose() } } render() { const { width, height, from, original } = this.props return ( <StyledPreview onClick={this.handleOnClose}> <LazyImg from={from} original={original} width={width} height={height} isLoaded={this.props.isLoaded} onLoad={this.props.onLoad} onClose={this.props.onClose} /> </StyledPreview> ) } } const StyledPreview = styled.div` display: flex; position: fixed; width: 100%; height: 100%; margin: 0; padding: 0; top: 0; left: 0; background: rgba(24, 24, 24, 0.97); cursor: pointer; overflow: auto; z-index: 999; `
7060f26ddd3b944fa2d5a9d8c096c4d8284eeecd
create_mysql_admin_user.sh
create_mysql_admin_user.sh
/usr/bin/mysqld_safe > /dev/null 2>&1 & RET=1 while [[ RET -ne 0 ]]; do echo "=> Waiting for confirmation of MySQL service startup" sleep 5 mysql -uroot -e "status" > /dev/null 2>&1 RET=$? done PASS=${MYSQL_PASS:-$(pwgen -s 12 1)} _word=$( [ ${MYSQL_PASS} ] && echo "preset" || echo "random" ) echo "=> Creating MySQL admin user with ${_word} password" mysql -uroot -e "CREATE USER 'admin'@'%' IDENTIFIED BY '$PASS'" mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION" echo "=> Done!" echo "========================================================================" echo "You can now connect to this MySQL Server using:" echo "" echo " mysql -uadmin -p$PASS -h<host> -P<port>" echo "" echo "Please remember to change the above password as soon as possible!" echo "MySQL user 'root' has no password but only allows local connections" echo "========================================================================" mysqladmin -uroot shutdown
/usr/bin/mysqld_safe > /dev/null 2>&1 & RET=1 while [[ RET -ne 0 ]]; do echo "=> Waiting for confirmation of MySQL service startup" sleep 5 mysql -uroot -e "status" > /dev/null 2>&1 RET=$? done PASS=${MYSQL_PASS:-$(pwgen -s 12 1)} _word=$( [ ${MYSQL_PASS} ] && echo "preset" || echo "random" ) echo "=> Creating MySQL admin user with ${_word} password" mysql -uroot -e "CREATE USER 'admin'@'%' IDENTIFIED BY '$PASS'" mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION" # You can create a /mysql-setup.sh file to intialized the DB if [ -f /mysql-setup.sh ] ; then . /mysql-setup.sh fi echo "=> Done!" echo "========================================================================" echo "You can now connect to this MySQL Server using:" echo "" echo " mysql -uadmin -p$PASS -h<host> -P<port>" echo "" echo "Please remember to change the above password as soon as possible!" echo "MySQL user 'root' has no password but only allows local connections" echo "========================================================================" mysqladmin -uroot shutdown
Support setting up the mysql DB with some initial data.
Support setting up the mysql DB with some initial data.
Shell
apache-2.0
qzsnitz/lamp,CodeBuffet/lamp-with-php5,dincaus/test_repo_2,qzsnitz/tenxcloud,tutumcloud/lamp
shell
## Code Before: /usr/bin/mysqld_safe > /dev/null 2>&1 & RET=1 while [[ RET -ne 0 ]]; do echo "=> Waiting for confirmation of MySQL service startup" sleep 5 mysql -uroot -e "status" > /dev/null 2>&1 RET=$? done PASS=${MYSQL_PASS:-$(pwgen -s 12 1)} _word=$( [ ${MYSQL_PASS} ] && echo "preset" || echo "random" ) echo "=> Creating MySQL admin user with ${_word} password" mysql -uroot -e "CREATE USER 'admin'@'%' IDENTIFIED BY '$PASS'" mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION" echo "=> Done!" echo "========================================================================" echo "You can now connect to this MySQL Server using:" echo "" echo " mysql -uadmin -p$PASS -h<host> -P<port>" echo "" echo "Please remember to change the above password as soon as possible!" echo "MySQL user 'root' has no password but only allows local connections" echo "========================================================================" mysqladmin -uroot shutdown ## Instruction: Support setting up the mysql DB with some initial data. ## Code After: /usr/bin/mysqld_safe > /dev/null 2>&1 & RET=1 while [[ RET -ne 0 ]]; do echo "=> Waiting for confirmation of MySQL service startup" sleep 5 mysql -uroot -e "status" > /dev/null 2>&1 RET=$? done PASS=${MYSQL_PASS:-$(pwgen -s 12 1)} _word=$( [ ${MYSQL_PASS} ] && echo "preset" || echo "random" ) echo "=> Creating MySQL admin user with ${_word} password" mysql -uroot -e "CREATE USER 'admin'@'%' IDENTIFIED BY '$PASS'" mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION" # You can create a /mysql-setup.sh file to intialized the DB if [ -f /mysql-setup.sh ] ; then . /mysql-setup.sh fi echo "=> Done!" echo "========================================================================" echo "You can now connect to this MySQL Server using:" echo "" echo " mysql -uadmin -p$PASS -h<host> -P<port>" echo "" echo "Please remember to change the above password as soon as possible!" echo "MySQL user 'root' has no password but only allows local connections" echo "========================================================================" mysqladmin -uroot shutdown
fc7d6fc961a83f8d90b7295b1e00a326e76a7889
.travis.yml
.travis.yml
language: python python: - '2.7' - '3.3' env: global: secure: |- EGaBZsH4N0En+rJBbsv+D/Y6nSuvYcMcqEfgQE62iEgzt5wXLAto5vV0SfoK uE1O+K3p5PSYeYL/z0z8jrloncTCY26bFB79p8cscZvD2aGZCdQgTHLW/inq PYkqxArdjIUU4Pe6yxIIS4sZv0jHA/CcVQAGa4KwMDiaVQA5/Hc= script: python setup.py run_tests -k $APIKEY notifications: email: on_success: never on_failure: always irc: channels: - "chat.freenode.net#optf2" template: - "%{repository}/%{branch}#%{commit} by %{author}: %{message} - %{build_url}"
language: python python: - '2.7' - '3.3' env: global: - APIKEY=NkExMzEzRDYzQ0EyRTA5NEJCQTJDMUY1N0IwNDk4QkQ= script: python setup.py run_tests -k $(echo $APIKEY|base64 -d) notifications: email: on_success: never on_failure: always irc: channels: - "chat.freenode.net#optf2" template: - "%{repository}/%{branch}#%{commit} by %{author}: %{message} - %{build_url}"
Use non-encrypted API key because pull requests are good.
Use non-encrypted API key because pull requests are good. Sorry Valve, but this is simply not fair. Appreciating high quality software as I know you do, I'm sure you'll understand why this is necessary. Minimal encoding is done to make sure the key isn't directly searchable
YAML
isc
miedzinski/steamodd,Lagg/steamodd
yaml
## Code Before: language: python python: - '2.7' - '3.3' env: global: secure: |- EGaBZsH4N0En+rJBbsv+D/Y6nSuvYcMcqEfgQE62iEgzt5wXLAto5vV0SfoK uE1O+K3p5PSYeYL/z0z8jrloncTCY26bFB79p8cscZvD2aGZCdQgTHLW/inq PYkqxArdjIUU4Pe6yxIIS4sZv0jHA/CcVQAGa4KwMDiaVQA5/Hc= script: python setup.py run_tests -k $APIKEY notifications: email: on_success: never on_failure: always irc: channels: - "chat.freenode.net#optf2" template: - "%{repository}/%{branch}#%{commit} by %{author}: %{message} - %{build_url}" ## Instruction: Use non-encrypted API key because pull requests are good. Sorry Valve, but this is simply not fair. Appreciating high quality software as I know you do, I'm sure you'll understand why this is necessary. Minimal encoding is done to make sure the key isn't directly searchable ## Code After: language: python python: - '2.7' - '3.3' env: global: - APIKEY=NkExMzEzRDYzQ0EyRTA5NEJCQTJDMUY1N0IwNDk4QkQ= script: python setup.py run_tests -k $(echo $APIKEY|base64 -d) notifications: email: on_success: never on_failure: always irc: channels: - "chat.freenode.net#optf2" template: - "%{repository}/%{branch}#%{commit} by %{author}: %{message} - %{build_url}"
a053401a50daeacd2141152b4fb25151d152efe1
templates/studygroups/facilitator_signup.html
templates/studygroups/facilitator_signup.html
{% extends 'base.html' %} {% load crispy_forms_tags %} {% load i18n %} {% url 'studygroups_login_redirect' as login_url %} {% block content %} <div class="container learning-circle-signup"> <div class="row"> <div class="col-md-12 col-sm-12"> <h2>{% trans "Create an account" %}</h2> {% blocktrans %}Or <a href="{{ login_url }}">log in</a>{% endblocktrans %} <p>{% trans "Fill in your email address and name below, and you’ll soon get an email prompting you to reset your password and log in to create your first Learning Circle." %}</p> </div> <div class="col-md-12 col-sm-12"> <form action="" method="POST" enctype="multipart/form-data"> {% csrf_token %} {{ form|crispy }} <p><button type="submit" class="btn btn-default">{% trans "Submit" %}</button></p> </form> </div> </div> </div> {% endblock %}
{% extends 'base.html' %} {% load crispy_forms_tags %} {% load i18n %} {% url 'studygroups_login_redirect' as login_url %} {% block content %} <div class="container learning-circle-signup"> <div class="row"> <div class="col-md-12 col-sm-12"> <h2>{% trans "Become a facilitator" %}</h2> {% blocktrans %}Or <a href="{{ login_url }}">log in</a>{% endblocktrans %} <p>{% trans "Fill in your email address and name below, and you’ll soon get an email prompting you to reset your password and log in to create your first Learning Circle." %}</p> </div> <div class="col-md-12 col-sm-12"> <form action="" method="POST" enctype="multipart/form-data"> {% csrf_token %} {{ form|crispy }} <p><button type="submit" class="btn btn-default">{% trans "Submit" %}</button></p> </form> </div> </div> </div> {% endblock %}
Update copy on signup page
Update copy on signup page
HTML
mit
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
html
## Code Before: {% extends 'base.html' %} {% load crispy_forms_tags %} {% load i18n %} {% url 'studygroups_login_redirect' as login_url %} {% block content %} <div class="container learning-circle-signup"> <div class="row"> <div class="col-md-12 col-sm-12"> <h2>{% trans "Create an account" %}</h2> {% blocktrans %}Or <a href="{{ login_url }}">log in</a>{% endblocktrans %} <p>{% trans "Fill in your email address and name below, and you’ll soon get an email prompting you to reset your password and log in to create your first Learning Circle." %}</p> </div> <div class="col-md-12 col-sm-12"> <form action="" method="POST" enctype="multipart/form-data"> {% csrf_token %} {{ form|crispy }} <p><button type="submit" class="btn btn-default">{% trans "Submit" %}</button></p> </form> </div> </div> </div> {% endblock %} ## Instruction: Update copy on signup page ## Code After: {% extends 'base.html' %} {% load crispy_forms_tags %} {% load i18n %} {% url 'studygroups_login_redirect' as login_url %} {% block content %} <div class="container learning-circle-signup"> <div class="row"> <div class="col-md-12 col-sm-12"> <h2>{% trans "Become a facilitator" %}</h2> {% blocktrans %}Or <a href="{{ login_url }}">log in</a>{% endblocktrans %} <p>{% trans "Fill in your email address and name below, and you’ll soon get an email prompting you to reset your password and log in to create your first Learning Circle." %}</p> </div> <div class="col-md-12 col-sm-12"> <form action="" method="POST" enctype="multipart/form-data"> {% csrf_token %} {{ form|crispy }} <p><button type="submit" class="btn btn-default">{% trans "Submit" %}</button></p> </form> </div> </div> </div> {% endblock %}
5ea38c63bf313e003b05220dcc172d5576bc3d8c
src/main/php/xp/runtime/Evaluate.class.php
src/main/php/xp/runtime/Evaluate.class.php
<?php namespace xp\runtime; use util\cmd\Console; /** * Evaluates sourcecode * */ class Evaluate extends \lang\Object { /** * Main * * @param string[] args */ public static function main(array $args) { // Read sourcecode from STDIN if no further argument is given if (0 === sizeof($args)) { $src= file_get_contents('php://stdin'); } else { $src= $args[0]; } $src= trim($src, ' ;').';'; // Perform $argv= array(\xp::nameOf(__CLASS__)) + $args; $argc= sizeof($argv); return eval($src); } }
<?php namespace xp\runtime; use util\cmd\Console; /** * Evaluates sourcecode * */ class Evaluate extends \lang\Object { /** * Main * * @param string[] args */ public static function main(array $args) { $argc= sizeof($args); // Read sourcecode from STDIN if no further argument is given if (0 === $argc) { $src= file_get_contents('php://stdin'); } else if ('--' === $args[0]) { $src= file_get_contents('php://stdin'); } else { $src= $args[0]; } // Support <?php $src= trim($src, ' ;').';'; if (0 === strncmp($src, '<?php', 5)) { $src= substr($src, 6); } // Perform $argv= array(\xp::nameOf(__CLASS__)) + $args; $argc= sizeof($argv); return eval($src); } }
Support piping code with PHP open tag
Support piping code with PHP open tag
PHP
bsd-3-clause
johannes85/core
php
## Code Before: <?php namespace xp\runtime; use util\cmd\Console; /** * Evaluates sourcecode * */ class Evaluate extends \lang\Object { /** * Main * * @param string[] args */ public static function main(array $args) { // Read sourcecode from STDIN if no further argument is given if (0 === sizeof($args)) { $src= file_get_contents('php://stdin'); } else { $src= $args[0]; } $src= trim($src, ' ;').';'; // Perform $argv= array(\xp::nameOf(__CLASS__)) + $args; $argc= sizeof($argv); return eval($src); } } ## Instruction: Support piping code with PHP open tag ## Code After: <?php namespace xp\runtime; use util\cmd\Console; /** * Evaluates sourcecode * */ class Evaluate extends \lang\Object { /** * Main * * @param string[] args */ public static function main(array $args) { $argc= sizeof($args); // Read sourcecode from STDIN if no further argument is given if (0 === $argc) { $src= file_get_contents('php://stdin'); } else if ('--' === $args[0]) { $src= file_get_contents('php://stdin'); } else { $src= $args[0]; } // Support <?php $src= trim($src, ' ;').';'; if (0 === strncmp($src, '<?php', 5)) { $src= substr($src, 6); } // Perform $argv= array(\xp::nameOf(__CLASS__)) + $args; $argc= sizeof($argv); return eval($src); } }
32dbe9375c94b59208275ae0dad42dbadb95081c
core/bin/ci.sh
core/bin/ci.sh
cd `dirname $0` cd .. ./script/set-status.sh "$GIT_COMMIT" pending "$BUILD_URL" "$BUILD_TAG" > github_pending_response.json export RUBY_HEAP_MIN_SLOTS=1000000 export RUBY_HEAP_SLOTS_INCREMENT=1000000 export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 export RUBY_GC_MALLOC_LIMIT=100000000 export RUBY_HEAP_FREE_MIN=500000 rm -f TEST_FAILURE rm -f tmp/*.junit.xml for action in bin/ci/*.sh; do banner $action; time /bin/bash "$action" if [ "$?" -gt "0" ] ; then ./script/set-status.sh "$GIT_COMMIT" error "$BUILD_URL" "$BUILD_TAG" > github_error_response.json exit 1 fi if [ -f TEST_FAILURE ] ; then ./script/set-status.sh "$GIT_COMMIT" failure "$BUILD_URL" "$BUILD_TAG" > github_failure_response.json exit fi done ./script/set-status.sh "$GIT_COMMIT" success "$BUILD_URL" "$BUILD_TAG" > github_success_response.json
cd `dirname $0` cd .. rm -f tmp/*.junit.xml ./script/set-status.sh "$GIT_COMMIT" pending "$BUILD_URL" "$BUILD_TAG" > github_pending_response.json export RUBY_HEAP_MIN_SLOTS=1000000 export RUBY_HEAP_SLOTS_INCREMENT=1000000 export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 export RUBY_GC_MALLOC_LIMIT=100000000 export RUBY_HEAP_FREE_MIN=500000 rm -f TEST_FAILURE rm -f tmp/*.junit.xml for action in bin/ci/*.sh; do banner $action; time /bin/bash "$action" if [ "$?" -gt "0" ] ; then ./script/set-status.sh "$GIT_COMMIT" error "$BUILD_URL" "$BUILD_TAG" > github_error_response.json exit 1 fi if [ -f TEST_FAILURE ] ; then ./script/set-status.sh "$GIT_COMMIT" failure "$BUILD_URL" "$BUILD_TAG" > github_failure_response.json exit fi done ./script/set-status.sh "$GIT_COMMIT" success "$BUILD_URL" "$BUILD_TAG" > github_success_response.json
Delete old unit test reports before build to ensure we don't keep trash.
Delete old unit test reports before build to ensure we don't keep trash.
Shell
mit
Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core
shell
## Code Before: cd `dirname $0` cd .. ./script/set-status.sh "$GIT_COMMIT" pending "$BUILD_URL" "$BUILD_TAG" > github_pending_response.json export RUBY_HEAP_MIN_SLOTS=1000000 export RUBY_HEAP_SLOTS_INCREMENT=1000000 export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 export RUBY_GC_MALLOC_LIMIT=100000000 export RUBY_HEAP_FREE_MIN=500000 rm -f TEST_FAILURE rm -f tmp/*.junit.xml for action in bin/ci/*.sh; do banner $action; time /bin/bash "$action" if [ "$?" -gt "0" ] ; then ./script/set-status.sh "$GIT_COMMIT" error "$BUILD_URL" "$BUILD_TAG" > github_error_response.json exit 1 fi if [ -f TEST_FAILURE ] ; then ./script/set-status.sh "$GIT_COMMIT" failure "$BUILD_URL" "$BUILD_TAG" > github_failure_response.json exit fi done ./script/set-status.sh "$GIT_COMMIT" success "$BUILD_URL" "$BUILD_TAG" > github_success_response.json ## Instruction: Delete old unit test reports before build to ensure we don't keep trash. ## Code After: cd `dirname $0` cd .. rm -f tmp/*.junit.xml ./script/set-status.sh "$GIT_COMMIT" pending "$BUILD_URL" "$BUILD_TAG" > github_pending_response.json export RUBY_HEAP_MIN_SLOTS=1000000 export RUBY_HEAP_SLOTS_INCREMENT=1000000 export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 export RUBY_GC_MALLOC_LIMIT=100000000 export RUBY_HEAP_FREE_MIN=500000 rm -f TEST_FAILURE rm -f tmp/*.junit.xml for action in bin/ci/*.sh; do banner $action; time /bin/bash "$action" if [ "$?" -gt "0" ] ; then ./script/set-status.sh "$GIT_COMMIT" error "$BUILD_URL" "$BUILD_TAG" > github_error_response.json exit 1 fi if [ -f TEST_FAILURE ] ; then ./script/set-status.sh "$GIT_COMMIT" failure "$BUILD_URL" "$BUILD_TAG" > github_failure_response.json exit fi done ./script/set-status.sh "$GIT_COMMIT" success "$BUILD_URL" "$BUILD_TAG" > github_success_response.json
ff8960bd40da52d91d217e7ede2b125b392e08ce
README.md
README.md
ipyaladin =============================== Description ----------- A bridge between Jupyter and Aladin Lite, enabling interactive sky visualization in IPython notebooks. ![ipyaladin example](ipyaladin-screenshot.png) With a couple of lines, you can display Aladin Lite, center it on the target of your choice, and overlay an Astropy table: ![ipyaladin example](ipyaladin-screencast.gif) Examples ----------- Some example notebooks can be found in the [examples directory](examples) Installation ------------ To install use pip: $ pip install ipyaladin Then, make sure to enable widgetsnbextension : $ jupyter nbextension enable --py widgetsnbextension Finally, enable ipyaladin : $ jupyter nbextension enable --py --sys-prefix ipyaladin For a development installation (requires npm) you can either do: $ git clone https://github.com/cds-astro/ipyaladin $ cd ipyaladin $ pip install -e . $ jupyter nbextension install --py --symlink --sys-prefix ipyaladin $ jupyter nbextension enable --py --sys-prefix ipyaladin or directly use the compile.sh script: $ git clone https://github.com/cds-astro/ipyaladin $ cd ipyaladin $ ./compile.sh Note: Sometimes the module installation crash because of a conflict with an older occurence of itself, if so to solve this problem go to: ~/anaconda3/share/jupyter/nbextensions Then suppress the jupyter-widget-ipyaladin corrupted file.
ipyaladin =============================== Description ----------- A bridge between Jupyter and Aladin Lite, enabling interactive sky visualization in IPython notebooks. ![ipyaladin example](ipyaladin-screenshot.png) With a couple of lines, you can display Aladin Lite, center it on the target of your choice, and overlay an Astropy table: ![ipyaladin example](ipyaladin-screencast.gif) Examples ----------- Some example notebooks can be found in the [examples directory](examples) Installation ------------ To install use pip: $ pip install ipyaladin Then, make sure to enable widgetsnbextension: $ jupyter nbextension enable --py widgetsnbextension Finally, enable ipyaladin: $ jupyter nbextension enable --py --sys-prefix ipyaladin There is also an experimental conda package that can be installed with: $ conda install ipyaladin For a development installation (requires npm) you can either do: $ git clone https://github.com/cds-astro/ipyaladin $ cd ipyaladin $ pip install -e . $ jupyter nbextension install --py --symlink --sys-prefix ipyaladin $ jupyter nbextension enable --py --sys-prefix ipyaladin or directly use the compile.sh script: $ git clone https://github.com/cds-astro/ipyaladin $ cd ipyaladin $ ./compile.sh Note: Sometimes the module installation crash because of a conflict with an older occurence of itself, if so to solve this problem go to: ~/anaconda3/share/jupyter/nbextensions Then suppress the jupyter-widget-ipyaladin corrupted file.
Add info on conda package
Add info on conda package
Markdown
bsd-3-clause
cds-astro/ipyaladin,cds-astro/ipyaladin,cds-astro/ipyaladin
markdown
## Code Before: ipyaladin =============================== Description ----------- A bridge between Jupyter and Aladin Lite, enabling interactive sky visualization in IPython notebooks. ![ipyaladin example](ipyaladin-screenshot.png) With a couple of lines, you can display Aladin Lite, center it on the target of your choice, and overlay an Astropy table: ![ipyaladin example](ipyaladin-screencast.gif) Examples ----------- Some example notebooks can be found in the [examples directory](examples) Installation ------------ To install use pip: $ pip install ipyaladin Then, make sure to enable widgetsnbextension : $ jupyter nbextension enable --py widgetsnbextension Finally, enable ipyaladin : $ jupyter nbextension enable --py --sys-prefix ipyaladin For a development installation (requires npm) you can either do: $ git clone https://github.com/cds-astro/ipyaladin $ cd ipyaladin $ pip install -e . $ jupyter nbextension install --py --symlink --sys-prefix ipyaladin $ jupyter nbextension enable --py --sys-prefix ipyaladin or directly use the compile.sh script: $ git clone https://github.com/cds-astro/ipyaladin $ cd ipyaladin $ ./compile.sh Note: Sometimes the module installation crash because of a conflict with an older occurence of itself, if so to solve this problem go to: ~/anaconda3/share/jupyter/nbextensions Then suppress the jupyter-widget-ipyaladin corrupted file. ## Instruction: Add info on conda package ## Code After: ipyaladin =============================== Description ----------- A bridge between Jupyter and Aladin Lite, enabling interactive sky visualization in IPython notebooks. ![ipyaladin example](ipyaladin-screenshot.png) With a couple of lines, you can display Aladin Lite, center it on the target of your choice, and overlay an Astropy table: ![ipyaladin example](ipyaladin-screencast.gif) Examples ----------- Some example notebooks can be found in the [examples directory](examples) Installation ------------ To install use pip: $ pip install ipyaladin Then, make sure to enable widgetsnbextension: $ jupyter nbextension enable --py widgetsnbextension Finally, enable ipyaladin: $ jupyter nbextension enable --py --sys-prefix ipyaladin There is also an experimental conda package that can be installed with: $ conda install ipyaladin For a development installation (requires npm) you can either do: $ git clone https://github.com/cds-astro/ipyaladin $ cd ipyaladin $ pip install -e . $ jupyter nbextension install --py --symlink --sys-prefix ipyaladin $ jupyter nbextension enable --py --sys-prefix ipyaladin or directly use the compile.sh script: $ git clone https://github.com/cds-astro/ipyaladin $ cd ipyaladin $ ./compile.sh Note: Sometimes the module installation crash because of a conflict with an older occurence of itself, if so to solve this problem go to: ~/anaconda3/share/jupyter/nbextensions Then suppress the jupyter-widget-ipyaladin corrupted file.
0ddc89d0f54ef6c97c492cf790e8cd50abfd8563
.hammerspoon/init.lua
.hammerspoon/init.lua
require 'expandmode' require 'movemode' local screenmon = nil local super = {'ctrl', 'alt', 'cmd', 'shift'} function screensChangedCallback() local screen1 = hs.screen.allScreens()[1]:name() if screen1 == 'Color LCD' then hs.notify.show('Switched KWM modes', '', 'Switched to floating window mode',''):withdraw() hs.execute('kwmc space -t float', true) end end screenmon = hs.screen.watcher.new(screensChangedCallback) screenmon:start()
require 'expandmode' require 'movemode' local super = {'ctrl', 'alt', 'cmd', 'shift'} function screensChangedCallback() local screens = hs.screen.allScreens() if #screens < 2 then hs.notify.show('Switched KWM modes', '', 'Switched to floating window mode',''):withdraw() hs.execute('kwmc space -t float', true) hs.execute('kwmc config focused-border off', true) else hs.notify.show('Switched KWM modes', '', 'Switched to bsp window mode',''):withdraw() hs.execute('kwmc space -t bsp', true) hs.execute('kwmc config focused-border on', true) end end hs.screen.watcher.new(screensChangedCallback):start()
Refactor screenmon to work better with multiscreen
Refactor screenmon to work better with multiscreen
Lua
mit
paradox460/.dotfiles,paradox460/.dotfiles,paradox460/.dotfiles,paradox460/.dotfiles
lua
## Code Before: require 'expandmode' require 'movemode' local screenmon = nil local super = {'ctrl', 'alt', 'cmd', 'shift'} function screensChangedCallback() local screen1 = hs.screen.allScreens()[1]:name() if screen1 == 'Color LCD' then hs.notify.show('Switched KWM modes', '', 'Switched to floating window mode',''):withdraw() hs.execute('kwmc space -t float', true) end end screenmon = hs.screen.watcher.new(screensChangedCallback) screenmon:start() ## Instruction: Refactor screenmon to work better with multiscreen ## Code After: require 'expandmode' require 'movemode' local super = {'ctrl', 'alt', 'cmd', 'shift'} function screensChangedCallback() local screens = hs.screen.allScreens() if #screens < 2 then hs.notify.show('Switched KWM modes', '', 'Switched to floating window mode',''):withdraw() hs.execute('kwmc space -t float', true) hs.execute('kwmc config focused-border off', true) else hs.notify.show('Switched KWM modes', '', 'Switched to bsp window mode',''):withdraw() hs.execute('kwmc space -t bsp', true) hs.execute('kwmc config focused-border on', true) end end hs.screen.watcher.new(screensChangedCallback):start()
b7d808b80c61756cc310ed522193f6b66b5b6230
src/operations/create.js
src/operations/create.js
"use strict"; const Environment = require('../environment/environment'); const Loader = require("../terminal-utils/async_loader"); module.exports = { description : "Create new environment and install drupal in it.", run : () => { let loader; Environment.create(['php', 'web', 'database']).then((env) => { loader = new Loader("saving environment config"); return env.save("/home/zoltan.fodor/Documents/Drupal/test"); }).then((env) => { loader.setMessage("generating docker env"); return env.write("docker", "/home/zoltan.fodor/Documents/Drupal/test"); }).then((docker) => { loader.setMessage("starting docker"); return docker.start(); }).then(() => { loader.finish("container started"); }).catch((err) => { console.log(err); console.error("Chain failed:\n" + err); }); } };
"use strict"; const Environment = require('../environment/environment'); const Loader = require("../terminal-utils/async_loader"); module.exports = { description : "Create new environment and install drupal in it.", run : () => { let loader; Environment.create({projectName: "test"}, ['php', 'web', 'database']).then((env) => { loader = new Loader("saving environment config"); return env.save("/home/zoltan.fodor/Documents/Drupal/test"); }).then((env) => { loader.setMessage("generating docker env"); return env.write("docker", "/home/zoltan.fodor/Documents/Drupal/test"); }).then((docker) => { loader.setMessage("starting docker"); return docker.getIp("nginx"); }).then((ip) => { console.log(ip); loader.finish("asd"); }).catch((err) => { console.log(err); console.error("Chain failed:\n" + err); }); } };
Test for getting container service ip.
Test for getting container service ip.
JavaScript
mit
archfz/drup,archfz/drup
javascript
## Code Before: "use strict"; const Environment = require('../environment/environment'); const Loader = require("../terminal-utils/async_loader"); module.exports = { description : "Create new environment and install drupal in it.", run : () => { let loader; Environment.create(['php', 'web', 'database']).then((env) => { loader = new Loader("saving environment config"); return env.save("/home/zoltan.fodor/Documents/Drupal/test"); }).then((env) => { loader.setMessage("generating docker env"); return env.write("docker", "/home/zoltan.fodor/Documents/Drupal/test"); }).then((docker) => { loader.setMessage("starting docker"); return docker.start(); }).then(() => { loader.finish("container started"); }).catch((err) => { console.log(err); console.error("Chain failed:\n" + err); }); } }; ## Instruction: Test for getting container service ip. ## Code After: "use strict"; const Environment = require('../environment/environment'); const Loader = require("../terminal-utils/async_loader"); module.exports = { description : "Create new environment and install drupal in it.", run : () => { let loader; Environment.create({projectName: "test"}, ['php', 'web', 'database']).then((env) => { loader = new Loader("saving environment config"); return env.save("/home/zoltan.fodor/Documents/Drupal/test"); }).then((env) => { loader.setMessage("generating docker env"); return env.write("docker", "/home/zoltan.fodor/Documents/Drupal/test"); }).then((docker) => { loader.setMessage("starting docker"); return docker.getIp("nginx"); }).then((ip) => { console.log(ip); loader.finish("asd"); }).catch((err) => { console.log(err); console.error("Chain failed:\n" + err); }); } };
2a840c50664084830f79ffe39ae468030d4a851b
devil/docs/persistent_device_list.md
devil/docs/persistent_device_list.md
<!-- Copyright 2016 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> # Devil: Persistent Device List ## What is it? A persistent device list that stores all expected devices between builds. It is used by the perf test runner in order to properly shard tests by device affinity. This is important because the same performance test can yield meaningfully different results when run on different devices. ## Bots The list is usually located at one of these locations: - `/b/build/site_config/.known_devices`. - `~/.android`. Look at recipes listed below in order to find more up to date location. ## Local Runs The persistent device list is unnecessary for local runs. It is only used on the bots that upload data to the perf dashboard. ## Where it is used The persistent device list is used in performance test recipes via [api.chromium\_tests.steps.DynamicPerfTests](https://cs.chromium.org/chromium/build/scripts/slave/recipe_modules/chromium_tests/steps.py?q=DynamicPerfTests). For example, the [android/perf](https://cs.chromium.org/chromium/build/scripts/slave/recipes/android/perf.py) recipe uses it like this: ```python dynamic_perf_tests = api.chromium_tests.steps.DynamicPerfTests( builder['perf_id'], 'android', None, known_devices_file=builder.get('known_devices_file', None)) dynamic_perf_tests.run(api, None) ```
<!-- Copyright 2016 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> # Devil: Persistent Device List ## What is it? A persistent device list that stores all expected devices between builds. It is used by non-swarmed bots to detect any missing/extra devices attached to them. This will be no longer needed when all bots are switched over to swarming. ## Bots The list is usually located at: - `~/.android/known_devices.json`. Look at recipes listed below in order to find more up to date location. ## Local Runs The persistent device list is unnecessary for local runs. It is only used on the bots that upload data to the perf dashboard. ## Where it is used The persistent device list is used in the [chromium_android](https://cs.chromium.org/chromium/build/scripts/slave/recipe_modules/chromium_android/api.py?q=known_devices_file) recipe module, and consumed by the [device_status.py](https://cs.chromium.org/chromium/src/third_party/catapult/devil/devil/android/tools/device_status.py?q=\-\-known%5C-devices%5C-file) script among others.
Update docs on persistent device list
[devil] Update docs on persistent device list Remove references to the obsoleted DynamicPerfTests; the main remaining client is on the devuce_status.py script, so mention that one instead. Bug: chromium:770700 Change-Id: I840424cede7308af1f5190ec2092363f30bf4268 Reviewed-on: https://chromium-review.googlesource.com/716498 Reviewed-by: John Budorick <[email protected]> Commit-Queue: Juan Antonio Navarro Pérez <[email protected]>
Markdown
bsd-3-clause
catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult
markdown
## Code Before: <!-- Copyright 2016 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> # Devil: Persistent Device List ## What is it? A persistent device list that stores all expected devices between builds. It is used by the perf test runner in order to properly shard tests by device affinity. This is important because the same performance test can yield meaningfully different results when run on different devices. ## Bots The list is usually located at one of these locations: - `/b/build/site_config/.known_devices`. - `~/.android`. Look at recipes listed below in order to find more up to date location. ## Local Runs The persistent device list is unnecessary for local runs. It is only used on the bots that upload data to the perf dashboard. ## Where it is used The persistent device list is used in performance test recipes via [api.chromium\_tests.steps.DynamicPerfTests](https://cs.chromium.org/chromium/build/scripts/slave/recipe_modules/chromium_tests/steps.py?q=DynamicPerfTests). For example, the [android/perf](https://cs.chromium.org/chromium/build/scripts/slave/recipes/android/perf.py) recipe uses it like this: ```python dynamic_perf_tests = api.chromium_tests.steps.DynamicPerfTests( builder['perf_id'], 'android', None, known_devices_file=builder.get('known_devices_file', None)) dynamic_perf_tests.run(api, None) ``` ## Instruction: [devil] Update docs on persistent device list Remove references to the obsoleted DynamicPerfTests; the main remaining client is on the devuce_status.py script, so mention that one instead. Bug: chromium:770700 Change-Id: I840424cede7308af1f5190ec2092363f30bf4268 Reviewed-on: https://chromium-review.googlesource.com/716498 Reviewed-by: John Budorick <[email protected]> Commit-Queue: Juan Antonio Navarro Pérez <[email protected]> ## Code After: <!-- Copyright 2016 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> # Devil: Persistent Device List ## What is it? A persistent device list that stores all expected devices between builds. It is used by non-swarmed bots to detect any missing/extra devices attached to them. This will be no longer needed when all bots are switched over to swarming. ## Bots The list is usually located at: - `~/.android/known_devices.json`. Look at recipes listed below in order to find more up to date location. ## Local Runs The persistent device list is unnecessary for local runs. It is only used on the bots that upload data to the perf dashboard. ## Where it is used The persistent device list is used in the [chromium_android](https://cs.chromium.org/chromium/build/scripts/slave/recipe_modules/chromium_android/api.py?q=known_devices_file) recipe module, and consumed by the [device_status.py](https://cs.chromium.org/chromium/src/third_party/catapult/devil/devil/android/tools/device_status.py?q=\-\-known%5C-devices%5C-file) script among others.
4859633e5338f0d7100b2fba781f1f5e17c7efea
src/test/php/net/xp_framework/unittest/io/streams/MemoryOutputStreamTest.class.php
src/test/php/net/xp_framework/unittest/io/streams/MemoryOutputStreamTest.class.php
<?php namespace net\xp_framework\unittest\io\streams; use unittest\TestCase; use io\streams\MemoryOutputStream; /** * Unit tests for streams API * * @see xp://io.streams.OutputStream * @purpose Unit test */ class MemoryOutputStreamTest extends TestCase { protected $out= null; /** * Setup method. Creates the fixture. * */ public function setUp() { $this->out= new MemoryOutputStream(); } /** * Test string writing * */ #[@test] public function writeString() { $this->out->write('Hello'); $this->assertEquals('Hello', $this->out->getBytes()); } /** * Test number writing * */ #[@test] public function writeNumber() { $this->out->write(5); $this->assertEquals('5', $this->out->getBytes()); } /** * Test closing a stream twice has no effect. * * @see xp://lang.Closeable#close */ #[@test] public function closingTwice() { $this->out->close(); $this->out->close(); } }
<?php namespace net\xp_framework\unittest\io\streams; use io\streams\MemoryOutputStream; /** * Unit tests for streams API * * @see xp://io.streams.OutputStream * @see xp://lang.Closeable#close */ class MemoryOutputStreamTest extends \unittest\TestCase { private $out; /** * Setup method. Creates the fixture. */ public function setUp() { $this->out= new MemoryOutputStream(); } #[@test] public function writing_a_string() { $this->out->write('Hello'); $this->assertEquals('Hello', $this->out->getBytes()); } #[@test] public function writing_a_number() { $this->out->write(5); $this->assertEquals('5', $this->out->getBytes()); } #[@test] public function closingTwice() { $this->out->close(); $this->out->close(); } }
Adjust to new unittest coding standards
QA: Adjust to new unittest coding standards
PHP
bsd-3-clause
johannes85/core
php
## Code Before: <?php namespace net\xp_framework\unittest\io\streams; use unittest\TestCase; use io\streams\MemoryOutputStream; /** * Unit tests for streams API * * @see xp://io.streams.OutputStream * @purpose Unit test */ class MemoryOutputStreamTest extends TestCase { protected $out= null; /** * Setup method. Creates the fixture. * */ public function setUp() { $this->out= new MemoryOutputStream(); } /** * Test string writing * */ #[@test] public function writeString() { $this->out->write('Hello'); $this->assertEquals('Hello', $this->out->getBytes()); } /** * Test number writing * */ #[@test] public function writeNumber() { $this->out->write(5); $this->assertEquals('5', $this->out->getBytes()); } /** * Test closing a stream twice has no effect. * * @see xp://lang.Closeable#close */ #[@test] public function closingTwice() { $this->out->close(); $this->out->close(); } } ## Instruction: QA: Adjust to new unittest coding standards ## Code After: <?php namespace net\xp_framework\unittest\io\streams; use io\streams\MemoryOutputStream; /** * Unit tests for streams API * * @see xp://io.streams.OutputStream * @see xp://lang.Closeable#close */ class MemoryOutputStreamTest extends \unittest\TestCase { private $out; /** * Setup method. Creates the fixture. */ public function setUp() { $this->out= new MemoryOutputStream(); } #[@test] public function writing_a_string() { $this->out->write('Hello'); $this->assertEquals('Hello', $this->out->getBytes()); } #[@test] public function writing_a_number() { $this->out->write(5); $this->assertEquals('5', $this->out->getBytes()); } #[@test] public function closingTwice() { $this->out->close(); $this->out->close(); } }
66b88beec05a0bf6762f4c92a8646dfb732a6ed6
ifs-web-service/ifs-front-door-service/src/test/java/org/innovateuk/ifs/competition/status/PublicContentStatusTextTest.java
ifs-web-service/ifs-front-door-service/src/test/java/org/innovateuk/ifs/competition/status/PublicContentStatusTextTest.java
package org.innovateuk.ifs.competition.status; import org.junit.Assert; import org.junit.Test; public class PublicContentStatusTextTest { PublicContentStatusText publicContentStatusText; @Test public void getPredicate() throws Exception { } @Test public void getHeader() throws Exception { String result = publicContentStatusText.CLOSING_SOON.getHeader(); Assert.assertEquals( "Closing soon", result); } @Test public void getOpenTense() throws Exception { String result = publicContentStatusText.CLOSING_SOON.getOpenTense(); Assert.assertEquals( "Opened", result); } }
package org.innovateuk.ifs.competition.status; import org.junit.Test; import static org.junit.Assert.assertEquals; public class PublicContentStatusTextTest { PublicContentStatusText publicContentStatusText; @Test public void getHeader() throws Exception { assertEquals("Closing soon", publicContentStatusText.CLOSING_SOON.getHeader()); } @Test public void getOpenTense() throws Exception { assertEquals("Opened", publicContentStatusText.CLOSING_SOON.getOpenTense()); } }
Update to PublicContentStatusText unit test.
Update to PublicContentStatusText unit test.
Java
mit
InnovateUKGitHub/innovation-funding-service,InnovateUKGitHub/innovation-funding-service,InnovateUKGitHub/innovation-funding-service,InnovateUKGitHub/innovation-funding-service,InnovateUKGitHub/innovation-funding-service
java
## Code Before: package org.innovateuk.ifs.competition.status; import org.junit.Assert; import org.junit.Test; public class PublicContentStatusTextTest { PublicContentStatusText publicContentStatusText; @Test public void getPredicate() throws Exception { } @Test public void getHeader() throws Exception { String result = publicContentStatusText.CLOSING_SOON.getHeader(); Assert.assertEquals( "Closing soon", result); } @Test public void getOpenTense() throws Exception { String result = publicContentStatusText.CLOSING_SOON.getOpenTense(); Assert.assertEquals( "Opened", result); } } ## Instruction: Update to PublicContentStatusText unit test. ## Code After: package org.innovateuk.ifs.competition.status; import org.junit.Test; import static org.junit.Assert.assertEquals; public class PublicContentStatusTextTest { PublicContentStatusText publicContentStatusText; @Test public void getHeader() throws Exception { assertEquals("Closing soon", publicContentStatusText.CLOSING_SOON.getHeader()); } @Test public void getOpenTense() throws Exception { assertEquals("Opened", publicContentStatusText.CLOSING_SOON.getOpenTense()); } }
3ea61d0ca39f8966877e513f76588171d35ab4b4
metadata/net.moasdawiki.app.yml
metadata/net.moasdawiki.app.yml
Categories: - Writing License: GPL-3.0-or-later WebSite: https://moasdawiki.net/ SourceCode: https://gitlab.com/moasdawiki/moasdawiki-app Changelog: https://gitlab.com/moasdawiki/moasdawiki-app/blob/HEAD/CHANGELOG.md AutoName: MoasdaWiki App RepoType: git Repo: https://gitlab.com/moasdawiki/moasdawiki-app.git Builds: - versionName: 2.2.1.0 versionCode: 16 commit: 2.2.1.0 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 2.2.1.0 CurrentVersionCode: 16
Categories: - Writing License: GPL-3.0-or-later WebSite: https://moasdawiki.net/ SourceCode: https://gitlab.com/moasdawiki/moasdawiki-app Changelog: https://gitlab.com/moasdawiki/moasdawiki-app/blob/HEAD/CHANGELOG.md AutoName: MoasdaWiki App RepoType: git Repo: https://gitlab.com/moasdawiki/moasdawiki-app.git Builds: - versionName: 2.2.1.0 versionCode: 16 commit: 2.2.1.0 subdir: app gradle: - yes - versionName: 2.2.1.1 versionCode: 17 commit: 2.2.1.1 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 2.2.1.1 CurrentVersionCode: 17
Update MoasdaWiki App to 2.2.1.1 (17)
Update MoasdaWiki App to 2.2.1.1 (17)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - Writing License: GPL-3.0-or-later WebSite: https://moasdawiki.net/ SourceCode: https://gitlab.com/moasdawiki/moasdawiki-app Changelog: https://gitlab.com/moasdawiki/moasdawiki-app/blob/HEAD/CHANGELOG.md AutoName: MoasdaWiki App RepoType: git Repo: https://gitlab.com/moasdawiki/moasdawiki-app.git Builds: - versionName: 2.2.1.0 versionCode: 16 commit: 2.2.1.0 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 2.2.1.0 CurrentVersionCode: 16 ## Instruction: Update MoasdaWiki App to 2.2.1.1 (17) ## Code After: Categories: - Writing License: GPL-3.0-or-later WebSite: https://moasdawiki.net/ SourceCode: https://gitlab.com/moasdawiki/moasdawiki-app Changelog: https://gitlab.com/moasdawiki/moasdawiki-app/blob/HEAD/CHANGELOG.md AutoName: MoasdaWiki App RepoType: git Repo: https://gitlab.com/moasdawiki/moasdawiki-app.git Builds: - versionName: 2.2.1.0 versionCode: 16 commit: 2.2.1.0 subdir: app gradle: - yes - versionName: 2.2.1.1 versionCode: 17 commit: 2.2.1.1 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 2.2.1.1 CurrentVersionCode: 17
178acf8b65f0caf17be68e942d92091d31559e0d
data/transition-sites/dclg_pg.yml
data/transition-sites/dclg_pg.yml
--- site: dclg_pg whitehall_slug: department-for-communities-and-local-government redirection_date: 31st August 2014 homepage: https://www.gov.uk/government/consultations/review-of-planning-practice-guidance tna_timestamp: 20140701125403 host: planningguidance.readandcomment.com
--- site: dclg_pg whitehall_slug: department-for-communities-and-local-government redirection_date: 31st August 2014 homepage: https://www.gov.uk/government/consultations/review-of-planning-practice-guidance tna_timestamp: 20140701125403 host: planningguidance.readandcomment.com global: =301 https://www.gov.uk/government/consultations/review-of-planning-practice-guidance
Add global config to DCLG planning guidance consultation site
Add global config to DCLG planning guidance consultation site
YAML
mit
alphagov/transition-config,alphagov/transition-config
yaml
## Code Before: --- site: dclg_pg whitehall_slug: department-for-communities-and-local-government redirection_date: 31st August 2014 homepage: https://www.gov.uk/government/consultations/review-of-planning-practice-guidance tna_timestamp: 20140701125403 host: planningguidance.readandcomment.com ## Instruction: Add global config to DCLG planning guidance consultation site ## Code After: --- site: dclg_pg whitehall_slug: department-for-communities-and-local-government redirection_date: 31st August 2014 homepage: https://www.gov.uk/government/consultations/review-of-planning-practice-guidance tna_timestamp: 20140701125403 host: planningguidance.readandcomment.com global: =301 https://www.gov.uk/government/consultations/review-of-planning-practice-guidance
40ee7aa3a6e51a8ebcf61b2a5389304bffb0d489
sample/src/debug/res/values/google_maps_api.xml
sample/src/debug/res/values/google_maps_api.xml
<resources> <!-- TODO: Before you run your application, you need a Google Maps API key. To get one, follow this link, follow the directions and press "Create" at the end: https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=21:D3:CF:16:E5:9E:5B:C9:35:45:2B:21:2B:68:7B:84:68:DC:E9:1B%3Bhu.supercluster.overpassapiquery You can also add your credentials to an existing key, using this line: 21:D3:CF:16:E5:9E:5B:C9:35:45:2B:21:2B:68:7B:84:68:DC:E9:1B;hu.supercluster.overpassapiquery Once you have your key (it starts with "AIza"), replace the "google_maps_key" string in this file. --> <string name="google_maps_key" translatable="false" templateMergeStrategy="preserve"> YOUR_KEY_HERE </string> </resources>
<resources> <string name="google_maps_key" translatable="false" templateMergeStrategy="preserve"> AIzaSyAmEZPlctScOvBNaDuXp1MSWQkLczDW60c </string> </resources>
Set google maps api key
Set google maps api key
XML
apache-2.0
zsoltk/overpasser,zsoltk/overpasser
xml
## Code Before: <resources> <!-- TODO: Before you run your application, you need a Google Maps API key. To get one, follow this link, follow the directions and press "Create" at the end: https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=21:D3:CF:16:E5:9E:5B:C9:35:45:2B:21:2B:68:7B:84:68:DC:E9:1B%3Bhu.supercluster.overpassapiquery You can also add your credentials to an existing key, using this line: 21:D3:CF:16:E5:9E:5B:C9:35:45:2B:21:2B:68:7B:84:68:DC:E9:1B;hu.supercluster.overpassapiquery Once you have your key (it starts with "AIza"), replace the "google_maps_key" string in this file. --> <string name="google_maps_key" translatable="false" templateMergeStrategy="preserve"> YOUR_KEY_HERE </string> </resources> ## Instruction: Set google maps api key ## Code After: <resources> <string name="google_maps_key" translatable="false" templateMergeStrategy="preserve"> AIzaSyAmEZPlctScOvBNaDuXp1MSWQkLczDW60c </string> </resources>
603e378237f0cd627d10330b6a5ffaadae01bf97
.travis.yml
.travis.yml
language: node_js node_js: - '0.10' script: - 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then grunt ci; else grunt ci-pull; fi' env: global: - secure: Kt+5IJDJRVwr28xRnmR5YDsJceXDcDR21/JUBfk6DYFixPbIq7LCPnZUmiSZQs8akU95ucXwB5hsirUAdEhXdYKilec6go70lticVlZBLy8IdJ+Di1uPwMOeMHvalC2P0woIRJSMzP8u5E+e+5ASggTjsXID7/p1rE0jXtoOueQ= - secure: TED5eLMxEsyIGzKP8xxhyRDbKlIX9POzj1qgan40a8rkwIVzkdglkviLAXJJeP0ilc1GeGz1ctXyA6NAZt7RHB79mdQbH9iV1AsR29ItH4jdBs7eWRybDRKYRlmOntH0n7zlJDB4qQMxvNdI8BKYrPQymgZ3jtRJ/INOvLerg1g=
language: node_js node_js: - '0.10' sudo: false script: - 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then grunt ci; else grunt ci-pull; fi' env: global: - secure: Kt+5IJDJRVwr28xRnmR5YDsJceXDcDR21/JUBfk6DYFixPbIq7LCPnZUmiSZQs8akU95ucXwB5hsirUAdEhXdYKilec6go70lticVlZBLy8IdJ+Di1uPwMOeMHvalC2P0woIRJSMzP8u5E+e+5ASggTjsXID7/p1rE0jXtoOueQ= - secure: TED5eLMxEsyIGzKP8xxhyRDbKlIX9POzj1qgan40a8rkwIVzkdglkviLAXJJeP0ilc1GeGz1ctXyA6NAZt7RHB79mdQbH9iV1AsR29ItH4jdBs7eWRybDRKYRlmOntH0n7zlJDB4qQMxvNdI8BKYrPQymgZ3jtRJ/INOvLerg1g=
Revert "test if sudo:false is why saucelabs fails"
Revert "test if sudo:false is why saucelabs fails" This reverts commit 05b138a1a4bcb2ed7c820bdd92556973ac365a24.
YAML
apache-2.0
kkdey/dc.js,vladimirbuskin/dc.js,gazal-k/dc.js,TheDataShed/dc.js,gazal-k/dc.js,vladimirbuskin/dc.js,aaronhoffman/dc.js,ruhley/dc.js,plingrat/dc.js,m4s0/dc.js,dc-js/dc.js,aaronhoffman/dc.js,remyyounes/dc.js,mtraynham/dc.js,maackle/dc.js,Sweetymeow/dc.js,dgerber/dc.js,remyyounes/dc.js,dc-js/dc.js,aaronhoffman/dc.js,liang42hao/dc.js,Sweetymeow/dc.js,ruhley/dc.js,yinchanted/dc.js,plingrat/dc.js,freizeitnerd/dc.js,sojoasd/dc.js,arriqaaq/dc.js,TheDataShed/dc.js,TheDataShed/dc.js,exsodus3249/dc.js,mikedizon/dc.js,plingrat/dc.js,aaronhoffman/dc.js,m4s0/dc.js,alicegugu/dc.js,dc-js/dc.js,davetaz/dc.js,exsodus3249/dc.js,dbirchak/dc.js,maackle/dc.js,aaronhoffman/dc.js,freizeitnerd/dc.js,alicegugu/dc.js,arriqaaq/dc.js,liang42hao/dc.js,mtraynham/dc.js,dgerber/dc.js,mtraynham/dc.js,mcanthony/dc.js,atchai/dc.js,lzheng571/dc.js,kkdey/dc.js,lzheng571/dc.js,mikedizon/dc.js,lzheng571/dc.js,mtraynham/dc.js,exsodus3249/dc.js,gazal-k/dc.js,kkdey/dc.js,alicegugu/dc.js,davetaz/dc.js,austinlyons/dc.js,austinlyons/dc.js,gazal-k/dc.js,dc-js/dc.js,yinchanted/dc.js,davetaz/dc.js,austinlyons/dc.js,liang42hao/dc.js,ruhley/dc.js,vladimirbuskin/dc.js,dbirchak/dc.js,dbirchak/dc.js,freizeitnerd/dc.js,maackle/dc.js,dbirchak/dc.js,m4s0/dc.js,m4s0/dc.js,Sweetymeow/dc.js,austinlyons/dc.js,vladimirbuskin/dc.js,sojoasd/dc.js,exsodus3249/dc.js,pastorenue/dc.js,yinchanted/dc.js,Maartenvm/dc.js,TheDataShed/dc.js,davetaz/dc.js,pastorenue/dc.js,sojoasd/dc.js,yinchanted/dc.js,pastorenue/dc.js,lzheng571/dc.js,dgerber/dc.js,Sweetymeow/dc.js,dc-js/dc.js,atchai/dc.js,pastorenue/dc.js,ruhley/dc.js,remyyounes/dc.js,liang42hao/dc.js,vladimirbuskin/dc.js,mcanthony/dc.js,freizeitnerd/dc.js,remyyounes/dc.js,plingrat/dc.js,mcanthony/dc.js,dgerber/dc.js,maackle/dc.js,maackle/dc.js,kkdey/dc.js,alicegugu/dc.js,mikedizon/dc.js,arriqaaq/dc.js,m4s0/dc.js,liang42hao/dc.js,mtraynham/dc.js,atchai/dc.js,Maartenvm/dc.js,sojoasd/dc.js,sojoasd/dc.js,ruhley/dc.js,arriqaaq/dc.js,atchai/dc.js,mcanthony/dc.js,TheDataShed/dc.js,kkdey/dc.js,gazal-k/dc.js,Maartenvm/dc.js,mikedizon/dc.js,mcanthony/dc.js,Maartenvm/dc.js,pastorenue/dc.js,remyyounes/dc.js
yaml
## Code Before: language: node_js node_js: - '0.10' script: - 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then grunt ci; else grunt ci-pull; fi' env: global: - secure: Kt+5IJDJRVwr28xRnmR5YDsJceXDcDR21/JUBfk6DYFixPbIq7LCPnZUmiSZQs8akU95ucXwB5hsirUAdEhXdYKilec6go70lticVlZBLy8IdJ+Di1uPwMOeMHvalC2P0woIRJSMzP8u5E+e+5ASggTjsXID7/p1rE0jXtoOueQ= - secure: TED5eLMxEsyIGzKP8xxhyRDbKlIX9POzj1qgan40a8rkwIVzkdglkviLAXJJeP0ilc1GeGz1ctXyA6NAZt7RHB79mdQbH9iV1AsR29ItH4jdBs7eWRybDRKYRlmOntH0n7zlJDB4qQMxvNdI8BKYrPQymgZ3jtRJ/INOvLerg1g= ## Instruction: Revert "test if sudo:false is why saucelabs fails" This reverts commit 05b138a1a4bcb2ed7c820bdd92556973ac365a24. ## Code After: language: node_js node_js: - '0.10' sudo: false script: - 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then grunt ci; else grunt ci-pull; fi' env: global: - secure: Kt+5IJDJRVwr28xRnmR5YDsJceXDcDR21/JUBfk6DYFixPbIq7LCPnZUmiSZQs8akU95ucXwB5hsirUAdEhXdYKilec6go70lticVlZBLy8IdJ+Di1uPwMOeMHvalC2P0woIRJSMzP8u5E+e+5ASggTjsXID7/p1rE0jXtoOueQ= - secure: TED5eLMxEsyIGzKP8xxhyRDbKlIX9POzj1qgan40a8rkwIVzkdglkviLAXJJeP0ilc1GeGz1ctXyA6NAZt7RHB79mdQbH9iV1AsR29ItH4jdBs7eWRybDRKYRlmOntH0n7zlJDB4qQMxvNdI8BKYrPQymgZ3jtRJ/INOvLerg1g=
3483728ed550201f0492199ae0854ba5f5ed0993
.travis.yml
.travis.yml
language: node_js sudo: false matrix: [email protected] [email protected] [email protected] node_js: - '5' - '4' - '0.12' - '0.10' addons: postgresql: "9.4" services: - postgresql before_script: - psql -U postgres -f docker/dbschema.sql
language: node_js sudo: false env: - [email protected] - [email protected] - [email protected] node_js: - '5' - '4' - '0.12' - '0.10' addons: postgresql: "9.4" services: - postgresql before_script: - psql -U postgres -f docker/dbschema.sql
Fix build matrix so that Travis CI build runs
Fix build matrix so that Travis CI build runs matrix needs to be an array. Also, construct 3x4 matrix
YAML
mit
senecajs/seneca-postgres-store,marianr/seneca-postgres-store,BloomBoard-Research/seneca-postgresql-store
yaml
## Code Before: language: node_js sudo: false matrix: [email protected] [email protected] [email protected] node_js: - '5' - '4' - '0.12' - '0.10' addons: postgresql: "9.4" services: - postgresql before_script: - psql -U postgres -f docker/dbschema.sql ## Instruction: Fix build matrix so that Travis CI build runs matrix needs to be an array. Also, construct 3x4 matrix ## Code After: language: node_js sudo: false env: - [email protected] - [email protected] - [email protected] node_js: - '5' - '4' - '0.12' - '0.10' addons: postgresql: "9.4" services: - postgresql before_script: - psql -U postgres -f docker/dbschema.sql
520d533eb372c0785550358731f05b53e13a9df0
app/views/home/_applications.html.erb
app/views/home/_applications.html.erb
<div class="applications"> <header> Applications <a href="#">add</a> </header> <!-- <% if current_subject.applications.blank? %> --> <div class="first-time-message"> <h3> You dont have any application. </h3> Wana like create your first application? </div> <!-- <% else %> <%= render partial: 'site/clients/list', object: current_subject.applications %> <% end %>--> </div>
<div class="applications"> <header> Applications <a href="#">add</a> </header> <% if current_subject.applications.blank? %> <div class="first-time-message"> <h3> You dont have any application. </h3> Wana like create your first application? </div> <% else %> <%= render partial: 'site/clients/list', object: current_subject.applications %> <% end %> </div>
Remove comments from application list
Remove comments from application list
HTML+ERB
agpl-3.0
Plexical/fi-ware-idm,ging/fi-ware-idm-deprecated,Plexical/fi-ware-idm,ging/fi-ware-idm-deprecated,ging/fi-ware-idm-deprecated
html+erb
## Code Before: <div class="applications"> <header> Applications <a href="#">add</a> </header> <!-- <% if current_subject.applications.blank? %> --> <div class="first-time-message"> <h3> You dont have any application. </h3> Wana like create your first application? </div> <!-- <% else %> <%= render partial: 'site/clients/list', object: current_subject.applications %> <% end %>--> </div> ## Instruction: Remove comments from application list ## Code After: <div class="applications"> <header> Applications <a href="#">add</a> </header> <% if current_subject.applications.blank? %> <div class="first-time-message"> <h3> You dont have any application. </h3> Wana like create your first application? </div> <% else %> <%= render partial: 'site/clients/list', object: current_subject.applications %> <% end %> </div>
c64c39e55431e9eca4c2e24ed86574f2f10cd259
docker-compose.yaml
docker-compose.yaml
version: "3" services: mongo: image: mongo:latest ports: - "27017" volumes: - ./docker/mongo/data:/data/db node-server: build: context: . dockerfile: "./docker/nodejs.dockerfile" volumes: - "./app:/src/app" ports: - "3031:3001" depends_on: - mongo links: - mongo command: bash -c "npm install && nodemon --legacy-watch ./bin/www ../server 3001" node-client: build: context: . dockerfile: "./docker/nodejs.dockerfile" volumes: - "./app:/src/app" ports: - "3030:3000" depends_on: - node-server links: - node-server command: bash -c "./node_modules/.bin/grunt build && node ./bin/www ../client 3000"
version: "3" services: mongo: image: mongo:latest ports: - "27017" volumes: - ./docker/mongo/data:/data/db node-server: build: context: . dockerfile: "./docker/nodejs.dockerfile" volumes: - "./app:/src/app" ports: - "3031:3001" depends_on: - mongo links: - mongo command: bash -c "npm install && nodemon --legacy-watch ./bin/www ../server 3001" node-client: build: context: . dockerfile: "./docker/nodejs.dockerfile" volumes: - "./app:/src/app" ports: - "3030:3000" depends_on: - node-server links: - node-server command: bash -c "./node_modules/.bin/grunt build && nodemon --legacy-watch ./bin/www ../client 3000"
Use nodemon for client app.
Use nodemon for client app.
YAML
mit
highpine/highpine,highpine/highpine,highpine/highpine
yaml
## Code Before: version: "3" services: mongo: image: mongo:latest ports: - "27017" volumes: - ./docker/mongo/data:/data/db node-server: build: context: . dockerfile: "./docker/nodejs.dockerfile" volumes: - "./app:/src/app" ports: - "3031:3001" depends_on: - mongo links: - mongo command: bash -c "npm install && nodemon --legacy-watch ./bin/www ../server 3001" node-client: build: context: . dockerfile: "./docker/nodejs.dockerfile" volumes: - "./app:/src/app" ports: - "3030:3000" depends_on: - node-server links: - node-server command: bash -c "./node_modules/.bin/grunt build && node ./bin/www ../client 3000" ## Instruction: Use nodemon for client app. ## Code After: version: "3" services: mongo: image: mongo:latest ports: - "27017" volumes: - ./docker/mongo/data:/data/db node-server: build: context: . dockerfile: "./docker/nodejs.dockerfile" volumes: - "./app:/src/app" ports: - "3031:3001" depends_on: - mongo links: - mongo command: bash -c "npm install && nodemon --legacy-watch ./bin/www ../server 3001" node-client: build: context: . dockerfile: "./docker/nodejs.dockerfile" volumes: - "./app:/src/app" ports: - "3030:3000" depends_on: - node-server links: - node-server command: bash -c "./node_modules/.bin/grunt build && nodemon --legacy-watch ./bin/www ../client 3000"
73cdd76971ea14909317069125d746c9420809f1
package.json
package.json
{ "name": "fabric", "description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.", "homepage": "http://fabricjs.com/", "version": "1.4.4", "author": "Juriy Zaytsev <[email protected]>", "keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"], "repository": "git://github.com/kangax/fabric.js", "licenses": [{ "type": "MIT", "url": "http://github.com/kangax/fabric.js/raw/master/LICENSE" }], "scripts": { "build": "node build.js modules=ALL exclude=json,cufon,gestures", "test": "node test.js && jshint src" }, "dependencies": { "canvas": "1.0.x", "jsdom": "0.10.x", "xmldom": "0.1.x" }, "devDependencies": { "qunit": "0.5.x", "jshint": "2.4.x", "uglify-js": "2.4.x", "execSync": "0.0.x", "plato": "0.6.x" }, "engines": { "node": ">=0.4.0 && <1.0.0" }, "main": "./dist/fabric.js" }
{ "name": "fabric", "description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.", "homepage": "http://fabricjs.com/", "version": "1.4.4", "author": "Juriy Zaytsev <[email protected]>", "keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"], "repository": "git://github.com/kangax/fabric.js", "licenses": [{ "type": "MIT", "url": "http://github.com/kangax/fabric.js/raw/master/LICENSE" }], "scripts": { "build": "node build.js modules=ALL exclude=json,cufon,gestures", "test": "node test.js && jshint src" }, "dependencies": { "canvas": "1.0.x", "jsdom": "0.10.x", "xmldom": "0.1.x" }, "devDependencies": { "qunit": "0.5.x", "jshint": "2.4.x", "uglify-js": "2.4.x", "execSync": "0.0.x", "plato": "0.6.x", "jscs": "1.2.x" }, "engines": { "node": ">=0.4.0 && <1.0.0" }, "main": "./dist/fabric.js" }
Add jscs as a dev dependency
Add jscs as a dev dependency
JSON
mit
kabab/fabric.js,jacobmarshall/fabric.js,rockmacaca/fabric.js,jcppman/fabric.js,terrancesnyder/fabric.js,dungntnew/fabric.js,fengyh/fabric.js,mcanthony/fabric.js,fredrikekelund/fabric.js,timkendall/fabric.js,zerin108/fabric.js,nibynool/fabric.js,kannans/fabric.js,inssein/fabric.js,kabab/fabric.js,zerin108/fabric.js,xronos-i-am/fabric.js,MohamedElamry/fabric.js,Drooids/fabric.js,jacobmarshall/fabric.js,partlyhuman/fabric.js,sapics/fabric.js,rockmacaca/fabric.js,Bnaya/fabric.js,bartuspan/fabric.js,timkendall/fabric.js,mcanthony/fabric.js,andrew168/fabric.js,xronos-i-am/fabric.js,kuldipem/fabric.js,inssein/fabric.js,kannans/fabric.js,andrew168/fabric.js,sapics/fabric.js,fredrikekelund/fabric.js,jcppman/fabric.js,nibynool/fabric.js,ChineseDron/fabric.js,Drooids/fabric.js,partlyhuman/fabric.js,makelivedotnet/fabric.js,Bnaya/fabric.js,emilyvon/fabric.js,emilyvon/fabric.js,MohamedElamry/fabric.js,m2broth/fabric.js,m2broth/fabric.js,liulingfree/fabric.js,makelivedotnet/fabric.js,ChineseDron/fabric.js,liulingfree/fabric.js,miguelmota/fabric.js,FOOLHOLI/fabric.js,bartuspan/fabric.js,kuldipem/fabric.js,miguelmota/fabric.js,FOOLHOLI/fabric.js,dungntnew/fabric.js,terrancesnyder/fabric.js,fengyh/fabric.js
json
## Code Before: { "name": "fabric", "description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.", "homepage": "http://fabricjs.com/", "version": "1.4.4", "author": "Juriy Zaytsev <[email protected]>", "keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"], "repository": "git://github.com/kangax/fabric.js", "licenses": [{ "type": "MIT", "url": "http://github.com/kangax/fabric.js/raw/master/LICENSE" }], "scripts": { "build": "node build.js modules=ALL exclude=json,cufon,gestures", "test": "node test.js && jshint src" }, "dependencies": { "canvas": "1.0.x", "jsdom": "0.10.x", "xmldom": "0.1.x" }, "devDependencies": { "qunit": "0.5.x", "jshint": "2.4.x", "uglify-js": "2.4.x", "execSync": "0.0.x", "plato": "0.6.x" }, "engines": { "node": ">=0.4.0 && <1.0.0" }, "main": "./dist/fabric.js" } ## Instruction: Add jscs as a dev dependency ## Code After: { "name": "fabric", "description": "Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.", "homepage": "http://fabricjs.com/", "version": "1.4.4", "author": "Juriy Zaytsev <[email protected]>", "keywords": ["canvas", "graphic", "graphics", "SVG", "node-canvas", "parser", "HTML5", "object model"], "repository": "git://github.com/kangax/fabric.js", "licenses": [{ "type": "MIT", "url": "http://github.com/kangax/fabric.js/raw/master/LICENSE" }], "scripts": { "build": "node build.js modules=ALL exclude=json,cufon,gestures", "test": "node test.js && jshint src" }, "dependencies": { "canvas": "1.0.x", "jsdom": "0.10.x", "xmldom": "0.1.x" }, "devDependencies": { "qunit": "0.5.x", "jshint": "2.4.x", "uglify-js": "2.4.x", "execSync": "0.0.x", "plato": "0.6.x", "jscs": "1.2.x" }, "engines": { "node": ">=0.4.0 && <1.0.0" }, "main": "./dist/fabric.js" }
0a028d4a3fb1cf208b89aece7212c5e25ab44781
.github/PULL_REQUEST_TEMPLATE.md
.github/PULL_REQUEST_TEMPLATE.md
Thank you for contributing to Apache UIMA uimaFIT. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? Please include a link to the JIRA ticked in the PR description. - [ ] Does your PR title start with UIMA-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? - [ ] Is your initial contribution a single, squashed commit? - [ ] Do the commit messages in your PR conform to the following format ``` [UIMA-<ISSUE-NUMBER>] <ISSUE TITLE> <EMPTY LINE> - <CHANGE 1> - <CHANGE 2> - ... ``` ### For code changes: - [ ] Have you ensured that the full suite of tests is executed via mvn clean install at the root project folder? - [ ] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file in respective module folder? - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found in respective module folder? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered? ### Note: Please ensure that once the PR is submitted, you check the Jenkins build status listed under "Checks" in the PR for issues and submit an update to your PR as soon as possible.
<!-- Thank you for contributing to Apache UIMA uimaFIT. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: --> **JIRA Ticket:** https://issues.apache.org/jira/browse/UIMA-XXXX ### For all changes: - [ ] PR title starts with `[UIMA-XXXX]`. - [ ] Commit messages conform to the following format ``` [UIMA-<ISSUE-NUMBER>] <ISSUE TITLE> <EMPTY LINE> - <CHANGE 1> - <CHANGE 2> - ... ``` ### For code changes: - [ ] PR includes new or updated tests related to the contribution. - [ ] PR includes new dependencies. Only dependencies under [approved licenses](http://www.apache.org/legal/resolved.html#category-a) are allowed. LICENSE and NOTICE files in the respective modules where dependencies have been added as well as in the project root have been updated. ### For documentation related changes: - [ ] PDF and HTML versions of the documentation render ok. <!-- ### Note: Please ensure that once the PR is submitted, you check the Jenkins build status listed under "Checks" in the PR for issues and submit an update to your PR as soon as possible. -->
Add contribution guidelines and PR template
[UIMA-5810] Add contribution guidelines and PR template - Trimmed down the PR template to what is necessary
Markdown
apache-2.0
apache/uima-uimafit,apache/uima-uimafit,apache/uima-uimafit
markdown
## Code Before: Thank you for contributing to Apache UIMA uimaFIT. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? Please include a link to the JIRA ticked in the PR description. - [ ] Does your PR title start with UIMA-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? - [ ] Is your initial contribution a single, squashed commit? - [ ] Do the commit messages in your PR conform to the following format ``` [UIMA-<ISSUE-NUMBER>] <ISSUE TITLE> <EMPTY LINE> - <CHANGE 1> - <CHANGE 2> - ... ``` ### For code changes: - [ ] Have you ensured that the full suite of tests is executed via mvn clean install at the root project folder? - [ ] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file in respective module folder? - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found in respective module folder? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered? ### Note: Please ensure that once the PR is submitted, you check the Jenkins build status listed under "Checks" in the PR for issues and submit an update to your PR as soon as possible. ## Instruction: [UIMA-5810] Add contribution guidelines and PR template - Trimmed down the PR template to what is necessary ## Code After: <!-- Thank you for contributing to Apache UIMA uimaFIT. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: --> **JIRA Ticket:** https://issues.apache.org/jira/browse/UIMA-XXXX ### For all changes: - [ ] PR title starts with `[UIMA-XXXX]`. - [ ] Commit messages conform to the following format ``` [UIMA-<ISSUE-NUMBER>] <ISSUE TITLE> <EMPTY LINE> - <CHANGE 1> - <CHANGE 2> - ... ``` ### For code changes: - [ ] PR includes new or updated tests related to the contribution. - [ ] PR includes new dependencies. Only dependencies under [approved licenses](http://www.apache.org/legal/resolved.html#category-a) are allowed. LICENSE and NOTICE files in the respective modules where dependencies have been added as well as in the project root have been updated. ### For documentation related changes: - [ ] PDF and HTML versions of the documentation render ok. <!-- ### Note: Please ensure that once the PR is submitted, you check the Jenkins build status listed under "Checks" in the PR for issues and submit an update to your PR as soon as possible. -->
bce54ce630a8306e66a215252597ee8c76793b44
quickgo-webapp/src/main/java/uk/ac/ebi/quickgo/webservice/model/EvidenceTypeJson.java
quickgo-webapp/src/main/java/uk/ac/ebi/quickgo/webservice/model/EvidenceTypeJson.java
package uk.ac.ebi.quickgo.webservice.model; /** * @Author Tony Wardell * Date: 05/03/2015 * Time: 16:58 * Created with IntelliJ IDEA. */ public class EvidenceTypeJson { private String ecoTerm; private String value; public void setKey(String ecoTerm) { this.ecoTerm = ecoTerm; } public String getEcoTerm() { return ecoTerm; } public void setValue(String value) { this.value = value; } public String getValue() { return value; } }
package uk.ac.ebi.quickgo.webservice.model; /** * @Author Tony Wardell * Date: 05/03/2015 * Time: 16:58 * Created with IntelliJ IDEA. */ public class EvidenceTypeJson { private String ecoTerm; private String evidence; private String evidenceKey; public void setKey(String ecoTerm) { this.ecoTerm = ecoTerm; } public String getEcoTerm() { return ecoTerm; } public void setEvidence(String evidence) { this.evidence = evidence; } public String getEvidence() { return evidence; } public void setEvidenceKey(String evidenceKey) { this.evidenceKey = evidenceKey; } public String getEvidenceKey() { return evidenceKey; } }
Change evidence model to help improve layout.
Change evidence model to help improve layout.
Java
apache-2.0
ebi-uniprot/QuickGOBE,ebi-uniprot/QuickGOBE,ebi-uniprot/QuickGOBE,ebi-uniprot/QuickGOBE,ebi-uniprot/QuickGOBE
java
## Code Before: package uk.ac.ebi.quickgo.webservice.model; /** * @Author Tony Wardell * Date: 05/03/2015 * Time: 16:58 * Created with IntelliJ IDEA. */ public class EvidenceTypeJson { private String ecoTerm; private String value; public void setKey(String ecoTerm) { this.ecoTerm = ecoTerm; } public String getEcoTerm() { return ecoTerm; } public void setValue(String value) { this.value = value; } public String getValue() { return value; } } ## Instruction: Change evidence model to help improve layout. ## Code After: package uk.ac.ebi.quickgo.webservice.model; /** * @Author Tony Wardell * Date: 05/03/2015 * Time: 16:58 * Created with IntelliJ IDEA. */ public class EvidenceTypeJson { private String ecoTerm; private String evidence; private String evidenceKey; public void setKey(String ecoTerm) { this.ecoTerm = ecoTerm; } public String getEcoTerm() { return ecoTerm; } public void setEvidence(String evidence) { this.evidence = evidence; } public String getEvidence() { return evidence; } public void setEvidenceKey(String evidenceKey) { this.evidenceKey = evidenceKey; } public String getEvidenceKey() { return evidenceKey; } }
b58404d18e4b58f2e5abbb8a6428fa6d3e266002
tools/c-index-test/CMakeLists.txt
tools/c-index-test/CMakeLists.txt
set(LLVM_USED_LIBS libclang) set( LLVM_LINK_COMPONENTS support mc ) add_clang_executable(c-index-test c-index-test.c ) set_target_properties(c-index-test PROPERTIES LINKER_LANGUAGE CXX)
set(LLVM_USED_LIBS libclang) set( LLVM_LINK_COMPONENTS support mc ) add_clang_executable(c-index-test c-index-test.c ) set_target_properties(c-index-test PROPERTIES LINKER_LANGUAGE CXX) install(TARGETS c-index-test RUNTIME DESTINATION bin)
Install c-index-test also on CMake build, following up r140681.
Install c-index-test also on CMake build, following up r140681. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@140694 91177308-0d34-0410-b5e6-96231b3b80d8
Text
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
text
## Code Before: set(LLVM_USED_LIBS libclang) set( LLVM_LINK_COMPONENTS support mc ) add_clang_executable(c-index-test c-index-test.c ) set_target_properties(c-index-test PROPERTIES LINKER_LANGUAGE CXX) ## Instruction: Install c-index-test also on CMake build, following up r140681. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@140694 91177308-0d34-0410-b5e6-96231b3b80d8 ## Code After: set(LLVM_USED_LIBS libclang) set( LLVM_LINK_COMPONENTS support mc ) add_clang_executable(c-index-test c-index-test.c ) set_target_properties(c-index-test PROPERTIES LINKER_LANGUAGE CXX) install(TARGETS c-index-test RUNTIME DESTINATION bin)
9f5a853b67ecb4b15963e09c11197ee13cc52e26
preset/tinypbc-avr.sh
preset/tinypbc-avr.sh
CC=avr-gcc CXX=c++ LINK="-mmcu=atmega128 -Wl,-gc-sections" COMP="-O2 -ggdb -Wa,-mmcu=atmega128 -mmcu=atmega128 -ffunction-sections -fdata-sections" cmake -DARCH=AVR -DWORD=8 -DOPSYS=NONE -DSEED=LIBC -DSHLIB=OFF -DSTBIN=ON -DTIMER=NONE -DWITH="DV;BN;FB;EB;PB;CP;MD" -DBENCH=20 -DTESTS=20 -DCHECK=off -DVERBS=off -DSTRIP=on -DQUIET=on -DARITH=easy -DFB_POLYN=271 -DFB_METHD="INTEG;INTEG;QUICK;QUICK;BASIC;BASIC;EXGCD" $1
CC=avr-gcc CXX=c++ LINK="-mmcu=atmega128 -Wl,-gc-sections" COMP="-O2 -ggdb -Wa,-mmcu=atmega128 -mmcu=atmega128 -ffunction-sections -fdata-sections" cmake -DARCH=AVR -DWORD=8 -DOPSYS=NONE -DSEED=LIBC -DSHLIB=OFF -DSTBIN=ON -DTIMER=NONE -DWITH="DV;BN;FB;EB;PB;CP;MD" -DBENCH=20 -DTESTS=20 -DCHECK=off -DVERBS=off -DSTRIP=on -DQUIET=on -DARITH=avr-asm-271 -DFB_POLYN=271 -DFB_METHD="INTEG;INTEG;QUICK;QUICK;BASIC;BASIC;EXGCD" -DFB_PRECO=off -DFB_TRINO=off -DBN_PRECI=256 -DBN_MAGNI=CARRY -DEB_PRECO=off -DEB_METHD="PROJC;BASIC;COMBS;INTER" -DEB_KBLTZ=off -DEB_ORDIN=off $1
Update preset to include newer configuration options.
Update preset to include newer configuration options.
Shell
lgpl-2.1
tectronics/relic-toolkit,tectronics/relic-toolkit,rajeevakarv/relic-toolkit,tectronics/relic-toolkit,rajeevakarv/relic-toolkit,rajeevakarv/relic-toolkit
shell
## Code Before: CC=avr-gcc CXX=c++ LINK="-mmcu=atmega128 -Wl,-gc-sections" COMP="-O2 -ggdb -Wa,-mmcu=atmega128 -mmcu=atmega128 -ffunction-sections -fdata-sections" cmake -DARCH=AVR -DWORD=8 -DOPSYS=NONE -DSEED=LIBC -DSHLIB=OFF -DSTBIN=ON -DTIMER=NONE -DWITH="DV;BN;FB;EB;PB;CP;MD" -DBENCH=20 -DTESTS=20 -DCHECK=off -DVERBS=off -DSTRIP=on -DQUIET=on -DARITH=easy -DFB_POLYN=271 -DFB_METHD="INTEG;INTEG;QUICK;QUICK;BASIC;BASIC;EXGCD" $1 ## Instruction: Update preset to include newer configuration options. ## Code After: CC=avr-gcc CXX=c++ LINK="-mmcu=atmega128 -Wl,-gc-sections" COMP="-O2 -ggdb -Wa,-mmcu=atmega128 -mmcu=atmega128 -ffunction-sections -fdata-sections" cmake -DARCH=AVR -DWORD=8 -DOPSYS=NONE -DSEED=LIBC -DSHLIB=OFF -DSTBIN=ON -DTIMER=NONE -DWITH="DV;BN;FB;EB;PB;CP;MD" -DBENCH=20 -DTESTS=20 -DCHECK=off -DVERBS=off -DSTRIP=on -DQUIET=on -DARITH=avr-asm-271 -DFB_POLYN=271 -DFB_METHD="INTEG;INTEG;QUICK;QUICK;BASIC;BASIC;EXGCD" -DFB_PRECO=off -DFB_TRINO=off -DBN_PRECI=256 -DBN_MAGNI=CARRY -DEB_PRECO=off -DEB_METHD="PROJC;BASIC;COMBS;INTER" -DEB_KBLTZ=off -DEB_ORDIN=off $1
abcf57ab6d4d15a04c1638f383b4a50a17ea6a3c
setup.py
setup.py
from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup( name='hashdb2', version='0.3', description='HashDb2 provides a simple method for executing commands based on matched files', long_description=readme(), classifiers=[ 'Development Status :: 1 - Planning0', 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3.0', 'Programming Language :: Python :: 3.1', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: Apache Software License', 'Topic :: System :: Filesystems', 'Topic :: Database', 'Topic :: Utilities' ], keywords='file matching comparison same identical duplicate duplicates', url='https://github.com/WHenderson/HashDb', author='Will Henderson', author_email='[email protected]', license='Apache 2.0', packages=['hashdb2'], zip_safe=False, install_requires=[ 'docopt>=0.6.2' ], entry_points = { 'console_scripts': ['hashdb2=hashdb2.command_line:main'], } )
from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup( name='hashdb2', version='0.3', description='HashDb2 provides a simple method for executing commands based on matched files', long_description=readme(), classifiers=[ 'Development Status :: 1 - Planning0', 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: Apache Software License', 'Topic :: System :: Filesystems', 'Topic :: Database', 'Topic :: Utilities' ], keywords='file matching comparison same identical duplicate duplicates', url='https://github.com/WHenderson/HashDb', author='Will Henderson', author_email='[email protected]', license='Apache 2.0', packages=['hashdb2'], zip_safe=False, install_requires=[ 'docopt>=0.6.2' ], entry_points = { 'console_scripts': ['hashdb2=hashdb2.command_line:main'], } )
Remove meta data around unsupported versions
Remove meta data around unsupported versions
Python
apache-2.0
WHenderson/HashDb
python
## Code Before: from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup( name='hashdb2', version='0.3', description='HashDb2 provides a simple method for executing commands based on matched files', long_description=readme(), classifiers=[ 'Development Status :: 1 - Planning0', 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3.0', 'Programming Language :: Python :: 3.1', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: Apache Software License', 'Topic :: System :: Filesystems', 'Topic :: Database', 'Topic :: Utilities' ], keywords='file matching comparison same identical duplicate duplicates', url='https://github.com/WHenderson/HashDb', author='Will Henderson', author_email='[email protected]', license='Apache 2.0', packages=['hashdb2'], zip_safe=False, install_requires=[ 'docopt>=0.6.2' ], entry_points = { 'console_scripts': ['hashdb2=hashdb2.command_line:main'], } ) ## Instruction: Remove meta data around unsupported versions ## Code After: from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup( name='hashdb2', version='0.3', description='HashDb2 provides a simple method for executing commands based on matched files', long_description=readme(), classifiers=[ 'Development Status :: 1 - Planning0', 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: Apache Software License', 'Topic :: System :: Filesystems', 'Topic :: Database', 'Topic :: Utilities' ], keywords='file matching comparison same identical duplicate duplicates', url='https://github.com/WHenderson/HashDb', author='Will Henderson', author_email='[email protected]', license='Apache 2.0', packages=['hashdb2'], zip_safe=False, install_requires=[ 'docopt>=0.6.2' ], entry_points = { 'console_scripts': ['hashdb2=hashdb2.command_line:main'], } )
b718c1d817e767c336654001f3aaea5d7327625a
wsgi_intercept/requests_intercept.py
wsgi_intercept/requests_intercept.py
from . import WSGI_HTTPConnection, WSGI_HTTPSConnection, wsgi_fake_socket from requests.packages.urllib3.connectionpool import (HTTPConnectionPool, HTTPSConnectionPool) from requests.packages.urllib3.connection import (HTTPConnection, HTTPSConnection) wsgi_fake_socket.settimeout = lambda self, timeout: None class HTTP_WSGIInterceptor(WSGI_HTTPConnection, HTTPConnection): pass class HTTPS_WSGIInterceptor(WSGI_HTTPSConnection, HTTPSConnection): pass def install(): HTTPConnectionPool.ConnectionCls = HTTP_WSGIInterceptor HTTPSConnectionPool.ConnectionCls = HTTPS_WSGIInterceptor def uninstall(): HTTPConnectionPool.ConnectionCls = HTTPConnection HTTPSConnectionPool.ConnectionCls = HTTPSConnection
import sys from . import WSGI_HTTPConnection, WSGI_HTTPSConnection, wsgi_fake_socket from requests.packages.urllib3.connectionpool import (HTTPConnectionPool, HTTPSConnectionPool) from requests.packages.urllib3.connection import (HTTPConnection, HTTPSConnection) wsgi_fake_socket.settimeout = lambda self, timeout: None class HTTP_WSGIInterceptor(WSGI_HTTPConnection, HTTPConnection): def __init__(self, *args, **kwargs): if 'strict' in kwargs and sys.version_info > (3, 0): kwargs.pop('strict') WSGI_HTTPConnection.__init__(self, *args, **kwargs) HTTPConnection.__init__(self, *args, **kwargs) class HTTPS_WSGIInterceptor(WSGI_HTTPSConnection, HTTPSConnection): def __init__(self, *args, **kwargs): if 'strict' in kwargs and sys.version_info > (3, 0): kwargs.pop('strict') WSGI_HTTPSConnection.__init__(self, *args, **kwargs) HTTPSConnection.__init__(self, *args, **kwargs) def install(): HTTPConnectionPool.ConnectionCls = HTTP_WSGIInterceptor HTTPSConnectionPool.ConnectionCls = HTTPS_WSGIInterceptor def uninstall(): HTTPConnectionPool.ConnectionCls = HTTPConnection HTTPSConnectionPool.ConnectionCls = HTTPSConnection
Deal with request's urllib3 being annoying about 'strict'
Deal with request's urllib3 being annoying about 'strict' These changes are required to get tests to pass in python3.4 (and presumably others). This is entirely code from @sashahart, who had done the work earlier to deal with with some Debian related issues uncovered by @thomasgoirand. These changes will probably mean the debian packages will need to be updated when the next version is released.
Python
mit
sileht/python3-wsgi-intercept,cdent/wsgi-intercept
python
## Code Before: from . import WSGI_HTTPConnection, WSGI_HTTPSConnection, wsgi_fake_socket from requests.packages.urllib3.connectionpool import (HTTPConnectionPool, HTTPSConnectionPool) from requests.packages.urllib3.connection import (HTTPConnection, HTTPSConnection) wsgi_fake_socket.settimeout = lambda self, timeout: None class HTTP_WSGIInterceptor(WSGI_HTTPConnection, HTTPConnection): pass class HTTPS_WSGIInterceptor(WSGI_HTTPSConnection, HTTPSConnection): pass def install(): HTTPConnectionPool.ConnectionCls = HTTP_WSGIInterceptor HTTPSConnectionPool.ConnectionCls = HTTPS_WSGIInterceptor def uninstall(): HTTPConnectionPool.ConnectionCls = HTTPConnection HTTPSConnectionPool.ConnectionCls = HTTPSConnection ## Instruction: Deal with request's urllib3 being annoying about 'strict' These changes are required to get tests to pass in python3.4 (and presumably others). This is entirely code from @sashahart, who had done the work earlier to deal with with some Debian related issues uncovered by @thomasgoirand. These changes will probably mean the debian packages will need to be updated when the next version is released. ## Code After: import sys from . import WSGI_HTTPConnection, WSGI_HTTPSConnection, wsgi_fake_socket from requests.packages.urllib3.connectionpool import (HTTPConnectionPool, HTTPSConnectionPool) from requests.packages.urllib3.connection import (HTTPConnection, HTTPSConnection) wsgi_fake_socket.settimeout = lambda self, timeout: None class HTTP_WSGIInterceptor(WSGI_HTTPConnection, HTTPConnection): def __init__(self, *args, **kwargs): if 'strict' in kwargs and sys.version_info > (3, 0): kwargs.pop('strict') WSGI_HTTPConnection.__init__(self, *args, **kwargs) HTTPConnection.__init__(self, *args, **kwargs) class HTTPS_WSGIInterceptor(WSGI_HTTPSConnection, HTTPSConnection): def __init__(self, *args, **kwargs): if 'strict' in kwargs and sys.version_info > (3, 0): kwargs.pop('strict') WSGI_HTTPSConnection.__init__(self, *args, **kwargs) HTTPSConnection.__init__(self, *args, **kwargs) def install(): HTTPConnectionPool.ConnectionCls = HTTP_WSGIInterceptor HTTPSConnectionPool.ConnectionCls = HTTPS_WSGIInterceptor def uninstall(): HTTPConnectionPool.ConnectionCls = HTTPConnection HTTPSConnectionPool.ConnectionCls = HTTPSConnection
d62c202e338c12ef7dc3076a30c560b44b110096
templates/rules/pathSpikes.yaml
templates/rules/pathSpikes.yaml
name: Spike in attacks on server # Type of alert. type: spike # num_events must occur within this amount of time to trigger an alert timeframe: seconds: 60 spike_height: 10 spike_type: up threshold_cur: 10 # Index to search, wildcard supported index: logstash-* query_key: - generalizedPath - host alert_subject: "Surge in attacks on {}" alert_subject_args: - generalizedPath alert_text_type: alert_text_only alert_text: "Surge in attacks on {} at {}" alert_text_args: - generalizedPath - host # The alert is use when a match is found alert: - slack slack_webhook_url: "{{SLACK_URL}}" slack_username_override: "ElastAlert"
name: Spike in attacks on server # Type of alert. type: spike # num_events must occur within this amount of time to trigger an alert timeframe: seconds: 60 spike_height: 10 spike_type: up threshold_cur: 10 threshold_ref: 1 # Index to search, wildcard supported index: logstash-* query_key: - generalizedPath - host alert_subject: "Surge in attacks on {}" alert_subject_args: - generalizedPath alert_text_type: alert_text_only alert_text: "Surge in attacks on {} at {}" alert_text_args: - generalizedPath - host # The alert is use when a match is found alert: - slack slack_webhook_url: "{{SLACK_URL}}" slack_username_override: "ElastAlert"
Add threshold ref 1, previous minute must have at least 1
Add threshold ref 1, previous minute must have at least 1
YAML
apache-2.0
dockstore/compose_setup,dockstore/compose_setup
yaml
## Code Before: name: Spike in attacks on server # Type of alert. type: spike # num_events must occur within this amount of time to trigger an alert timeframe: seconds: 60 spike_height: 10 spike_type: up threshold_cur: 10 # Index to search, wildcard supported index: logstash-* query_key: - generalizedPath - host alert_subject: "Surge in attacks on {}" alert_subject_args: - generalizedPath alert_text_type: alert_text_only alert_text: "Surge in attacks on {} at {}" alert_text_args: - generalizedPath - host # The alert is use when a match is found alert: - slack slack_webhook_url: "{{SLACK_URL}}" slack_username_override: "ElastAlert" ## Instruction: Add threshold ref 1, previous minute must have at least 1 ## Code After: name: Spike in attacks on server # Type of alert. type: spike # num_events must occur within this amount of time to trigger an alert timeframe: seconds: 60 spike_height: 10 spike_type: up threshold_cur: 10 threshold_ref: 1 # Index to search, wildcard supported index: logstash-* query_key: - generalizedPath - host alert_subject: "Surge in attacks on {}" alert_subject_args: - generalizedPath alert_text_type: alert_text_only alert_text: "Surge in attacks on {} at {}" alert_text_args: - generalizedPath - host # The alert is use when a match is found alert: - slack slack_webhook_url: "{{SLACK_URL}}" slack_username_override: "ElastAlert"
03bacea779facc6b5874872884e7da00251abf44
app/views/polls/edit.html.erb
app/views/polls/edit.html.erb
<div class="row"> <div class="span12 main"> <div class="grouptitle">Lower Northeast &rsaquo; #2 &rsaquo; Edit</div> <%= render 'form' %> </div> </div>
<div class="row"> <div class="span12 main"> <div class="grouptitle">Lower Northeast &rsaquo; <%= @poll.title %> &rsaquo; Edit</div> <%= render 'form' %> </div> </div>
Include nickname in Edit Poll breadcrumb
Include nickname in Edit Poll breadcrumb
HTML+ERB
bsd-3-clause
codeforamerica/textizen,codeforamerica/textizen,codeforamerica/textizen
html+erb
## Code Before: <div class="row"> <div class="span12 main"> <div class="grouptitle">Lower Northeast &rsaquo; #2 &rsaquo; Edit</div> <%= render 'form' %> </div> </div> ## Instruction: Include nickname in Edit Poll breadcrumb ## Code After: <div class="row"> <div class="span12 main"> <div class="grouptitle">Lower Northeast &rsaquo; <%= @poll.title %> &rsaquo; Edit</div> <%= render 'form' %> </div> </div>
c08582a8d832b4ec3ac983283d4727fa29827e5a
docs/index.md
docs/index.md
Micro vector tile manufacturing from PostGIS. ## Overview Utilery serves [protobuf vector tiles](https://github.com/mapbox/mapnik-vector-tile) from a PostGIS database. Basically it's as simple as a collection of configurable SQL requests in a YAML file. Here is an example of a recipe to use with OpenStreetMap data: [https://github.com/etalab/utilery-osm-recipe](https://github.com/etalab/utilery-osm-recipe) - [Installation](install.md) - [Configuration](config.md)
Micro vector tile manufacturing from PostGIS. ## Overview Utilery serves [protobuf vector tiles](https://github.com/mapbox/mapnik-vector-tile) from a PostGIS database. Basically it's as simple as a collection of configurable SQL requests in a YAML file. Here is an example of a recipe to use with OpenStreetMap data: [https://github.com/etalab/utilery-osm-recipe/blob/master/utilery.yml](https://github.com/etalab/utilery-osm-recipe/blob/master/utilery.yml) - [Installation](install.md) - [Configuration](config.md)
Update link to example in doc
Update link to example in doc
Markdown
mit
jondelmil/aiovectortiler,shongololo/aiovectortiler
markdown
## Code Before: Micro vector tile manufacturing from PostGIS. ## Overview Utilery serves [protobuf vector tiles](https://github.com/mapbox/mapnik-vector-tile) from a PostGIS database. Basically it's as simple as a collection of configurable SQL requests in a YAML file. Here is an example of a recipe to use with OpenStreetMap data: [https://github.com/etalab/utilery-osm-recipe](https://github.com/etalab/utilery-osm-recipe) - [Installation](install.md) - [Configuration](config.md) ## Instruction: Update link to example in doc ## Code After: Micro vector tile manufacturing from PostGIS. ## Overview Utilery serves [protobuf vector tiles](https://github.com/mapbox/mapnik-vector-tile) from a PostGIS database. Basically it's as simple as a collection of configurable SQL requests in a YAML file. Here is an example of a recipe to use with OpenStreetMap data: [https://github.com/etalab/utilery-osm-recipe/blob/master/utilery.yml](https://github.com/etalab/utilery-osm-recipe/blob/master/utilery.yml) - [Installation](install.md) - [Configuration](config.md)
c971b045e63517ceab1c26ca49a6e1ec436d92a8
tails_files/securedrop_init.c
tails_files/securedrop_init.c
int main(int argc, char* argv) { setuid(0); // Use absolute path to the Python binary and execl to avoid $PATH or symlink trickery execl("/usr/bin/python2.7", "python2.7", "/home/vagrant/tails_files/test.py", (char*)NULL); return 0; }
int main(int argc, char* argv) { setuid(0); // Use absolute path to the Python binary and execl to avoid $PATH or symlink trickery execl("/usr/bin/python2.7", "python2.7", "/home/amnesia/Persistent/.securedrop/securedrop_init.py", (char*)NULL); return 0; }
Fix path in tails_files C wrapper
Fix path in tails_files C wrapper
C
agpl-3.0
jaseg/securedrop,jeann2013/securedrop,kelcecil/securedrop,jrosco/securedrop,ageis/securedrop,jrosco/securedrop,chadmiller/securedrop,GabeIsman/securedrop,jaseg/securedrop,pwplus/securedrop,GabeIsman/securedrop,harlo/securedrop,chadmiller/securedrop,heartsucker/securedrop,heartsucker/securedrop,jeann2013/securedrop,pwplus/securedrop,heartsucker/securedrop,jrosco/securedrop,harlo/securedrop,pwplus/securedrop,conorsch/securedrop,micahflee/securedrop,ehartsuyker/securedrop,chadmiller/securedrop,jrosco/securedrop,ehartsuyker/securedrop,chadmiller/securedrop,pwplus/securedrop,chadmiller/securedrop,kelcecil/securedrop,micahflee/securedrop,GabeIsman/securedrop,harlo/securedrop,ehartsuyker/securedrop,heartsucker/securedrop,ehartsuyker/securedrop,ageis/securedrop,ehartsuyker/securedrop,GabeIsman/securedrop,ageis/securedrop,harlo/securedrop,kelcecil/securedrop,jeann2013/securedrop,ageis/securedrop,conorsch/securedrop,jeann2013/securedrop,jeann2013/securedrop,conorsch/securedrop,kelcecil/securedrop,GabeIsman/securedrop,harlo/securedrop,micahflee/securedrop,jrosco/securedrop,garrettr/securedrop,jaseg/securedrop,garrettr/securedrop,jaseg/securedrop,heartsucker/securedrop,harlo/securedrop,conorsch/securedrop,GabeIsman/securedrop,kelcecil/securedrop,garrettr/securedrop,jaseg/securedrop,ehartsuyker/securedrop,jaseg/securedrop,micahflee/securedrop,kelcecil/securedrop,pwplus/securedrop,conorsch/securedrop,pwplus/securedrop,jeann2013/securedrop,chadmiller/securedrop,jrosco/securedrop,garrettr/securedrop
c
## Code Before: int main(int argc, char* argv) { setuid(0); // Use absolute path to the Python binary and execl to avoid $PATH or symlink trickery execl("/usr/bin/python2.7", "python2.7", "/home/vagrant/tails_files/test.py", (char*)NULL); return 0; } ## Instruction: Fix path in tails_files C wrapper ## Code After: int main(int argc, char* argv) { setuid(0); // Use absolute path to the Python binary and execl to avoid $PATH or symlink trickery execl("/usr/bin/python2.7", "python2.7", "/home/amnesia/Persistent/.securedrop/securedrop_init.py", (char*)NULL); return 0; }
f109b818bf57a3fbf99dc03bf7b8adc262c0d4e8
test/integration/destructive.yml
test/integration/destructive.yml
- hosts: testhost gather_facts: True roles: - { role: test_service, tags: test_service } - { role: test_pip, tags: test_pip } - { role: test_gem, tags: test_gem } - { role: test_yum, tags: test_yum } - { role: test_apt, tags: test_apt } - { role: test_apt_repository, tags: test_apt_repository } - { role: test_mysql_db, tags: test_mysql_db} - { role: test_mysql_user, tags: test_mysql_user} - { role: test_mysql_user, tags: test_mysql_user} - { role: test_mysql_variables, tags: test_mysql_variables}
- hosts: testhost gather_facts: True roles: - { role: test_service, tags: test_service } # Current pip unconditionally uses md5. We can re-enable if pip switches # to a different hash or allows us to not check md5 - { role: test_pip, tags: test_pip, when: ansible_fips != True } - { role: test_gem, tags: test_gem } - { role: test_yum, tags: test_yum } - { role: test_apt, tags: test_apt } - { role: test_apt_repository, tags: test_apt_repository } - { role: test_mysql_db, tags: test_mysql_db} - { role: test_mysql_user, tags: test_mysql_user} - { role: test_mysql_user, tags: test_mysql_user} - { role: test_mysql_variables, tags: test_mysql_variables}
Disable pip test on FIPS enabled systems because pip unconditionally uses md5
Disable pip test on FIPS enabled systems because pip unconditionally uses md5
YAML
mit
thaim/ansible,thaim/ansible
yaml
## Code Before: - hosts: testhost gather_facts: True roles: - { role: test_service, tags: test_service } - { role: test_pip, tags: test_pip } - { role: test_gem, tags: test_gem } - { role: test_yum, tags: test_yum } - { role: test_apt, tags: test_apt } - { role: test_apt_repository, tags: test_apt_repository } - { role: test_mysql_db, tags: test_mysql_db} - { role: test_mysql_user, tags: test_mysql_user} - { role: test_mysql_user, tags: test_mysql_user} - { role: test_mysql_variables, tags: test_mysql_variables} ## Instruction: Disable pip test on FIPS enabled systems because pip unconditionally uses md5 ## Code After: - hosts: testhost gather_facts: True roles: - { role: test_service, tags: test_service } # Current pip unconditionally uses md5. We can re-enable if pip switches # to a different hash or allows us to not check md5 - { role: test_pip, tags: test_pip, when: ansible_fips != True } - { role: test_gem, tags: test_gem } - { role: test_yum, tags: test_yum } - { role: test_apt, tags: test_apt } - { role: test_apt_repository, tags: test_apt_repository } - { role: test_mysql_db, tags: test_mysql_db} - { role: test_mysql_user, tags: test_mysql_user} - { role: test_mysql_user, tags: test_mysql_user} - { role: test_mysql_variables, tags: test_mysql_variables}
d84e3116750b5c0ac1aef3f8b0614e74e31a0758
lhm.gemspec
lhm.gemspec
lib = File.expand_path('../lib', __FILE__) $:.unshift(lib) unless $:.include?(lib) require 'lhm/version' Gem::Specification.new do |s| s.name = "lhm" s.version = Lhm::VERSION s.platform = Gem::Platform::RUBY s.authors = ["SoundCloud", "Rany Keddo", "Tobias Bielohlawek", "Tobias Schmidt"] s.email = %q{[email protected], [email protected], [email protected]} s.summary = %q{online schema changer for mysql} s.description = %q{Migrate large tables without downtime by copying to a temporary table in chunks. The old table is not dropped. Instead, it is moved to timestamp_table_name for verification.} s.homepage = %q{http://github.com/soundcloud/large-hadron-migrator} s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.require_paths = ["lib"] s.executables = ["lhm-kill-queue"] s.add_development_dependency "minitest", "= 2.10.0" s.add_development_dependency "rake" end
lib = File.expand_path('../lib', __FILE__) $:.unshift(lib) unless $:.include?(lib) require 'lhm/version' Gem::Specification.new do |s| s.name = "lhm" s.version = Lhm::VERSION s.platform = Gem::Platform::RUBY s.authors = ["SoundCloud", "Rany Keddo", "Tobias Bielohlawek", "Tobias Schmidt"] s.email = %q{[email protected], [email protected], [email protected]} s.summary = %q{online schema changer for mysql} s.description = %q{Migrate large tables without downtime by copying to a temporary table in chunks. The old table is not dropped. Instead, it is moved to timestamp_table_name for verification.} s.homepage = %q{http://github.com/soundcloud/lhm} s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.require_paths = ["lib"] s.executables = ["lhm-kill-queue"] s.add_development_dependency "minitest", "= 2.10.0" s.add_development_dependency "rake" end
Update homepage url in gemspec
Update homepage url in gemspec
Ruby
bsd-3-clause
timeplayinc/lhm,nathanhoel/lhm,sj26/lhm,civisanalytics/lhm,tdeo/lhm,Shopify/lhm,sj26/lhm,Shopify/lhm,soundcloud/lhm,timeplayinc/lhm,civisanalytics/lhm,tdeo/lhm,soundcloud/lhm,nathanhoel/lhm
ruby
## Code Before: lib = File.expand_path('../lib', __FILE__) $:.unshift(lib) unless $:.include?(lib) require 'lhm/version' Gem::Specification.new do |s| s.name = "lhm" s.version = Lhm::VERSION s.platform = Gem::Platform::RUBY s.authors = ["SoundCloud", "Rany Keddo", "Tobias Bielohlawek", "Tobias Schmidt"] s.email = %q{[email protected], [email protected], [email protected]} s.summary = %q{online schema changer for mysql} s.description = %q{Migrate large tables without downtime by copying to a temporary table in chunks. The old table is not dropped. Instead, it is moved to timestamp_table_name for verification.} s.homepage = %q{http://github.com/soundcloud/large-hadron-migrator} s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.require_paths = ["lib"] s.executables = ["lhm-kill-queue"] s.add_development_dependency "minitest", "= 2.10.0" s.add_development_dependency "rake" end ## Instruction: Update homepage url in gemspec ## Code After: lib = File.expand_path('../lib', __FILE__) $:.unshift(lib) unless $:.include?(lib) require 'lhm/version' Gem::Specification.new do |s| s.name = "lhm" s.version = Lhm::VERSION s.platform = Gem::Platform::RUBY s.authors = ["SoundCloud", "Rany Keddo", "Tobias Bielohlawek", "Tobias Schmidt"] s.email = %q{[email protected], [email protected], [email protected]} s.summary = %q{online schema changer for mysql} s.description = %q{Migrate large tables without downtime by copying to a temporary table in chunks. The old table is not dropped. Instead, it is moved to timestamp_table_name for verification.} s.homepage = %q{http://github.com/soundcloud/lhm} s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.require_paths = ["lib"] s.executables = ["lhm-kill-queue"] s.add_development_dependency "minitest", "= 2.10.0" s.add_development_dependency "rake" end
e148ea6a4f14944a931e60aa5ce1a0c5d49df654
doc/python/examples/CMakeLists.txt
doc/python/examples/CMakeLists.txt
FIND_PACKAGE(PythonInterp) IF ( PYTHONINTERP_FOUND ) SET(pythonPath ${CMAKE_BINARY_DIR}/swig/python) MESSAGE ( STATUS "Adding Python test" ) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/python_test.py.in ${CMAKE_CURRENT_BINARY_DIR}/python_test.py) ADD_TEST("python" ${PYTHON_EXECUTABLE} python_test.py) ELSE( PYTHONINTERP_FOUND ) MESSAGE(STATUS "Python test not added because Python Interpreter not found.") INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/python_test.py DESTINATION share/doc/zorba-${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}/python/examples) ENDIF ( PYTHONINTERP_FOUND )
FIND_PACKAGE(PythonInterp) IF ( PYTHONINTERP_FOUND ) SET(pythonPath ${CMAKE_BINARY_DIR}/swig/python) MESSAGE ( STATUS "Adding Python test" ) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/python_test.py.in ${CMAKE_CURRENT_BINARY_DIR}/python_test.py) ADD_TEST("python" ${PYTHON_EXECUTABLE} python_test.py) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/python_test.py DESTINATION share/doc/zorba-${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}/python/examples) ELSE( PYTHONINTERP_FOUND ) MESSAGE(STATUS "Python test not added because Python Interpreter not found.") ENDIF ( PYTHONINTERP_FOUND )
Fix install of Python examles
Fix install of Python examles
Text
apache-2.0
cezarfx/zorba,cezarfx/zorba,28msec/zorba,bgarrels/zorba,cezarfx/zorba,28msec/zorba,cezarfx/zorba,cezarfx/zorba,cezarfx/zorba,cezarfx/zorba,bgarrels/zorba,bgarrels/zorba,28msec/zorba,28msec/zorba,cezarfx/zorba,cezarfx/zorba,bgarrels/zorba,28msec/zorba,bgarrels/zorba,bgarrels/zorba,28msec/zorba,bgarrels/zorba,28msec/zorba,cezarfx/zorba,bgarrels/zorba,28msec/zorba,28msec/zorba
text
## Code Before: FIND_PACKAGE(PythonInterp) IF ( PYTHONINTERP_FOUND ) SET(pythonPath ${CMAKE_BINARY_DIR}/swig/python) MESSAGE ( STATUS "Adding Python test" ) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/python_test.py.in ${CMAKE_CURRENT_BINARY_DIR}/python_test.py) ADD_TEST("python" ${PYTHON_EXECUTABLE} python_test.py) ELSE( PYTHONINTERP_FOUND ) MESSAGE(STATUS "Python test not added because Python Interpreter not found.") INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/python_test.py DESTINATION share/doc/zorba-${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}/python/examples) ENDIF ( PYTHONINTERP_FOUND ) ## Instruction: Fix install of Python examles ## Code After: FIND_PACKAGE(PythonInterp) IF ( PYTHONINTERP_FOUND ) SET(pythonPath ${CMAKE_BINARY_DIR}/swig/python) MESSAGE ( STATUS "Adding Python test" ) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/python_test.py.in ${CMAKE_CURRENT_BINARY_DIR}/python_test.py) ADD_TEST("python" ${PYTHON_EXECUTABLE} python_test.py) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/python_test.py DESTINATION share/doc/zorba-${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER}/python/examples) ELSE( PYTHONINTERP_FOUND ) MESSAGE(STATUS "Python test not added because Python Interpreter not found.") ENDIF ( PYTHONINTERP_FOUND )
3bcb3b34e28e3fad3f048d78027b637f7394261c
dockercl.sh
dockercl.sh
while true do read -r -p $'\e[94mdocker> \e[0m' command; docker $command; done
echo '' echo ' ## . ' echo ' ## ## ## == ' echo ' ## ## ## ## === ' echo ' /"""""""""""""""""\___/ === ' echo ' ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ ' echo ' \______ o __/ ' echo ' \ \ __/ ' echo ' \____\_______/ ' echo '' echo " _____ _ _ " echo " | __ \ | | | |" echo " | | | | ___ ___| | _____ _ __ ___| |" echo " | | | |/ _ \ / __| |/ / _ \ '__/ __| |" echo " | |__| | (_) | (__| < __/ | | (__| |" echo " |_____/ \___/ \___|_|\_\___|_| \___|_|" echo "" while true do read -r -p $'\e[94mdocker> \e[0m' command; docker $command; done
Add ASCII art(thanks boot2docker for pretty whale)
Add ASCII art(thanks boot2docker for pretty whale)
Shell
mit
ket4yii/dockercl
shell
## Code Before: while true do read -r -p $'\e[94mdocker> \e[0m' command; docker $command; done ## Instruction: Add ASCII art(thanks boot2docker for pretty whale) ## Code After: echo '' echo ' ## . ' echo ' ## ## ## == ' echo ' ## ## ## ## === ' echo ' /"""""""""""""""""\___/ === ' echo ' ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ ' echo ' \______ o __/ ' echo ' \ \ __/ ' echo ' \____\_______/ ' echo '' echo " _____ _ _ " echo " | __ \ | | | |" echo " | | | | ___ ___| | _____ _ __ ___| |" echo " | | | |/ _ \ / __| |/ / _ \ '__/ __| |" echo " | |__| | (_) | (__| < __/ | | (__| |" echo " |_____/ \___/ \___|_|\_\___|_| \___|_|" echo "" while true do read -r -p $'\e[94mdocker> \e[0m' command; docker $command; done
1d699304a41b4e5c359e0c46674efde853a4972c
lib/utils.js
lib/utils.js
Object.values = function(obj) { var vals = []; for( var key in obj ) { if ( obj.hasOwnProperty(key) ) { vals.push(obj[key]); } } return vals; }
Object.values = function(obj) { var vals = []; for( var key in obj ) { if ( obj.hasOwnProperty(key) ) { if(typeof(obj[key]) === 'object') { vals.push(JSON.stringify(obj[key])); } else { vals.push(obj[key]) } } } return vals; }
Add support for json columns
Add support for json columns
JavaScript
mit
swlkr/psqljs
javascript
## Code Before: Object.values = function(obj) { var vals = []; for( var key in obj ) { if ( obj.hasOwnProperty(key) ) { vals.push(obj[key]); } } return vals; } ## Instruction: Add support for json columns ## Code After: Object.values = function(obj) { var vals = []; for( var key in obj ) { if ( obj.hasOwnProperty(key) ) { if(typeof(obj[key]) === 'object') { vals.push(JSON.stringify(obj[key])); } else { vals.push(obj[key]) } } } return vals; }
e824d8ad284603b73df48f1a413b129280318937
examples/annotation.py
examples/annotation.py
class Root(object): def __init__(self, context): self._ctx = context def mul(self, a: int = None, b: int = None) -> 'json': if not a and not b: return dict(message="Pass arguments a and b to multiply them together!") return dict(answer=a * b) if __name__ == '__main__': from marrow.server.http import HTTPServer from web.core.application import Application from web.ext.template import TemplateExtension from web.ext.cast import CastExtension HTTPServer('127.0.0.1', 8080, application=Application(Root, dict(extensions=dict( template = TemplateExtension(), typecast = CastExtension() )))).start()
class Root(object): def __init__(self, context): self._ctx = context def mul(self, a: int = None, b: int = None) -> 'json': """Multiply two values together and return the result via JSON. Python 3 function annotations are used to ensure that the arguments are integers. This requires the functionality of web.ext.cast:CastExtension. The return value annotation is handled by web.ext.template:TemplateExtension and may be the name of a serialization engine or template path. (The trailing colon may be omitted for serialization when used this way.) There are two ways to execute this method: * POST http://localhost:8080/mul * GET http://localhost:8080/mul?a=27&b=42 * GET http://localhost:8080/mul/27/42 The latter relies on the fact we can't descend past a callable method so the remaining path elements are used as positional arguments, whereas the others rely on keyword argument assignment from a form-encoded request body or query string arguments. (Security note: any form in request body takes presidence over query string arguments!) """ if not a and not b: return dict(message="Pass arguments a and b to multiply them together!") return dict(answer=a * b) if __name__ == '__main__': from marrow.server.http import HTTPServer from web.core.application import Application from web.ext.template import TemplateExtension from web.ext.cast import CastExtension # Configure the extensions needed for this example: config = dict( extensions = dict( template = TemplateExtension(), typecast = CastExtension() )) # Create the underlying WSGI application, passing the extensions to it. app = Application(Root, config) # Start the development HTTP server. HTTPServer('127.0.0.1', 8080, application=app).start()
Split the HTTPServer line into multiple.
Split the HTTPServer line into multiple. Also added comments and a docstring, since this is an example after all.
Python
mit
marrow/WebCore,marrow/WebCore
python
## Code Before: class Root(object): def __init__(self, context): self._ctx = context def mul(self, a: int = None, b: int = None) -> 'json': if not a and not b: return dict(message="Pass arguments a and b to multiply them together!") return dict(answer=a * b) if __name__ == '__main__': from marrow.server.http import HTTPServer from web.core.application import Application from web.ext.template import TemplateExtension from web.ext.cast import CastExtension HTTPServer('127.0.0.1', 8080, application=Application(Root, dict(extensions=dict( template = TemplateExtension(), typecast = CastExtension() )))).start() ## Instruction: Split the HTTPServer line into multiple. Also added comments and a docstring, since this is an example after all. ## Code After: class Root(object): def __init__(self, context): self._ctx = context def mul(self, a: int = None, b: int = None) -> 'json': """Multiply two values together and return the result via JSON. Python 3 function annotations are used to ensure that the arguments are integers. This requires the functionality of web.ext.cast:CastExtension. The return value annotation is handled by web.ext.template:TemplateExtension and may be the name of a serialization engine or template path. (The trailing colon may be omitted for serialization when used this way.) There are two ways to execute this method: * POST http://localhost:8080/mul * GET http://localhost:8080/mul?a=27&b=42 * GET http://localhost:8080/mul/27/42 The latter relies on the fact we can't descend past a callable method so the remaining path elements are used as positional arguments, whereas the others rely on keyword argument assignment from a form-encoded request body or query string arguments. (Security note: any form in request body takes presidence over query string arguments!) """ if not a and not b: return dict(message="Pass arguments a and b to multiply them together!") return dict(answer=a * b) if __name__ == '__main__': from marrow.server.http import HTTPServer from web.core.application import Application from web.ext.template import TemplateExtension from web.ext.cast import CastExtension # Configure the extensions needed for this example: config = dict( extensions = dict( template = TemplateExtension(), typecast = CastExtension() )) # Create the underlying WSGI application, passing the extensions to it. app = Application(Root, config) # Start the development HTTP server. HTTPServer('127.0.0.1', 8080, application=app).start()
4924b3108288fd5e116ac305d638bc58d207a2e6
app/Library.php
app/Library.php
<?php namespace App; use Illuminate\Database\Eloquent\Model; use \App\Manga; class Library extends Model { // protected $fillable = ['name', 'path']; public function getId() { return $this->id; } public function getName() { return $this->name; } public function getPath() { return $this->path; } public function scan() { foreach (\File::directories($this->getPath()) as $path) { $manga = Manga::updateOrCreate([ 'name' => pathinfo($path, PATHINFO_FILENAME), 'path' => $path, 'library_id' => Library::where('name','=',$this->getName())->first()->id ]); } } public function forceDelete() { // get all the manga that have library_id to ours $manga = Manga::where('library_id', '=', $this->getId())->get(); // and delete them foreach ($manga as $manga_) { // Manga::forceDelete deletes all the references to other tables (artists, authors, manga_information, etc..) $manga_->forceDelete(); } parent::forceDelete(); } }
<?php namespace App; use Illuminate\Database\Eloquent\Model; use \App\Manga; class Library extends Model { // protected $fillable = ['name', 'path']; public function getId() { return $this->id; } public function getName() { return $this->name; } public function getPath() { return $this->path; } public function scan() { // scan and add new directories foreach (\File::directories($this->getPath()) as $path) { $manga = Manga::updateOrCreate([ 'name' => pathinfo($path, PATHINFO_FILENAME), 'path' => $path, 'library_id' => Library::where('name','=',$this->getName())->first()->id ]); } // iterate through all the manga in the library // and remove those that no longer exist in the filesystem $manga = Manga::where('library_id', '=', $this->getId())->get(); foreach ($manga as $manga_) { if (\File::exists($manga_->getPath()) === false) { $manga_->forceDelete(); } } } public function forceDelete() { // get all the manga that have library_id to ours $manga = Manga::where('library_id', '=', $this->getId())->get(); // and delete them foreach ($manga as $manga_) { // Manga::forceDelete deletes all the references to other tables (artists, authors, manga_information, etc..) $manga_->forceDelete(); } parent::forceDelete(); } }
Remove manga that no longer exist.
Remove manga that no longer exist. This is done whenever one updates a library.
PHP
bsd-3-clause
pierobot/mangapie,pierobot/mangapie,pierobot/mangapie
php
## Code Before: <?php namespace App; use Illuminate\Database\Eloquent\Model; use \App\Manga; class Library extends Model { // protected $fillable = ['name', 'path']; public function getId() { return $this->id; } public function getName() { return $this->name; } public function getPath() { return $this->path; } public function scan() { foreach (\File::directories($this->getPath()) as $path) { $manga = Manga::updateOrCreate([ 'name' => pathinfo($path, PATHINFO_FILENAME), 'path' => $path, 'library_id' => Library::where('name','=',$this->getName())->first()->id ]); } } public function forceDelete() { // get all the manga that have library_id to ours $manga = Manga::where('library_id', '=', $this->getId())->get(); // and delete them foreach ($manga as $manga_) { // Manga::forceDelete deletes all the references to other tables (artists, authors, manga_information, etc..) $manga_->forceDelete(); } parent::forceDelete(); } } ## Instruction: Remove manga that no longer exist. This is done whenever one updates a library. ## Code After: <?php namespace App; use Illuminate\Database\Eloquent\Model; use \App\Manga; class Library extends Model { // protected $fillable = ['name', 'path']; public function getId() { return $this->id; } public function getName() { return $this->name; } public function getPath() { return $this->path; } public function scan() { // scan and add new directories foreach (\File::directories($this->getPath()) as $path) { $manga = Manga::updateOrCreate([ 'name' => pathinfo($path, PATHINFO_FILENAME), 'path' => $path, 'library_id' => Library::where('name','=',$this->getName())->first()->id ]); } // iterate through all the manga in the library // and remove those that no longer exist in the filesystem $manga = Manga::where('library_id', '=', $this->getId())->get(); foreach ($manga as $manga_) { if (\File::exists($manga_->getPath()) === false) { $manga_->forceDelete(); } } } public function forceDelete() { // get all the manga that have library_id to ours $manga = Manga::where('library_id', '=', $this->getId())->get(); // and delete them foreach ($manga as $manga_) { // Manga::forceDelete deletes all the references to other tables (artists, authors, manga_information, etc..) $manga_->forceDelete(); } parent::forceDelete(); } }
bc660945417d7b7cb3e4c2e88afb6414c94767fb
sources/ca-bc-kamloops.json
sources/ca-bc-kamloops.json
{ "coverage": { "country": "ca", "state": "bc", "city": "Kamloops" }, "data": "http://www.kamloops.ca/downloads/maps/cadastralSHP.zip", "website": "http://www.kamloops.ca/downloads/maps/launch.htm", "license": "http://www.city.kamloops.bc.ca/maps/disclaimer.html", "type": "http", "compression": "zip", "conform": { "merge": [ "name", "nametype" ], "lon": "x", "lat": "y", "number": "STREETNO", "street": "auto_street", "type": "shapefile" }, "attribution": "City of Kamloops" }
{ "coverage": { "country": "ca", "state": "bc", "city": "Kamloops" }, "data": "http://www.kamloops.ca/downloads/maps/cadastralSHP.zip", "website": "http://www.kamloops.ca/downloads/maps/launch.htm", "license": "http://www.city.kamloops.bc.ca/maps/disclaimer.html", "type": "http", "compression": "zip", "conform": { "merge": [ "name", "nametype", "suffix" ], "lon": "x", "lat": "y", "number": "STREETNO", "street": "auto_street", "type": "shapefile", "file": "AddressPoint.shp" }, "attribution": "City of Kamloops" }
Add file to Kamloops, also fix schema
Add file to Kamloops, also fix schema
JSON
bsd-3-clause
jonbstrong/openaddresses,binaek89/openaddresses,openaddresses/openaddresses,alenFMF/openaddresses,openaddresses/openaddresses,PauloLuan/openaddresses,mkuh/openaddresses,knu2xs/openaddresses,npettiaux/openaddresses,orangejulius/openaddresses,newmana/openaddresses,slibby/openaddresses,sergiyprotsiv/openaddresses,artsandideas/openaddresses,artsandideas/openaddresses,daguar/openaddresses,tomslee/openaddresses,jgravois/openaddresses,Zia-/openaddresses,Andygol/openaddresses,daguar/openaddresses,Kenyat1989/openaddresses,fredericksilva/openaddresses,newmana/openaddresses,cbley/openaddresses,sidewalkballet/openaddresses,riordan/openaddresses,newmana/openaddresses,tomslee/openaddresses,djeraseit/openaddresses,Kenyat1989/openaddresses,planemad/openaddresses,sergiyprotsiv/openaddresses,PauloLuan/openaddresses,sabas/openaddresses,getmetorajesh/openaddresses,djeraseit/openaddresses,binaek89/openaddresses,orangejulius/openaddresses,astoff/openaddresses,bbodenmiller/openaddresses,bbodenmiller/openaddresses,riordan/openaddresses,mkuh/openaddresses,jgravois/openaddresses,tyrasd/openaddresses,slibby/openaddresses,knu2xs/openaddresses,Zia-/openaddresses,jonbstrong/openaddresses,getmetorajesh/openaddresses,npettiaux/openaddresses,mmdolbow/openaddresses,sabas/openaddresses,copelco/openaddresses,PauloLuan/openaddresses,Cartografica/openaddresses,hannesj/openaddresses,wilsaj/openaddresses,djeraseit/openaddresses,pssguy/openaddresses,dfuhry/openaddresses,wilsaj/openaddresses,Andygol/openaddresses,Cartografica/openaddresses,alenFMF/openaddresses,getmetorajesh/openaddresses,planemad/openaddresses,tomslee/openaddresses,morganherlocker/openaddresses,mkuh/openaddresses,davidchiles/openaddresses,wilsaj/openaddresses,artsandideas/openaddresses,morganherlocker/openaddresses,fredericksilva/openaddresses,czuio/openaddresses,orangejulius/openaddresses,copelco/openaddresses,chriszs/openaddresses,fredericksilva/openaddresses,planemad/openaddresses,hannesj/openaddresses,cbley/openaddresses,bbodenmiller/openaddresses,hannesj/openaddresses,creade/openaddresses,sidewalkballet/openaddresses,morganherlocker/openaddresses,ajwrtly/openaddresses,knmurphy/openaddresses,tyrasd/openaddresses,chriszs/openaddresses,winfinit/openaddresses,ajwrtly/openaddresses,sidewalkballet/openaddresses,creade/openaddresses,pssguy/openaddresses,npettiaux/openaddresses,riordan/openaddresses,Andygol/openaddresses,tyrasd/openaddresses,davidchiles/openaddresses,openaddresses/openaddresses,sabas/openaddresses,cbley/openaddresses,davidchiles/openaddresses,czuio/openaddresses,dfuhry/openaddresses,ajwrtly/openaddresses,jonbstrong/openaddresses,winfinit/openaddresses,astoff/openaddresses,alenFMF/openaddresses,knmurphy/openaddresses,winfinit/openaddresses,sergiyprotsiv/openaddresses,knmurphy/openaddresses,dfuhry/openaddresses,binaek89/openaddresses,Kenyat1989/openaddresses,chriszs/openaddresses,astoff/openaddresses,slibby/openaddresses,pssguy/openaddresses,czuio/openaddresses,mmdolbow/openaddresses,Zia-/openaddresses,copelco/openaddresses,knu2xs/openaddresses,Cartografica/openaddresses,mmdolbow/openaddresses,jgravois/openaddresses,creade/openaddresses,daguar/openaddresses
json
## Code Before: { "coverage": { "country": "ca", "state": "bc", "city": "Kamloops" }, "data": "http://www.kamloops.ca/downloads/maps/cadastralSHP.zip", "website": "http://www.kamloops.ca/downloads/maps/launch.htm", "license": "http://www.city.kamloops.bc.ca/maps/disclaimer.html", "type": "http", "compression": "zip", "conform": { "merge": [ "name", "nametype" ], "lon": "x", "lat": "y", "number": "STREETNO", "street": "auto_street", "type": "shapefile" }, "attribution": "City of Kamloops" } ## Instruction: Add file to Kamloops, also fix schema ## Code After: { "coverage": { "country": "ca", "state": "bc", "city": "Kamloops" }, "data": "http://www.kamloops.ca/downloads/maps/cadastralSHP.zip", "website": "http://www.kamloops.ca/downloads/maps/launch.htm", "license": "http://www.city.kamloops.bc.ca/maps/disclaimer.html", "type": "http", "compression": "zip", "conform": { "merge": [ "name", "nametype", "suffix" ], "lon": "x", "lat": "y", "number": "STREETNO", "street": "auto_street", "type": "shapefile", "file": "AddressPoint.shp" }, "attribution": "City of Kamloops" }
91372671b5420677d26d2b22573601841c0554ff
flatten.js
flatten.js
'use strict'; // flatten arbitrarily nested array // data NestedList a = Elem a | List [NestedList a] // flatten :: NestedList a -> [a] module.exports = function flatten(arr) { const _flatten = function(p, c) { if (Array.isArray(c)) p = p.concat(c.reduce(_flatten, [])); else p.push(c); return p; }; return arr.reduce(_flatten, []); };
'use strict'; // flatten arbitrarily nested array // data NestedList a = Elem a | List [NestedList a] // flatten :: NestedList a -> [a] function flatten(arr) { const _flatten = function(p, c) { if (Array.isArray(c)) p = p.concat(c.reduce(_flatten, [])); else p.push(c); return p; }; return arr.reduce(_flatten, []); }
Remove all the module system junk
Remove all the module system junk
JavaScript
isc
zeusdeux/random
javascript
## Code Before: 'use strict'; // flatten arbitrarily nested array // data NestedList a = Elem a | List [NestedList a] // flatten :: NestedList a -> [a] module.exports = function flatten(arr) { const _flatten = function(p, c) { if (Array.isArray(c)) p = p.concat(c.reduce(_flatten, [])); else p.push(c); return p; }; return arr.reduce(_flatten, []); }; ## Instruction: Remove all the module system junk ## Code After: 'use strict'; // flatten arbitrarily nested array // data NestedList a = Elem a | List [NestedList a] // flatten :: NestedList a -> [a] function flatten(arr) { const _flatten = function(p, c) { if (Array.isArray(c)) p = p.concat(c.reduce(_flatten, [])); else p.push(c); return p; }; return arr.reduce(_flatten, []); }
c5525e18df5b3d99568c758213396594f69248ce
app/models/token.rb
app/models/token.rb
class Token < ActiveRecord::Base belongs_to :user validates :name, :secret, presence: true validate :secret_is_valid before_validation :normalize_secret scope :by_created_at, -> { order(:created_at) } def code ROTP::TOTP.new(secret).now end private def secret_is_valid code rescue errors.add :secret, "is not a valid base32 secret" end def normalize_secret secret && secret.gsub!(" ", "") end end
class Token < ActiveRecord::Base belongs_to :user validates :name, :secret, presence: true validate :secret_is_valid_base32 before_validation :normalize_secret scope :by_created_at, -> { order(:created_at) } def code ROTP::TOTP.new(secret).now end private def secret_is_valid_base32 code rescue errors.add :secret, "is not a valid base32 secret" end def normalize_secret secret && secret.gsub!(" ", "") end end
Rename method to reveal intent
Rename method to reveal intent
Ruby
mit
ylansegal/tokenator,ylansegal/tokenator,ylansegal/tokenator
ruby
## Code Before: class Token < ActiveRecord::Base belongs_to :user validates :name, :secret, presence: true validate :secret_is_valid before_validation :normalize_secret scope :by_created_at, -> { order(:created_at) } def code ROTP::TOTP.new(secret).now end private def secret_is_valid code rescue errors.add :secret, "is not a valid base32 secret" end def normalize_secret secret && secret.gsub!(" ", "") end end ## Instruction: Rename method to reveal intent ## Code After: class Token < ActiveRecord::Base belongs_to :user validates :name, :secret, presence: true validate :secret_is_valid_base32 before_validation :normalize_secret scope :by_created_at, -> { order(:created_at) } def code ROTP::TOTP.new(secret).now end private def secret_is_valid_base32 code rescue errors.add :secret, "is not a valid base32 secret" end def normalize_secret secret && secret.gsub!(" ", "") end end
53d597c47886f27abe6dce38dc7bd52d44fd2f8f
Toolbelt/Toolbelt/GCD.swift
Toolbelt/Toolbelt/GCD.swift
// // GCD.swift // Toolbelt // // Created by Alexander Edge on 14/01/2016. // Copyright © 2016 Alexander Edge. All rights reserved. // import Foundation public func dispatch_after(delay : NSTimeInterval, block: dispatch_block_t) { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(delay * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), block) } public enum Queue { case Main case UserInteractive case UserInitiated case Utility case Background public var queue: dispatch_queue_t { switch self { case .Main: return dispatch_get_main_queue() case .UserInteractive: return dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0) case .UserInitiated: return dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0) case .Utility: return dispatch_get_global_queue(QOS_CLASS_UTILITY, 0) case .Background: return dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0) } } public func execute(closure: () -> Void) { dispatch_async(self.queue, closure) } }
// // GCD.swift // Toolbelt // // Created by Alexander Edge on 14/01/2016. // Copyright © 2016 Alexander Edge. All rights reserved. // import Foundation public enum Queue { case Main case UserInteractive case UserInitiated case Utility case Background public var queue: dispatch_queue_t { switch self { case .Main: return dispatch_get_main_queue() case .UserInteractive: return dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0) case .UserInitiated: return dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0) case .Utility: return dispatch_get_global_queue(QOS_CLASS_UTILITY, 0) case .Background: return dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0) } } public func execute(closure: () -> Void) { dispatch_async(self.queue, closure) } public func execute(after: NSTimeInterval, closure: () -> Void) { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(after * Double(NSEC_PER_SEC))), self.queue, closure) } }
Move delayed execution to function on enum
Move delayed execution to function on enum
Swift
mit
alexanderedge/Toolbelt,alexanderedge/Toolbelt
swift
## Code Before: // // GCD.swift // Toolbelt // // Created by Alexander Edge on 14/01/2016. // Copyright © 2016 Alexander Edge. All rights reserved. // import Foundation public func dispatch_after(delay : NSTimeInterval, block: dispatch_block_t) { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(delay * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), block) } public enum Queue { case Main case UserInteractive case UserInitiated case Utility case Background public var queue: dispatch_queue_t { switch self { case .Main: return dispatch_get_main_queue() case .UserInteractive: return dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0) case .UserInitiated: return dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0) case .Utility: return dispatch_get_global_queue(QOS_CLASS_UTILITY, 0) case .Background: return dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0) } } public func execute(closure: () -> Void) { dispatch_async(self.queue, closure) } } ## Instruction: Move delayed execution to function on enum ## Code After: // // GCD.swift // Toolbelt // // Created by Alexander Edge on 14/01/2016. // Copyright © 2016 Alexander Edge. All rights reserved. // import Foundation public enum Queue { case Main case UserInteractive case UserInitiated case Utility case Background public var queue: dispatch_queue_t { switch self { case .Main: return dispatch_get_main_queue() case .UserInteractive: return dispatch_get_global_queue(QOS_CLASS_USER_INTERACTIVE, 0) case .UserInitiated: return dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0) case .Utility: return dispatch_get_global_queue(QOS_CLASS_UTILITY, 0) case .Background: return dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0) } } public func execute(closure: () -> Void) { dispatch_async(self.queue, closure) } public func execute(after: NSTimeInterval, closure: () -> Void) { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(after * Double(NSEC_PER_SEC))), self.queue, closure) } }