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
5baa844c5f0b53ec4c451ea6f7a661c919190c4a
Sources/Moya/MoyaProvider+Defaults.swift
Sources/Moya/MoyaProvider+Defaults.swift
import Alamofire /// These functions are default mappings to `MoyaProvider`'s properties: endpoints, requests, manager, etc. public extension MoyaProvider { public final class func defaultEndpointMapping(for target: Target) -> Endpoint<Target> { let url = target.baseURL.appendingPathComponent(target.path).absoluteString return Endpoint( url: url, sampleResponseClosure: { .networkResponse(200, target.sampleData) }, method: target.method, parameters: target.parameters, parameterEncoding: target.parameterEncoding ) } public final class func defaultRequestMapping(for endpoint: Endpoint<Target>, closure: RequestResultClosure) { if let urlRequest = endpoint.urlRequest { closure(.success(urlRequest)) } else { closure(.failure(Error.requestMapping(endpoint.url))) } } public final class func defaultAlamofireManager() -> Manager { let configuration = URLSessionConfiguration.default configuration.httpAdditionalHeaders = Manager.defaultHTTPHeaders let manager = Manager(configuration: configuration) manager.startRequestsImmediately = false return manager } }
import Foundation import Alamofire /// These functions are default mappings to `MoyaProvider`'s properties: endpoints, requests, manager, etc. public extension MoyaProvider { public final class func defaultEndpointMapping(for target: Target) -> Endpoint<Target> { let url = target.baseURL.appendingPathComponent(target.path).absoluteString return Endpoint( url: url, sampleResponseClosure: { .networkResponse(200, target.sampleData) }, method: target.method, parameters: target.parameters, parameterEncoding: target.parameterEncoding ) } public final class func defaultRequestMapping(for endpoint: Endpoint<Target>, closure: RequestResultClosure) { if let urlRequest = endpoint.urlRequest { closure(.success(urlRequest)) } else { closure(.failure(Error.requestMapping(endpoint.url))) } } public final class func defaultAlamofireManager() -> Manager { let configuration = URLSessionConfiguration.default configuration.httpAdditionalHeaders = Manager.defaultHTTPHeaders let manager = Manager(configuration: configuration) manager.startRequestsImmediately = false return manager } }
Add Foundation import to fix SPM build error.
Add Foundation import to fix SPM build error.
Swift
mit
ashfurrow/Moya,Moya/Moya,calt/Moya,AvdLee/Moya,justinmakaila/Moya,Moya/Moya,ashfurrow/Moya,AvdLee/Moya,Moya/Moya,justinmakaila/Moya,AvdLee/Moya,justinmakaila/Moya,calt/Moya,calt/Moya
swift
## Code Before: import Alamofire /// These functions are default mappings to `MoyaProvider`'s properties: endpoints, requests, manager, etc. public extension MoyaProvider { public final class func defaultEndpointMapping(for target: Target) -> Endpoint<Target> { let url = target.baseURL.appendingPathComponent(target.path).absoluteString return Endpoint( url: url, sampleResponseClosure: { .networkResponse(200, target.sampleData) }, method: target.method, parameters: target.parameters, parameterEncoding: target.parameterEncoding ) } public final class func defaultRequestMapping(for endpoint: Endpoint<Target>, closure: RequestResultClosure) { if let urlRequest = endpoint.urlRequest { closure(.success(urlRequest)) } else { closure(.failure(Error.requestMapping(endpoint.url))) } } public final class func defaultAlamofireManager() -> Manager { let configuration = URLSessionConfiguration.default configuration.httpAdditionalHeaders = Manager.defaultHTTPHeaders let manager = Manager(configuration: configuration) manager.startRequestsImmediately = false return manager } } ## Instruction: Add Foundation import to fix SPM build error. ## Code After: import Foundation import Alamofire /// These functions are default mappings to `MoyaProvider`'s properties: endpoints, requests, manager, etc. public extension MoyaProvider { public final class func defaultEndpointMapping(for target: Target) -> Endpoint<Target> { let url = target.baseURL.appendingPathComponent(target.path).absoluteString return Endpoint( url: url, sampleResponseClosure: { .networkResponse(200, target.sampleData) }, method: target.method, parameters: target.parameters, parameterEncoding: target.parameterEncoding ) } public final class func defaultRequestMapping(for endpoint: Endpoint<Target>, closure: RequestResultClosure) { if let urlRequest = endpoint.urlRequest { closure(.success(urlRequest)) } else { closure(.failure(Error.requestMapping(endpoint.url))) } } public final class func defaultAlamofireManager() -> Manager { let configuration = URLSessionConfiguration.default configuration.httpAdditionalHeaders = Manager.defaultHTTPHeaders let manager = Manager(configuration: configuration) manager.startRequestsImmediately = false return manager } }
02189c43564f661742378a7623b22409aa7c295f
config/locales/en.yml
config/locales/en.yml
en: spree: buy_gift_card: "Buy gift card" gift_card: 'Gift Card' gift_cards: "Gift cards" gift_card_calculator: 'Gift Card Calculator' gift_code: 'Gift Code' gift_code_applied: 'Gift code has been successfully applied to your order.' gift_code_not_found: "The gift code you entered doesn't exist. Please try again." is_gift_card: "is gift card" new_gift_card: 'New Gift Card' recipient_name: "Recipient name" successfully_created_gift_card: 'You have successfully created the gift card.' transactions: "Transactions" value: 'Value'
en: spree: apply: "Apply" back_to_gift_cards_list: "Back to Gift Cards List" buy_gift_card: "Buy gift card" current_value: "Current Value" gift_card: 'Gift Card' gift_cards: "Gift cards" gift_card_calculator: 'Gift Card Calculator' gift_code: 'Gift Code' gift_code_applied: 'Gift code has been successfully applied to your order.' gift_code_not_found: "The gift code you entered doesn't exist. Please try again." is_gift_card: "is gift card" new_gift_card: 'New Gift Card' note: "Note" original_value: "Original Value" recipient_name: "Recipient name" successfully_created_gift_card: 'You have successfully created the gift card.' transactions: "Transactions" value: 'Value'
Add a few more translations.
Add a few more translations.
YAML
bsd-3-clause
dotandbo/spree_gift_card,mr-ado/spree_gift_card,AdamGoodApp/spree_gift_card,JDutil/spree_gift_card,AdamGoodApp/spree_gift_card,mr-ado/spree_gift_card,AdamGoodApp/spree_gift_card,tcjuan/spree_gift_card,Boomkat/spree_gift_card,tcjuan/spree_gift_card,dotandbo/spree_gift_card,Boomkat/spree_gift_card,JDutil/spree_gift_card,mr-ado/spree_gift_card,Boomkat/spree_gift_card,JDutil/spree_gift_card
yaml
## Code Before: en: spree: buy_gift_card: "Buy gift card" gift_card: 'Gift Card' gift_cards: "Gift cards" gift_card_calculator: 'Gift Card Calculator' gift_code: 'Gift Code' gift_code_applied: 'Gift code has been successfully applied to your order.' gift_code_not_found: "The gift code you entered doesn't exist. Please try again." is_gift_card: "is gift card" new_gift_card: 'New Gift Card' recipient_name: "Recipient name" successfully_created_gift_card: 'You have successfully created the gift card.' transactions: "Transactions" value: 'Value' ## Instruction: Add a few more translations. ## Code After: en: spree: apply: "Apply" back_to_gift_cards_list: "Back to Gift Cards List" buy_gift_card: "Buy gift card" current_value: "Current Value" gift_card: 'Gift Card' gift_cards: "Gift cards" gift_card_calculator: 'Gift Card Calculator' gift_code: 'Gift Code' gift_code_applied: 'Gift code has been successfully applied to your order.' gift_code_not_found: "The gift code you entered doesn't exist. Please try again." is_gift_card: "is gift card" new_gift_card: 'New Gift Card' note: "Note" original_value: "Original Value" recipient_name: "Recipient name" successfully_created_gift_card: 'You have successfully created the gift card.' transactions: "Transactions" value: 'Value'
d3f35787fe191b350fb75d72ed99c05dfba16144
lib/punchblock/protocol/rayo/event/dtmf.rb
lib/punchblock/protocol/rayo/event/dtmf.rb
module Punchblock module Protocol class Rayo module Event class DTMF < RayoNode register :dtmf, :core def signal read_attr :signal end def inspect_attributes # :nodoc: [:signal] + super end end # End end end # Rayo end # Protocol end # Punchblock
module Punchblock module Protocol class Rayo module Event class DTMF < RayoNode register :dtmf, :core def signal read_attr :signal end def signal=(other) write_attr :signal, other end def inspect_attributes # :nodoc: [:signal] + super end end # End end end # Rayo end # Protocol end # Punchblock
Allow setting the signal on a DTMF event
Allow setting the signal on a DTMF event
Ruby
mit
system123/punchblock,adhearsion/punchblock,cloudvox/punchblock,kares/punchblock
ruby
## Code Before: module Punchblock module Protocol class Rayo module Event class DTMF < RayoNode register :dtmf, :core def signal read_attr :signal end def inspect_attributes # :nodoc: [:signal] + super end end # End end end # Rayo end # Protocol end # Punchblock ## Instruction: Allow setting the signal on a DTMF event ## Code After: module Punchblock module Protocol class Rayo module Event class DTMF < RayoNode register :dtmf, :core def signal read_attr :signal end def signal=(other) write_attr :signal, other end def inspect_attributes # :nodoc: [:signal] + super end end # End end end # Rayo end # Protocol end # Punchblock
63cebaf6d25fbff0815afc97e9574c1b9e66ce83
zsh/7.arch.zsh
zsh/7.arch.zsh
if [[ ! -f /etc/arch-release ]]; then return fi prepend-path $HOME/.bin/arch if [[ -d $HOME/build || -d $HOME/opt/build ]]; then if [[ ! -f ${XDG_DATA_HOME:-$HOME/.local/share}/aur-update ]]; then echo "${fg[red]}Found an AUR build folder, but no update data available. Please configure aur-update in cron.${terminfo[sgr0]}" echo "" else source ${XDG_DATA_HOME:-$HOME/.local/share}/aur-update fi fi alias pacman-orphans="pacman -Qtdq"
if [[ ! -f /etc/arch-release ]]; then return fi prepend-path $HOME/.bin/arch if [[ -d $HOME/build || -d $HOME/opt/build ]]; then if [[ ! -f ${XDG_DATA_HOME:-$HOME/.local/share}/aur-update ]]; then echo "${fg[red]}Found an AUR build folder, but no update data available. Please configure aur-update in cron.${terminfo[sgr0]}" echo "" else source ${XDG_DATA_HOME:-$HOME/.local/share}/aur-update fi fi alias pacman-orphans="pacman -Qtdq" alias pacman-remove-orphans="pacman -Rns \$(pacman -Qtdq)"
Add a remove-orphaned packages alias for Arch
Add a remove-orphaned packages alias for Arch
Shell
mit
mscharley/dotfiles,mscharley/dotfiles,mscharley/dotfiles,mscharley/dotfiles
shell
## Code Before: if [[ ! -f /etc/arch-release ]]; then return fi prepend-path $HOME/.bin/arch if [[ -d $HOME/build || -d $HOME/opt/build ]]; then if [[ ! -f ${XDG_DATA_HOME:-$HOME/.local/share}/aur-update ]]; then echo "${fg[red]}Found an AUR build folder, but no update data available. Please configure aur-update in cron.${terminfo[sgr0]}" echo "" else source ${XDG_DATA_HOME:-$HOME/.local/share}/aur-update fi fi alias pacman-orphans="pacman -Qtdq" ## Instruction: Add a remove-orphaned packages alias for Arch ## Code After: if [[ ! -f /etc/arch-release ]]; then return fi prepend-path $HOME/.bin/arch if [[ -d $HOME/build || -d $HOME/opt/build ]]; then if [[ ! -f ${XDG_DATA_HOME:-$HOME/.local/share}/aur-update ]]; then echo "${fg[red]}Found an AUR build folder, but no update data available. Please configure aur-update in cron.${terminfo[sgr0]}" echo "" else source ${XDG_DATA_HOME:-$HOME/.local/share}/aur-update fi fi alias pacman-orphans="pacman -Qtdq" alias pacman-remove-orphans="pacman -Rns \$(pacman -Qtdq)"
3f62d2ab8f583ed7957983ae47f8e07860e5e72a
.travis.yml
.travis.yml
language: ruby rvm: - "2.2.1" before_install: - sudo add-apt-repository ppa:jon-severinsson/ffmpeg -y - sudo apt-get update -qq - sudo apt-get install -qq libsndfile1-dev libsox-fmt-all lame mp3val sox twolame - sudo apt-get install -qq ffmpeg
language: ruby rvm: - "2.2.1" - "2.3.1" before_install: - sudo add-apt-repository ppa:jonathonf/ffmpeg -y - sudo apt-get update -qq - sudo apt-get install -qq libsndfile1-dev libsox-fmt-all lame mp3val sox twolame - sudo apt-get install -qq ffmpeg
Change PPA url, add ruby 2.3.1
Change PPA url, add ruby 2.3.1
YAML
mit
PRX/audio_monster
yaml
## Code Before: language: ruby rvm: - "2.2.1" before_install: - sudo add-apt-repository ppa:jon-severinsson/ffmpeg -y - sudo apt-get update -qq - sudo apt-get install -qq libsndfile1-dev libsox-fmt-all lame mp3val sox twolame - sudo apt-get install -qq ffmpeg ## Instruction: Change PPA url, add ruby 2.3.1 ## Code After: language: ruby rvm: - "2.2.1" - "2.3.1" before_install: - sudo add-apt-repository ppa:jonathonf/ffmpeg -y - sudo apt-get update -qq - sudo apt-get install -qq libsndfile1-dev libsox-fmt-all lame mp3val sox twolame - sudo apt-get install -qq ffmpeg
d1c85c359d11495c741d7bab8558c3a69ea90d0c
README.md
README.md
Make Brexit as delicious as breakfast. This Chrome extension replaces all occurrences of the word Brexit with the word breakfast. Enjoy! Why? This: https://twitter.com/elliwsan/status/783246302691876868 Who? This extension is courtesy of Lady Geek, http://ladygeek.nl. How? I based this on an excellent tutorial from https://9to5google.com/2015/06/14/how-to-make-a-chrome-extensions.
[Make Brexit as delicious as breakfast](https://twitter.com/elliwsan/status/783246302691876868). This Chrome extension replaces all occurrences of the word Brexit with the word breakfast. Enjoy! (If you've already installed this extension, this readme may be a bit confusing. Well, not as confusing as Brexit itself, I suppose.) ## Installation * Download https://github.com/nieske/brexit-at-tiffanys/archive/master.zip. * Unzip it and put the resulting folder somewhere on your computer. * Go to Chrome and type chrome://extensions/ in your address bar. * Tick the check box in the upper right corner that says "Developer mode", which will make a new line with buttons appear. * From those new buttons, click the "Load unpacked extension..." button, browse to your Brexit at Tiffany's folder and click "Select". Now, you're all set! Go browse http://www.bbc.com/news/politics or something. Have fun. Hope it doesn't make you too hungry. This extension is based on [this excellent tutorial](https://9to5google.com/2015/06/14/how-to-make-a-chrome-extensions). The initial version is by [Lady Geek](http://ladygeek.nl). Please feel free to make your own adaptations.
Read even more in this new readme.
Read even more in this new readme.
Markdown
mit
nieske/brexit-at-tiffanys
markdown
## Code Before: Make Brexit as delicious as breakfast. This Chrome extension replaces all occurrences of the word Brexit with the word breakfast. Enjoy! Why? This: https://twitter.com/elliwsan/status/783246302691876868 Who? This extension is courtesy of Lady Geek, http://ladygeek.nl. How? I based this on an excellent tutorial from https://9to5google.com/2015/06/14/how-to-make-a-chrome-extensions. ## Instruction: Read even more in this new readme. ## Code After: [Make Brexit as delicious as breakfast](https://twitter.com/elliwsan/status/783246302691876868). This Chrome extension replaces all occurrences of the word Brexit with the word breakfast. Enjoy! (If you've already installed this extension, this readme may be a bit confusing. Well, not as confusing as Brexit itself, I suppose.) ## Installation * Download https://github.com/nieske/brexit-at-tiffanys/archive/master.zip. * Unzip it and put the resulting folder somewhere on your computer. * Go to Chrome and type chrome://extensions/ in your address bar. * Tick the check box in the upper right corner that says "Developer mode", which will make a new line with buttons appear. * From those new buttons, click the "Load unpacked extension..." button, browse to your Brexit at Tiffany's folder and click "Select". Now, you're all set! Go browse http://www.bbc.com/news/politics or something. Have fun. Hope it doesn't make you too hungry. This extension is based on [this excellent tutorial](https://9to5google.com/2015/06/14/how-to-make-a-chrome-extensions). The initial version is by [Lady Geek](http://ladygeek.nl). Please feel free to make your own adaptations.
29a5a636ce4f3246aded7892819bd11789f28fab
modules/collectd/templates/etc/collectd/conf.d/redis.conf.erb
modules/collectd/templates/etc/collectd/conf.d/redis.conf.erb
<LoadPlugin python> Globals true </LoadPlugin> <Plugin python> ModulePath "/opt/collectd/lib/collectd/plugins/python" Import "redis_info" <Module redis_info> Host "<%= @host %>" Port <%= @port %> Verbose false </Module> </Plugin>
<LoadPlugin python> Globals true </LoadPlugin> <Plugin python> ModulePath "/usr/lib/collectd/python" Import "redis_info" <Module redis_info> Host "<%= @host %>" Port <%= @port %> Verbose false </Module> </Plugin>
Use the correct ModulePath for the redis_info plugin location
Use the correct ModulePath for the redis_info plugin location
HTML+ERB
mit
alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet
html+erb
## Code Before: <LoadPlugin python> Globals true </LoadPlugin> <Plugin python> ModulePath "/opt/collectd/lib/collectd/plugins/python" Import "redis_info" <Module redis_info> Host "<%= @host %>" Port <%= @port %> Verbose false </Module> </Plugin> ## Instruction: Use the correct ModulePath for the redis_info plugin location ## Code After: <LoadPlugin python> Globals true </LoadPlugin> <Plugin python> ModulePath "/usr/lib/collectd/python" Import "redis_info" <Module redis_info> Host "<%= @host %>" Port <%= @port %> Verbose false </Module> </Plugin>
fa814378ed7a34f6c6582dca2bfb6e1a0491ffb8
pom.xml
pom.xml
<project> <modelVersion>4.0.0</modelVersion> <groupId>com.nullprogram</groupId> <artifactId>native-guide</artifactId> <version>0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>NativeGuide</name> <description>Helper for loading native libraries from resources.</description> <url>http://nullprogram.com</url> <licenses> <license> <name>The Unlicense</name> <url>http://unlicense.org/UNLICENSE</url> <distribution>repo</distribution> </license> </licenses> <scm> <connection>scm:git:https://github.com/skeeto/NativeGuide.git</connection> <url>https://github.com/skeeto/NativeGuide</url> </scm> <developers> <developer> <name>Christopher Wellons</name> <email>[email protected]</email> <url>http://nullprogram.com</url> <timezone>-5</timezone> </developer> </developers> </project>
<project> <modelVersion>4.0.0</modelVersion> <groupId>com.nullprogram</groupId> <artifactId>native-guide</artifactId> <version>0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>NativeGuide</name> <description>Helper for loading native libraries from resources.</description> <url>http://nullprogram.com</url> <licenses> <license> <name>The Unlicense</name> <url>http://unlicense.org/UNLICENSE</url> <distribution>repo</distribution> </license> </licenses> <scm> <connection>scm:git:https://github.com/skeeto/NativeGuide.git</connection> <url>https://github.com/skeeto/NativeGuide</url> </scm> <developers> <developer> <name>Christopher Wellons</name> <email>[email protected]</email> <url>http://nullprogram.com</url> <timezone>-5</timezone> </developer> </developers> <parent> <groupId>org.sonatype.oss</groupId> <artifactId>oss-parent</artifactId> <version>7</version> </parent> </project>
Add Sonatype as a parent.
Add Sonatype as a parent.
XML
unlicense
skeeto/NativeGuide,skeeto/NativeGuide
xml
## Code Before: <project> <modelVersion>4.0.0</modelVersion> <groupId>com.nullprogram</groupId> <artifactId>native-guide</artifactId> <version>0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>NativeGuide</name> <description>Helper for loading native libraries from resources.</description> <url>http://nullprogram.com</url> <licenses> <license> <name>The Unlicense</name> <url>http://unlicense.org/UNLICENSE</url> <distribution>repo</distribution> </license> </licenses> <scm> <connection>scm:git:https://github.com/skeeto/NativeGuide.git</connection> <url>https://github.com/skeeto/NativeGuide</url> </scm> <developers> <developer> <name>Christopher Wellons</name> <email>[email protected]</email> <url>http://nullprogram.com</url> <timezone>-5</timezone> </developer> </developers> </project> ## Instruction: Add Sonatype as a parent. ## Code After: <project> <modelVersion>4.0.0</modelVersion> <groupId>com.nullprogram</groupId> <artifactId>native-guide</artifactId> <version>0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>NativeGuide</name> <description>Helper for loading native libraries from resources.</description> <url>http://nullprogram.com</url> <licenses> <license> <name>The Unlicense</name> <url>http://unlicense.org/UNLICENSE</url> <distribution>repo</distribution> </license> </licenses> <scm> <connection>scm:git:https://github.com/skeeto/NativeGuide.git</connection> <url>https://github.com/skeeto/NativeGuide</url> </scm> <developers> <developer> <name>Christopher Wellons</name> <email>[email protected]</email> <url>http://nullprogram.com</url> <timezone>-5</timezone> </developer> </developers> <parent> <groupId>org.sonatype.oss</groupId> <artifactId>oss-parent</artifactId> <version>7</version> </parent> </project>
f4c7117eae4a95614a48c5ca18f476a9ba7090cc
metadata.json
metadata.json
{ "name": "zleslie-openvpn", "version": "1.1.1", "author": "zleslie", "summary": "Puppet powered OpenVPN", "license": "Apache License Version 2.0", "source": "git://github.com/xaque208/puppet-openvpn.git", "project_page": "https://github.com/xaque208/puppet-openvpn", "issues_url": "https://github.com/xaque208/puppet-openvpn/issues", "operatingsystem_support": [ { "operatingsystem": "FreeBSD", "operatingsystemrelease": [ "10", "9.3", "8.4" ] }, { "operatingsystem": "OpenBSD", "operatingsystemrelease": [ "5.5" ] } ], "requirements": [ { "name": "pe", "version_requirement": ">= 3.2.0 < 3.4.0" }, { "name": "puppet", "version_requirement": "3.x" } ], "dependencies": [ ] }
{ "name": "zleslie-openvpn", "version": "1.1.1", "author": "zleslie", "summary": "Puppet powered OpenVPN", "license": "Apache License Version 2.0", "source": "git://github.com/xaque208/puppet-openvpn.git", "project_page": "https://github.com/xaque208/puppet-openvpn", "issues_url": "https://github.com/xaque208/puppet-openvpn/issues", "operatingsystem_support": [ { "operatingsystem": "FreeBSD", "operatingsystemrelease": [ "10", "9.3", "8.4" ] }, { "operatingsystem": "OpenBSD", "operatingsystemrelease": [ "5.5", "5.6", "5.7" ] } ], "requirements": [ { "name": "pe", "version_requirement": ">= 3.2.0 < 3.4.0" }, { "name": "puppet", "version_requirement": "3.x" } ], "dependencies": [ ] }
Add more OpenBSD versions as supported
Add more OpenBSD versions as supported
JSON
apache-2.0
buzzdeee/puppet-openvpn,xaque208/puppet-openvpn,buzzdeee/puppet-openvpn,xaque208/puppet-openvpn,buzzdeee/puppet-openvpn,cirrax/puppet-openvpn,xaque208/puppet-openvpn,cirrax/puppet-openvpn,cirrax/puppet-openvpn
json
## Code Before: { "name": "zleslie-openvpn", "version": "1.1.1", "author": "zleslie", "summary": "Puppet powered OpenVPN", "license": "Apache License Version 2.0", "source": "git://github.com/xaque208/puppet-openvpn.git", "project_page": "https://github.com/xaque208/puppet-openvpn", "issues_url": "https://github.com/xaque208/puppet-openvpn/issues", "operatingsystem_support": [ { "operatingsystem": "FreeBSD", "operatingsystemrelease": [ "10", "9.3", "8.4" ] }, { "operatingsystem": "OpenBSD", "operatingsystemrelease": [ "5.5" ] } ], "requirements": [ { "name": "pe", "version_requirement": ">= 3.2.0 < 3.4.0" }, { "name": "puppet", "version_requirement": "3.x" } ], "dependencies": [ ] } ## Instruction: Add more OpenBSD versions as supported ## Code After: { "name": "zleslie-openvpn", "version": "1.1.1", "author": "zleslie", "summary": "Puppet powered OpenVPN", "license": "Apache License Version 2.0", "source": "git://github.com/xaque208/puppet-openvpn.git", "project_page": "https://github.com/xaque208/puppet-openvpn", "issues_url": "https://github.com/xaque208/puppet-openvpn/issues", "operatingsystem_support": [ { "operatingsystem": "FreeBSD", "operatingsystemrelease": [ "10", "9.3", "8.4" ] }, { "operatingsystem": "OpenBSD", "operatingsystemrelease": [ "5.5", "5.6", "5.7" ] } ], "requirements": [ { "name": "pe", "version_requirement": ">= 3.2.0 < 3.4.0" }, { "name": "puppet", "version_requirement": "3.x" } ], "dependencies": [ ] }
03a22d315a658c547b3cdcc31a94f862c60ddb58
slick/src/main/scala/slick/util/ReadAheadIterator.scala
slick/src/main/scala/slick/util/ReadAheadIterator.scala
package slick.util /** * An iterator on top of a data source which does not offer a hasNext() * method without doing a next() */ trait ReadAheadIterator[+T] extends BufferedIterator[T] { private[this] var state = 0 // 0: no data, 1: cached, 2: finished private[this] var cached: T = null.asInstanceOf[T] protected[this] final def finished(): T = { state = 2 null.asInstanceOf[T] } /** Return a new value or call finished() */ protected def fetchNext(): T def head: T = { update() if(state == 1) cached else throw new NoSuchElementException("head on empty iterator") } private[this] def update() { if(state == 0) { cached = fetchNext() if(state == 0) state = 1 } } def hasNext: Boolean = { update() state == 1 } def next(): T = { update() if(state == 1) { state = 0 cached } else throw new NoSuchElementException("next on empty iterator"); } }
package slick.util /** * An iterator on top of a data source which does not offer a hasNext() * method without doing a next() */ trait ReadAheadIterator[+T] extends BufferedIterator[T] { private[this] var state = 0 // 0: no data, 1: cached, 2: finished private[this] var cached: T = null.asInstanceOf[T] protected[this] final def finished(): T = { state = 2 null.asInstanceOf[T] } /** Return a new value or call finished() */ protected def fetchNext(): T def head: T = { update() if(state == 1) cached else throw new NoSuchElementException("head on empty iterator") } private[this] def update() { if(state == 0) { cached = fetchNext() if(state == 0) state = 1 } } def hasNext: Boolean = { update() state == 1 } def next(): T = { update() if(state == 1) { state = 0 cached } else throw new NoSuchElementException("next on empty iterator"); } } object ReadAheadIterator { /** Feature implemented in Scala library 2.12 this maintains functionality for 2.11 */ implicit class headOptionReverseCompatibility[T](readAheadIterator: ReadAheadIterator[T]){ def headOption : Option[T] = if (readAheadIterator.hasNext) Some(readAheadIterator.head) else None } }
Implement Implicit Class with Extension Method
Implement Implicit Class with Extension Method This extends support for headOption in 2.11 while allowing the inherent functionality provided by 2.12 to take precedence once 2.12 is released.
Scala
bsd-2-clause
nafg/slick,Asamsig/slick,xavier-fernandez/slick,trevorsibanda/slick,nremond/slick,marko-asplund/slick,Radsaggi/slick,Radsaggi/slick,nremond/slick,nremond/slick,xavier-fernandez/slick,xavier-fernandez/slick,kwark/slick
scala
## Code Before: package slick.util /** * An iterator on top of a data source which does not offer a hasNext() * method without doing a next() */ trait ReadAheadIterator[+T] extends BufferedIterator[T] { private[this] var state = 0 // 0: no data, 1: cached, 2: finished private[this] var cached: T = null.asInstanceOf[T] protected[this] final def finished(): T = { state = 2 null.asInstanceOf[T] } /** Return a new value or call finished() */ protected def fetchNext(): T def head: T = { update() if(state == 1) cached else throw new NoSuchElementException("head on empty iterator") } private[this] def update() { if(state == 0) { cached = fetchNext() if(state == 0) state = 1 } } def hasNext: Boolean = { update() state == 1 } def next(): T = { update() if(state == 1) { state = 0 cached } else throw new NoSuchElementException("next on empty iterator"); } } ## Instruction: Implement Implicit Class with Extension Method This extends support for headOption in 2.11 while allowing the inherent functionality provided by 2.12 to take precedence once 2.12 is released. ## Code After: package slick.util /** * An iterator on top of a data source which does not offer a hasNext() * method without doing a next() */ trait ReadAheadIterator[+T] extends BufferedIterator[T] { private[this] var state = 0 // 0: no data, 1: cached, 2: finished private[this] var cached: T = null.asInstanceOf[T] protected[this] final def finished(): T = { state = 2 null.asInstanceOf[T] } /** Return a new value or call finished() */ protected def fetchNext(): T def head: T = { update() if(state == 1) cached else throw new NoSuchElementException("head on empty iterator") } private[this] def update() { if(state == 0) { cached = fetchNext() if(state == 0) state = 1 } } def hasNext: Boolean = { update() state == 1 } def next(): T = { update() if(state == 1) { state = 0 cached } else throw new NoSuchElementException("next on empty iterator"); } } object ReadAheadIterator { /** Feature implemented in Scala library 2.12 this maintains functionality for 2.11 */ implicit class headOptionReverseCompatibility[T](readAheadIterator: ReadAheadIterator[T]){ def headOption : Option[T] = if (readAheadIterator.hasNext) Some(readAheadIterator.head) else None } }
d9d111b3281414257288d73f72dd143ef50aadea
lib/pdc/v1/product.rb
lib/pdc/v1/product.rb
module PDC::V1 class Product < PDC::Base end end
module PDC::V1 class Product < PDC::Base attributes :name, :short, :active, :product_versions, :internal end end
Add known attributes to PDC::V1::Product
Add known attributes to PDC::V1::Product This patch fixes issue 22 where fetching a product resulted in warning about unknown attributes. This has now been fixed by adding the list of attributes to Product.
Ruby
mit
product-definition-center/pdc-ruby-gem,product-definition-center/pdc-ruby-gem
ruby
## Code Before: module PDC::V1 class Product < PDC::Base end end ## Instruction: Add known attributes to PDC::V1::Product This patch fixes issue 22 where fetching a product resulted in warning about unknown attributes. This has now been fixed by adding the list of attributes to Product. ## Code After: module PDC::V1 class Product < PDC::Base attributes :name, :short, :active, :product_versions, :internal end end
f24b4b6c6291e4fa78c878a9cb4cd4b735abde60
README.md
README.md
Tracker for life-wide goals. [![Travis](https://img.shields.io/travis/rust-lang/rust.svg?style=flat-square)]()
Tracker for life-wide goals. [![Travis](https://img.shields.io/travis/rust-lang/rust.svg)](https://travis-ci.org/rwillrich/life-goals-tracker)
Add link to Travis badge
Add link to Travis badge
Markdown
mit
rwillrich/life-goals-tracker
markdown
## Code Before: Tracker for life-wide goals. [![Travis](https://img.shields.io/travis/rust-lang/rust.svg?style=flat-square)]() ## Instruction: Add link to Travis badge ## Code After: Tracker for life-wide goals. [![Travis](https://img.shields.io/travis/rust-lang/rust.svg)](https://travis-ci.org/rwillrich/life-goals-tracker)
4433c46e35f8362985b38b13dfd7410792f1199b
bin/emacs-gui.sh
bin/emacs-gui.sh
if [ ! -f "$1" ]; then touch "$1" fi open -a `brew --prefix emacs`/Emacs.app "$1"
if [ ! -f "$1" ]; then touch "$1" fi if [ -e $(brew --prefix --HEAD emacs)/Emacs.app ]; then open -a `brew --prefix --HEAD emacs`/Emacs.app "$1" else open -a `brew --prefix emacs`/Emacs.app "$1" fi
Update GUI launcher to handle HEAD brew installs
Update GUI launcher to handle HEAD brew installs
Shell
mit
lstoll/repo,lstoll/dotfiles,lstoll/dotfiles,lstoll/repo,lstoll/repo,lstoll/dotfiles
shell
## Code Before: if [ ! -f "$1" ]; then touch "$1" fi open -a `brew --prefix emacs`/Emacs.app "$1" ## Instruction: Update GUI launcher to handle HEAD brew installs ## Code After: if [ ! -f "$1" ]; then touch "$1" fi if [ -e $(brew --prefix --HEAD emacs)/Emacs.app ]; then open -a `brew --prefix --HEAD emacs`/Emacs.app "$1" else open -a `brew --prefix emacs`/Emacs.app "$1" fi
c14bea03e77d0b7573ae087c879cadfc3ca9c970
firefox/prefs.js
firefox/prefs.js
user_pref("accessibility.typeaheadfind.flashBar", 0); user_pref("accessibility.typeaheadfind.prefillwithselection", true); user_pref("browser.backspace_action", 2); user_pref("browser.bookmarks.restore_default_bookmarks", false); user_pref("browser.newtab.url", "about:blank"); user_pref("browser.search.suggest.enabled", false); user_pref("browser.selfsupport.url", ""); user_pref("browser.showQuitWarning", true); user_pref("browser.startup.homepage", "about:blank"); user_pref("browser.tabs.animate", false); user_pref("browser.tabs.closeWindowWithLastTab", false); user_pref("browser.tabs.warnOnClose", false); user_pref("datareporting.healthreport.uploadEnabled", false); user_pref("network.cookie.cookieBehavior", 3); user_pref("network.cookie.lifetimePolicy", 2); user_pref("network.http.referer.spoofSource", true); user_pref("network.http.referer.trimmingPolicy", 2); user_pref("network.http.referer.XOriginPolicy", 2); user_pref("toolkit.telemetry.enabled", false);
user_pref("accessibility.typeaheadfind.flashBar", 0); user_pref("accessibility.typeaheadfind.prefillwithselection", true); user_pref("browser.backspace_action", 2); user_pref("browser.bookmarks.restore_default_bookmarks", false); user_pref("browser.newtab.url", "about:blank"); user_pref("browser.readinglist.enabled", false); user_pref("browser.search.suggest.enabled", false); user_pref("browser.selfsupport.url", ""); user_pref("browser.showQuitWarning", true); user_pref("browser.startup.homepage", "about:blank"); user_pref("browser.tabs.animate", false); user_pref("browser.tabs.closeWindowWithLastTab", false); user_pref("browser.tabs.warnOnClose", false); user_pref("datareporting.healthreport.uploadEnabled", false); user_pref("loop.enabled", false); user_pref("network.cookie.cookieBehavior", 3); user_pref("network.cookie.lifetimePolicy", 2); user_pref("network.http.referer.spoofSource", true); user_pref("network.http.referer.trimmingPolicy", 2); user_pref("network.http.referer.XOriginPolicy", 2); user_pref("readinglist.scheduler.enabled", false); user_pref("toolkit.telemetry.enabled", false);
Disable a few unused features
firefox: Disable a few unused features
JavaScript
mit
poiru/dotfiles,poiru/dotfiles,poiru/dotfiles
javascript
## Code Before: user_pref("accessibility.typeaheadfind.flashBar", 0); user_pref("accessibility.typeaheadfind.prefillwithselection", true); user_pref("browser.backspace_action", 2); user_pref("browser.bookmarks.restore_default_bookmarks", false); user_pref("browser.newtab.url", "about:blank"); user_pref("browser.search.suggest.enabled", false); user_pref("browser.selfsupport.url", ""); user_pref("browser.showQuitWarning", true); user_pref("browser.startup.homepage", "about:blank"); user_pref("browser.tabs.animate", false); user_pref("browser.tabs.closeWindowWithLastTab", false); user_pref("browser.tabs.warnOnClose", false); user_pref("datareporting.healthreport.uploadEnabled", false); user_pref("network.cookie.cookieBehavior", 3); user_pref("network.cookie.lifetimePolicy", 2); user_pref("network.http.referer.spoofSource", true); user_pref("network.http.referer.trimmingPolicy", 2); user_pref("network.http.referer.XOriginPolicy", 2); user_pref("toolkit.telemetry.enabled", false); ## Instruction: firefox: Disable a few unused features ## Code After: user_pref("accessibility.typeaheadfind.flashBar", 0); user_pref("accessibility.typeaheadfind.prefillwithselection", true); user_pref("browser.backspace_action", 2); user_pref("browser.bookmarks.restore_default_bookmarks", false); user_pref("browser.newtab.url", "about:blank"); user_pref("browser.readinglist.enabled", false); user_pref("browser.search.suggest.enabled", false); user_pref("browser.selfsupport.url", ""); user_pref("browser.showQuitWarning", true); user_pref("browser.startup.homepage", "about:blank"); user_pref("browser.tabs.animate", false); user_pref("browser.tabs.closeWindowWithLastTab", false); user_pref("browser.tabs.warnOnClose", false); user_pref("datareporting.healthreport.uploadEnabled", false); user_pref("loop.enabled", false); user_pref("network.cookie.cookieBehavior", 3); user_pref("network.cookie.lifetimePolicy", 2); user_pref("network.http.referer.spoofSource", true); user_pref("network.http.referer.trimmingPolicy", 2); user_pref("network.http.referer.XOriginPolicy", 2); user_pref("readinglist.scheduler.enabled", false); user_pref("toolkit.telemetry.enabled", false);
cd145bf657a41a59d960a33014f19dc398256379
docker-compose.yml
docker-compose.yml
web: build: ./bin/web/php5-6/ links: - mysql - smtp mysql: image: mysql:5.6.23 ports: - "3307:3306" smtp: image: schickling/mailcatcher container_name: smtp-hipay-mg-latest ports: - "1095:1080"
web: build: ./bin/docker/php5-6/ dockerfile: ./bin/docker/php5-6/Dockerfile links: - mysql - smtp mysql: image: mysql:5.6.23 ports: - "3307:3306" smtp: image: schickling/mailcatcher container_name: smtp-hipay-mg-latest ports: - "1095:1080"
Rework PHP 5.4 and upgrade docker
Rework PHP 5.4 and upgrade docker
YAML
apache-2.0
hipay/hipay-fullservice-sdk-magento1,hipay/hipay-fullservice-sdk-magento1,hipay/hipay-fullservice-sdk-magento1,hipay/hipay-fullservice-sdk-magento1
yaml
## Code Before: web: build: ./bin/web/php5-6/ links: - mysql - smtp mysql: image: mysql:5.6.23 ports: - "3307:3306" smtp: image: schickling/mailcatcher container_name: smtp-hipay-mg-latest ports: - "1095:1080" ## Instruction: Rework PHP 5.4 and upgrade docker ## Code After: web: build: ./bin/docker/php5-6/ dockerfile: ./bin/docker/php5-6/Dockerfile links: - mysql - smtp mysql: image: mysql:5.6.23 ports: - "3307:3306" smtp: image: schickling/mailcatcher container_name: smtp-hipay-mg-latest ports: - "1095:1080"
0cfe56cef5f6a1af5073332a34569bdc1d89414c
.coco.yml
.coco.yml
:directories: - lib :excludes: - spec - lib/secretsharing/version.rb :single_line_report: false
:directories: - lib :excludes: - spec - lib/secretsharing/version.rb - lib/backports/bit_length.rb :single_line_report: false
Exclude bit_length backport from further code coverage checks.
Exclude bit_length backport from further code coverage checks.
YAML
apache-2.0
grempe/secretsharing
yaml
## Code Before: :directories: - lib :excludes: - spec - lib/secretsharing/version.rb :single_line_report: false ## Instruction: Exclude bit_length backport from further code coverage checks. ## Code After: :directories: - lib :excludes: - spec - lib/secretsharing/version.rb - lib/backports/bit_length.rb :single_line_report: false
45aa05367140c68de6b09efaee1fa6a72ee3a1ae
IdeaFight/Shuffle.elm
IdeaFight/Shuffle.elm
module IdeaFight.Shuffle exposing (shuffle) import Random exposing (Generator) extractValueHelper : List a -> Int -> List a -> ( a, List a ) extractValueHelper values index accumulator = case ( index, values ) of ( _, [] ) -> Debug.crash "Out of values to extract" ( 0, head :: tail ) -> ( head, List.append (List.reverse accumulator) tail ) ( _, head :: tail ) -> extractValueHelper tail (index - 1) <| head :: accumulator extractValue : List a -> Int -> ( a, List a ) extractValue values index = extractValueHelper values index [] shuffle : List a -> Generator (List a) shuffle values = case values of [] -> Random.map (\_ -> []) Random.bool values -> let randomIndexGenerator = Random.int 0 <| List.length values - 1 extractAndRecurse = \index -> let ( randomHead, remainder ) = extractValue values index remainderGen = shuffle remainder in Random.map (\randomTail -> randomHead :: randomTail) remainderGen in Random.andThen extractAndRecurse randomIndexGenerator
module IdeaFight.Shuffle exposing (shuffle) import Random exposing (Generator) extractValueHelper : a -> List a -> Int -> List a -> ( a, List a ) extractValueHelper first_value rest_values index accumulator = case ( index, rest_values ) of ( 0, _) -> ( first_value, List.append (List.reverse accumulator) rest_values ) ( _, []) -> ( first_value, List.reverse accumulator ) ( _, head :: tail ) -> extractValueHelper head tail (index - 1) <| first_value :: accumulator extractValue : a -> List a -> Int -> ( a, List a ) extractValue first_value rest_values index = extractValueHelper first_value rest_values index [] shuffle : List a -> Generator (List a) shuffle values = case values of [] -> Random.constant [] (first_value :: rest_values) -> let randomIndexGenerator = Random.int 0 <| List.length rest_values extractAndRecurse = \index -> let ( randomHead, remainder ) = extractValue first_value rest_values index remainderGen = shuffle remainder in Random.map (\randomTail -> randomHead :: randomTail) remainderGen in Random.andThen extractAndRecurse randomIndexGenerator
Rearrange types in shuffle to avoid crash
Rearrange types in shuffle to avoid crash Debug.crash was removed from Elm 0.19, so I needed to work around this. In reality, extractValueHelper and extractValue should never get passed empty lists, and the Debug.crash invocation was meant to make things typecheck in this case - so instead we can just use some type magic to require a non-empty list be passed
Elm
mit
hoelzro/idea-fight
elm
## Code Before: module IdeaFight.Shuffle exposing (shuffle) import Random exposing (Generator) extractValueHelper : List a -> Int -> List a -> ( a, List a ) extractValueHelper values index accumulator = case ( index, values ) of ( _, [] ) -> Debug.crash "Out of values to extract" ( 0, head :: tail ) -> ( head, List.append (List.reverse accumulator) tail ) ( _, head :: tail ) -> extractValueHelper tail (index - 1) <| head :: accumulator extractValue : List a -> Int -> ( a, List a ) extractValue values index = extractValueHelper values index [] shuffle : List a -> Generator (List a) shuffle values = case values of [] -> Random.map (\_ -> []) Random.bool values -> let randomIndexGenerator = Random.int 0 <| List.length values - 1 extractAndRecurse = \index -> let ( randomHead, remainder ) = extractValue values index remainderGen = shuffle remainder in Random.map (\randomTail -> randomHead :: randomTail) remainderGen in Random.andThen extractAndRecurse randomIndexGenerator ## Instruction: Rearrange types in shuffle to avoid crash Debug.crash was removed from Elm 0.19, so I needed to work around this. In reality, extractValueHelper and extractValue should never get passed empty lists, and the Debug.crash invocation was meant to make things typecheck in this case - so instead we can just use some type magic to require a non-empty list be passed ## Code After: module IdeaFight.Shuffle exposing (shuffle) import Random exposing (Generator) extractValueHelper : a -> List a -> Int -> List a -> ( a, List a ) extractValueHelper first_value rest_values index accumulator = case ( index, rest_values ) of ( 0, _) -> ( first_value, List.append (List.reverse accumulator) rest_values ) ( _, []) -> ( first_value, List.reverse accumulator ) ( _, head :: tail ) -> extractValueHelper head tail (index - 1) <| first_value :: accumulator extractValue : a -> List a -> Int -> ( a, List a ) extractValue first_value rest_values index = extractValueHelper first_value rest_values index [] shuffle : List a -> Generator (List a) shuffle values = case values of [] -> Random.constant [] (first_value :: rest_values) -> let randomIndexGenerator = Random.int 0 <| List.length rest_values extractAndRecurse = \index -> let ( randomHead, remainder ) = extractValue first_value rest_values index remainderGen = shuffle remainder in Random.map (\randomTail -> randomHead :: randomTail) remainderGen in Random.andThen extractAndRecurse randomIndexGenerator
ac1570f925e05ac09421f063c320dd2f1afd0f8b
README.md
README.md
DBC Hackathon Project [Live link][live] [live]: http://hack1n-slash.herokuapp.com/ ## Concept HACK1N-Slash is a typing demo that tracks a user's typing speed and accuracy. In order to practice typing in a user's language of choice, users can paste URLs from any project on github, and test their typing in that file format. When they complete the file or are done typing, the app displays details on typing speed and accuracy, including a chart of their most frequently missed characters. ## Take a Look Inside the App ![](public/demo.gif) ![](public/splash.png) ![](public/chart.png)
2nd Place Project for DBC's November Hackathon! Check it out on [Heroku](http://hack1n-slash.herokuapp.com/)! ## Concept HACK1N-Slash is a typing demo that tracks a user's typing speed and accuracy. In order to practice typing in a user's language of choice, users can paste URLs from any project on github, and test their typing in that file format. When they complete the file or are done typing, the app displays details on typing speed and accuracy, including a chart of their most frequently missed characters. ## Take a Look Inside the App ![](public/demo.gif) ![](public/splash.png) ![](public/chart.png) ##Technologies Used * Backend: Rails, PostgreSQL * Frontend: Javascript, jQuery, Chart.JS, HTML, CSS * Design: Photoshop ##User Stories * A user can type in or paste a GitHub URL to begin. * A user can select from a pre-existing category to begin. * A user can see where he/she is making mistakes. * A user can finish the typing excercise early by pressing the ESC button or clicking Done. * A user can see his/her most frequent incorrect keystrokes, WPM, etc. * A user can enter another URL or click on another category to begin typing again. ##Challenges We Faced * Event Delegation - We had to sort through the code a few times in order to find out where we had to halt our event listeners for key events to allow the rest of the page to function properly. * Rails Forms w/Partials - We used partials to dry out our code, but noticed that the type attribute of our forms would change after submitting them and navigating to a new page. We handled these by adding url and html attributes with specific values in order to overcome this. ##Next Steps * Refactor * Make calls to the GitHub API to provide an interface where users may navigate through repos to select files. * Implement OAuth to allow users to save their stats and challenge friends * Speed Ranks ##The Team * Team Lead: Harvey Ngo * Team Members: Adam Fluke, Chris Scott, Kevin Yan, Isaac (Jose) Taveras, Noah Wiener * Idea Credit: Chris Scott ##Run HACK1N-Slash Locally: 1. Clone the repo - 'git clone https://github.com/hdngo/TeamHACKIN.git' 2. Throw up a server by running 'python -m SimpleHTTPServer'
Update readme to include full details.
Update readme to include full details. MORE DESCRIPTIVE
Markdown
mit
hdngo/TeamHACKIN,hdngo/TeamHACKIN,hdngo/TeamHACKIN
markdown
## Code Before: DBC Hackathon Project [Live link][live] [live]: http://hack1n-slash.herokuapp.com/ ## Concept HACK1N-Slash is a typing demo that tracks a user's typing speed and accuracy. In order to practice typing in a user's language of choice, users can paste URLs from any project on github, and test their typing in that file format. When they complete the file or are done typing, the app displays details on typing speed and accuracy, including a chart of their most frequently missed characters. ## Take a Look Inside the App ![](public/demo.gif) ![](public/splash.png) ![](public/chart.png) ## Instruction: Update readme to include full details. MORE DESCRIPTIVE ## Code After: 2nd Place Project for DBC's November Hackathon! Check it out on [Heroku](http://hack1n-slash.herokuapp.com/)! ## Concept HACK1N-Slash is a typing demo that tracks a user's typing speed and accuracy. In order to practice typing in a user's language of choice, users can paste URLs from any project on github, and test their typing in that file format. When they complete the file or are done typing, the app displays details on typing speed and accuracy, including a chart of their most frequently missed characters. ## Take a Look Inside the App ![](public/demo.gif) ![](public/splash.png) ![](public/chart.png) ##Technologies Used * Backend: Rails, PostgreSQL * Frontend: Javascript, jQuery, Chart.JS, HTML, CSS * Design: Photoshop ##User Stories * A user can type in or paste a GitHub URL to begin. * A user can select from a pre-existing category to begin. * A user can see where he/she is making mistakes. * A user can finish the typing excercise early by pressing the ESC button or clicking Done. * A user can see his/her most frequent incorrect keystrokes, WPM, etc. * A user can enter another URL or click on another category to begin typing again. ##Challenges We Faced * Event Delegation - We had to sort through the code a few times in order to find out where we had to halt our event listeners for key events to allow the rest of the page to function properly. * Rails Forms w/Partials - We used partials to dry out our code, but noticed that the type attribute of our forms would change after submitting them and navigating to a new page. We handled these by adding url and html attributes with specific values in order to overcome this. ##Next Steps * Refactor * Make calls to the GitHub API to provide an interface where users may navigate through repos to select files. * Implement OAuth to allow users to save their stats and challenge friends * Speed Ranks ##The Team * Team Lead: Harvey Ngo * Team Members: Adam Fluke, Chris Scott, Kevin Yan, Isaac (Jose) Taveras, Noah Wiener * Idea Credit: Chris Scott ##Run HACK1N-Slash Locally: 1. Clone the repo - 'git clone https://github.com/hdngo/TeamHACKIN.git' 2. Throw up a server by running 'python -m SimpleHTTPServer'
ac931b6cbe658281fbdd5aa0864ad052cfc9194e
tests/Domain/Stock/StockTest.php
tests/Domain/Stock/StockTest.php
<?php namespace MageTitans\Workshop\Domain\Stock; use PHPUnit\Framework\TestCase; final class StockTest extends TestCase { public function testGetInStock() { $stock = new Stock( false, 0 ); $this->assertFalse($stock->getInStock()); } }
<?php namespace MageTitans\Workshop\Domain\Stock; use PHPUnit\Framework\TestCase; final class StockTest extends TestCase { /** * @dataProvider getInStockProvider */ public function testGetInStock($inStock, $expectedInStock) { $stock = new Stock( $inStock, 100 ); $this->assertEquals($expectedInStock, $stock->getInStock()); } public function getInStockProvider() { return [ [true, true], [false, false], [1, 1], [0, 0] ]; } /** * @dataProvider getStockLevelProvider */ public function testGetStockLevel($stockLevel, $expectedStockLevel) { $stock = new Stock( true, $stockLevel ); $this->assertEquals($expectedStockLevel, $stock->getStockLevel()); } public function getStockLevelProvider() { return [ [300, 300], [20, 20], [0, 0], [5, 5] ]; } }
Test both functions in the stock object
Test both functions in the stock object
PHP
mit
dmanners/mage-titans-it
php
## Code Before: <?php namespace MageTitans\Workshop\Domain\Stock; use PHPUnit\Framework\TestCase; final class StockTest extends TestCase { public function testGetInStock() { $stock = new Stock( false, 0 ); $this->assertFalse($stock->getInStock()); } } ## Instruction: Test both functions in the stock object ## Code After: <?php namespace MageTitans\Workshop\Domain\Stock; use PHPUnit\Framework\TestCase; final class StockTest extends TestCase { /** * @dataProvider getInStockProvider */ public function testGetInStock($inStock, $expectedInStock) { $stock = new Stock( $inStock, 100 ); $this->assertEquals($expectedInStock, $stock->getInStock()); } public function getInStockProvider() { return [ [true, true], [false, false], [1, 1], [0, 0] ]; } /** * @dataProvider getStockLevelProvider */ public function testGetStockLevel($stockLevel, $expectedStockLevel) { $stock = new Stock( true, $stockLevel ); $this->assertEquals($expectedStockLevel, $stock->getStockLevel()); } public function getStockLevelProvider() { return [ [300, 300], [20, 20], [0, 0], [5, 5] ]; } }
ab13f35fd038925b57bce799e9397ae7e69cdf93
README.md
README.md
Howl ==== [![Build Status](https://travis-ci.org/stevebob/howl.svg?branch=master)](https://travis-ci.org/stevebob/howl)
Howl ==== ## Build Status ### Unix [![Travis Status](https://travis-ci.org/stevebob/howl.svg?branch=master)](https://travis-ci.org/stevebob/howl) ### Windows [![Appveyor Status](https://ci.appveyor.com/api/projects/status/github/stevebob/howl?branch=master&svg=true)](https://ci.appveyor.com/project/stevebob/howl)
Add appveyor status to readme
Add appveyor status to readme
Markdown
mit
stevebob/apocalypse-post,stevebob/apocalypse-post
markdown
## Code Before: Howl ==== [![Build Status](https://travis-ci.org/stevebob/howl.svg?branch=master)](https://travis-ci.org/stevebob/howl) ## Instruction: Add appveyor status to readme ## Code After: Howl ==== ## Build Status ### Unix [![Travis Status](https://travis-ci.org/stevebob/howl.svg?branch=master)](https://travis-ci.org/stevebob/howl) ### Windows [![Appveyor Status](https://ci.appveyor.com/api/projects/status/github/stevebob/howl?branch=master&svg=true)](https://ci.appveyor.com/project/stevebob/howl)
19f8603f2421fbdd09b3c6b7187f227a9ef85c56
app/controllers/crowdblog/admin/transitions_controller.rb
app/controllers/crowdblog/admin/transitions_controller.rb
module Crowdblog module Admin class TransitionsController < Crowdblog::Admin::BaseController respond_to :json before_filter :load_post, only: [:create] def create namespace = '_as_publisher' if current_user.is_publisher? @post.send "#{params[:transition]}#{namespace}" respond_with @post, location: admin_post_url(@post) end private def load_post post = Post.scoped_for(current_user).find(params[:id]) @post = PostPresenter.new(post, current_user) end end end end
module Crowdblog module Admin class TransitionsController < Crowdblog::Admin::BaseController respond_to :json before_filter :load_post, only: [:create] cache_sweeper :post_sweeper def create namespace = '_as_publisher' if current_user.is_publisher? @post.send "#{params[:transition]}#{namespace}" respond_with @post, location: admin_post_url(@post) end private def load_post post = Post.scoped_for(current_user).find(params[:id]) @post = PostPresenter.new(post, current_user) end end end end
Fix post cache when doing state transitions
Fix post cache when doing state transitions
Ruby
mit
crowdint/crowdblog,crowdint/crowdblog,chukitow/crowdblog,chukitow/crowdblog,chukitow/crowdblog,crowdint/crowdblog,chukitow/crowdblog,crowdint/crowdblog
ruby
## Code Before: module Crowdblog module Admin class TransitionsController < Crowdblog::Admin::BaseController respond_to :json before_filter :load_post, only: [:create] def create namespace = '_as_publisher' if current_user.is_publisher? @post.send "#{params[:transition]}#{namespace}" respond_with @post, location: admin_post_url(@post) end private def load_post post = Post.scoped_for(current_user).find(params[:id]) @post = PostPresenter.new(post, current_user) end end end end ## Instruction: Fix post cache when doing state transitions ## Code After: module Crowdblog module Admin class TransitionsController < Crowdblog::Admin::BaseController respond_to :json before_filter :load_post, only: [:create] cache_sweeper :post_sweeper def create namespace = '_as_publisher' if current_user.is_publisher? @post.send "#{params[:transition]}#{namespace}" respond_with @post, location: admin_post_url(@post) end private def load_post post = Post.scoped_for(current_user).find(params[:id]) @post = PostPresenter.new(post, current_user) end end end end
0131a25352bb1ebfe5bc08e660dcfea0a04f2667
doc/commands.txt
doc/commands.txt
/pgp keyId passphrase /add jid /del jid /set online|away|offline|invisible|not-available[|...] /msg jid text /pwd password /log quiet|verbose|debug
/pgp keyId passphrase /add jid /del jid /set online|away|offline|invisible|not-available[|...] /msg jid text /pwd password
Remove setting logging at runtime. (Use compile flags instead.)
Remove setting logging at runtime. (Use compile flags instead.)
Text
isc
def-/sxc
text
## Code Before: /pgp keyId passphrase /add jid /del jid /set online|away|offline|invisible|not-available[|...] /msg jid text /pwd password /log quiet|verbose|debug ## Instruction: Remove setting logging at runtime. (Use compile flags instead.) ## Code After: /pgp keyId passphrase /add jid /del jid /set online|away|offline|invisible|not-available[|...] /msg jid text /pwd password
98bdb678a9092c5c19bc2b379cca74a2ed33c457
libqtile/layout/subverttile.py
libqtile/layout/subverttile.py
from base import SubLayout, Rect from sublayouts import HorizontalStack from subtile import SubTile class SubVertTile(SubTile): arrangements = ["top", "bottom"] def _init_sublayouts(self): ratio = self.ratio expand = self.expand master_windows = self.master_windows arrangement = self.arrangement class MasterWindows(HorizontalStack): def filter(self, client): return self.index_of(client) < master_windows def request_rectangle(self, r, windows): return (r, Rect()) class SlaveWindows(HorizontalStack): def filter(self, client): return self.index_of(client) >= master_windows def request_rectangle(self, r, windows): if self.autohide and not windows: return (Rect(), r) else: if arrangement == "top": rmaster, rslave = r.split_horizontal(ratio=ratio) else: rslave, rmaster = r.split_horizontal(ratio=(1-ratio)) return (rslave, rmaster) self.sublayouts.append(SlaveWindows(self.clientStack, self.theme, parent=self, autohide=self.expand ) ) self.sublayouts.append(MasterWindows(self.clientStack, self.theme, parent=self, autohide=self.expand ) )
from base import SubLayout, Rect from sublayouts import HorizontalStack from subtile import SubTile class SubVertTile(SubTile): arrangements = ["top", "bottom"] def _init_sublayouts(self): class MasterWindows(HorizontalStack): def filter(self, client): return self.index_of(client) < self.parent.master_windows def request_rectangle(self, r, windows): return (r, Rect()) class SlaveWindows(HorizontalStack): def filter(self, client): return self.index_of(client) >= self.parent.master_windows def request_rectangle(self, r, windows): if self.autohide and not windows: return (Rect(), r) else: if self.parent.arrangement == "top": rmaster, rslave = r.split_horizontal(ratio=self.parent.ratio) else: rslave, rmaster = r.split_horizontal(ratio=(1-self.parent.ratio)) return (rslave, rmaster) self.sublayouts.append(SlaveWindows(self.clientStack, self.theme, parent=self, autohide=self.expand ) ) self.sublayouts.append(MasterWindows(self.clientStack, self.theme, parent=self, autohide=self.expand ) )
Refactor SubVertTile - make sublayout use the parents' variables
Refactor SubVertTile - make sublayout use the parents' variables
Python
mit
rxcomm/qtile,de-vri-es/qtile,EndPointCorp/qtile,zordsdavini/qtile,bavardage/qtile,nxnfufunezn/qtile,encukou/qtile,andrewyoung1991/qtile,ramnes/qtile,himaaaatti/qtile,de-vri-es/qtile,frostidaho/qtile,encukou/qtile,andrewyoung1991/qtile,w1ndy/qtile,frostidaho/qtile,nxnfufunezn/qtile,StephenBarnes/qtile,farebord/qtile,kopchik/qtile,rxcomm/qtile,jdowner/qtile,flacjacket/qtile,w1ndy/qtile,cortesi/qtile,aniruddhkanojia/qtile,qtile/qtile,himaaaatti/qtile,ramnes/qtile,xplv/qtile,flacjacket/qtile,soulchainer/qtile,kynikos/qtile,dequis/qtile,cortesi/qtile,jdowner/qtile,kseistrup/qtile,kiniou/qtile,apinsard/qtile,kiniou/qtile,kynikos/qtile,qtile/qtile,kopchik/qtile,kseistrup/qtile,tych0/qtile,tych0/qtile,apinsard/qtile,xplv/qtile,zordsdavini/qtile,soulchainer/qtile,dequis/qtile,farebord/qtile,aniruddhkanojia/qtile,EndPointCorp/qtile,StephenBarnes/qtile
python
## Code Before: from base import SubLayout, Rect from sublayouts import HorizontalStack from subtile import SubTile class SubVertTile(SubTile): arrangements = ["top", "bottom"] def _init_sublayouts(self): ratio = self.ratio expand = self.expand master_windows = self.master_windows arrangement = self.arrangement class MasterWindows(HorizontalStack): def filter(self, client): return self.index_of(client) < master_windows def request_rectangle(self, r, windows): return (r, Rect()) class SlaveWindows(HorizontalStack): def filter(self, client): return self.index_of(client) >= master_windows def request_rectangle(self, r, windows): if self.autohide and not windows: return (Rect(), r) else: if arrangement == "top": rmaster, rslave = r.split_horizontal(ratio=ratio) else: rslave, rmaster = r.split_horizontal(ratio=(1-ratio)) return (rslave, rmaster) self.sublayouts.append(SlaveWindows(self.clientStack, self.theme, parent=self, autohide=self.expand ) ) self.sublayouts.append(MasterWindows(self.clientStack, self.theme, parent=self, autohide=self.expand ) ) ## Instruction: Refactor SubVertTile - make sublayout use the parents' variables ## Code After: from base import SubLayout, Rect from sublayouts import HorizontalStack from subtile import SubTile class SubVertTile(SubTile): arrangements = ["top", "bottom"] def _init_sublayouts(self): class MasterWindows(HorizontalStack): def filter(self, client): return self.index_of(client) < self.parent.master_windows def request_rectangle(self, r, windows): return (r, Rect()) class SlaveWindows(HorizontalStack): def filter(self, client): return self.index_of(client) >= self.parent.master_windows def request_rectangle(self, r, windows): if self.autohide and not windows: return (Rect(), r) else: if self.parent.arrangement == "top": rmaster, rslave = r.split_horizontal(ratio=self.parent.ratio) else: rslave, rmaster = r.split_horizontal(ratio=(1-self.parent.ratio)) return (rslave, rmaster) self.sublayouts.append(SlaveWindows(self.clientStack, self.theme, parent=self, autohide=self.expand ) ) self.sublayouts.append(MasterWindows(self.clientStack, self.theme, parent=self, autohide=self.expand ) )
bd74c8f3a6bb3b654029a48aba6ffc627379022e
README.md
README.md
Andriod app to help you training in archery. At the moment it allows the user to: - Load free training information - Create tournament information - Do retentions Check [Google Play](https://play.google.com/store/apps/details?id=ar.com.tzulberti.archerytraining) to get the application. # Assets - The target image was taken from Wikipedia. By Alberto Barbati - Own work, CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=828148 - Icons taken from FlatIcon - Logo image given by Aixa Rodriguez Avendaño
<h1 align=center> <img src="Logo/horizontal.png" width=50%> </h1> Andriod app to help you training in archery. At the moment it allows the user to: - Load free training information - Create tournament information - Do retentions Check [Google Play](https://play.google.com/store/apps/details?id=ar.com.tzulberti.archerytraining) to get the application. # Assets - The target image was taken from Wikipedia. By Alberto Barbati - Own work, CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=828148 - Icons taken from FlatIcon - Logo image given by Aixa Rodriguez Avendaño - New Icons/Logo by zularizal
Add logo and my name to readme
Add logo and my name to readme
Markdown
mit
tzulberti/archery-training
markdown
## Code Before: Andriod app to help you training in archery. At the moment it allows the user to: - Load free training information - Create tournament information - Do retentions Check [Google Play](https://play.google.com/store/apps/details?id=ar.com.tzulberti.archerytraining) to get the application. # Assets - The target image was taken from Wikipedia. By Alberto Barbati - Own work, CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=828148 - Icons taken from FlatIcon - Logo image given by Aixa Rodriguez Avendaño ## Instruction: Add logo and my name to readme ## Code After: <h1 align=center> <img src="Logo/horizontal.png" width=50%> </h1> Andriod app to help you training in archery. At the moment it allows the user to: - Load free training information - Create tournament information - Do retentions Check [Google Play](https://play.google.com/store/apps/details?id=ar.com.tzulberti.archerytraining) to get the application. # Assets - The target image was taken from Wikipedia. By Alberto Barbati - Own work, CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=828148 - Icons taken from FlatIcon - Logo image given by Aixa Rodriguez Avendaño - New Icons/Logo by zularizal
17090aae3b2dc292bc0aa42cb53371f2feb29183
library/src/com/twotoasters/jazzylistview/effects/FadeEffect.java
library/src/com/twotoasters/jazzylistview/effects/FadeEffect.java
package com.twotoasters.jazzylistview.effects; import android.view.View; import com.nineoldandroids.view.ViewHelper; import com.nineoldandroids.view.ViewPropertyAnimator; import com.twotoasters.jazzylistview.JazzyEffect; import com.twotoasters.jazzylistview.JazzyListView; public class FadeEffect implements JazzyEffect { private static final int DURATION_MULTIPLIER = 5; @Override public void initView(View item, int position, int scrollDirection) { ViewHelper.setAlpha(item, JazzyListView.TRANSPARENT); } @Override public void setupAnimation(View item, int position, int scrollDirection, ViewPropertyAnimator animator) { animator.setDuration(animator.getDuration() * JazzyListView.DURATION * DURATION_MULTIPLIER); animator.alpha(JazzyListView.OPAQUE); } }
package com.twotoasters.jazzylistview.effects; import android.view.View; import com.nineoldandroids.view.ViewHelper; import com.nineoldandroids.view.ViewPropertyAnimator; import com.twotoasters.jazzylistview.JazzyEffect; import com.twotoasters.jazzylistview.JazzyListView; public class FadeEffect implements JazzyEffect { private static final int DURATION_MULTIPLIER = 5; @Override public void initView(View item, int position, int scrollDirection) { ViewHelper.setAlpha(item, JazzyListView.TRANSPARENT); } @Override public void setupAnimation(View item, int position, int scrollDirection, ViewPropertyAnimator animator) { animator.setDuration(JazzyListView.DURATION * DURATION_MULTIPLIER); animator.alpha(JazzyListView.OPAQUE); } }
Fix error while factoring out fade effect
Fix error while factoring out fade effect
Java
apache-2.0
hgl888/JazzyListView,qingsong-xu/JazzyListView,Tok11313/MySimoneRepository,xunyixiangchao/callCar,chengkaizone/JazzyListView,lxhxhlw/JazzyListView,hanhailong/JazzyListView,ukri82/JazzyListView,twotoasters/JazzyListView,yincs/JazzyListView,ajju4455/JazzyListView,java02014/JazzyListView,jaohoang/JazzyListView
java
## Code Before: package com.twotoasters.jazzylistview.effects; import android.view.View; import com.nineoldandroids.view.ViewHelper; import com.nineoldandroids.view.ViewPropertyAnimator; import com.twotoasters.jazzylistview.JazzyEffect; import com.twotoasters.jazzylistview.JazzyListView; public class FadeEffect implements JazzyEffect { private static final int DURATION_MULTIPLIER = 5; @Override public void initView(View item, int position, int scrollDirection) { ViewHelper.setAlpha(item, JazzyListView.TRANSPARENT); } @Override public void setupAnimation(View item, int position, int scrollDirection, ViewPropertyAnimator animator) { animator.setDuration(animator.getDuration() * JazzyListView.DURATION * DURATION_MULTIPLIER); animator.alpha(JazzyListView.OPAQUE); } } ## Instruction: Fix error while factoring out fade effect ## Code After: package com.twotoasters.jazzylistview.effects; import android.view.View; import com.nineoldandroids.view.ViewHelper; import com.nineoldandroids.view.ViewPropertyAnimator; import com.twotoasters.jazzylistview.JazzyEffect; import com.twotoasters.jazzylistview.JazzyListView; public class FadeEffect implements JazzyEffect { private static final int DURATION_MULTIPLIER = 5; @Override public void initView(View item, int position, int scrollDirection) { ViewHelper.setAlpha(item, JazzyListView.TRANSPARENT); } @Override public void setupAnimation(View item, int position, int scrollDirection, ViewPropertyAnimator animator) { animator.setDuration(JazzyListView.DURATION * DURATION_MULTIPLIER); animator.alpha(JazzyListView.OPAQUE); } }
458fd49fdf73f5cc338c58b1e741fde42f2f7251
exampleapp/models.py
exampleapp/models.py
from galleries.models import Gallery, ImageModel from django.db import models from imagekit.models import ImageSpec from imagekit.processors.resize import Fit class Photo(ImageModel): thumbnail = ImageSpec([Fit(50, 50)]) full = ImageSpec([Fit(400, 200)]) caption = models.CharField(max_length=100) class PortfolioImage(ImageModel): thumbnail = ImageSpec([Fit(70, 40)]) class Video(models.Model): title = models.CharField(max_length=50) video = models.FileField(upload_to='galleries/video/video') thumbnail = models.ImageField(upload_to='galleries/video/thumbnail', blank=True) def __unicode__(self): return self.title class Meta: ordering = ['title'] class PhotoAlbum(Gallery): class GalleryMeta: member_models = [Photo] class Meta: verbose_name = 'Photo Album' class Portfolio(Gallery): class GalleryMeta: member_models = [Video] membership_class = 'PortfolioMembership' class PortfolioMembership(Portfolio.BaseMembership): extra_field = models.CharField(max_length=10)
from galleries.models import Gallery, ImageModel from django.db import models from imagekit.models import ImageSpec from imagekit.processors import ResizeToFit class Photo(ImageModel): thumbnail = ImageSpec([ResizeToFit(50, 50)]) full = ImageSpec([ResizeToFit(400, 200)]) caption = models.CharField(max_length=100) class PortfolioImage(ImageModel): thumbnail = ImageSpec([ResizeToFit(70, 40)]) class Video(models.Model): title = models.CharField(max_length=50) video = models.FileField(upload_to='galleries/video/video') thumbnail = models.ImageField(upload_to='galleries/video/thumbnail', blank=True) def __unicode__(self): return self.title class Meta: ordering = ['title'] class PhotoAlbum(Gallery): class GalleryMeta: member_models = [Photo] class Meta: verbose_name = 'Photo Album' class Portfolio(Gallery): class GalleryMeta: member_models = [Video] membership_class = 'PortfolioMembership' class PortfolioMembership(Portfolio.BaseMembership): extra_field = models.CharField(max_length=10)
Use (not so) new processor class names
Use (not so) new processor class names
Python
mit
hzdg/django-galleries,hzdg/django-galleries,hzdg/django-galleries
python
## Code Before: from galleries.models import Gallery, ImageModel from django.db import models from imagekit.models import ImageSpec from imagekit.processors.resize import Fit class Photo(ImageModel): thumbnail = ImageSpec([Fit(50, 50)]) full = ImageSpec([Fit(400, 200)]) caption = models.CharField(max_length=100) class PortfolioImage(ImageModel): thumbnail = ImageSpec([Fit(70, 40)]) class Video(models.Model): title = models.CharField(max_length=50) video = models.FileField(upload_to='galleries/video/video') thumbnail = models.ImageField(upload_to='galleries/video/thumbnail', blank=True) def __unicode__(self): return self.title class Meta: ordering = ['title'] class PhotoAlbum(Gallery): class GalleryMeta: member_models = [Photo] class Meta: verbose_name = 'Photo Album' class Portfolio(Gallery): class GalleryMeta: member_models = [Video] membership_class = 'PortfolioMembership' class PortfolioMembership(Portfolio.BaseMembership): extra_field = models.CharField(max_length=10) ## Instruction: Use (not so) new processor class names ## Code After: from galleries.models import Gallery, ImageModel from django.db import models from imagekit.models import ImageSpec from imagekit.processors import ResizeToFit class Photo(ImageModel): thumbnail = ImageSpec([ResizeToFit(50, 50)]) full = ImageSpec([ResizeToFit(400, 200)]) caption = models.CharField(max_length=100) class PortfolioImage(ImageModel): thumbnail = ImageSpec([ResizeToFit(70, 40)]) class Video(models.Model): title = models.CharField(max_length=50) video = models.FileField(upload_to='galleries/video/video') thumbnail = models.ImageField(upload_to='galleries/video/thumbnail', blank=True) def __unicode__(self): return self.title class Meta: ordering = ['title'] class PhotoAlbum(Gallery): class GalleryMeta: member_models = [Photo] class Meta: verbose_name = 'Photo Album' class Portfolio(Gallery): class GalleryMeta: member_models = [Video] membership_class = 'PortfolioMembership' class PortfolioMembership(Portfolio.BaseMembership): extra_field = models.CharField(max_length=10)
864ca3d532ac17f35821ff6a99037e5a67247bb0
resources/js/progress_graph.js
resources/js/progress_graph.js
var PHRAGILE = PHRAGILE || {}; (function (PHRAGILE) { /** * Same as Graph but also renders graph areas under the line. * ProgressGraph will be limited to dates <= today. * @param {Object[]} data * @param {string} cssID - Its CSS identifier (used as class or id) * @param {string} label - Description text for the graph which will show in the label that appears when hovering * @constructor */ PHRAGILE.ProgressGraph = function (data, cssID, label) { data = data.filter(function (d) { var $snapshotDate = $('#snapshot-date'), filterDate = $snapshotDate.length > 0 ? Date.parse($snapshotDate.text()) : new Date(); return d.day <= filterDate; }); PHRAGILE.Graph.call(this, data, cssID, label); this.addGraphArea = function () { this.plane.append('path') .datum(this.data) .attr('class', 'graph-area') .attr('d', d3.svg.area() .x(PHRAGILE.Helpers.xOfDay) .y0(PHRAGILE.coordinateSystem.getY()(0)) .y1(PHRAGILE.Helpers.yOfPoints)); } }; PHRAGILE.ProgressGraph.prototype = new PHRAGILE.Graph; PHRAGILE.ProgressGraph.prototype.render = function () { PHRAGILE.Graph.prototype.render.call(this); this.addGraphArea(); }; })(PHRAGILE);
var PHRAGILE = PHRAGILE || {}; (function (PHRAGILE) { /** * Same as Graph but also renders graph areas under the line. * ProgressGraph will be limited to dates <= today. * @param {Object[]} data * @param {string} cssID - Its CSS identifier (used as class or id) * @param {string} label - Description text for the graph which will show in the label that appears when hovering * @constructor */ PHRAGILE.ProgressGraph = function (data, cssID, label) { data = data.filter(function (d) { var $snapshotDate = $('#snapshot-date'), filterDate = $snapshotDate.length > 0 ? Date.parse($snapshotDate.text().replace(' ', 'T')) : new Date(); return d.day <= filterDate; }); PHRAGILE.Graph.call(this, data, cssID, label); this.addGraphArea = function () { this.plane.append('path') .datum(this.data) .attr('class', 'graph-area') .attr('d', d3.svg.area() .x(PHRAGILE.Helpers.xOfDay) .y0(PHRAGILE.coordinateSystem.getY()(0)) .y1(PHRAGILE.Helpers.yOfPoints)); } }; PHRAGILE.ProgressGraph.prototype = new PHRAGILE.Graph; PHRAGILE.ProgressGraph.prototype.render = function () { PHRAGILE.Graph.prototype.render.call(this); this.addGraphArea(); }; })(PHRAGILE);
Convert snapshot date to format complying with ISO 8601
Convert snapshot date to format complying with ISO 8601
JavaScript
apache-2.0
christopher-johnson/phabricator,christopher-johnson/phabricator,christopher-johnson/phabricator,christopher-johnson/phabricator,christopher-johnson/phabricator
javascript
## Code Before: var PHRAGILE = PHRAGILE || {}; (function (PHRAGILE) { /** * Same as Graph but also renders graph areas under the line. * ProgressGraph will be limited to dates <= today. * @param {Object[]} data * @param {string} cssID - Its CSS identifier (used as class or id) * @param {string} label - Description text for the graph which will show in the label that appears when hovering * @constructor */ PHRAGILE.ProgressGraph = function (data, cssID, label) { data = data.filter(function (d) { var $snapshotDate = $('#snapshot-date'), filterDate = $snapshotDate.length > 0 ? Date.parse($snapshotDate.text()) : new Date(); return d.day <= filterDate; }); PHRAGILE.Graph.call(this, data, cssID, label); this.addGraphArea = function () { this.plane.append('path') .datum(this.data) .attr('class', 'graph-area') .attr('d', d3.svg.area() .x(PHRAGILE.Helpers.xOfDay) .y0(PHRAGILE.coordinateSystem.getY()(0)) .y1(PHRAGILE.Helpers.yOfPoints)); } }; PHRAGILE.ProgressGraph.prototype = new PHRAGILE.Graph; PHRAGILE.ProgressGraph.prototype.render = function () { PHRAGILE.Graph.prototype.render.call(this); this.addGraphArea(); }; })(PHRAGILE); ## Instruction: Convert snapshot date to format complying with ISO 8601 ## Code After: var PHRAGILE = PHRAGILE || {}; (function (PHRAGILE) { /** * Same as Graph but also renders graph areas under the line. * ProgressGraph will be limited to dates <= today. * @param {Object[]} data * @param {string} cssID - Its CSS identifier (used as class or id) * @param {string} label - Description text for the graph which will show in the label that appears when hovering * @constructor */ PHRAGILE.ProgressGraph = function (data, cssID, label) { data = data.filter(function (d) { var $snapshotDate = $('#snapshot-date'), filterDate = $snapshotDate.length > 0 ? Date.parse($snapshotDate.text().replace(' ', 'T')) : new Date(); return d.day <= filterDate; }); PHRAGILE.Graph.call(this, data, cssID, label); this.addGraphArea = function () { this.plane.append('path') .datum(this.data) .attr('class', 'graph-area') .attr('d', d3.svg.area() .x(PHRAGILE.Helpers.xOfDay) .y0(PHRAGILE.coordinateSystem.getY()(0)) .y1(PHRAGILE.Helpers.yOfPoints)); } }; PHRAGILE.ProgressGraph.prototype = new PHRAGILE.Graph; PHRAGILE.ProgressGraph.prototype.render = function () { PHRAGILE.Graph.prototype.render.call(this); this.addGraphArea(); }; })(PHRAGILE);
ad8b7d8f1203e5d369e68842b052043e154507af
app/views/snapshots/_status_block.html.haml
app/views/snapshots/_status_block.html.haml
.snapshot-status-block %table.table %tr %th %abbr.initialism{ title: 'Uniform Resource Locator' } URL %td = link_to simplified_url(@snapshot.url.address), @snapshot.url.address, class: 'url-multiline' %tr %th Viewport %td= @snapshot.viewport %tr %th When %td = time_tag @snapshot.created_at do = time_ago_in_words(@snapshot.created_at) + ' ago' %tr %th Status %td= snapshot_status(@snapshot) .snapshot-buttons - if @snapshot.under_review? || @snapshot.accepted? || @snapshot.rejected? = form_tag accept_snapshot_path(@snapshot), data: { replace: '.snapshot-status-block' }, method: :post do %button.btn{ disabled: @snapshot.accepted? } %span.snapshot-button-enabled Accept %span.snapshot-button-disabled Accepted = form_tag reject_snapshot_path(@snapshot), data: { replace: '.snapshot-status-block' }, method: :post do %button.btn{ disabled: @snapshot.rejected? } %span.snapshot-button-enabled Reject %span.snapshot-button-disabled Rejected = button_to 'Delete', @snapshot, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'
.snapshot-status-block %table.table %tr %th %abbr.initialism{ title: 'Uniform Resource Locator' } URL %td = link_to simplified_url(@snapshot.url.address), @snapshot.url.address, class: 'url-multiline' %tr %th Viewport %td= @snapshot.viewport %tr %th When %td = time_tag @snapshot.created_at do = time_ago_in_words(@snapshot.created_at) + ' ago' %tr %th Status %td= snapshot_status(@snapshot) .snapshot-buttons - if @snapshot.under_review? || @snapshot.accepted? || @snapshot.rejected? = form_tag accept_snapshot_path(@snapshot), data: { replace: '.snapshot-status-block' }, method: :post do %button.btn{ disabled: @snapshot.accepted?, class: ('btn-success' if @snapshot.accepted?) } %i.glyphicon.glyphicon-ok-sign %span.snapshot-button-enabled Accept %span.snapshot-button-disabled Accepted = form_tag reject_snapshot_path(@snapshot), data: { replace: '.snapshot-status-block' }, method: :post do %button.btn{ disabled: @snapshot.rejected?, class: ('btn-danger' if @snapshot.rejected?)} %i.glyphicon.glyphicon-remove-sign %span.snapshot-button-enabled Reject %span.snapshot-button-disabled Rejected = button_to 'Delete', @snapshot, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'
Improve styling of Accept/Reject buttons
Improve styling of Accept/Reject buttons By adding an icon and turning the buttons green/red depending on what state they are in, we make it easier to quickly spot what state the snapshot is in.
Haml
mit
diffux/diffux,diffux/diffux,kalw/diffux,kalw/diffux,kalw/diffux,diffux/diffux
haml
## Code Before: .snapshot-status-block %table.table %tr %th %abbr.initialism{ title: 'Uniform Resource Locator' } URL %td = link_to simplified_url(@snapshot.url.address), @snapshot.url.address, class: 'url-multiline' %tr %th Viewport %td= @snapshot.viewport %tr %th When %td = time_tag @snapshot.created_at do = time_ago_in_words(@snapshot.created_at) + ' ago' %tr %th Status %td= snapshot_status(@snapshot) .snapshot-buttons - if @snapshot.under_review? || @snapshot.accepted? || @snapshot.rejected? = form_tag accept_snapshot_path(@snapshot), data: { replace: '.snapshot-status-block' }, method: :post do %button.btn{ disabled: @snapshot.accepted? } %span.snapshot-button-enabled Accept %span.snapshot-button-disabled Accepted = form_tag reject_snapshot_path(@snapshot), data: { replace: '.snapshot-status-block' }, method: :post do %button.btn{ disabled: @snapshot.rejected? } %span.snapshot-button-enabled Reject %span.snapshot-button-disabled Rejected = button_to 'Delete', @snapshot, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' ## Instruction: Improve styling of Accept/Reject buttons By adding an icon and turning the buttons green/red depending on what state they are in, we make it easier to quickly spot what state the snapshot is in. ## Code After: .snapshot-status-block %table.table %tr %th %abbr.initialism{ title: 'Uniform Resource Locator' } URL %td = link_to simplified_url(@snapshot.url.address), @snapshot.url.address, class: 'url-multiline' %tr %th Viewport %td= @snapshot.viewport %tr %th When %td = time_tag @snapshot.created_at do = time_ago_in_words(@snapshot.created_at) + ' ago' %tr %th Status %td= snapshot_status(@snapshot) .snapshot-buttons - if @snapshot.under_review? || @snapshot.accepted? || @snapshot.rejected? = form_tag accept_snapshot_path(@snapshot), data: { replace: '.snapshot-status-block' }, method: :post do %button.btn{ disabled: @snapshot.accepted?, class: ('btn-success' if @snapshot.accepted?) } %i.glyphicon.glyphicon-ok-sign %span.snapshot-button-enabled Accept %span.snapshot-button-disabled Accepted = form_tag reject_snapshot_path(@snapshot), data: { replace: '.snapshot-status-block' }, method: :post do %button.btn{ disabled: @snapshot.rejected?, class: ('btn-danger' if @snapshot.rejected?)} %i.glyphicon.glyphicon-remove-sign %span.snapshot-button-enabled Reject %span.snapshot-button-disabled Rejected = button_to 'Delete', @snapshot, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger'
fe834410e60a916d98c3252d7dd178139e6c00b8
pystan/windows_setup.patch
pystan/windows_setup.patch
--- setup.py +++ setup.py @@ -105,7 +105,7 @@ 'macros': stan_macros}) ## extensions -extensions_extra_compile_args = ['-O0', '-ftemplate-depth-256'] +extensions_extra_compile_args = ['/EHsc', '/Ox', '-DBOOST_DATE_TIME_NO_LIB'] stanc_sources = [ "pystan/stan/src/stan/gm/grammars/var_decls_grammar_inst.cpp", --- pystan\model.py +++ pystan\model.py @@ -279,7 +280,7 @@ s = template.safe_substitute(model_cppname=self.model_cppname) outfile.write(s) - extra_compile_args = ['-O3', '-ftemplate-depth-256'] + extra_compile_args = ['/EHsc', '/Ox', '-DBOOST_DATE_TIME_NO_LIB'] distutils.log.set_verbosity(verbose) extension = Extension(name=module_name, language="c++", --- pystan\stan\src\stan\gm\grammars\functions_grammar_def.hpp +++ pystan\stan\src\stan\gm\grammars\functions_grammar_def.hpp @@ -126,7 +126,7 @@ static bool fun_exists(const std::set<std::pair<std::string, function_signature_t> >& existing, const std::pair<std::string,function_signature_t>& name_sig) { - for (std::set<std::pair<std::string, function_signature_t> >::iterator it + for (std::set<std::pair<std::string, function_signature_t> >::const_iterator it = existing.begin(); it != existing.end(); ++it)
--- setup.py +++ setup.py @@ -119,7 +119,7 @@ libstan = ('stan', {'sources': libstan_sources, 'macros': stan_macros}) ## extensions -extensions_extra_compile_args = ['-O0', '-ftemplate-depth-256'] +extensions_extra_compile_args = ['/EHsc', '/Ox', '-DBOOST_DATE_TIME_NO_LIB'] stanc_sources = [ "pystan/stan/src/stan/gm/ast_def.cpp", --- pystan\model.py +++ pystan\model.py @@ -279,7 +280,7 @@ s = template.safe_substitute(model_cppname=self.model_cppname) outfile.write(s) - extra_compile_args = ['-O3', '-ftemplate-depth-256'] + extra_compile_args = ['/EHsc', '/Ox', '-DBOOST_DATE_TIME_NO_LIB'] distutils.log.set_verbosity(verbose) extension = Extension(name=module_name, language="c++",
Update windows patch for pystan
Update windows patch for pystan
Diff
bsd-3-clause
menpo/conda-recipes,menpo/conda-recipes
diff
## Code Before: --- setup.py +++ setup.py @@ -105,7 +105,7 @@ 'macros': stan_macros}) ## extensions -extensions_extra_compile_args = ['-O0', '-ftemplate-depth-256'] +extensions_extra_compile_args = ['/EHsc', '/Ox', '-DBOOST_DATE_TIME_NO_LIB'] stanc_sources = [ "pystan/stan/src/stan/gm/grammars/var_decls_grammar_inst.cpp", --- pystan\model.py +++ pystan\model.py @@ -279,7 +280,7 @@ s = template.safe_substitute(model_cppname=self.model_cppname) outfile.write(s) - extra_compile_args = ['-O3', '-ftemplate-depth-256'] + extra_compile_args = ['/EHsc', '/Ox', '-DBOOST_DATE_TIME_NO_LIB'] distutils.log.set_verbosity(verbose) extension = Extension(name=module_name, language="c++", --- pystan\stan\src\stan\gm\grammars\functions_grammar_def.hpp +++ pystan\stan\src\stan\gm\grammars\functions_grammar_def.hpp @@ -126,7 +126,7 @@ static bool fun_exists(const std::set<std::pair<std::string, function_signature_t> >& existing, const std::pair<std::string,function_signature_t>& name_sig) { - for (std::set<std::pair<std::string, function_signature_t> >::iterator it + for (std::set<std::pair<std::string, function_signature_t> >::const_iterator it = existing.begin(); it != existing.end(); ++it) ## Instruction: Update windows patch for pystan ## Code After: --- setup.py +++ setup.py @@ -119,7 +119,7 @@ libstan = ('stan', {'sources': libstan_sources, 'macros': stan_macros}) ## extensions -extensions_extra_compile_args = ['-O0', '-ftemplate-depth-256'] +extensions_extra_compile_args = ['/EHsc', '/Ox', '-DBOOST_DATE_TIME_NO_LIB'] stanc_sources = [ "pystan/stan/src/stan/gm/ast_def.cpp", --- pystan\model.py +++ pystan\model.py @@ -279,7 +280,7 @@ s = template.safe_substitute(model_cppname=self.model_cppname) outfile.write(s) - extra_compile_args = ['-O3', '-ftemplate-depth-256'] + extra_compile_args = ['/EHsc', '/Ox', '-DBOOST_DATE_TIME_NO_LIB'] distutils.log.set_verbosity(verbose) extension = Extension(name=module_name, language="c++",
38e4d6594ff46e06cb7154f47806f4947c960bed
app/collections/project_based_collection.js
app/collections/project_based_collection.js
var User = zooniverse.models.User; var ProjectBasedCollection = Backbone.Collection.extend({ initialize: function() { User.on('change', _.bind(this.fetch, this)); this.listenTo(require('lib/state'), 'change:project', this.fetch); }, sync: require('lib/sync'), comparator: function(m) { return -(new Date(m.get('updated_at')).getTime()); }, fetch: function() { if (!(User.current && require('lib/state').get('project'))) return; return ProjectBasedCollection.__super__.fetch.call(this); } }); module.exports = ProjectBasedCollection;
var User = zooniverse.models.User; var ProjectBasedCollection = Backbone.Collection.extend({ initialize: function() { User.on('change', _.bind(this.fetch, this)); this.listenTo(require('lib/state'), 'change:project', this.fetch); }, sync: require('lib/sync'), comparator: function(m) { return -(new Date(m.get('updated_at')).getTime()); }, fetch: function() { this.reset(); if (!(User.current && require('lib/state').get('project'))) return; return ProjectBasedCollection.__super__.fetch.call(this); } }); module.exports = ProjectBasedCollection;
Reset collections when switching projects
Reset collections when switching projects
JavaScript
apache-2.0
zooniverse/Ubret-Dashboard
javascript
## Code Before: var User = zooniverse.models.User; var ProjectBasedCollection = Backbone.Collection.extend({ initialize: function() { User.on('change', _.bind(this.fetch, this)); this.listenTo(require('lib/state'), 'change:project', this.fetch); }, sync: require('lib/sync'), comparator: function(m) { return -(new Date(m.get('updated_at')).getTime()); }, fetch: function() { if (!(User.current && require('lib/state').get('project'))) return; return ProjectBasedCollection.__super__.fetch.call(this); } }); module.exports = ProjectBasedCollection; ## Instruction: Reset collections when switching projects ## Code After: var User = zooniverse.models.User; var ProjectBasedCollection = Backbone.Collection.extend({ initialize: function() { User.on('change', _.bind(this.fetch, this)); this.listenTo(require('lib/state'), 'change:project', this.fetch); }, sync: require('lib/sync'), comparator: function(m) { return -(new Date(m.get('updated_at')).getTime()); }, fetch: function() { this.reset(); if (!(User.current && require('lib/state').get('project'))) return; return ProjectBasedCollection.__super__.fetch.call(this); } }); module.exports = ProjectBasedCollection;
9546faddab321eb508f358883faf45cbc7d48dd8
calexicon/internal/tests/test_julian.py
calexicon/internal/tests/test_julian.py
import unittest from calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian class TestJulian(unittest.TestCase): def test_distant_julian_to_gregorian(self): self.assertEqual(distant_julian_to_gregorian(9999, 12, 1), (10000, 2, 12)) def test_julian_to_gregorian(self): self.assertEqual(julian_to_gregorian(1984, 2, 29), (1984, 3, 13))
import unittest from datetime import date as vanilla_date from calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian class TestJulian(unittest.TestCase): def test_distant_julian_to_gregorian(self): self.assertEqual(distant_julian_to_gregorian(9999, 12, 1), (10000, 2, 12)) def test_julian_to_gregorian(self): self.assertEqual(julian_to_gregorian(1984, 2, 29), vanilla_date(1984, 3, 13))
Correct test - vanilla_date not tuple.
Correct test - vanilla_date not tuple.
Python
apache-2.0
jwg4/calexicon,jwg4/qual
python
## Code Before: import unittest from calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian class TestJulian(unittest.TestCase): def test_distant_julian_to_gregorian(self): self.assertEqual(distant_julian_to_gregorian(9999, 12, 1), (10000, 2, 12)) def test_julian_to_gregorian(self): self.assertEqual(julian_to_gregorian(1984, 2, 29), (1984, 3, 13)) ## Instruction: Correct test - vanilla_date not tuple. ## Code After: import unittest from datetime import date as vanilla_date from calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian class TestJulian(unittest.TestCase): def test_distant_julian_to_gregorian(self): self.assertEqual(distant_julian_to_gregorian(9999, 12, 1), (10000, 2, 12)) def test_julian_to_gregorian(self): self.assertEqual(julian_to_gregorian(1984, 2, 29), vanilla_date(1984, 3, 13))
88e83e886f79e10982b3a2774a31e5dd2c5f7e90
.idea/dataSources.xml
.idea/dataSources.xml
<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="DataSourceManagerImpl" format="xml" multifile-model="true"> <data-source source="LOCAL" name="local.sqlite" uuid="0e800247-2508-4561-9201-33ff054255c4"> <driver-ref>sqlite.xerial</driver-ref> <synchronize>true</synchronize> <jdbc-driver>org.sqlite.JDBC</jdbc-driver> <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/app/storage/databases/local.sqlite</jdbc-url> </data-source> <data-source source="LOCAL" name="prod.sqlite" uuid="fb3f430b-5d14-400c-aeb6-5c0883cbade9"> <driver-ref>sqlite.xerial</driver-ref> <synchronize>true</synchronize> <jdbc-driver>org.sqlite.JDBC</jdbc-driver> <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/app/storage/databases/prod.sqlite</jdbc-url> </data-source> </component> </project>
<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="DataSourceManagerImpl" format="xml" multifile-model="true"> <data-source source="LOCAL" name="local.sqlite" uuid="0e800247-2508-4561-9201-33ff054255c4"> <driver-ref>sqlite.xerial</driver-ref> <synchronize>true</synchronize> <jdbc-driver>org.sqlite.JDBC</jdbc-driver> <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/storage/databases/local.sqlite</jdbc-url> </data-source> </component> </project>
Update .idea local sqlite datasource path and remove prod sqlite
Update .idea local sqlite datasource path and remove prod sqlite
XML
agpl-3.0
WaveHack/OpenDominion,WaveHack/OpenDominion,WaveHack/OpenDominion
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="DataSourceManagerImpl" format="xml" multifile-model="true"> <data-source source="LOCAL" name="local.sqlite" uuid="0e800247-2508-4561-9201-33ff054255c4"> <driver-ref>sqlite.xerial</driver-ref> <synchronize>true</synchronize> <jdbc-driver>org.sqlite.JDBC</jdbc-driver> <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/app/storage/databases/local.sqlite</jdbc-url> </data-source> <data-source source="LOCAL" name="prod.sqlite" uuid="fb3f430b-5d14-400c-aeb6-5c0883cbade9"> <driver-ref>sqlite.xerial</driver-ref> <synchronize>true</synchronize> <jdbc-driver>org.sqlite.JDBC</jdbc-driver> <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/app/storage/databases/prod.sqlite</jdbc-url> </data-source> </component> </project> ## Instruction: Update .idea local sqlite datasource path and remove prod sqlite ## Code After: <?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="DataSourceManagerImpl" format="xml" multifile-model="true"> <data-source source="LOCAL" name="local.sqlite" uuid="0e800247-2508-4561-9201-33ff054255c4"> <driver-ref>sqlite.xerial</driver-ref> <synchronize>true</synchronize> <jdbc-driver>org.sqlite.JDBC</jdbc-driver> <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/storage/databases/local.sqlite</jdbc-url> </data-source> </component> </project>
3508d2d571603a44b5ce22e6c2dbcfe5961e38f4
settings/language-viml.cson
settings/language-viml.cson
".source.viml": editor: commentStart: '" '
".source.viml": editor: commentStart: '" ' increaseIndentPattern: "(?:^|\\s)(?:if|else|elseif|for|function!?|while)(?:\\s|$)" decreaseIndentPattern: "(?:^|\\s)(?:endif|endfor|endfunction|endwhile)(?:\\s|$)"
Add editor settings for adjusting indent/outdent
Add editor settings for adjusting indent/outdent
CoffeeScript
mit
Alhadis/language-viml
coffeescript
## Code Before: ".source.viml": editor: commentStart: '" ' ## Instruction: Add editor settings for adjusting indent/outdent ## Code After: ".source.viml": editor: commentStart: '" ' increaseIndentPattern: "(?:^|\\s)(?:if|else|elseif|for|function!?|while)(?:\\s|$)" decreaseIndentPattern: "(?:^|\\s)(?:endif|endfor|endfunction|endwhile)(?:\\s|$)"
e64c7588bf87b1db2b8d71146dc11762b82de933
two-samples/README.md
two-samples/README.md
Similar to the t-test, a two sample t-test will test the differences between two datasets. Example: ```R > summary(discoveries) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0 2.0 3.0 3.1 4.0 12.0 > summary(eurodist) Min. 1st Qu. Median Mean 3rd Qu. Max. 158 808 1312 1505 2064 4532 > t.test(discoveries, eurodist) Welch Two Sample t-test data: discoveries and eurodist t = -24.218, df = 209.01, p-value < 2.2e-16 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -1624.317 -1379.778 sample estimates: mean of x mean of y 3.100 1505.148 ```
Similar to the t-test, a two sample t-test will test the differences between two datasets. Example: ```R > summary(discoveries) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0 2.0 3.0 3.1 4.0 12.0 > summary(eurodist) Min. 1st Qu. Median Mean 3rd Qu. Max. 158 808 1312 1505 2064 4532 > t.test(discoveries, eurodist) Welch Two Sample t-test data: discoveries and eurodist t = -24.218, df = 209.01, p-value < 2.2e-16 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -1624.317 -1379.778 sample estimates: mean of x mean of y 3.100 1505.148 ``` The above is assuming each dataset has different variances. To assume the same variances and to perform a "normal" t-test, you need to specify this. ```R > t.test(discoveries, eurodist, var.equal = TRUE) Two Sample t-test data: discoveries and eurodist t = -16.698, df = 308, p-value < 2.2e-16 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -1679.052 -1325.044 sample estimates: mean of x mean of y 3.100 1505.148 ```
Add details & caveats on actual two-sample t-test
Add details & caveats on actual two-sample t-test
Markdown
mit
erictleung/statistics,erictleung/statistics,erictleung/statistics
markdown
## Code Before: Similar to the t-test, a two sample t-test will test the differences between two datasets. Example: ```R > summary(discoveries) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0 2.0 3.0 3.1 4.0 12.0 > summary(eurodist) Min. 1st Qu. Median Mean 3rd Qu. Max. 158 808 1312 1505 2064 4532 > t.test(discoveries, eurodist) Welch Two Sample t-test data: discoveries and eurodist t = -24.218, df = 209.01, p-value < 2.2e-16 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -1624.317 -1379.778 sample estimates: mean of x mean of y 3.100 1505.148 ``` ## Instruction: Add details & caveats on actual two-sample t-test ## Code After: Similar to the t-test, a two sample t-test will test the differences between two datasets. Example: ```R > summary(discoveries) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0 2.0 3.0 3.1 4.0 12.0 > summary(eurodist) Min. 1st Qu. Median Mean 3rd Qu. Max. 158 808 1312 1505 2064 4532 > t.test(discoveries, eurodist) Welch Two Sample t-test data: discoveries and eurodist t = -24.218, df = 209.01, p-value < 2.2e-16 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -1624.317 -1379.778 sample estimates: mean of x mean of y 3.100 1505.148 ``` The above is assuming each dataset has different variances. To assume the same variances and to perform a "normal" t-test, you need to specify this. ```R > t.test(discoveries, eurodist, var.equal = TRUE) Two Sample t-test data: discoveries and eurodist t = -16.698, df = 308, p-value < 2.2e-16 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -1679.052 -1325.044 sample estimates: mean of x mean of y 3.100 1505.148 ```
f0d4fccdc2fd7d89c7d7cdeac350faa384652bc5
build_tools/jenkins_win_build.bat
build_tools/jenkins_win_build.bat
set PYTHON=C:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\" set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH% cd %WORKSPACE% %PYTHON% check_packages.py cd %WORKSPACE% python setup.py build -cmingw32 cd %WORKSPACE% python setup.py docs cd %WORKSPACE% python setup.py bdist_egg --skip-build cd %WORKSPACE%\test %PYTHON% utest_sasview.py cd %WORKSPACE% mkdir sasview-install set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% cd dist %EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg cd %WORKSPACE%\sasview python setup_exe.py py2exe python installer_generator.py "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss cd Output xcopy setupSasView.exe %WORKSPACE%\dist cd %WORKSPACE%
set PYTHON=C:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\" set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH% set PYLINT=c:\python27\scripts\pylint cd %WORKSPACE% %PYTHON% check_packages.py cd %WORKSPACE% python setup.py build -cmingw32 cd %WORKSPACE% python setup.py docs cd %WORKSPACE% python setup.py bdist_egg --skip-build cd %WORKSPACE%\test %PYTHON% utest_sasview.py cd %WORKSPACE% mkdir sasview-install set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% cd dist %EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg cd %WORKSPACE%\sasview python setup_exe.py py2exe python installer_generator.py "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss cd Output xcopy setupSasView.exe %WORKSPACE%\dist cd %WORKSPACE% %PYLINT% --rcfile "%WORKSPACE%cd /build_tools/pylint.rc" -f parseable sasview-install/sasview*.egg/sas sasview > test/sasview.txt cd %WORKSPACE%
Update new windows build script
Update new windows build script
Batchfile
bsd-3-clause
lewisodriscoll/sasview,SasView/sasview,lewisodriscoll/sasview,lewisodriscoll/sasview,lewisodriscoll/sasview,SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview,lewisodriscoll/sasview
batchfile
## Code Before: set PYTHON=C:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\" set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH% cd %WORKSPACE% %PYTHON% check_packages.py cd %WORKSPACE% python setup.py build -cmingw32 cd %WORKSPACE% python setup.py docs cd %WORKSPACE% python setup.py bdist_egg --skip-build cd %WORKSPACE%\test %PYTHON% utest_sasview.py cd %WORKSPACE% mkdir sasview-install set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% cd dist %EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg cd %WORKSPACE%\sasview python setup_exe.py py2exe python installer_generator.py "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss cd Output xcopy setupSasView.exe %WORKSPACE%\dist cd %WORKSPACE% ## Instruction: Update new windows build script ## Code After: set PYTHON=C:\Python27\python set EASY_INSTALL=c:\python27\scripts\easy_install.exe set NEXUSDIR="C:\Program Files (x86)\NeXus Data Format\" set PATH=C:\Python27;C:\Python27\Scripts;C:\mingw\bin;%PATH% set PYLINT=c:\python27\scripts\pylint cd %WORKSPACE% %PYTHON% check_packages.py cd %WORKSPACE% python setup.py build -cmingw32 cd %WORKSPACE% python setup.py docs cd %WORKSPACE% python setup.py bdist_egg --skip-build cd %WORKSPACE%\test %PYTHON% utest_sasview.py cd %WORKSPACE% mkdir sasview-install set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% cd %WORKSPACE% cd dist %EASY_INSTALL% -d ..\sasview-install sasview-3.1.2-py2.7-win32.egg cd %WORKSPACE%\sasview python setup_exe.py py2exe python installer_generator.py "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer.iss cd Output xcopy setupSasView.exe %WORKSPACE%\dist cd %WORKSPACE% %PYLINT% --rcfile "%WORKSPACE%cd /build_tools/pylint.rc" -f parseable sasview-install/sasview*.egg/sas sasview > test/sasview.txt cd %WORKSPACE%
3a8a213522bb16b30844abd5c16629ee26fbf6d4
.travis-ci.d/compile_and_test.sh
.travis-ci.d/compile_and_test.sh
ILCSOFT=/cvmfs/clicdp.cern.ch/iLCSoft/builds/current/CI_${COMPILER} source $ILCSOFT/init_ilcsoft.sh cd /Package mkdir build cd build cmake -GNinja -DUSE_CXX11=ON -DBUILD_ROOTDICT=ON .. ninja ninja install ctest --output-on-failure
ILCSOFT=/cvmfs/clicdp.cern.ch/iLCSoft/builds/current/CI_${COMPILER} source $ILCSOFT/init_ilcsoft.sh cd /Package mkdir build cd build cmake -GNinja -DUSE_CXX11=ON -DBUILD_ROOTDICT=ON -DCMAKE_CXX_FLAGS="-fdiagnostics-color=always" .. ninja ninja install ctest --output-on-failure
Add diagnostic color to external cmake flags
Add diagnostic color to external cmake flags
Shell
bsd-3-clause
petricm/LCIO,iLCSoft/LCIO,petricm/LCIO,iLCSoft/LCIO,petricm/LCIO,petricm/LCIO,iLCSoft/LCIO,iLCSoft/LCIO,petricm/LCIO,petricm/LCIO,iLCSoft/LCIO,iLCSoft/LCIO
shell
## Code Before: ILCSOFT=/cvmfs/clicdp.cern.ch/iLCSoft/builds/current/CI_${COMPILER} source $ILCSOFT/init_ilcsoft.sh cd /Package mkdir build cd build cmake -GNinja -DUSE_CXX11=ON -DBUILD_ROOTDICT=ON .. ninja ninja install ctest --output-on-failure ## Instruction: Add diagnostic color to external cmake flags ## Code After: ILCSOFT=/cvmfs/clicdp.cern.ch/iLCSoft/builds/current/CI_${COMPILER} source $ILCSOFT/init_ilcsoft.sh cd /Package mkdir build cd build cmake -GNinja -DUSE_CXX11=ON -DBUILD_ROOTDICT=ON -DCMAKE_CXX_FLAGS="-fdiagnostics-color=always" .. ninja ninja install ctest --output-on-failure
41832d4b5f0aa7590c81ee9eb2ee15b3d8924b06
compiler_source/6_actions_perl/template-runtime-code-for-action-get-word-at-position.txt
compiler_source/6_actions_perl/template-runtime-code-for-action-get-word-at-position.txt
template-runtime-code-standard-action-begin $global_single_action_name = '<dashrep_placeholder_action_name>' ; <new_line> $global_single_action_operand_one = runtime-code-for-operand-number-one ; <new_line> $global_single_action_operand_two = runtime-code-for-operand-number-two ; <new_line> $global_single_action_operand_three = runtime-code-for-operand-number-three ; <new_line> $global_single_action_operand_four = runtime-code-for-operand-number-four ; <new_line> runtime-code-storage-item-result = &dashrep_expand_parameters( ) ; <new_line> # $global_source_text = code-get-or-put-phrase-definition-begin runtime-code-for-operand-number-one code-get-or-put-phrase-definition-end ; <new_line> # $global_word_pointer = runtime-code-for-operand-number-three + 0 ; <new_line> # &function__get_word_at_position( ) ; <new_line> # runtime-code-storage-item-result = $target_text ; <new_line> template-runtime-code-standard-action-end
template-runtime-code-standard-action-begin # $global_single_action_name = '<dashrep_placeholder_action_name>' ; <new_line> # $global_single_action_operand_one = runtime-code-for-operand-number-one ; <new_line> # $global_single_action_operand_two = runtime-code-for-operand-number-two ; <new_line> # $global_single_action_operand_three = runtime-code-for-operand-number-three ; <new_line> # $global_single_action_operand_four = runtime-code-for-operand-number-four ; <new_line> # runtime-code-storage-item-result = &dashrep_expand_parameters( ) ; <new_line> $global_source_text = code-get-or-put-phrase-definition-begin runtime-code-for-operand-number-one code-get-or-put-phrase-definition-end ; <new_line> $global_word_pointer = runtime-code-for-operand-number-three + 0 ; <new_line> &function__get_word_at_position( ) ; <new_line> runtime-code-storage-item-result = $target_text ; <new_line> template-runtime-code-standard-action-end
Use direct code for action "get-word-at-position"
Use direct code for action "get-word-at-position"
Text
artistic-2.0
cpsolver/Dashrep-language,cpsolver/Dashrep-language,cpsolver/Dashrep-language
text
## Code Before: template-runtime-code-standard-action-begin $global_single_action_name = '<dashrep_placeholder_action_name>' ; <new_line> $global_single_action_operand_one = runtime-code-for-operand-number-one ; <new_line> $global_single_action_operand_two = runtime-code-for-operand-number-two ; <new_line> $global_single_action_operand_three = runtime-code-for-operand-number-three ; <new_line> $global_single_action_operand_four = runtime-code-for-operand-number-four ; <new_line> runtime-code-storage-item-result = &dashrep_expand_parameters( ) ; <new_line> # $global_source_text = code-get-or-put-phrase-definition-begin runtime-code-for-operand-number-one code-get-or-put-phrase-definition-end ; <new_line> # $global_word_pointer = runtime-code-for-operand-number-three + 0 ; <new_line> # &function__get_word_at_position( ) ; <new_line> # runtime-code-storage-item-result = $target_text ; <new_line> template-runtime-code-standard-action-end ## Instruction: Use direct code for action "get-word-at-position" ## Code After: template-runtime-code-standard-action-begin # $global_single_action_name = '<dashrep_placeholder_action_name>' ; <new_line> # $global_single_action_operand_one = runtime-code-for-operand-number-one ; <new_line> # $global_single_action_operand_two = runtime-code-for-operand-number-two ; <new_line> # $global_single_action_operand_three = runtime-code-for-operand-number-three ; <new_line> # $global_single_action_operand_four = runtime-code-for-operand-number-four ; <new_line> # runtime-code-storage-item-result = &dashrep_expand_parameters( ) ; <new_line> $global_source_text = code-get-or-put-phrase-definition-begin runtime-code-for-operand-number-one code-get-or-put-phrase-definition-end ; <new_line> $global_word_pointer = runtime-code-for-operand-number-three + 0 ; <new_line> &function__get_word_at_position( ) ; <new_line> runtime-code-storage-item-result = $target_text ; <new_line> template-runtime-code-standard-action-end
edd88c2cf4ccc7c8c9169171db7b6407bfe3f8a1
configs/_defaults.yaml
configs/_defaults.yaml
nickname: DesertBot username: DesertBot realname: DesertBot # prefix for commands commandChar: . # where to find the bot's source source: https://github.com/DesertBot/DesertBot/ # CTCP FINGER response finger: GET YOUR FINGER OUT OF THERE # slightly more privileged than admins; can add/remove admins owners: - "*[email protected]" - "*[email protected]" - "*[email protected]" - "*[email protected]" - "*[email protected]" # shelve storage settings storage_save_interval: 60 # modules to load modules: - all
nickname: DesertBot username: DesertBot realname: DesertBot # prefix for commands commandChar: . # where to find the bot's source source: https://github.com/DesertBot/DesertBot/ # CTCP FINGER response finger: GET YOUR FINGER OUT OF THERE # slightly more privileged than admins; can add/remove admins owners: - "*[email protected]" - "*[email protected]" - "*[email protected]" - "*[email protected]" - "R:StarlitGhost" - "R:Heufneutje" - "R:HubbeKing" # shelve storage settings storage_save_interval: 60 # modules to load modules: - all
Add registered account names to owners list
Add registered account names to owners list
YAML
mit
DesertBot/DesertBot
yaml
## Code Before: nickname: DesertBot username: DesertBot realname: DesertBot # prefix for commands commandChar: . # where to find the bot's source source: https://github.com/DesertBot/DesertBot/ # CTCP FINGER response finger: GET YOUR FINGER OUT OF THERE # slightly more privileged than admins; can add/remove admins owners: - "*[email protected]" - "*[email protected]" - "*[email protected]" - "*[email protected]" - "*[email protected]" # shelve storage settings storage_save_interval: 60 # modules to load modules: - all ## Instruction: Add registered account names to owners list ## Code After: nickname: DesertBot username: DesertBot realname: DesertBot # prefix for commands commandChar: . # where to find the bot's source source: https://github.com/DesertBot/DesertBot/ # CTCP FINGER response finger: GET YOUR FINGER OUT OF THERE # slightly more privileged than admins; can add/remove admins owners: - "*[email protected]" - "*[email protected]" - "*[email protected]" - "*[email protected]" - "R:StarlitGhost" - "R:Heufneutje" - "R:HubbeKing" # shelve storage settings storage_save_interval: 60 # modules to load modules: - all
3e3294173addfbbeac07d9d3fd6f989a67ea3388
octane_nailgun/push.sh
octane_nailgun/push.sh
host=${1:-"cz5545-fuel"} branch=${2:-$(git rev-parse --abbrev-ref HEAD)} container="fuel-core-6.1-nailgun" version=$(awk -F\" '/version/{print $2}' < setup.py) wheel="octane_nailgun-${version}-py2-none-any.whl" git push --force $host HEAD # TODO: Next lines can be separated in independent script tnat can be # copied into $host and runned from there. ssh $host "cd octane; git reset --hard $branch" ssh $host "cd octane; git clean -x -d -f" ssh $host "cd octane/octane_nailgun; python setup.py bdist_wheel" ssh $host "docker cp ${container}:/root/ dist/${wheel}" ssh $host "docker exec ${container} pip install -U ${wheel}" ssh $host "docker restart ${container}"
host=${1:-"cz5545-fuel"} branch=${2:-$(git rev-parse --abbrev-ref HEAD)} version=$(awk -F\" '/version/{print $2}' < setup.py) wheel="octane_nailgun-${version}-py2-none-any.whl" location="octane/octane_nailgun" container="fuel-core-6.1-nailgun" git push --force $host HEAD ssh $host "cd ${location}; git reset --hard $branch" ssh $host "cd ${location}; git clean -x -d -f" ssh $host "cd ${location}; python setup.py bdist_wheel" ssh $host "cd ${location}; dockerctl copy dist/${wheel} nailgun:/root/${wheel}" ssh $host "docker exec ${container} pip install -U ${wheel}" ssh $host "docker restart ${container}"
Use dockerctl to copy files
Use dockerctl to copy files
Shell
apache-2.0
stackforge/fuel-octane,Mirantis/octane,Mirantis/octane,stackforge/fuel-octane
shell
## Code Before: host=${1:-"cz5545-fuel"} branch=${2:-$(git rev-parse --abbrev-ref HEAD)} container="fuel-core-6.1-nailgun" version=$(awk -F\" '/version/{print $2}' < setup.py) wheel="octane_nailgun-${version}-py2-none-any.whl" git push --force $host HEAD # TODO: Next lines can be separated in independent script tnat can be # copied into $host and runned from there. ssh $host "cd octane; git reset --hard $branch" ssh $host "cd octane; git clean -x -d -f" ssh $host "cd octane/octane_nailgun; python setup.py bdist_wheel" ssh $host "docker cp ${container}:/root/ dist/${wheel}" ssh $host "docker exec ${container} pip install -U ${wheel}" ssh $host "docker restart ${container}" ## Instruction: Use dockerctl to copy files ## Code After: host=${1:-"cz5545-fuel"} branch=${2:-$(git rev-parse --abbrev-ref HEAD)} version=$(awk -F\" '/version/{print $2}' < setup.py) wheel="octane_nailgun-${version}-py2-none-any.whl" location="octane/octane_nailgun" container="fuel-core-6.1-nailgun" git push --force $host HEAD ssh $host "cd ${location}; git reset --hard $branch" ssh $host "cd ${location}; git clean -x -d -f" ssh $host "cd ${location}; python setup.py bdist_wheel" ssh $host "cd ${location}; dockerctl copy dist/${wheel} nailgun:/root/${wheel}" ssh $host "docker exec ${container} pip install -U ${wheel}" ssh $host "docker restart ${container}"
771635c7731093e88ca26891197eeb49eae951cc
circle.yml
circle.yml
machine: environment: LANG: en_US.UTF-8 LC_CTYPE: en_US.UTF-8 xcode: version: "6.2" dependencies: pre: - xcrun instruments -w "iPhone 6 (8.2 Simulator)" || exit 0 override: - sudo gem install cocoapods xcpretty obcd slather -N - pod install --project-directory=Example test: override: - set -o pipefail && xcodebuild -workspace 'Example/Espressos.xcworkspace' -scheme 'Espressos' -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 6" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES clean test | xcpretty -c --report junit --output ${CIRCLE_TEST_REPORTS}/junit.xml - pod lib lint --quick post: - slather
machine: environment: LANG: en_US.UTF-8 LC_CTYPE: en_US.UTF-8 xcode: version: "6.3.1" dependencies: pre: - xcrun instruments -w "iPhone 6 (8.3 Simulator)" || exit 0 override: - sudo gem install cocoapods:0.36.4 xcpretty obcd slather:1.7.0 -N - pod install --project-directory=Example test: override: - set -o pipefail && xcodebuild -workspace 'Example/Espressos.xcworkspace' -scheme 'Espressos' -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 6" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES clean test | xcpretty -c --report junit --output ${CIRCLE_TEST_REPORTS}/junit.xml - pod lib lint --quick post: - slather
Update xcode to 6.3.1, pin CocoaPods
[CI] Update xcode to 6.3.1, pin CocoaPods
YAML
mit
CoderIvanLee/TTTAttributedLabel,mattt/TTTAttributedLabel,yaoxiaoyong/TTTAttributedLabel,KILLI/TTTAttributedLabel,XZwalk/TTTAttributedLabel,denivip/TTTAttributedLabel,SampleLiao/TTTAttributedLabel,sunzeboy/TTTAttributedLabel,engmahsa/TTTAttributedLabel,TTTAttributedLabel/TTTAttributedLabel,zhouwude/TTTAttributedLabel,WWLJ/TTTAttributedLabel,yimouleng/TTTAttributedLabel,zilanfeng/TTTAttributedLabel,Naithar/TTTAttributedLabel,z8927623/TTTAttributedLabel,TimorCan/TTTAttributedLabel,rtsbtx/TTTAttributedLabel,Voxer/TTTAttributedLabel,hoaquo/TTTAttributedLabel,NewAmsterdamLabs/TTTAttributedLabel,JIFFinc/TTTAttributedLabel,hao-hua/TTTAttributedLabel,Nykho/TTTAttributedLabel,Akylas/TTTAttributedLabel,devandroid/TTTAttributedLabel,jianwoo/TTTAttributedLabel,zhwcoder/TTTAttributedLabel,FishMemory/TTTAttributedLabel,lookingstars/TTTAttributedLabel,buiminhhuy/TTTAttributedLabel,mjhassan/TTTAttributedLabel
yaml
## Code Before: machine: environment: LANG: en_US.UTF-8 LC_CTYPE: en_US.UTF-8 xcode: version: "6.2" dependencies: pre: - xcrun instruments -w "iPhone 6 (8.2 Simulator)" || exit 0 override: - sudo gem install cocoapods xcpretty obcd slather -N - pod install --project-directory=Example test: override: - set -o pipefail && xcodebuild -workspace 'Example/Espressos.xcworkspace' -scheme 'Espressos' -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 6" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES clean test | xcpretty -c --report junit --output ${CIRCLE_TEST_REPORTS}/junit.xml - pod lib lint --quick post: - slather ## Instruction: [CI] Update xcode to 6.3.1, pin CocoaPods ## Code After: machine: environment: LANG: en_US.UTF-8 LC_CTYPE: en_US.UTF-8 xcode: version: "6.3.1" dependencies: pre: - xcrun instruments -w "iPhone 6 (8.3 Simulator)" || exit 0 override: - sudo gem install cocoapods:0.36.4 xcpretty obcd slather:1.7.0 -N - pod install --project-directory=Example test: override: - set -o pipefail && xcodebuild -workspace 'Example/Espressos.xcworkspace' -scheme 'Espressos' -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 6" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES clean test | xcpretty -c --report junit --output ${CIRCLE_TEST_REPORTS}/junit.xml - pod lib lint --quick post: - slather
ac97316a9403934d81ff717dfbeec2443b2ae905
package.json
package.json
{ "private": true, "scripts": { "start": "node --perf-basic-prof src/server.js", "watch": "nodemon", "test": "mocha tests --recursive", "lint": "eslint ." }, "engines": { "node": "^8.7.0" }, "dependencies": { "dotenv": "^4.0.0", "ejs": "0.8.x", "express": "^4.13.3", "jsdom": "^11.3.0", "newrelic": "^1.22.0", "potpourri": "0.0.1", "request": "^2.61.0", "sqlite3": "^3.0.10" }, "devDependencies": { "eslint": "^4.9.0", "eslint-config-eslint": "^4.0.0", "mocha": "^4.0.1", "nodemon": "^1.12.1" } }
{ "private": true, "scripts": { "start": "node --perf-basic-prof src/server.js", "watch": "nodemon", "test": "NEW_RELIC_ENABLED=false mocha tests --recursive", "lint": "eslint ." }, "engines": { "node": "^8.7.0" }, "dependencies": { "dotenv": "^4.0.0", "ejs": "0.8.x", "express": "^4.13.3", "jsdom": "^11.3.0", "newrelic": "^1.22.0", "potpourri": "0.0.1", "request": "^2.61.0", "sqlite3": "^3.0.10" }, "devDependencies": { "eslint": "^4.9.0", "eslint-config-eslint": "^4.0.0", "mocha": "^4.0.1", "nodemon": "^1.12.1" } }
Disable New Relic during testing
Disable New Relic during testing
JSON
mit
frosas/google-plus-user-feed,frosas/google-plus-user-feed
json
## Code Before: { "private": true, "scripts": { "start": "node --perf-basic-prof src/server.js", "watch": "nodemon", "test": "mocha tests --recursive", "lint": "eslint ." }, "engines": { "node": "^8.7.0" }, "dependencies": { "dotenv": "^4.0.0", "ejs": "0.8.x", "express": "^4.13.3", "jsdom": "^11.3.0", "newrelic": "^1.22.0", "potpourri": "0.0.1", "request": "^2.61.0", "sqlite3": "^3.0.10" }, "devDependencies": { "eslint": "^4.9.0", "eslint-config-eslint": "^4.0.0", "mocha": "^4.0.1", "nodemon": "^1.12.1" } } ## Instruction: Disable New Relic during testing ## Code After: { "private": true, "scripts": { "start": "node --perf-basic-prof src/server.js", "watch": "nodemon", "test": "NEW_RELIC_ENABLED=false mocha tests --recursive", "lint": "eslint ." }, "engines": { "node": "^8.7.0" }, "dependencies": { "dotenv": "^4.0.0", "ejs": "0.8.x", "express": "^4.13.3", "jsdom": "^11.3.0", "newrelic": "^1.22.0", "potpourri": "0.0.1", "request": "^2.61.0", "sqlite3": "^3.0.10" }, "devDependencies": { "eslint": "^4.9.0", "eslint-config-eslint": "^4.0.0", "mocha": "^4.0.1", "nodemon": "^1.12.1" } }
f9a474ace29191b980dd7ac40579bfbb9bd52d09
Node.js/nodejs_ioredis_performance.js
Node.js/nodejs_ioredis_performance.js
"use strict"; var Redis = require('ioredis'); var start = new Date(); // I can't get to 1,000,000 commands in one pipeline, not even to 120,000, because ioredis would just hang. // Therefore I use 100,000 and hope that this is precise enough. var N = 100*1000; var redis = new Redis(); redis.del("foo"); var pipeline = redis.pipeline(); for(var i = 0; i < N; i++) { pipeline.set('foo', 'bar'); } pipeline.exec(function (err, results) { // `err` is always null, and `results` is an array of responses // corresponding the sequence the commands where queued. // Each response follows the format `[err, result]`. var end = new Date(); var elapsedTime = end - start; console.log("Elapsed time: " + elapsedTime + "ms"); console.log("Commands per second: " + Math.round(N * 1000 / elapsedTime)); redis.disconnect(); });
'use strict'; var Redis = require('ioredis'); var start = new Date(); // I can't get to 1,000,000 commands in one pipeline, not even to 120,000, because ioredis would just hang. // Therefore I use 100,000 and hope that this is precise enough. var N = 100*1000; var redis = new Redis(); redis.del('foo'); var pipeline = redis.pipeline(); for(var i = 0; i < N; i++) { pipeline.set('foo', 'bar'); } pipeline.exec(function (err, results) { // `err` is always null, and `results` is an array of responses // corresponding the sequence the commands where queued. // Each response follows the format `[err, result]`. var end = new Date(); var elapsedTime = end - start; console.log('Elapsed time: ' + elapsedTime + 'ms'); console.log('Commands per second: ' + Math.round(N * 1000 / elapsedTime)); redis.disconnect(); });
Convert double to single quotes
Convert double to single quotes
JavaScript
apache-2.0
stefanwille/redis-client-benchmarks,stefanwille/redis-client-benchmarks,stefanwille/redis-client-benchmarks,stefanwille/redis-client-benchmarks,stefanwille/redis-client-benchmarks
javascript
## Code Before: "use strict"; var Redis = require('ioredis'); var start = new Date(); // I can't get to 1,000,000 commands in one pipeline, not even to 120,000, because ioredis would just hang. // Therefore I use 100,000 and hope that this is precise enough. var N = 100*1000; var redis = new Redis(); redis.del("foo"); var pipeline = redis.pipeline(); for(var i = 0; i < N; i++) { pipeline.set('foo', 'bar'); } pipeline.exec(function (err, results) { // `err` is always null, and `results` is an array of responses // corresponding the sequence the commands where queued. // Each response follows the format `[err, result]`. var end = new Date(); var elapsedTime = end - start; console.log("Elapsed time: " + elapsedTime + "ms"); console.log("Commands per second: " + Math.round(N * 1000 / elapsedTime)); redis.disconnect(); }); ## Instruction: Convert double to single quotes ## Code After: 'use strict'; var Redis = require('ioredis'); var start = new Date(); // I can't get to 1,000,000 commands in one pipeline, not even to 120,000, because ioredis would just hang. // Therefore I use 100,000 and hope that this is precise enough. var N = 100*1000; var redis = new Redis(); redis.del('foo'); var pipeline = redis.pipeline(); for(var i = 0; i < N; i++) { pipeline.set('foo', 'bar'); } pipeline.exec(function (err, results) { // `err` is always null, and `results` is an array of responses // corresponding the sequence the commands where queued. // Each response follows the format `[err, result]`. var end = new Date(); var elapsedTime = end - start; console.log('Elapsed time: ' + elapsedTime + 'ms'); console.log('Commands per second: ' + Math.round(N * 1000 / elapsedTime)); redis.disconnect(); });
8c098dc13cbe8d7752804df721c814967f9c677b
samples/main.php
samples/main.php
<?php $_PCONN['cnt']++; if (function_exists('zend_thread_id')) { echo "thread ", zend_thread_id(), "\n"; } else { echo "main\n"; }
<?php $_PCONN['cnt']++; if (function_exists('zend_thread_id')) { echo "thread ", zend_thread_id(), "\n"; } else { echo "main\n"; } exit(PCONN_SUCCESS);
Use the status constant for the return code
Use the status constant for the return code
PHP
bsd-3-clause
johannes/pconn-sapi,johannes/pconn-sapi,johannes/pconn-sapi,ilk33r/pconn-sapi,ilk33r/pconn-sapi,ilk33r/pconn-sapi
php
## Code Before: <?php $_PCONN['cnt']++; if (function_exists('zend_thread_id')) { echo "thread ", zend_thread_id(), "\n"; } else { echo "main\n"; } ## Instruction: Use the status constant for the return code ## Code After: <?php $_PCONN['cnt']++; if (function_exists('zend_thread_id')) { echo "thread ", zend_thread_id(), "\n"; } else { echo "main\n"; } exit(PCONN_SUCCESS);
6fcd753837c1cd198efb7940673e79465d583bab
tests/test_tools/phpunit_bootstrap.php
tests/test_tools/phpunit_bootstrap.php
<?php /** * A few common settings for all unit tests. * * Also remember do define the @package attribute for your test class to make it appear under * the right package in unit test and code coverage reports. */ define('PRADO_TEST_RUN', true); define('PRADO_FRAMEWORK_DIR', dirname(__FILE__).'/../../framework'); define('VENDOR_DIR', dirname(__FILE__).'/../../vendor'); set_include_path(PRADO_FRAMEWORK_DIR.PATH_SEPARATOR.get_include_path()); if (!@include_once VENDOR_DIR.'/autoload.php') { die('You must set up the project dependencies, run the following commands: wget http://getcomposer.org/composer.phar php composer.phar install'); } require_once(PRADO_FRAMEWORK_DIR.'/prado.php'); // for FunctionalTests require_once(__DIR__.'/PradoGenericSeleniumTest.php');
<?php /** * A few common settings for all unit tests. * * Also remember do define the @package attribute for your test class to make it appear under * the right package in unit test and code coverage reports. */ define('PRADO_TEST_RUN', true); define('PRADO_FRAMEWORK_DIR', dirname(__FILE__).'/../../framework'); define('VENDOR_DIR', dirname(__FILE__).'/../../vendor'); set_include_path(PRADO_FRAMEWORK_DIR.PATH_SEPARATOR.get_include_path()); // coverage tests waste a lot of memory! ini_set('memory_limit', '1G'); if (!@include_once VENDOR_DIR.'/autoload.php') { die('You must set up the project dependencies, run the following commands: wget http://getcomposer.org/composer.phar php composer.phar install'); } require_once(PRADO_FRAMEWORK_DIR.'/prado.php'); // for FunctionalTests require_once(__DIR__.'/PradoGenericSeleniumTest.php');
Raise memory limit for coverage tests
Raise memory limit for coverage tests
PHP
bsd-3-clause
mmauri04/prado,majuca/prado,majuca/prado,mmauri04/prado,majuca/prado,mmauri04/prado
php
## Code Before: <?php /** * A few common settings for all unit tests. * * Also remember do define the @package attribute for your test class to make it appear under * the right package in unit test and code coverage reports. */ define('PRADO_TEST_RUN', true); define('PRADO_FRAMEWORK_DIR', dirname(__FILE__).'/../../framework'); define('VENDOR_DIR', dirname(__FILE__).'/../../vendor'); set_include_path(PRADO_FRAMEWORK_DIR.PATH_SEPARATOR.get_include_path()); if (!@include_once VENDOR_DIR.'/autoload.php') { die('You must set up the project dependencies, run the following commands: wget http://getcomposer.org/composer.phar php composer.phar install'); } require_once(PRADO_FRAMEWORK_DIR.'/prado.php'); // for FunctionalTests require_once(__DIR__.'/PradoGenericSeleniumTest.php'); ## Instruction: Raise memory limit for coverage tests ## Code After: <?php /** * A few common settings for all unit tests. * * Also remember do define the @package attribute for your test class to make it appear under * the right package in unit test and code coverage reports. */ define('PRADO_TEST_RUN', true); define('PRADO_FRAMEWORK_DIR', dirname(__FILE__).'/../../framework'); define('VENDOR_DIR', dirname(__FILE__).'/../../vendor'); set_include_path(PRADO_FRAMEWORK_DIR.PATH_SEPARATOR.get_include_path()); // coverage tests waste a lot of memory! ini_set('memory_limit', '1G'); if (!@include_once VENDOR_DIR.'/autoload.php') { die('You must set up the project dependencies, run the following commands: wget http://getcomposer.org/composer.phar php composer.phar install'); } require_once(PRADO_FRAMEWORK_DIR.'/prado.php'); // for FunctionalTests require_once(__DIR__.'/PradoGenericSeleniumTest.php');
acced8a65a89568f6e9a721483ce39604cc67de6
hello-world/test.pony
hello-world/test.pony
use "ponytest" actor Main new create(env: Env) => var test = PonyTest(env) test(recover _TestHelloWorld end) test.complete() class _TestHelloWorld iso is UnitTest """ Test HelloWorld package """ fun name(): String => "hello-world/HelloWorld" fun apply(h: TestHelper): TestResult => let hello: HelloWorld = HelloWorld.create() h.expect_eq[String]("Hello, World!", hello.say_hello()) h.expect_eq[String]("Hello, Exercism!", hello.say_hello("Exercism!")) true
use "ponytest" actor Main is TestList new create(env: Env) => PonyTest(env, this) new make() => None fun tag tests(test: PonyTest) => test(_TestHelloWorld) class _TestHelloWorld iso is UnitTest """ Test HelloWorld package """ fun name(): String => "hello-world/HelloWorld" fun apply(h: TestHelper) : TestResult => let hello: HelloWorld = HelloWorld.create() h.expect_eq[String]("Hello, World!", hello.say_hello()) h.expect_eq[String]("Hello, Exercism!", hello.say_hello("Exercism!")) true
Make Hello world compatible with Pony 0.2.1
Make Hello world compatible with Pony 0.2.1
Pony
mit
exercism/xpony
pony
## Code Before: use "ponytest" actor Main new create(env: Env) => var test = PonyTest(env) test(recover _TestHelloWorld end) test.complete() class _TestHelloWorld iso is UnitTest """ Test HelloWorld package """ fun name(): String => "hello-world/HelloWorld" fun apply(h: TestHelper): TestResult => let hello: HelloWorld = HelloWorld.create() h.expect_eq[String]("Hello, World!", hello.say_hello()) h.expect_eq[String]("Hello, Exercism!", hello.say_hello("Exercism!")) true ## Instruction: Make Hello world compatible with Pony 0.2.1 ## Code After: use "ponytest" actor Main is TestList new create(env: Env) => PonyTest(env, this) new make() => None fun tag tests(test: PonyTest) => test(_TestHelloWorld) class _TestHelloWorld iso is UnitTest """ Test HelloWorld package """ fun name(): String => "hello-world/HelloWorld" fun apply(h: TestHelper) : TestResult => let hello: HelloWorld = HelloWorld.create() h.expect_eq[String]("Hello, World!", hello.say_hello()) h.expect_eq[String]("Hello, Exercism!", hello.say_hello("Exercism!")) true
261cb5aecc52d07b10d826e8b22d17817d1c3529
web/backend/backend_django/apps/capacity/management/commands/importpath.py
web/backend/backend_django/apps/capacity/management/commands/importpath.py
from __future__ import unicode_literals from optparse import make_option import os from csv import reader from codecs import BOM_UTF8 import pickle from django.utils.six import string_types, PY3 from django.core.management.base import BaseCommand, CommandError from ...models import Path class Command(BaseCommand): help = 'Encode txt files in ascii format' def add_arguments(self, parser): parser.add_argument('--input', '-i', help='input file as pickle') def handle(self, *args, **options): i = options['input'] if not os.path.isfile(i): raise CommandError trips = pickle.load(open(i, "rb")) print(len(trips)) for k, path in trips.items(): trip_id = k[0] stop_id = k[1] try: _, created = Path.objects.get_or_create( trip_id = int(trip_id), stop_id = int(stop_id), path = str(path) ) pass except Exception as e: self.stdout.write("Error with row {} {} : {}".format(k, path, e)) self.stdout.write("Done")
from __future__ import unicode_literals from optparse import make_option import os from csv import reader from codecs import BOM_UTF8 import pickle from django.utils.six import string_types, PY3 from django.core.management.base import BaseCommand, CommandError from ...models import Path class Command(BaseCommand): help = 'Encode txt files in ascii format' def add_arguments(self, parser): parser.add_argument('--input', '-i', help='input file as pickle') def handle(self, *args, **options): i = options['input'] if not os.path.isfile(i): raise CommandError trips = pickle.load(open(i, "rb")) print(len(trips)) i = 0 for k, path in trips.items(): trip_id = k[0] stop_id = k[1] if i%1000==0: print(i) try: _, created = Path.objects.get_or_create( trip_id = int(trip_id), stop_id = int(stop_id), path = str(path) ) pass except Exception as e: self.stdout.write("Error with row {} {} : {}".format(k, path, e)) i = i+1 self.stdout.write("Done")
Update import path method to reflect behaviour
Update import path method to reflect behaviour
Python
apache-2.0
tOverney/ADA-Project,tOverney/ADA-Project,tOverney/ADA-Project
python
## Code Before: from __future__ import unicode_literals from optparse import make_option import os from csv import reader from codecs import BOM_UTF8 import pickle from django.utils.six import string_types, PY3 from django.core.management.base import BaseCommand, CommandError from ...models import Path class Command(BaseCommand): help = 'Encode txt files in ascii format' def add_arguments(self, parser): parser.add_argument('--input', '-i', help='input file as pickle') def handle(self, *args, **options): i = options['input'] if not os.path.isfile(i): raise CommandError trips = pickle.load(open(i, "rb")) print(len(trips)) for k, path in trips.items(): trip_id = k[0] stop_id = k[1] try: _, created = Path.objects.get_or_create( trip_id = int(trip_id), stop_id = int(stop_id), path = str(path) ) pass except Exception as e: self.stdout.write("Error with row {} {} : {}".format(k, path, e)) self.stdout.write("Done") ## Instruction: Update import path method to reflect behaviour ## Code After: from __future__ import unicode_literals from optparse import make_option import os from csv import reader from codecs import BOM_UTF8 import pickle from django.utils.six import string_types, PY3 from django.core.management.base import BaseCommand, CommandError from ...models import Path class Command(BaseCommand): help = 'Encode txt files in ascii format' def add_arguments(self, parser): parser.add_argument('--input', '-i', help='input file as pickle') def handle(self, *args, **options): i = options['input'] if not os.path.isfile(i): raise CommandError trips = pickle.load(open(i, "rb")) print(len(trips)) i = 0 for k, path in trips.items(): trip_id = k[0] stop_id = k[1] if i%1000==0: print(i) try: _, created = Path.objects.get_or_create( trip_id = int(trip_id), stop_id = int(stop_id), path = str(path) ) pass except Exception as e: self.stdout.write("Error with row {} {} : {}".format(k, path, e)) i = i+1 self.stdout.write("Done")
d1554a63a32b2ee299e21259085684345040235f
main/src/main/java/eu/nerro/wolappla/provider/DeviceContract.java
main/src/main/java/eu/nerro/wolappla/provider/DeviceContract.java
package eu.nerro.wolappla.provider; /** * Contract class for interacting with {@link DeviceProvider}. */ public class DeviceContract { }
package eu.nerro.wolappla.provider; import android.net.Uri; /** * Contract class for interacting with {@link DeviceProvider}. */ public class DeviceContract { public static final String CONTENT_AUTHORITY = "eu.nerro.wolappla"; public static final Uri BASE_CONTENT_URI = Uri.parse("content://" + CONTENT_AUTHORITY); interface DevicesColumns { /** Name describing this device. */ String DEVICE_NAME = "device_name"; /** MAC address of the network card of this device. */ String DEVICE_MAC_ADDRESS = "device_mac_address"; /** Network broadcast IP. */ String DEVICE_IP_ADDRESS = "device_ip_address"; /** Port on which this device is listening for magic packets. */ String DEVICE_PORT = "device_port"; } }
Add column description for device SQLite table
Add column description for device SQLite table
Java
mit
nerro/wolappla
java
## Code Before: package eu.nerro.wolappla.provider; /** * Contract class for interacting with {@link DeviceProvider}. */ public class DeviceContract { } ## Instruction: Add column description for device SQLite table ## Code After: package eu.nerro.wolappla.provider; import android.net.Uri; /** * Contract class for interacting with {@link DeviceProvider}. */ public class DeviceContract { public static final String CONTENT_AUTHORITY = "eu.nerro.wolappla"; public static final Uri BASE_CONTENT_URI = Uri.parse("content://" + CONTENT_AUTHORITY); interface DevicesColumns { /** Name describing this device. */ String DEVICE_NAME = "device_name"; /** MAC address of the network card of this device. */ String DEVICE_MAC_ADDRESS = "device_mac_address"; /** Network broadcast IP. */ String DEVICE_IP_ADDRESS = "device_ip_address"; /** Port on which this device is listening for magic packets. */ String DEVICE_PORT = "device_port"; } }
6658702d420ec25228880bb1720f4f971e349300
app/js/arethusa.core/document_store.js
app/js/arethusa.core/document_store.js
'use strict'; angular.module('arethusa.core').service('documentStore', function () { var self = this; this.store = {}; this.reset = function () { this.store = {}; }; this.addDocument = function (location, doc) { self.store[location] = doc; }; });
'use strict'; angular.module('arethusa.core').service('documentStore', function () { var self = this; this.reset = function () { this.store = {}; this.confs = {}; }; function extractConf(doc) { angular.extend(self.confs, doc.conf); } this.addDocument = function (location, doc) { self.store[location] = doc; extractConf(doc); }; this.hasAdditionalConfs = function() { return !angular.equals(self.confs, {}); }; this.reset(); });
Save additional confs in documentStore
Save additional confs in documentStore
JavaScript
mit
fbaumgardt/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa
javascript
## Code Before: 'use strict'; angular.module('arethusa.core').service('documentStore', function () { var self = this; this.store = {}; this.reset = function () { this.store = {}; }; this.addDocument = function (location, doc) { self.store[location] = doc; }; }); ## Instruction: Save additional confs in documentStore ## Code After: 'use strict'; angular.module('arethusa.core').service('documentStore', function () { var self = this; this.reset = function () { this.store = {}; this.confs = {}; }; function extractConf(doc) { angular.extend(self.confs, doc.conf); } this.addDocument = function (location, doc) { self.store[location] = doc; extractConf(doc); }; this.hasAdditionalConfs = function() { return !angular.equals(self.confs, {}); }; this.reset(); });
d358449c7f1592e6b06aadc94dcf39dcc50c9671
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/fr.json
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/resources/translations/fr.json
{ "LOGIN" : { "ERROR_PASSWORD_BLANK" : "@:APP.ERROR_PASSWORD_BLANK", "ERROR_PASSWORD_MISMATCH" : "@:APP.ERROR_PASSWORD_MISMATCH", "FIELD_HEADER_NEW_PASSWORD" : "Mot de passe", "FIELD_HEADER_CONFIRM_NEW_PASSWORD" : "Répéter mot de passe" } }
{ "LOGIN" : { "ERROR_PASSWORD_BLANK" : "@:APP.ERROR_PASSWORD_BLANK", "ERROR_PASSWORD_MISMATCH" : "@:APP.ERROR_PASSWORD_MISMATCH", "FIELD_HEADER_NEW_PASSWORD" : "Mot de passe", "FIELD_HEADER_CONFIRM_NEW_PASSWORD" : "Répéter mot de passe" }, "USER_ATTRIBUTES" : { "FIELD_HEADER_DISABLED" : "Identifiant désactivé:", "FIELD_HEADER_EXPIRED" : "Mot de passe expiré:", "FIELD_HEADER_ACCESS_WINDOW_END" : "Interdire l'accès après:", "FIELD_HEADER_ACCESS_WINDOW_START" : "Autoriser l'accès après:", "FIELD_HEADER_TIMEZONE" : "Fuseau horaire de l'utilisateur:", "FIELD_HEADER_VALID_FROM" : "Activer le compte après:", "FIELD_HEADER_VALID_UNTIL" : "Désactiver le compte après:", "SECTION_HEADER_RESTRICTIONS" : "Restrictions de comptes" } }
Merge updated French translations for database auth.
GUACAMOLE-156: Merge updated French translations for database auth.
JSON
apache-2.0
mike-jumper/incubator-guacamole-client,lato333/guacamole-client,glyptodon/guacamole-client,jmuehlner/incubator-guacamole-client,softpymesJeffer/incubator-guacamole-client,necouchman/incubator-guacamole-client,esmailpour-hosein/incubator-guacamole-client,lato333/guacamole-client,necouchman/incubator-guacamole-client,lato333/guacamole-client,glyptodon/guacamole-client,softpymesJeffer/incubator-guacamole-client,glyptodon/guacamole-client,softpymesJeffer/incubator-guacamole-client,lato333/guacamole-client,softpymesJeffer/incubator-guacamole-client,necouchman/incubator-guacamole-client,jmuehlner/incubator-guacamole-client,glyptodon/guacamole-client,mike-jumper/incubator-guacamole-client,mike-jumper/incubator-guacamole-client,mike-jumper/incubator-guacamole-client,jmuehlner/incubator-guacamole-client,necouchman/incubator-guacamole-client,glyptodon/guacamole-client,jmuehlner/incubator-guacamole-client
json
## Code Before: { "LOGIN" : { "ERROR_PASSWORD_BLANK" : "@:APP.ERROR_PASSWORD_BLANK", "ERROR_PASSWORD_MISMATCH" : "@:APP.ERROR_PASSWORD_MISMATCH", "FIELD_HEADER_NEW_PASSWORD" : "Mot de passe", "FIELD_HEADER_CONFIRM_NEW_PASSWORD" : "Répéter mot de passe" } } ## Instruction: GUACAMOLE-156: Merge updated French translations for database auth. ## Code After: { "LOGIN" : { "ERROR_PASSWORD_BLANK" : "@:APP.ERROR_PASSWORD_BLANK", "ERROR_PASSWORD_MISMATCH" : "@:APP.ERROR_PASSWORD_MISMATCH", "FIELD_HEADER_NEW_PASSWORD" : "Mot de passe", "FIELD_HEADER_CONFIRM_NEW_PASSWORD" : "Répéter mot de passe" }, "USER_ATTRIBUTES" : { "FIELD_HEADER_DISABLED" : "Identifiant désactivé:", "FIELD_HEADER_EXPIRED" : "Mot de passe expiré:", "FIELD_HEADER_ACCESS_WINDOW_END" : "Interdire l'accès après:", "FIELD_HEADER_ACCESS_WINDOW_START" : "Autoriser l'accès après:", "FIELD_HEADER_TIMEZONE" : "Fuseau horaire de l'utilisateur:", "FIELD_HEADER_VALID_FROM" : "Activer le compte après:", "FIELD_HEADER_VALID_UNTIL" : "Désactiver le compte après:", "SECTION_HEADER_RESTRICTIONS" : "Restrictions de comptes" } }
aed62336b68d823e7b1585d36a8d3686ff46e33a
lib/functions.php
lib/functions.php
<? function tt_connect() { return Tyrant::connect('localhost', 1978); } function get_url($key) { if (!$tt){$tt = tt_connect();} $data = json_decode($tt->get($key), true); return $data; } function save_url($url) { if (!$tt){$tt = tt_connect();} $key = substr(sha1(rand()), 0, 8); while ($tt[$key]) { $key = substr(sha1(rand()), 0, 8); } $data = json_encode(array( 'url' => $url, 'created_at' => gmdate('Y-m-d H:i:s', time()), 'ip' => $_SERVER['REMOTE_ADDR'] )); $tt->put($key, $data); return $key; } ?>
<? function tt_connect() { return Tyrant::connect('localhost', 1978); } function get_url($key) { if (!$tt){$tt = tt_connect();} $data = json_decode($tt->get($key), true); $data['hits'] = $data['hits'] + 1; $data['last_hit'] = gmdate('Y-m-d H:i:s', time()); $tt->put($key, json_encode($data)); return $data; } function save_url($url) { if (!$tt){$tt = tt_connect();} $key = substr(sha1(rand()), 0, 8); while ($tt[$key]) { $key = substr(sha1(rand()), 0, 8); } $data = json_encode(array( 'url' => $url, 'created_at' => gmdate('Y-m-d H:i:s', time()), 'ip' => $_SERVER['REMOTE_ADDR'], 'hits' => 0, 'last_hit' => '0000-00-00 00:00:00' )); $tt->put($key, $data); return $key; } ?>
Support for URL hits and last hit.
Feature: Support for URL hits and last hit.
PHP
bsd-3-clause
nachopro/followlink,nachopro/followlink
php
## Code Before: <? function tt_connect() { return Tyrant::connect('localhost', 1978); } function get_url($key) { if (!$tt){$tt = tt_connect();} $data = json_decode($tt->get($key), true); return $data; } function save_url($url) { if (!$tt){$tt = tt_connect();} $key = substr(sha1(rand()), 0, 8); while ($tt[$key]) { $key = substr(sha1(rand()), 0, 8); } $data = json_encode(array( 'url' => $url, 'created_at' => gmdate('Y-m-d H:i:s', time()), 'ip' => $_SERVER['REMOTE_ADDR'] )); $tt->put($key, $data); return $key; } ?> ## Instruction: Feature: Support for URL hits and last hit. ## Code After: <? function tt_connect() { return Tyrant::connect('localhost', 1978); } function get_url($key) { if (!$tt){$tt = tt_connect();} $data = json_decode($tt->get($key), true); $data['hits'] = $data['hits'] + 1; $data['last_hit'] = gmdate('Y-m-d H:i:s', time()); $tt->put($key, json_encode($data)); return $data; } function save_url($url) { if (!$tt){$tt = tt_connect();} $key = substr(sha1(rand()), 0, 8); while ($tt[$key]) { $key = substr(sha1(rand()), 0, 8); } $data = json_encode(array( 'url' => $url, 'created_at' => gmdate('Y-m-d H:i:s', time()), 'ip' => $_SERVER['REMOTE_ADDR'], 'hits' => 0, 'last_hit' => '0000-00-00 00:00:00' )); $tt->put($key, $data); return $key; } ?>
a16df1d11a10812a360a5f97da9d52c71115bfdf
library/enqueue-scripts.php
library/enqueue-scripts.php
<?php if (!function_exists('FoundationPress_scripts')) : function FoundationPress_scripts() { // deregister the jquery version bundled with wordpress wp_deregister_script( 'jquery' ); // register scripts wp_register_script( 'modernizr', get_template_directory_uri() . '/js/modernizr/modernizr.min.js', array(), '1.0.0', false ); wp_register_script( 'jquery', get_template_directory_uri() . '/js/jquery/dist/jquery.min.js', array(), '1.0.0', false ); wp_register_script( 'foundation', get_template_directory_uri() . '/js/app.js', array('jquery'), '1.0.0', true ); // enqueue scripts wp_enqueue_script('modernizr'); wp_enqueue_script('jquery'); wp_enqueue_script('foundation'); } add_action( 'wp_enqueue_scripts', 'FoundationPress_scripts' ); endif; ?>
<?php if (!function_exists('FoundationPress_scripts')) : function FoundationPress_scripts() { // deregister the jquery version bundled with wordpress wp_deregister_script( 'jquery' ); // register scripts wp_register_script( 'modernizr', get_template_directory_uri() . '/js/modernizr/modernizr.min.js', array(), '1.0.0', false ); wp_register_script( 'jquery', get_template_directory_uri() . '/js/jquery/dist/jquery.min.js', array(), '1.0.0', false ); wp_register_script( 'foundation', get_template_directory_uri() . '/js/app.js', array('jquery'), '1.0.0', true ); // enqueue scripts wp_enqueue_script('modernizr'); wp_enqueue_script('jquery'); wp_enqueue_script('foundation'); } add_action( 'wp_enqueue_scripts', 'FoundationPress_scripts' ); endif; function FoundationPress_styles() { global $post; $custom_css = ""; wp_enqueue_style( 'FoundationPress_styles', get_stylesheet_uri() ); if ( has_post_thumbnail( $post->ID ) ) { $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); $custom_css .= " #header-banner { background: url($image[0]); }"; } if ( $custom_css ) wp_add_inline_style( 'FoundationPress_styles', $custom_css ); } add_action( 'wp_enqueue_scripts', 'FoundationPress_styles' ); ?>
Use feature image as header banner
Use feature image as header banner Dynamically replace #header-banner background with feature image.
PHP
mit
zeppytoh/nuscru-foundationpress,zeppytoh/nuscru-foundationpress
php
## Code Before: <?php if (!function_exists('FoundationPress_scripts')) : function FoundationPress_scripts() { // deregister the jquery version bundled with wordpress wp_deregister_script( 'jquery' ); // register scripts wp_register_script( 'modernizr', get_template_directory_uri() . '/js/modernizr/modernizr.min.js', array(), '1.0.0', false ); wp_register_script( 'jquery', get_template_directory_uri() . '/js/jquery/dist/jquery.min.js', array(), '1.0.0', false ); wp_register_script( 'foundation', get_template_directory_uri() . '/js/app.js', array('jquery'), '1.0.0', true ); // enqueue scripts wp_enqueue_script('modernizr'); wp_enqueue_script('jquery'); wp_enqueue_script('foundation'); } add_action( 'wp_enqueue_scripts', 'FoundationPress_scripts' ); endif; ?> ## Instruction: Use feature image as header banner Dynamically replace #header-banner background with feature image. ## Code After: <?php if (!function_exists('FoundationPress_scripts')) : function FoundationPress_scripts() { // deregister the jquery version bundled with wordpress wp_deregister_script( 'jquery' ); // register scripts wp_register_script( 'modernizr', get_template_directory_uri() . '/js/modernizr/modernizr.min.js', array(), '1.0.0', false ); wp_register_script( 'jquery', get_template_directory_uri() . '/js/jquery/dist/jquery.min.js', array(), '1.0.0', false ); wp_register_script( 'foundation', get_template_directory_uri() . '/js/app.js', array('jquery'), '1.0.0', true ); // enqueue scripts wp_enqueue_script('modernizr'); wp_enqueue_script('jquery'); wp_enqueue_script('foundation'); } add_action( 'wp_enqueue_scripts', 'FoundationPress_scripts' ); endif; function FoundationPress_styles() { global $post; $custom_css = ""; wp_enqueue_style( 'FoundationPress_styles', get_stylesheet_uri() ); if ( has_post_thumbnail( $post->ID ) ) { $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); $custom_css .= " #header-banner { background: url($image[0]); }"; } if ( $custom_css ) wp_add_inline_style( 'FoundationPress_styles', $custom_css ); } add_action( 'wp_enqueue_scripts', 'FoundationPress_styles' ); ?>
656f58dfd6a0c9a794c8d7eb156b0a9c4720eaa4
.travis.yml
.travis.yml
language: python python: - "2.7" install: - (cd vendor && git submodule update --init --recursive) - pip install -r requirements/compiled.txt - cp webpagemaker/settings/local.py-dist webpagemaker/settings/local.py - mysql -e 'create database playdoh_app;' - python manage.py syncdb --noinput script: make test
language: python python: - "2.7" install: - (cd vendor && git submodule update --init --recursive) - pip install -r requirements/compiled.txt - cp webpagemaker/settings/local.py-dist webpagemaker/settings/local.py - mysql -e 'create database playdoh_app;' - python manage.py syncdb --noinput - python manage.py migrate --noinput script: make test
Make sure to run migrations as well.
Make sure to run migrations as well.
YAML
mpl-2.0
brianloveswords/webpagemaker,brianloveswords/webpagemaker,brianloveswords/webpagemaker,brianloveswords/webpagemaker
yaml
## Code Before: language: python python: - "2.7" install: - (cd vendor && git submodule update --init --recursive) - pip install -r requirements/compiled.txt - cp webpagemaker/settings/local.py-dist webpagemaker/settings/local.py - mysql -e 'create database playdoh_app;' - python manage.py syncdb --noinput script: make test ## Instruction: Make sure to run migrations as well. ## Code After: language: python python: - "2.7" install: - (cd vendor && git submodule update --init --recursive) - pip install -r requirements/compiled.txt - cp webpagemaker/settings/local.py-dist webpagemaker/settings/local.py - mysql -e 'create database playdoh_app;' - python manage.py syncdb --noinput - python manage.py migrate --noinput script: make test
520eddd8396bbe28f68b5e57e693b138d8ed28f1
README.md
README.md
Rorschart ========= Rorchart interprates Rails data structures for you to generate beautiful Javascript Google Charts. Designed to be the perfect companion to [rails-snowplow](#). ### Credits Rorschart is inpired by [chartkick](https://github.com/ankane/chartkick) from Andrew Kane. Rorschart was design with a different approach of data handling and especially regarding multiple series management to allow multiple series Graphs and Tables creation right from an ActiveRecord query.
Rorschart ========= Rorchart interprates Rails data structures for you to generate beautiful Javascript Google Charts. Checkout the [demonstration page](http://viadeo.github.io/rorschart). Rorschart is a Ruby library that interprates Rails data structures for you to generate beautiful Javascript Google. # Multi-series charts directly from yours ActiveRecord queries # Works with all Google Charts # Detects appropriate data type to customize axes labels # Supports asynchonous ajax data generation # Rorschart knows how to draw charts from Array, Hash, Array of Array or Hash, ActiveRecord::Relation...
Add demo page to the Readme
Add demo page to the Readme
Markdown
mit
viadeo/rorschart,viadeo/rorschart
markdown
## Code Before: Rorschart ========= Rorchart interprates Rails data structures for you to generate beautiful Javascript Google Charts. Designed to be the perfect companion to [rails-snowplow](#). ### Credits Rorschart is inpired by [chartkick](https://github.com/ankane/chartkick) from Andrew Kane. Rorschart was design with a different approach of data handling and especially regarding multiple series management to allow multiple series Graphs and Tables creation right from an ActiveRecord query. ## Instruction: Add demo page to the Readme ## Code After: Rorschart ========= Rorchart interprates Rails data structures for you to generate beautiful Javascript Google Charts. Checkout the [demonstration page](http://viadeo.github.io/rorschart). Rorschart is a Ruby library that interprates Rails data structures for you to generate beautiful Javascript Google. # Multi-series charts directly from yours ActiveRecord queries # Works with all Google Charts # Detects appropriate data type to customize axes labels # Supports asynchonous ajax data generation # Rorschart knows how to draw charts from Array, Hash, Array of Array or Hash, ActiveRecord::Relation...
56ee0e42bf36cb0ebab286862b111a5a299fb279
README.md
README.md
ERROR: type should be string, got "\nhttps://rvm.beginrescueend.com/integration/capistrano\n\n## Description\n\nRVM / Capistrano Integration Gem\n\n## Installation\n\nRVM / Capistrano integration is now available as a separate gem\n\n $ gem install rvm-capistrano\n\n## Example\n\nThe following code will:\n\n- detect `ruby@gemset` used for deployment\n- install RVM and Ruby on `cap deploy:setup`\n\nExample:\n\n set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\\//,\"\")\n set :rvm_install_ruby_params, '--1.9' # for jruby/rbx default to 1.9 mode\n\n before 'deploy:setup', 'rvm:install_rvm' # install RVM\n before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, or:\n before 'deploy:setup', 'rvm:create_gemset' # only create gemset\n\n require \"rvm/capistrano\"\n\n## To use the ruby version currently active locally\n\n set :rvm_ruby_string, :local\n\n## Development\n\n $ rake spec\n"
ERROR: type should be string, got "\nhttps://rvm.io/integration/capistrano/#gem\n\n## Description\n\nRVM / Capistrano Integration Gem\n\n## Installation\n\nRVM / Capistrano integration is now available as a separate gem\n\n $ gem install rvm-capistrano\n\n## Example\n\nThe following code will:\n\n- detect `ruby@gemset` used for deployment\n- install RVM and Ruby on `cap deploy:setup`\n\nExample:\n\n set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\\//,\"\")\n set :rvm_install_ruby_params, '--1.9' # for jruby/rbx default to 1.9 mode\n\n before 'deploy:setup', 'rvm:install_rvm' # install RVM\n before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, or:\n before 'deploy:setup', 'rvm:create_gemset' # only create gemset\n\n require \"rvm/capistrano\"\n\n## To use the ruby version currently active locally\n\n set :rvm_ruby_string, :local\n\n## Development\n\n $ rake spec\n"
Update link (new domain with proper certificate)
Update link (new domain with proper certificate)
Markdown
mit
rvm/rvm-capistrano
markdown
## Code Before: https://rvm.beginrescueend.com/integration/capistrano ## Description RVM / Capistrano Integration Gem ## Installation RVM / Capistrano integration is now available as a separate gem $ gem install rvm-capistrano ## Example The following code will: - detect `ruby@gemset` used for deployment - install RVM and Ruby on `cap deploy:setup` Example: set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") set :rvm_install_ruby_params, '--1.9' # for jruby/rbx default to 1.9 mode before 'deploy:setup', 'rvm:install_rvm' # install RVM before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, or: before 'deploy:setup', 'rvm:create_gemset' # only create gemset require "rvm/capistrano" ## To use the ruby version currently active locally set :rvm_ruby_string, :local ## Development $ rake spec ## Instruction: Update link (new domain with proper certificate) ## Code After: https://rvm.io/integration/capistrano/#gem ## Description RVM / Capistrano Integration Gem ## Installation RVM / Capistrano integration is now available as a separate gem $ gem install rvm-capistrano ## Example The following code will: - detect `ruby@gemset` used for deployment - install RVM and Ruby on `cap deploy:setup` Example: set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") set :rvm_install_ruby_params, '--1.9' # for jruby/rbx default to 1.9 mode before 'deploy:setup', 'rvm:install_rvm' # install RVM before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, or: before 'deploy:setup', 'rvm:create_gemset' # only create gemset require "rvm/capistrano" ## To use the ruby version currently active locally set :rvm_ruby_string, :local ## Development $ rake spec
fb8fb61303dd567038ca812a61e6702b8b3f4edc
tests/test_exceptions.py
tests/test_exceptions.py
from cookiecutter import exceptions def test_undefined_variable_to_str(): undefined_var_error = exceptions.UndefinedVariableInTemplate( 'Beautiful is better than ugly', exceptions.CookiecutterException('Errors should never pass silently'), {'cookiecutter': {'foo': 'bar'}} ) expected_str = ( "Beautiful is better than ugly. " "Error message: Errors should never pass silently. " "Context: {'cookiecutter': {'foo': 'bar'}}" ) assert str(undefined_var_error) == expected_str
from jinja2.exceptions import UndefinedError from cookiecutter import exceptions def test_undefined_variable_to_str(): undefined_var_error = exceptions.UndefinedVariableInTemplate( 'Beautiful is better than ugly', UndefinedError('Errors should never pass silently'), {'cookiecutter': {'foo': 'bar'}} ) expected_str = ( "Beautiful is better than ugly. " "Error message: Errors should never pass silently. " "Context: {'cookiecutter': {'foo': 'bar'}}" ) assert str(undefined_var_error) == expected_str
Create a jinja2 error in the test to ensure it has a message attribute
Create a jinja2 error in the test to ensure it has a message attribute
Python
bsd-3-clause
hackebrot/cookiecutter,dajose/cookiecutter,dajose/cookiecutter,willingc/cookiecutter,audreyr/cookiecutter,Springerle/cookiecutter,terryjbates/cookiecutter,hackebrot/cookiecutter,Springerle/cookiecutter,willingc/cookiecutter,pjbull/cookiecutter,stevepiercy/cookiecutter,michaeljoseph/cookiecutter,luzfcb/cookiecutter,audreyr/cookiecutter,michaeljoseph/cookiecutter,luzfcb/cookiecutter,pjbull/cookiecutter,terryjbates/cookiecutter,stevepiercy/cookiecutter
python
## Code Before: from cookiecutter import exceptions def test_undefined_variable_to_str(): undefined_var_error = exceptions.UndefinedVariableInTemplate( 'Beautiful is better than ugly', exceptions.CookiecutterException('Errors should never pass silently'), {'cookiecutter': {'foo': 'bar'}} ) expected_str = ( "Beautiful is better than ugly. " "Error message: Errors should never pass silently. " "Context: {'cookiecutter': {'foo': 'bar'}}" ) assert str(undefined_var_error) == expected_str ## Instruction: Create a jinja2 error in the test to ensure it has a message attribute ## Code After: from jinja2.exceptions import UndefinedError from cookiecutter import exceptions def test_undefined_variable_to_str(): undefined_var_error = exceptions.UndefinedVariableInTemplate( 'Beautiful is better than ugly', UndefinedError('Errors should never pass silently'), {'cookiecutter': {'foo': 'bar'}} ) expected_str = ( "Beautiful is better than ugly. " "Error message: Errors should never pass silently. " "Context: {'cookiecutter': {'foo': 'bar'}}" ) assert str(undefined_var_error) == expected_str
c485a6b8b1230e319b69adbb46788405d4e48c89
corpus/utf8-normalize.sh
corpus/utf8-normalize.sh
if which uconv > /dev/null then CMD="uconv -f utf8 -t utf8 -x Any-NFKC --callback skip" else echo "Cannot find ICU uconv (http://site.icu-project.org/) ... falling back to iconv. Normalization NOT taking place." 1>&2 CMD="iconv -f utf8 -t utf8 -c" fi $CMD | /usr/bin/perl -w -e ' while (<>) { chomp; s/[\x00-\x1F]+/ /g; s/ +/ /g; s/^ //; s/ $//; print "$_\n"; }'
if which uconv > /dev/null then CMD="uconv -f utf8 -t utf8 -x Any-NFKC --callback skip --remove-signature" else echo "Cannot find ICU uconv (http://site.icu-project.org/) ... falling back to iconv. Normalization NOT taking place." 1>&2 CMD="iconv -f utf8 -t utf8 -c" fi $CMD | /usr/bin/perl -w -e ' while (<>) { chomp; s/[\x00-\x1F]+/ /g; s/ +/ /g; s/^ //; s/ $//; print "$_\n"; }'
Stop BOMbs before they decrease quality
Stop BOMbs before they decrease quality
Shell
apache-2.0
veer66/cdec,veer66/cdec,carhaas/cdec-semparse,veer66/cdec,redpony/cdec,redpony/cdec,veer66/cdec,veer66/cdec,carhaas/cdec-semparse,redpony/cdec,redpony/cdec,pks/cdec-dtrain,veer66/cdec,redpony/cdec,pks/cdec-dtrain,pks/cdec-dtrain,pks/cdec-dtrain,m5w/atools,carhaas/cdec-semparse,pks/cdec-dtrain,carhaas/cdec-semparse,carhaas/cdec-semparse,pks/cdec-dtrain,redpony/cdec,carhaas/cdec-semparse,m5w/atools,m5w/atools
shell
## Code Before: if which uconv > /dev/null then CMD="uconv -f utf8 -t utf8 -x Any-NFKC --callback skip" else echo "Cannot find ICU uconv (http://site.icu-project.org/) ... falling back to iconv. Normalization NOT taking place." 1>&2 CMD="iconv -f utf8 -t utf8 -c" fi $CMD | /usr/bin/perl -w -e ' while (<>) { chomp; s/[\x00-\x1F]+/ /g; s/ +/ /g; s/^ //; s/ $//; print "$_\n"; }' ## Instruction: Stop BOMbs before they decrease quality ## Code After: if which uconv > /dev/null then CMD="uconv -f utf8 -t utf8 -x Any-NFKC --callback skip --remove-signature" else echo "Cannot find ICU uconv (http://site.icu-project.org/) ... falling back to iconv. Normalization NOT taking place." 1>&2 CMD="iconv -f utf8 -t utf8 -c" fi $CMD | /usr/bin/perl -w -e ' while (<>) { chomp; s/[\x00-\x1F]+/ /g; s/ +/ /g; s/^ //; s/ $//; print "$_\n"; }'
fdfff5a728c85d1436e24576378d2d540a06a99c
rxbus/src/main/java/com/hwangjr/rxbus/RxBus.java
rxbus/src/main/java/com/hwangjr/rxbus/RxBus.java
package com.hwangjr.rxbus; /** * Instance of {@link Bus}. * Simply use {@link #get()} to get the instance of {@link Bus} */ public class RxBus { /** * Instance of {@link Bus} */ private static Bus sBus; /** * Get the instance of {@link Bus} * * @return */ public static synchronized Bus get() { if (sBus == null) { sBus = new Bus(); } return sBus; } }
package com.hwangjr.rxbus; import com.hwangjr.rxbus.thread.ThreadEnforcer; /** * Instance of {@link Bus}. * Simply use {@link #get()} to get the instance of {@link Bus} */ public class RxBus { /** * Instance of {@link Bus} */ private static Bus sBus; /** * Get the instance of {@link Bus} * * @return */ public static synchronized Bus get() { if (sBus == null) { sBus = new Bus(ThreadEnforcer.ANY); } return sBus; } }
Modify default rxbus from MainThreadEnforce to AnyThreadEnforce
Modify default rxbus from MainThreadEnforce to AnyThreadEnforce
Java
apache-2.0
AndroidKnife/RxBus
java
## Code Before: package com.hwangjr.rxbus; /** * Instance of {@link Bus}. * Simply use {@link #get()} to get the instance of {@link Bus} */ public class RxBus { /** * Instance of {@link Bus} */ private static Bus sBus; /** * Get the instance of {@link Bus} * * @return */ public static synchronized Bus get() { if (sBus == null) { sBus = new Bus(); } return sBus; } } ## Instruction: Modify default rxbus from MainThreadEnforce to AnyThreadEnforce ## Code After: package com.hwangjr.rxbus; import com.hwangjr.rxbus.thread.ThreadEnforcer; /** * Instance of {@link Bus}. * Simply use {@link #get()} to get the instance of {@link Bus} */ public class RxBus { /** * Instance of {@link Bus} */ private static Bus sBus; /** * Get the instance of {@link Bus} * * @return */ public static synchronized Bus get() { if (sBus == null) { sBus = new Bus(ThreadEnforcer.ANY); } return sBus; } }
5931f8b0ce3febb0b8d0571ceca2133444632c85
aphrodite/app/controllers/api/v1/documents_controller.rb
aphrodite/app/controllers/api/v1/documents_controller.rb
class Api::V1::DocumentsController < Api::V1::BaseController before_filter :authenticate_user! def update document = current_user.documents.find(params[:id]) document.update_attributes params[:document] respond_with document end end
class Api::V1::DocumentsController < Api::V1::BaseController before_filter :authenticate_user! def index respond_with Document.where(user_id: current_user.id).order_by(order) end def update document = current_user.documents.find(params[:id]) document.update_attributes params[:document] respond_with document end private def order "#{sort_column} #{sort_direction}" end def sort_column %w[created_at title].include?(params[:sort]) ? params[:sort] : 'created_at' end def sort_direction %w[asc desc].include?(params[:direction]) ? params[:direction] : "asc" end end
Add index action to api/documents
[aphrodite] Add index action to api/documents
Ruby
mit
analiceme/chaos
ruby
## Code Before: class Api::V1::DocumentsController < Api::V1::BaseController before_filter :authenticate_user! def update document = current_user.documents.find(params[:id]) document.update_attributes params[:document] respond_with document end end ## Instruction: [aphrodite] Add index action to api/documents ## Code After: class Api::V1::DocumentsController < Api::V1::BaseController before_filter :authenticate_user! def index respond_with Document.where(user_id: current_user.id).order_by(order) end def update document = current_user.documents.find(params[:id]) document.update_attributes params[:document] respond_with document end private def order "#{sort_column} #{sort_direction}" end def sort_column %w[created_at title].include?(params[:sort]) ? params[:sort] : 'created_at' end def sort_direction %w[asc desc].include?(params[:direction]) ? params[:direction] : "asc" end end
625fe4ea0c354208841bfc4dcbb4659fa8799065
README.md
README.md
Citero-ruby ========== Ruby repository for the [Citero](https://github.com/NYULibraries/citero) project. Citero is a program that allows for mapping of data inputs from various systems into one normalized metadata schema tentatively known as *Citero Standard Form*, or *CSF*. From the normalized schema, *CSF*, it can produce another output format for use by another system. Citero-ruby is a complete rewrite of the Java project in Ruby. Currently Supported Formats/Systems =================================== How to install ============== How to run ========== API Considerations ========== Exceptions ========== CSF =====
Citero-ruby ========== Citero is a program that allows for mapping of data inputs from various systems into one normalized metadata schema tentatively known as *Citero Standard Form*, or *CSF*. From the normalized schema, *CSF*, it can produce another output format for use by another system.
Remove placeholder text on readme
Remove placeholder text on readme
Markdown
mit
NYULibraries/citero
markdown
## Code Before: Citero-ruby ========== Ruby repository for the [Citero](https://github.com/NYULibraries/citero) project. Citero is a program that allows for mapping of data inputs from various systems into one normalized metadata schema tentatively known as *Citero Standard Form*, or *CSF*. From the normalized schema, *CSF*, it can produce another output format for use by another system. Citero-ruby is a complete rewrite of the Java project in Ruby. Currently Supported Formats/Systems =================================== How to install ============== How to run ========== API Considerations ========== Exceptions ========== CSF ===== ## Instruction: Remove placeholder text on readme ## Code After: Citero-ruby ========== Citero is a program that allows for mapping of data inputs from various systems into one normalized metadata schema tentatively known as *Citero Standard Form*, or *CSF*. From the normalized schema, *CSF*, it can produce another output format for use by another system.
d0b10caa4ba2225bea20fe8fa0ab5a00173d4ca2
src/components/dev.jsx
src/components/dev.jsx
import React from 'react'; import {Link} from 'react-router'; export default (props) => ( <div className="box"> <div className="box-header-timeline"></div> <div className="box-body"> <h3>Help us build FreeFeed</h3> <p>We are looking for volunteers to help us build FreeFeed, an open-source social network, replacement of FriendFeed.com.</p> <p>We need help with both development and testing.</p> <p>FreeFeed is open-source: <a href="https://github.com/FreeFeed/" target="_blank">https://github.com/FreeFeed/</a></p> <p>The <a href="https://github.com/FreeFeed/freefeed-server" target="_blank">backend</a> is built with Node.js and Redis. It is now being re-written to use PostgreSQL instead of Redis.</p> <p>The <a href="https://github.com/FreeFeed/freefeed-react-client" target="_blank">frontend</a> is built with React.</p> <h3>Roadmap</h3> <p>[x] v 0.6 React frontend<br/> [x] v 0.7 Add real-time updates to the frontend<br/> [x] v 0.8 Add support for private groups<br/> [ &nbsp;] v 0.9 Migrate to Postgres<br/> [ &nbsp;] v 1.0 Support for search and #hashtags</p> <p><a href="https://dev.freefeed.net" target="_blank">Join</a> our team of volunteers!</p> <p>P.S. We welcome contributions of features outside of the core ones outlined above, however we feel that the core has higher priority (especially switching the primary data store).</p> </div> </div> );
import React from 'react'; export default (props) => ( <div className="box"> <div className="box-header-timeline"></div> <div className="box-body"> <h3>Help us build FreeFeed</h3> <p>We are looking for volunteers to help us build FreeFeed, an open-source social network, replacement of FriendFeed.com.</p> <p>We <a href="https://dev.freefeed.net" target="_blank">need help</a> with both development and testing.</p> <p>FreeFeed is open-source: <a href="https://github.com/FreeFeed/" target="_blank">https://github.com/FreeFeed/</a></p> <p>The <a href="https://github.com/FreeFeed/freefeed-server" target="_blank">backend</a> is built with Node.js and PostgreSQL.</p> <p>The <a href="https://github.com/FreeFeed/freefeed-react-client" target="_blank">frontend</a> is built with React.</p> <p><b><a href="https://dev.freefeed.net" target="_blank">Join</a></b> our team of volunteers!</p> </div> </div> );
Update Dev page (FreeFeed v1 released)
Update Dev page (FreeFeed v1 released)
JSX
mit
clbn/freefeed-gamma,clbn/freefeed-gamma,clbn/freefeed-gamma
jsx
## Code Before: import React from 'react'; import {Link} from 'react-router'; export default (props) => ( <div className="box"> <div className="box-header-timeline"></div> <div className="box-body"> <h3>Help us build FreeFeed</h3> <p>We are looking for volunteers to help us build FreeFeed, an open-source social network, replacement of FriendFeed.com.</p> <p>We need help with both development and testing.</p> <p>FreeFeed is open-source: <a href="https://github.com/FreeFeed/" target="_blank">https://github.com/FreeFeed/</a></p> <p>The <a href="https://github.com/FreeFeed/freefeed-server" target="_blank">backend</a> is built with Node.js and Redis. It is now being re-written to use PostgreSQL instead of Redis.</p> <p>The <a href="https://github.com/FreeFeed/freefeed-react-client" target="_blank">frontend</a> is built with React.</p> <h3>Roadmap</h3> <p>[x] v 0.6 React frontend<br/> [x] v 0.7 Add real-time updates to the frontend<br/> [x] v 0.8 Add support for private groups<br/> [ &nbsp;] v 0.9 Migrate to Postgres<br/> [ &nbsp;] v 1.0 Support for search and #hashtags</p> <p><a href="https://dev.freefeed.net" target="_blank">Join</a> our team of volunteers!</p> <p>P.S. We welcome contributions of features outside of the core ones outlined above, however we feel that the core has higher priority (especially switching the primary data store).</p> </div> </div> ); ## Instruction: Update Dev page (FreeFeed v1 released) ## Code After: import React from 'react'; export default (props) => ( <div className="box"> <div className="box-header-timeline"></div> <div className="box-body"> <h3>Help us build FreeFeed</h3> <p>We are looking for volunteers to help us build FreeFeed, an open-source social network, replacement of FriendFeed.com.</p> <p>We <a href="https://dev.freefeed.net" target="_blank">need help</a> with both development and testing.</p> <p>FreeFeed is open-source: <a href="https://github.com/FreeFeed/" target="_blank">https://github.com/FreeFeed/</a></p> <p>The <a href="https://github.com/FreeFeed/freefeed-server" target="_blank">backend</a> is built with Node.js and PostgreSQL.</p> <p>The <a href="https://github.com/FreeFeed/freefeed-react-client" target="_blank">frontend</a> is built with React.</p> <p><b><a href="https://dev.freefeed.net" target="_blank">Join</a></b> our team of volunteers!</p> </div> </div> );
c56616fb4581ca358469d900903ef67f0160456c
transformers/BlogPostTransformer.php
transformers/BlogPostTransformer.php
<?php namespace Autumn\Tools\Transformers; use RainLab\Blog\Models\Post; use League\Fractal\TransformerAbstract; class BlogPostTransformer extends TransformerAbstract { protected $defaultIncludes = [ 'featured_images', ]; public function transform(Post $post) { return [ 'id' => $post->id, 'title' => $post->title, 'slug' => $post->slug, 'excerpt' => $post->excerpt, 'content' => $post->content, 'published' => $post->published, 'published_at' => $post->published_at, 'categories' => $post->categories ]; } public function includeFeaturedImages(Post $post) { $images = $post->featured_images; return $this->collection($images, new SystemFileTransformer); } }
<?php namespace Autumn\Tools\Transformers; use RainLab\Blog\Models\Post; use League\Fractal\TransformerAbstract; class BlogPostTransformer extends TransformerAbstract { protected $defaultIncludes = [ 'featured_images', ]; public function transform(Post $post) { return [ 'id' => $post->id, 'title' => $post->title, 'slug' => $post->slug, 'excerpt' => $post->excerpt, 'content' => $post->content, 'published' => $post->published, 'published_at' => $post->published_at->toDateTimeString(), 'categories' => $post->categories()->get(['id', 'name', 'slug']), 'author' => $post->user()->get(['id', 'first_name', 'last_name', 'login', 'email']) ]; } public function includeFeaturedImages(Post $post) { return $this->collection($post->featured_images, new SystemFileTransformer); } }
Add author to post transformer
Add author to post transformer
PHP
mit
gpasztor87/oc-api-plugin
php
## Code Before: <?php namespace Autumn\Tools\Transformers; use RainLab\Blog\Models\Post; use League\Fractal\TransformerAbstract; class BlogPostTransformer extends TransformerAbstract { protected $defaultIncludes = [ 'featured_images', ]; public function transform(Post $post) { return [ 'id' => $post->id, 'title' => $post->title, 'slug' => $post->slug, 'excerpt' => $post->excerpt, 'content' => $post->content, 'published' => $post->published, 'published_at' => $post->published_at, 'categories' => $post->categories ]; } public function includeFeaturedImages(Post $post) { $images = $post->featured_images; return $this->collection($images, new SystemFileTransformer); } } ## Instruction: Add author to post transformer ## Code After: <?php namespace Autumn\Tools\Transformers; use RainLab\Blog\Models\Post; use League\Fractal\TransformerAbstract; class BlogPostTransformer extends TransformerAbstract { protected $defaultIncludes = [ 'featured_images', ]; public function transform(Post $post) { return [ 'id' => $post->id, 'title' => $post->title, 'slug' => $post->slug, 'excerpt' => $post->excerpt, 'content' => $post->content, 'published' => $post->published, 'published_at' => $post->published_at->toDateTimeString(), 'categories' => $post->categories()->get(['id', 'name', 'slug']), 'author' => $post->user()->get(['id', 'first_name', 'last_name', 'login', 'email']) ]; } public function includeFeaturedImages(Post $post) { return $this->collection($post->featured_images, new SystemFileTransformer); } }
c3609cbe9d33222f2bd5c466b874f4943094143f
src/middleware/authenticate.js
src/middleware/authenticate.js
export default (config) => { if ( ! config.enabled) return (req, res, next) => { next() } var header = (config.header || 'Authorization').toLowerCase() var tokenLength = 32 var tokenRegExp = new RegExp(`^Token ([a-zA-Z0-9]{${tokenLength}})$`) return (req, res, next) => { var value = req.headers[header] var err req.auth = { header: value } if ( ! req.auth.header) { err = new Error(`Missing ${config.header} header.`) err.statusCode = 401 return next(err) } if (config.byToken) { var token = value.replace(tokenRegExp, '$1') if (token.length !== tokenLength) { err = new Error('Invalid token.') err.statusCode = 401 return next(err) } req.auth.token = token } if ( ! config.method) return next() config.method(req, config, req.data, (err, user) => { if (err) { err = new Error(err) err.statusCode = 401 return next(err) } req.user = user next() }) } }
export default (config) => { if ( ! config.enabled) return (req, res, next) => { next() } var verifyHeader = ( !! config.header) var header = (config.header || '').toLowerCase() var tokenLength = 32 var tokenRegExp = new RegExp(`^Token ([a-zA-Z0-9]{${tokenLength}})$`) return (req, res, next) => { var err req.auth = {} if (verifyHeader) { var value = req.auth.header = req.headers[header] if ( ! value) { err = new Error(`Missing ${config.header} header.`) err.statusCode = 401 return next(err) } if (config.byToken) { var token = value.replace(tokenRegExp, '$1') if (token.length !== tokenLength) { err = new Error('Invalid token.') err.statusCode = 401 return next(err) } req.auth.token = token } } if ( ! config.method) return next() config.method(req, config, req.data, (err, user) => { if (err) { err = new Error(err) err.statusCode = 401 return next(err) } req.user = user next() }) } }
Make request header optional in authentication middleware.
Make request header optional in authentication middleware.
JavaScript
mit
kukua/concava
javascript
## Code Before: export default (config) => { if ( ! config.enabled) return (req, res, next) => { next() } var header = (config.header || 'Authorization').toLowerCase() var tokenLength = 32 var tokenRegExp = new RegExp(`^Token ([a-zA-Z0-9]{${tokenLength}})$`) return (req, res, next) => { var value = req.headers[header] var err req.auth = { header: value } if ( ! req.auth.header) { err = new Error(`Missing ${config.header} header.`) err.statusCode = 401 return next(err) } if (config.byToken) { var token = value.replace(tokenRegExp, '$1') if (token.length !== tokenLength) { err = new Error('Invalid token.') err.statusCode = 401 return next(err) } req.auth.token = token } if ( ! config.method) return next() config.method(req, config, req.data, (err, user) => { if (err) { err = new Error(err) err.statusCode = 401 return next(err) } req.user = user next() }) } } ## Instruction: Make request header optional in authentication middleware. ## Code After: export default (config) => { if ( ! config.enabled) return (req, res, next) => { next() } var verifyHeader = ( !! config.header) var header = (config.header || '').toLowerCase() var tokenLength = 32 var tokenRegExp = new RegExp(`^Token ([a-zA-Z0-9]{${tokenLength}})$`) return (req, res, next) => { var err req.auth = {} if (verifyHeader) { var value = req.auth.header = req.headers[header] if ( ! value) { err = new Error(`Missing ${config.header} header.`) err.statusCode = 401 return next(err) } if (config.byToken) { var token = value.replace(tokenRegExp, '$1') if (token.length !== tokenLength) { err = new Error('Invalid token.') err.statusCode = 401 return next(err) } req.auth.token = token } } if ( ! config.method) return next() config.method(req, config, req.data, (err, user) => { if (err) { err = new Error(err) err.statusCode = 401 return next(err) } req.user = user next() }) } }
658bcb6421770ab0e6a622bce2da0e5962224eb9
.travis.yml
.travis.yml
language: python env: - TOXENV=py25 PIP_INSECURE=t - TOXENV=py26 - TOXENV=py27 - TOXENV=py32 - TOXENV=py33 - TOXENV=cov matrix: allow_failures: - env: - TOXENV=cov install: - pip install --quiet --use-mirrors tox coveralls script: - tox - if [ $TOXENV == "cov" ]; then coveralls; fi
language: python env: - TOXENV=py25 PIP_INSECURE=t - TOXENV=py26 - TOXENV=py27 - TOXENV=py32 - TOXENV=py33 - TOXENV=cov matrix: allow_failures: - env: - TOXENV=cov install: - pip install --quiet --use-mirrors tox script: - tox after_script: - if [ $TOXENV == "cov" ]; then pip install --quiet --use-mirrors coveralls coveralls; fi
Install coveralls only when needed
Install coveralls only when needed
YAML
mit
tjwei/jedi,jonashaag/jedi,flurischt/jedi,mfussenegger/jedi,jonashaag/jedi,mfussenegger/jedi,dwillmer/jedi,WoLpH/jedi,dwillmer/jedi,tjwei/jedi,flurischt/jedi,WoLpH/jedi
yaml
## Code Before: language: python env: - TOXENV=py25 PIP_INSECURE=t - TOXENV=py26 - TOXENV=py27 - TOXENV=py32 - TOXENV=py33 - TOXENV=cov matrix: allow_failures: - env: - TOXENV=cov install: - pip install --quiet --use-mirrors tox coveralls script: - tox - if [ $TOXENV == "cov" ]; then coveralls; fi ## Instruction: Install coveralls only when needed ## Code After: language: python env: - TOXENV=py25 PIP_INSECURE=t - TOXENV=py26 - TOXENV=py27 - TOXENV=py32 - TOXENV=py33 - TOXENV=cov matrix: allow_failures: - env: - TOXENV=cov install: - pip install --quiet --use-mirrors tox script: - tox after_script: - if [ $TOXENV == "cov" ]; then pip install --quiet --use-mirrors coveralls coveralls; fi
f3648411fad70736a1dd0bda128a50d3d6b24911
spec/python-requirements_spec.rb
spec/python-requirements_spec.rb
require "spec_helper_#{ENV['SPEC_TARGET_BACKEND']}" describe package('python-apt'), :if => os[:family] == 'debian' do it { should be_installed } end describe package('python-dev'), :if => os[:family] == 'debian' do it { should be_installed } end describe package('build-essential'), :if => os[:family] == 'debian' do it { should be_installed } end describe package('unzip'), :if => os[:family] == 'debian' do it { should be_installed } end describe package('openssl') do it { should be_installed } end describe command('which python') do its(:exit_status) { should eq 0 } end describe command('which unzip') do its(:exit_status) { should eq 0 } end describe command('which curl') do its(:exit_status) { should eq 0 } end
require "spec_helper_#{ENV['SPEC_TARGET_BACKEND']}" describe package('python-apt'), :if => os[:family] == 'debian' do it { should be_installed } end describe package('python-dev'), :if => ['debian', 'alpine'].include?(os[:family]) do it { should be_installed } end describe package('build-essential'), :if => os[:family] == 'debian' do it { should be_installed } end describe package('build-base'), :if => os[:family] == 'alpine' do it { should be_installed } end describe package('unzip'), :if => ['debian', 'alpine'].include?(os[:family]) do it { should be_installed } end describe package('curl'), :if => ['debian', 'alpine'].include?(os[:family]) do it { should be_installed } end describe package('openssl') do it { should be_installed } end describe command('which python') do its(:exit_status) { should eq 0 } end describe command('which unzip') do its(:exit_status) { should eq 0 } end describe command('which curl') do its(:exit_status) { should eq 0 } end
Update specs for Alpine Linux.
Update specs for Alpine Linux.
Ruby
mit
FGtatsuro/ansible-python-requirements
ruby
## Code Before: require "spec_helper_#{ENV['SPEC_TARGET_BACKEND']}" describe package('python-apt'), :if => os[:family] == 'debian' do it { should be_installed } end describe package('python-dev'), :if => os[:family] == 'debian' do it { should be_installed } end describe package('build-essential'), :if => os[:family] == 'debian' do it { should be_installed } end describe package('unzip'), :if => os[:family] == 'debian' do it { should be_installed } end describe package('openssl') do it { should be_installed } end describe command('which python') do its(:exit_status) { should eq 0 } end describe command('which unzip') do its(:exit_status) { should eq 0 } end describe command('which curl') do its(:exit_status) { should eq 0 } end ## Instruction: Update specs for Alpine Linux. ## Code After: require "spec_helper_#{ENV['SPEC_TARGET_BACKEND']}" describe package('python-apt'), :if => os[:family] == 'debian' do it { should be_installed } end describe package('python-dev'), :if => ['debian', 'alpine'].include?(os[:family]) do it { should be_installed } end describe package('build-essential'), :if => os[:family] == 'debian' do it { should be_installed } end describe package('build-base'), :if => os[:family] == 'alpine' do it { should be_installed } end describe package('unzip'), :if => ['debian', 'alpine'].include?(os[:family]) do it { should be_installed } end describe package('curl'), :if => ['debian', 'alpine'].include?(os[:family]) do it { should be_installed } end describe package('openssl') do it { should be_installed } end describe command('which python') do its(:exit_status) { should eq 0 } end describe command('which unzip') do its(:exit_status) { should eq 0 } end describe command('which curl') do its(:exit_status) { should eq 0 } end
25f822086a349668c3442b530037b84aacb719e7
test/features/step_definitions/demo_steps.rb
test/features/step_definitions/demo_steps.rb
Given(/^I am on the koha front page$/) do @browser.goto 'http://catalog.bywatersolutions.com/' end When(/^I search for "([^"]*)"$/) do |search_term| @context[:search_term] = search_term form = @browser.form(:id => 'translControl1') form.text_field(:name => 'q').set @context[:search_term] # binding.pry # uncomment and see what happens! form.submit end Then(/^I should find it in the results$/) do @browser.div(:id => 'userresults').text.should include(@context[:search_term]) end
Given(/^I am on the koha front page$/) do @browser.goto 'http://catalog.bywatersolutions.com/' end When(/^I search for "([^"]*)"$/) do |search_term| @context[:search_term] = search_term binding.pry form = @browser.form(:id => 'searchform') form.text_field(:name => 'q').set @context[:search_term] # binding.pry # uncomment and see what happens! form.submit end Then(/^I should find it in the results$/) do @browser.div(:id => 'userresults').text.should include(@context[:search_term]) end
Fix element type in step.
Fix element type in step.
Ruby
mit
akafred/browsertests,akafred/browsertests
ruby
## Code Before: Given(/^I am on the koha front page$/) do @browser.goto 'http://catalog.bywatersolutions.com/' end When(/^I search for "([^"]*)"$/) do |search_term| @context[:search_term] = search_term form = @browser.form(:id => 'translControl1') form.text_field(:name => 'q').set @context[:search_term] # binding.pry # uncomment and see what happens! form.submit end Then(/^I should find it in the results$/) do @browser.div(:id => 'userresults').text.should include(@context[:search_term]) end ## Instruction: Fix element type in step. ## Code After: Given(/^I am on the koha front page$/) do @browser.goto 'http://catalog.bywatersolutions.com/' end When(/^I search for "([^"]*)"$/) do |search_term| @context[:search_term] = search_term binding.pry form = @browser.form(:id => 'searchform') form.text_field(:name => 'q').set @context[:search_term] # binding.pry # uncomment and see what happens! form.submit end Then(/^I should find it in the results$/) do @browser.div(:id => 'userresults').text.should include(@context[:search_term]) end
d335fce6cea07df872d8cd7d70c6c3fea348e521
tests/__init__.py
tests/__init__.py
import os.path import unittest def get_tests(): start_dir = os.path.dirname(__file__) return unittest.TestLoader().discover(start_dir, pattern="*.py")
import os.path import unittest def get_tests(): return full_suite() def full_suite(): from .resource import ResourceTestCase from .serializer import ResourceTestCase as SerializerTestCase from .utils import UtilsTestCase resourcesuite = unittest.TestLoader().loadTestsFromTestCase(ResourceTestCase) serializersuite = unittest.TestLoader().loadTestsFromTestCase(SerializerTestCase) utilssuite = unittest.TestLoader().loadTestsFromTestCase(UtilsTestCase) return unittest.TestSuite([resourcesuite, serializersuite, utilssuite])
Update get_tests to be backwards compatible with Python 2.6, since the library is compatible it seems worth this extra effort to test against it.
Update get_tests to be backwards compatible with Python 2.6, since the library is compatible it seems worth this extra effort to test against it.
Python
bsd-2-clause
jannon/slumber,IAlwaysBeCoding/More,zongxiao/slumber,infoxchange/slumber,futurice/slumber,IAlwaysBeCoding/slumber,samgiles/slumber,s-block/slumber,ministryofjustice/slumber
python
## Code Before: import os.path import unittest def get_tests(): start_dir = os.path.dirname(__file__) return unittest.TestLoader().discover(start_dir, pattern="*.py") ## Instruction: Update get_tests to be backwards compatible with Python 2.6, since the library is compatible it seems worth this extra effort to test against it. ## Code After: import os.path import unittest def get_tests(): return full_suite() def full_suite(): from .resource import ResourceTestCase from .serializer import ResourceTestCase as SerializerTestCase from .utils import UtilsTestCase resourcesuite = unittest.TestLoader().loadTestsFromTestCase(ResourceTestCase) serializersuite = unittest.TestLoader().loadTestsFromTestCase(SerializerTestCase) utilssuite = unittest.TestLoader().loadTestsFromTestCase(UtilsTestCase) return unittest.TestSuite([resourcesuite, serializersuite, utilssuite])
2f1ab5c647d01454dda2a1fed904bc0087e2165f
us_ignite/templates/profile/user_profile.html
us_ignite/templates/profile/user_profile.html
{% extends "base.html" %} {% block title %}Edit profile - {{ block.super }}{% endblock title %} {% block content %} <h1>Profile</h1> <ul> <li><a href="{% url 'auth_password_change' %}">Password change</a></li> <li><a href="{{ request.user.profile.get_absolute_url }}">View my profile</a></li> </ul> <form method="post" action="{% url 'user_profile' %}"> {{ form.as_p }} {{ formset.as_p }} <p> {% csrf_token %} <button type="submit">Update</button> </p> </form> {% endblock content %}
{% extends "base.html" %} {% block title %}Edit profile - {{ block.super }}{% endblock title %} {% block content %} <h1>Profile</h1> <ul> {% if request.user.has_usable_password %} <li><a href="{% url 'auth_password_change' %}">Password change</a></li> {% endif %} <li><a href="{{ request.user.profile.get_absolute_url }}">View my profile</a></li> </ul> <form method="post" action="{% url 'user_profile' %}"> {{ form.as_p }} {{ formset.as_p }} <p> {% csrf_token %} <button type="submit">Update</button> </p> </form> {% endblock content %}
Remove change password functinality to ``Mozilla Persona`` users.
Remove change password functinality to ``Mozilla Persona`` users. The functionality is not available to them, since the password of the account is managed in ``Mozilla Persona``
HTML
bsd-3-clause
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
html
## Code Before: {% extends "base.html" %} {% block title %}Edit profile - {{ block.super }}{% endblock title %} {% block content %} <h1>Profile</h1> <ul> <li><a href="{% url 'auth_password_change' %}">Password change</a></li> <li><a href="{{ request.user.profile.get_absolute_url }}">View my profile</a></li> </ul> <form method="post" action="{% url 'user_profile' %}"> {{ form.as_p }} {{ formset.as_p }} <p> {% csrf_token %} <button type="submit">Update</button> </p> </form> {% endblock content %} ## Instruction: Remove change password functinality to ``Mozilla Persona`` users. The functionality is not available to them, since the password of the account is managed in ``Mozilla Persona`` ## Code After: {% extends "base.html" %} {% block title %}Edit profile - {{ block.super }}{% endblock title %} {% block content %} <h1>Profile</h1> <ul> {% if request.user.has_usable_password %} <li><a href="{% url 'auth_password_change' %}">Password change</a></li> {% endif %} <li><a href="{{ request.user.profile.get_absolute_url }}">View my profile</a></li> </ul> <form method="post" action="{% url 'user_profile' %}"> {{ form.as_p }} {{ formset.as_p }} <p> {% csrf_token %} <button type="submit">Update</button> </p> </form> {% endblock content %}
de80557a1bd3e2ff1e06e8a1d8d382b4fff9b8d6
pkg/artnet/ip.go
pkg/artnet/ip.go
package artnet import ( "fmt" "net" "strings" ) const ( // addressRange specifies the network CIDR an artnet network should have addressRange = "2.0.0.0/8" ) // FindArtNetIP finds the matching interface with an IP address inside of the addressRange func FindArtNetIP() (net.IP, error) { var ip net.IP _, cidrnet, _ := net.ParseCIDR(addressRange) addrs, err := net.InterfaceAddrs() if err != nil { return ip, fmt.Errorf("error getting ips: %s", err) } for _, addr := range addrs { ip = addr.(*net.IPNet).IP if strings.Contains(ip.String(), ":") { continue } if cidrnet.Contains(ip) { break } } return ip, nil }
package artnet import ( "fmt" "net" "strings" ) const ( // addressRange specifies the network CIDR an artnet network should have addressRange = "2.0.0.0/8" ) // FindArtNetIP finds the matching interface with an IP address inside of the addressRange func FindArtNetIP() (net.IP, error) { _, cidrnet, _ := net.ParseCIDR(addressRange) addrs, err := net.InterfaceAddrs() if err != nil { return nil, fmt.Errorf("error getting ips: %s", err) } for _, addr := range addrs { ip := addr.(*net.IPNet).IP if strings.Contains(ip.String(), ":") { continue } if cidrnet.Contains(ip) { return ip, nil } } return nil, nil }
Fix wrongly as ArtNet Subnet identified IPv6 interface
Fix wrongly as ArtNet Subnet identified IPv6 interface
Go
mit
StageAutoControl/controller
go
## Code Before: package artnet import ( "fmt" "net" "strings" ) const ( // addressRange specifies the network CIDR an artnet network should have addressRange = "2.0.0.0/8" ) // FindArtNetIP finds the matching interface with an IP address inside of the addressRange func FindArtNetIP() (net.IP, error) { var ip net.IP _, cidrnet, _ := net.ParseCIDR(addressRange) addrs, err := net.InterfaceAddrs() if err != nil { return ip, fmt.Errorf("error getting ips: %s", err) } for _, addr := range addrs { ip = addr.(*net.IPNet).IP if strings.Contains(ip.String(), ":") { continue } if cidrnet.Contains(ip) { break } } return ip, nil } ## Instruction: Fix wrongly as ArtNet Subnet identified IPv6 interface ## Code After: package artnet import ( "fmt" "net" "strings" ) const ( // addressRange specifies the network CIDR an artnet network should have addressRange = "2.0.0.0/8" ) // FindArtNetIP finds the matching interface with an IP address inside of the addressRange func FindArtNetIP() (net.IP, error) { _, cidrnet, _ := net.ParseCIDR(addressRange) addrs, err := net.InterfaceAddrs() if err != nil { return nil, fmt.Errorf("error getting ips: %s", err) } for _, addr := range addrs { ip := addr.(*net.IPNet).IP if strings.Contains(ip.String(), ":") { continue } if cidrnet.Contains(ip) { return ip, nil } } return nil, nil }
9e7bcadbb2c522d394f73b762dd986f9c4a5b3c1
simpleshelfmobile/_attachments/code/couchutils.js
simpleshelfmobile/_attachments/code/couchutils.js
/** * Utilities for accessing CouchDB. */ define([ "jquery" ], function($) { var couchUtils = { /** * Login to CouchDB * @return Promise */ login: function(userName, password, urlPrefix) { // $.Deferred callbacks: done, fail, always return $.ajax({ type: "POST", url: urlPrefix + "/_session", dataType: "json", data: { name: userName, password: password } }); }, logout: function(urlPrefix) { return $.ajax({ type: "DELETE", url: urlPrefix + "/_session" }); } }; return couchUtils; });
/** * Utilities for accessing CouchDB. */ define([ "jquery", "settings" ], function($, appSettings) { var couchUtils = { /** * Determine if current session is active. * @return Promise **/ isLoggedIn: function() { var dfrd = $.Deferred(); $.ajax({ url: appSettings.get("urlPrefix") + "/_session", dataType: "json" }).done(function(data) { // Payload must have userCtx.name !== null. if (_.has(data, "userCtx") && (!_.isNull(data.userCtx.name))) { dfrd.resolve(); } else { dfrd.reject(); } }).fail(function() { dfrd.reject(); }) return dfrd; }, /** * Login to CouchDB * @return Promise */ login: function(userName, password) { // $.Deferred callbacks: done, fail, always return $.ajax({ type: "POST", url: appSettings.get("urlPrefix") + "/_session", dataType: "json", data: { name: userName, password: password } }); }, logout: function() { return $.ajax({ type: "DELETE", url: appSettings.get("urlPrefix") + "/_session" }); } }; return couchUtils; });
Add login check, use appSetting model
Add login check, use appSetting model
JavaScript
agpl-3.0
tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf
javascript
## Code Before: /** * Utilities for accessing CouchDB. */ define([ "jquery" ], function($) { var couchUtils = { /** * Login to CouchDB * @return Promise */ login: function(userName, password, urlPrefix) { // $.Deferred callbacks: done, fail, always return $.ajax({ type: "POST", url: urlPrefix + "/_session", dataType: "json", data: { name: userName, password: password } }); }, logout: function(urlPrefix) { return $.ajax({ type: "DELETE", url: urlPrefix + "/_session" }); } }; return couchUtils; }); ## Instruction: Add login check, use appSetting model ## Code After: /** * Utilities for accessing CouchDB. */ define([ "jquery", "settings" ], function($, appSettings) { var couchUtils = { /** * Determine if current session is active. * @return Promise **/ isLoggedIn: function() { var dfrd = $.Deferred(); $.ajax({ url: appSettings.get("urlPrefix") + "/_session", dataType: "json" }).done(function(data) { // Payload must have userCtx.name !== null. if (_.has(data, "userCtx") && (!_.isNull(data.userCtx.name))) { dfrd.resolve(); } else { dfrd.reject(); } }).fail(function() { dfrd.reject(); }) return dfrd; }, /** * Login to CouchDB * @return Promise */ login: function(userName, password) { // $.Deferred callbacks: done, fail, always return $.ajax({ type: "POST", url: appSettings.get("urlPrefix") + "/_session", dataType: "json", data: { name: userName, password: password } }); }, logout: function() { return $.ajax({ type: "DELETE", url: appSettings.get("urlPrefix") + "/_session" }); } }; return couchUtils; });
02b1e8274d769045e8f6e49b579db478c5c8e4c1
client/app/common/common.js
client/app/common/common.js
import angular from 'angular' import Navbar from './navbar/navbar' import Hero from './hero/hero' import User from './user/user' const commonModule = angular.module('app.common', [ Navbar.name, Hero.name, User.name ]) export default commonModule
import angular from 'angular' import Navbar from './navbar/navbar' import User from './user/user' const commonModule = angular.module('app.common', [ Navbar.name, User.name ]) export default commonModule
Remove forgotten references to Hero component
Remove forgotten references to Hero component
JavaScript
apache-2.0
mklinga/aprendo,mklinga/aprendo
javascript
## Code Before: import angular from 'angular' import Navbar from './navbar/navbar' import Hero from './hero/hero' import User from './user/user' const commonModule = angular.module('app.common', [ Navbar.name, Hero.name, User.name ]) export default commonModule ## Instruction: Remove forgotten references to Hero component ## Code After: import angular from 'angular' import Navbar from './navbar/navbar' import User from './user/user' const commonModule = angular.module('app.common', [ Navbar.name, User.name ]) export default commonModule
303530cb85d31a7193c57ba771126e633ef0150c
.kitchen.yml
.kitchen.yml
--- #<% require 'poise_boiler' %> <%= PoiseBoiler.kitchen(platforms: %w{ubuntu-12.04 ubuntu-14.04 ubuntu-16.04 centos-5 centos-6 centos-7}, driver: 'rackspace') %>
--- #<% require 'poise_boiler' %> <%= PoiseBoiler.kitchen(platforms: %w{ubuntu-14.04 ubuntu-16.04 centos-5 centos-6 centos-7}, driver: 'rackspace') %>
Remove Ubuntu 12.04 as no longer supported (past EOL).
Remove Ubuntu 12.04 as no longer supported (past EOL).
YAML
apache-2.0
poise/poise-service,poise/poise-service,poise/poise-service
yaml
## Code Before: --- #<% require 'poise_boiler' %> <%= PoiseBoiler.kitchen(platforms: %w{ubuntu-12.04 ubuntu-14.04 ubuntu-16.04 centos-5 centos-6 centos-7}, driver: 'rackspace') %> ## Instruction: Remove Ubuntu 12.04 as no longer supported (past EOL). ## Code After: --- #<% require 'poise_boiler' %> <%= PoiseBoiler.kitchen(platforms: %w{ubuntu-14.04 ubuntu-16.04 centos-5 centos-6 centos-7}, driver: 'rackspace') %>
6a6e5c263dd9b0b89d4d1e341402eca88943ae68
installer/jaspersoft-install.sh
installer/jaspersoft-install.sh
if [ "$(whoami)" != "root" ]; then echo "Must be root." exit 1 fi USERNAME=$SUDO_USER # ssh cat > /home/$USERNAME/.ssh/config <<"EOL" Host falcon.jaspersoft.com HostName falcon.jaspersoft.com IdentityFile ~/.ssh/<private_key> EOL chown $USERNAME:$USERNAME /home/$USERNAME/.ssh/config chmod 600 /home/$USERNAME/.ssh/config
if [ "$(whoami)" != "root" ]; then echo "Must be root." exit 1 fi USERNAME=$SUDO_USER # ssh cat > /home/$USERNAME/.ssh/config <<"EOL" Host falcon.jaspersoft.com HostName falcon.jaspersoft.com IdentityFile ~/.ssh/id_dsa EOL chown $USERNAME:$USERNAME /home/$USERNAME/.ssh/config chmod 600 /home/$USERNAME/.ssh/config
Use default file name for ssh key
Use default file name for ssh key
Shell
mit
rzhilkibaev/dev-env,rzhilkibaev/dev-env
shell
## Code Before: if [ "$(whoami)" != "root" ]; then echo "Must be root." exit 1 fi USERNAME=$SUDO_USER # ssh cat > /home/$USERNAME/.ssh/config <<"EOL" Host falcon.jaspersoft.com HostName falcon.jaspersoft.com IdentityFile ~/.ssh/<private_key> EOL chown $USERNAME:$USERNAME /home/$USERNAME/.ssh/config chmod 600 /home/$USERNAME/.ssh/config ## Instruction: Use default file name for ssh key ## Code After: if [ "$(whoami)" != "root" ]; then echo "Must be root." exit 1 fi USERNAME=$SUDO_USER # ssh cat > /home/$USERNAME/.ssh/config <<"EOL" Host falcon.jaspersoft.com HostName falcon.jaspersoft.com IdentityFile ~/.ssh/id_dsa EOL chown $USERNAME:$USERNAME /home/$USERNAME/.ssh/config chmod 600 /home/$USERNAME/.ssh/config
15fe50c05b166c6f05e3889e9beaf14483a1a6df
src/scripts/content/dynamics-365.js
src/scripts/content/dynamics-365.js
'use strict'; togglbutton.render('#headerContainer:not(.toggl)', { observe: true }, function (elem) { const getDescription = function () { // entity: incident const ticketnumber = $('input[data-id="ticketnumber.fieldControl-text-box-text"]'); const ticketname = $('input[data-id="title.fieldControl-text-box-text"]'); if ((ticketnumber) || (ticketname)) { return (ticketnumber ? ticketnumber.title + ' ' : '') + (ticketname ? ticketname.title : ''); } else { // other entities const header = $('#headerContainer'); if (!header) { return ''; } const title = $('h1', header); if (!title) { return ''; } return (title ? title.textContent : ''); } }; const link = togglbutton.createTimerLink({ className: 'dynamics365', description: getDescription }); elem.appendChild(link); });
'use strict'; togglbutton.render( '[data-id="ticketnumber.fieldControl-text-box-text"]:not(.toggl)', { observe: true }, function (elem) { const header = $('#headerContainer'); const getDescription = function () { // entity: incident const ticketnumber = $( 'input[data-id="ticketnumber.fieldControl-text-box-text"]' ); const ticketname = $('input[data-id="title.fieldControl-text-box-text"]'); if (ticketnumber || ticketname) { return ( (ticketnumber ? ticketnumber.title + ' ' : '') + (ticketname ? ticketname.title : '') ); } else { // other entities if (!header) { return ''; } const title = $('h1', header); if (!title) { return ''; } return title ? title.textContent : ''; } }; const link = togglbutton.createTimerLink({ className: 'dynamics365', description: getDescription }); header.appendChild(link); } );
Fix observed element for Dynamics 365
Fix observed element for Dynamics 365 The button was losing the active status right after the timer was started.
JavaScript
bsd-3-clause
glensc/toggl-button,glensc/toggl-button,glensc/toggl-button
javascript
## Code Before: 'use strict'; togglbutton.render('#headerContainer:not(.toggl)', { observe: true }, function (elem) { const getDescription = function () { // entity: incident const ticketnumber = $('input[data-id="ticketnumber.fieldControl-text-box-text"]'); const ticketname = $('input[data-id="title.fieldControl-text-box-text"]'); if ((ticketnumber) || (ticketname)) { return (ticketnumber ? ticketnumber.title + ' ' : '') + (ticketname ? ticketname.title : ''); } else { // other entities const header = $('#headerContainer'); if (!header) { return ''; } const title = $('h1', header); if (!title) { return ''; } return (title ? title.textContent : ''); } }; const link = togglbutton.createTimerLink({ className: 'dynamics365', description: getDescription }); elem.appendChild(link); }); ## Instruction: Fix observed element for Dynamics 365 The button was losing the active status right after the timer was started. ## Code After: 'use strict'; togglbutton.render( '[data-id="ticketnumber.fieldControl-text-box-text"]:not(.toggl)', { observe: true }, function (elem) { const header = $('#headerContainer'); const getDescription = function () { // entity: incident const ticketnumber = $( 'input[data-id="ticketnumber.fieldControl-text-box-text"]' ); const ticketname = $('input[data-id="title.fieldControl-text-box-text"]'); if (ticketnumber || ticketname) { return ( (ticketnumber ? ticketnumber.title + ' ' : '') + (ticketname ? ticketname.title : '') ); } else { // other entities if (!header) { return ''; } const title = $('h1', header); if (!title) { return ''; } return title ? title.textContent : ''; } }; const link = togglbutton.createTimerLink({ className: 'dynamics365', description: getDescription }); header.appendChild(link); } );
2b3aca68c8a67b9f7c5b56f582f7550948b6cad9
README.md
README.md
The MVVM FX project targets Windows Forms and Visual Web GUI. The project focus on providing a development framework based on three libraries: - Caliburn.Micro MVVM framework - bound controls library - general purpose data binding library The project's main goal is the MVVM framework. Caliburn.Micro is one of the best MVVM frameworks around (some would say it is the best). Based on a partial port from Dan Durland (http://caliburnmicro.codeplex.com/SourceControl/network/forks/ddurland/CaliburnMicroWinForms), the missing features were added, bit by bit. In order to do proper MVVM, one must use controls that support data binding. Some of the standard Windows Forms controls (or Visual WebGUI controls for that matter) don't comply with this requirement, namely TreeView. The bound controls library fills this gap. Due to Windows Forms binding shortcomings, a general purpose binding library is instrumental for the Caliburn.Micro port. The MvvmFx.Windows library is based on Truss (http://truss.codeplex.com/) and includes some features that aren't needed for the Caliburn.Micro port. The same source code was used to build MvvmFx.DataBinding, a smaller version of the library, that is stripped off of all method binding parts, like Action or Command binding. Note "Caliburn.Micro does not need an implementation of ICommand because it has Actions which are superior to commands in every way", as Rob Eisenberg puts it (http://caliburnmicro.codeplex.com/discussions/241024).
The MVVM FX project targets Windows Forms, Visual Web GUI and Wisej. The project focus on providing a development framework based on three libraries: - Caliburn.Micro MVVM framework - bound controls library - general purpose data binding library The project's main goal is the MVVM framework. Caliburn.Micro is one of the best MVVM frameworks around (some would say it is the best). Based on a partial port from Dan Durland (http://caliburnmicro.codeplex.com/SourceControl/network/forks/ddurland/CaliburnMicroWinForms), the missing features were added, bit by bit. In order to do proper MVVM, one must use controls that support data binding. Some of the standard Windows Forms controls (or Visual WebGUI controls for that matter) don't comply with this requirement, namely TreeView. The bound controls library fills this gap. Due to Windows Forms binding shortcomings, a general purpose binding library is instrumental for the Caliburn.Micro port. The MvvmFx.Windows library is based on Truss (http://truss.codeplex.com/) and includes some features that aren't needed for the Caliburn.Micro port. The same source code was used to build MvvmFx.DataBinding, a smaller version of the library, that is stripped off of all method binding parts, like Action or Command binding. Note "Caliburn.Micro does not need an implementation of ICommand because it has Actions which are superior to commands in every way", as Rob Eisenberg puts it (http://caliburnmicro.codeplex.com/discussions/241024).
Add Wisej to the targets of the project.
Add Wisej to the targets of the project.
Markdown
mit
MvvmFx/MvvmFx,tfreitasleal/MvvmFx
markdown
## Code Before: The MVVM FX project targets Windows Forms and Visual Web GUI. The project focus on providing a development framework based on three libraries: - Caliburn.Micro MVVM framework - bound controls library - general purpose data binding library The project's main goal is the MVVM framework. Caliburn.Micro is one of the best MVVM frameworks around (some would say it is the best). Based on a partial port from Dan Durland (http://caliburnmicro.codeplex.com/SourceControl/network/forks/ddurland/CaliburnMicroWinForms), the missing features were added, bit by bit. In order to do proper MVVM, one must use controls that support data binding. Some of the standard Windows Forms controls (or Visual WebGUI controls for that matter) don't comply with this requirement, namely TreeView. The bound controls library fills this gap. Due to Windows Forms binding shortcomings, a general purpose binding library is instrumental for the Caliburn.Micro port. The MvvmFx.Windows library is based on Truss (http://truss.codeplex.com/) and includes some features that aren't needed for the Caliburn.Micro port. The same source code was used to build MvvmFx.DataBinding, a smaller version of the library, that is stripped off of all method binding parts, like Action or Command binding. Note "Caliburn.Micro does not need an implementation of ICommand because it has Actions which are superior to commands in every way", as Rob Eisenberg puts it (http://caliburnmicro.codeplex.com/discussions/241024). ## Instruction: Add Wisej to the targets of the project. ## Code After: The MVVM FX project targets Windows Forms, Visual Web GUI and Wisej. The project focus on providing a development framework based on three libraries: - Caliburn.Micro MVVM framework - bound controls library - general purpose data binding library The project's main goal is the MVVM framework. Caliburn.Micro is one of the best MVVM frameworks around (some would say it is the best). Based on a partial port from Dan Durland (http://caliburnmicro.codeplex.com/SourceControl/network/forks/ddurland/CaliburnMicroWinForms), the missing features were added, bit by bit. In order to do proper MVVM, one must use controls that support data binding. Some of the standard Windows Forms controls (or Visual WebGUI controls for that matter) don't comply with this requirement, namely TreeView. The bound controls library fills this gap. Due to Windows Forms binding shortcomings, a general purpose binding library is instrumental for the Caliburn.Micro port. The MvvmFx.Windows library is based on Truss (http://truss.codeplex.com/) and includes some features that aren't needed for the Caliburn.Micro port. The same source code was used to build MvvmFx.DataBinding, a smaller version of the library, that is stripped off of all method binding parts, like Action or Command binding. Note "Caliburn.Micro does not need an implementation of ICommand because it has Actions which are superior to commands in every way", as Rob Eisenberg puts it (http://caliburnmicro.codeplex.com/discussions/241024).
0cc5c711dfde79acebb41a9f91a3002ec9fe80cf
src/type.ts
src/type.ts
namespace fun { /** * Returns true if the value passed in is either null or undefined. */ export function isVoid(value: any): value is void { // See https://basarat.gitbooks.io/typescript/content/docs/tips/null.html return value == undefined; } export function isString(value: any): value is string { return typeof value === 'string'; } export function isNumber(value: any): value is number { return typeof value === 'number'; } export function isBoolean(value: any): value is boolean { return typeof value === 'boolean'; } export function isArray<T>(value: any): value is Array<T> { // See http://jsperf.com/is-array-tests return value != undefined && value.constructor === Array; } export function isFunction(value: any): value is Function { // See http://jsperf.com/is-function-tests return value != undefined && value.constructor === Function; } /** * Returns true if value is a plain object (e.g. {a: 1}), false otherwise. */ export function isObject(value: any): value is Object { // See http://jsperf.com/is-object-tests // See https://basarat.gitbooks.io/typescript/content/docs/tips/null.html return value != undefined && value.constructor === Object; } }
namespace fun { /** * Returns true if the value passed in is either null or undefined. */ export function isVoid(value: any): value is void { // See https://basarat.gitbooks.io/typescript/content/docs/tips/null.html return value == undefined; } export function isString(value: any): value is string { // See http://jsperf.com/is-string-tests return typeof value === 'string'; } export function isNumber(value: any): value is number { return typeof value === 'number'; } export function isBoolean(value: any): value is boolean { return typeof value === 'boolean'; } export function isArray<T>(value: any): value is Array<T> { // See http://jsperf.com/is-array-tests return value != undefined && value.constructor === Array; } export function isFunction(value: any): value is Function { // See http://jsperf.com/is-function-tests return value != undefined && value.constructor === Function; } /** * Returns true if value is a plain object (e.g. {a: 1}), false otherwise. */ export function isObject(value: any): value is Object { // See http://jsperf.com/is-object-tests // See https://basarat.gitbooks.io/typescript/content/docs/tips/null.html return value != undefined && value.constructor === Object; } }
Add link to benchmark for toString implementation
Add link to benchmark for toString implementation
TypeScript
mit
federico-lox/fun.ts
typescript
## Code Before: namespace fun { /** * Returns true if the value passed in is either null or undefined. */ export function isVoid(value: any): value is void { // See https://basarat.gitbooks.io/typescript/content/docs/tips/null.html return value == undefined; } export function isString(value: any): value is string { return typeof value === 'string'; } export function isNumber(value: any): value is number { return typeof value === 'number'; } export function isBoolean(value: any): value is boolean { return typeof value === 'boolean'; } export function isArray<T>(value: any): value is Array<T> { // See http://jsperf.com/is-array-tests return value != undefined && value.constructor === Array; } export function isFunction(value: any): value is Function { // See http://jsperf.com/is-function-tests return value != undefined && value.constructor === Function; } /** * Returns true if value is a plain object (e.g. {a: 1}), false otherwise. */ export function isObject(value: any): value is Object { // See http://jsperf.com/is-object-tests // See https://basarat.gitbooks.io/typescript/content/docs/tips/null.html return value != undefined && value.constructor === Object; } } ## Instruction: Add link to benchmark for toString implementation ## Code After: namespace fun { /** * Returns true if the value passed in is either null or undefined. */ export function isVoid(value: any): value is void { // See https://basarat.gitbooks.io/typescript/content/docs/tips/null.html return value == undefined; } export function isString(value: any): value is string { // See http://jsperf.com/is-string-tests return typeof value === 'string'; } export function isNumber(value: any): value is number { return typeof value === 'number'; } export function isBoolean(value: any): value is boolean { return typeof value === 'boolean'; } export function isArray<T>(value: any): value is Array<T> { // See http://jsperf.com/is-array-tests return value != undefined && value.constructor === Array; } export function isFunction(value: any): value is Function { // See http://jsperf.com/is-function-tests return value != undefined && value.constructor === Function; } /** * Returns true if value is a plain object (e.g. {a: 1}), false otherwise. */ export function isObject(value: any): value is Object { // See http://jsperf.com/is-object-tests // See https://basarat.gitbooks.io/typescript/content/docs/tips/null.html return value != undefined && value.constructor === Object; } }
16945303e5092bbd37f914ea10936d95e054f703
harvesting_blog_data.py
harvesting_blog_data.py
import os import sys import json import feedparser from bs4 import BeautifulSoup FEED_URL = 'http://g1.globo.com/dynamo/rss2.xml' def cleanHtml(html): return BeautifulSoup(html, 'lxml').get_text() fp = feedparser.parse(FEED_URL) print "Fetched %s entries from '%s'" % (len(fp.entries[0].title), fp.feed.title) blog_posts = [] for e in fp.entries: blog_posts.append({'title': e.title, 'published': e.published, 'summary': cleanHtml(e.summary), 'link': e.link}) out_file = os.path.join('./', 'feed.json') f = open(out_file, 'w') f.write(json.dumps(blog_posts, indent=1)) f.close() print 'Wrote output file to %s' % (f.name, )
import os import sys import json import feedparser from bs4 import BeautifulSoup FEED_URL = 'http://g1.globo.com/dynamo/rss2.xml' fp = feedparser.parse(FEED_URL) print "Fetched %s entries from '%s'" % (len(fp.entries[0].title), fp.feed.title) blog_posts = [] for e in fp.entries: blog_posts.append({'title': e.title, 'published': e.published, 'summary': BeautifulSoup(e.summary, 'lxml').get_text(), 'link': e.link}) out_file = os.path.join('./', 'feed.json') f = open(out_file, 'w') f.write(json.dumps(blog_posts, indent=1, ensure_ascii=False).encode('utf8')) f.close() print 'Wrote output file to %s' % (f.name, )
Add G1 example and utf-8
Add G1 example and utf-8
Python
apache-2.0
fabriciojoc/redes-sociais-web,fabriciojoc/redes-sociais-web
python
## Code Before: import os import sys import json import feedparser from bs4 import BeautifulSoup FEED_URL = 'http://g1.globo.com/dynamo/rss2.xml' def cleanHtml(html): return BeautifulSoup(html, 'lxml').get_text() fp = feedparser.parse(FEED_URL) print "Fetched %s entries from '%s'" % (len(fp.entries[0].title), fp.feed.title) blog_posts = [] for e in fp.entries: blog_posts.append({'title': e.title, 'published': e.published, 'summary': cleanHtml(e.summary), 'link': e.link}) out_file = os.path.join('./', 'feed.json') f = open(out_file, 'w') f.write(json.dumps(blog_posts, indent=1)) f.close() print 'Wrote output file to %s' % (f.name, ) ## Instruction: Add G1 example and utf-8 ## Code After: import os import sys import json import feedparser from bs4 import BeautifulSoup FEED_URL = 'http://g1.globo.com/dynamo/rss2.xml' fp = feedparser.parse(FEED_URL) print "Fetched %s entries from '%s'" % (len(fp.entries[0].title), fp.feed.title) blog_posts = [] for e in fp.entries: blog_posts.append({'title': e.title, 'published': e.published, 'summary': BeautifulSoup(e.summary, 'lxml').get_text(), 'link': e.link}) out_file = os.path.join('./', 'feed.json') f = open(out_file, 'w') f.write(json.dumps(blog_posts, indent=1, ensure_ascii=False).encode('utf8')) f.close() print 'Wrote output file to %s' % (f.name, )
a0987263c8769c216e18ad38bf3179761dd71dc0
metadata/com.marv42.ebt.newnote.yml
metadata/com.marv42.ebt.newnote.yml
AntiFeatures: - NonFreeNet Categories: - Games - Internet - Money License: GPL-2.0-only SourceCode: https://github.com/marv42/EbtNewNote IssueTracker: https://github.com/marv42/EbtNewNote/issues AutoName: EBT New Note RepoType: git Repo: https://github.com/marv42/EbtNewNote Builds: - versionName: '0.19' versionCode: 19 commit: v0.19 subdir: app gradle: - withoutKey - versionName: 0.43.0 versionCode: 4300 commit: v0.43.0 subdir: app gradle: - withoutKey - versionName: 0.44.0 versionCode: 4400 commit: v0.44.0 subdir: app gradle: - withoutKey AutoUpdateMode: None UpdateCheckMode: Tags v\d+\.\d+(\.\d+)? CurrentVersion: 0.44.0 CurrentVersionCode: 4400
AntiFeatures: - NonFreeNet Categories: - Games - Internet - Money License: GPL-2.0-only SourceCode: https://github.com/marv42/EbtNewNote IssueTracker: https://github.com/marv42/EbtNewNote/issues AutoName: EBT New Note RepoType: git Repo: https://github.com/marv42/EbtNewNote Builds: - versionName: '0.19' versionCode: 19 commit: v0.19 subdir: app gradle: - withoutKey - versionName: 0.43.0 versionCode: 4300 commit: v0.43.0 subdir: app gradle: - withoutKey - versionName: 0.44.0 versionCode: 4400 commit: v0.44.0 subdir: app gradle: - withoutKey - versionName: 0.46.0 versionCode: 4600 commit: v0.46.0 subdir: app gradle: - withoutKey AutoUpdateMode: None UpdateCheckMode: Tags v\d+\.\d+(\.\d+)? CurrentVersion: 0.46.0 CurrentVersionCode: 4600
Update EBT New Note to 0.46.0
Update EBT New Note to 0.46.0
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: AntiFeatures: - NonFreeNet Categories: - Games - Internet - Money License: GPL-2.0-only SourceCode: https://github.com/marv42/EbtNewNote IssueTracker: https://github.com/marv42/EbtNewNote/issues AutoName: EBT New Note RepoType: git Repo: https://github.com/marv42/EbtNewNote Builds: - versionName: '0.19' versionCode: 19 commit: v0.19 subdir: app gradle: - withoutKey - versionName: 0.43.0 versionCode: 4300 commit: v0.43.0 subdir: app gradle: - withoutKey - versionName: 0.44.0 versionCode: 4400 commit: v0.44.0 subdir: app gradle: - withoutKey AutoUpdateMode: None UpdateCheckMode: Tags v\d+\.\d+(\.\d+)? CurrentVersion: 0.44.0 CurrentVersionCode: 4400 ## Instruction: Update EBT New Note to 0.46.0 ## Code After: AntiFeatures: - NonFreeNet Categories: - Games - Internet - Money License: GPL-2.0-only SourceCode: https://github.com/marv42/EbtNewNote IssueTracker: https://github.com/marv42/EbtNewNote/issues AutoName: EBT New Note RepoType: git Repo: https://github.com/marv42/EbtNewNote Builds: - versionName: '0.19' versionCode: 19 commit: v0.19 subdir: app gradle: - withoutKey - versionName: 0.43.0 versionCode: 4300 commit: v0.43.0 subdir: app gradle: - withoutKey - versionName: 0.44.0 versionCode: 4400 commit: v0.44.0 subdir: app gradle: - withoutKey - versionName: 0.46.0 versionCode: 4600 commit: v0.46.0 subdir: app gradle: - withoutKey AutoUpdateMode: None UpdateCheckMode: Tags v\d+\.\d+(\.\d+)? CurrentVersion: 0.46.0 CurrentVersionCode: 4600
1d6634c99f01b8a2be79292aad9b9990b468a8d0
aliases/1st.zsh
aliases/1st.zsh
echoerr() { cat <<< "$@" 1>&2 } alias err=echoerr # Add a dir to the path (if it exists and isn't already added). addpath() { if [ -d "$1" ]; then if [[ ":$PATH:" != *":$1:"* ]]; then PATH="${PATH:+"$PATH:"}$1" fi else err "Not a directory: $1" fi } # Make a string replacement in ALL files RECURSIVELY starting in the current directory. # Intentionally ignores '.git' directories, unless you're already in it. # # @param $1 - The string to find. # @param $2 - The string to replace each occurrence of $1 with. sed-recursive() { find . -type f -not -path '*.git/*' -print0 | xargs -0 sed -i '' "s/$1/$2/g" } alias sr=sed-recursive
echoerr() { cat <<< "$@" 1>&2 } alias err=echoerr # Add a dir to the path (if it exists and isn't already added). addpath() { if [ -d "$1" ]; then if [[ ":$PATH:" != *":$1:"* ]]; then PATH="${PATH:+"$PATH:"}$1" fi else err "Not a directory: $1" fi } # Make a string replacement in ALL files RECURSIVELY starting in the current directory. # For safety, this ignores files within hidden '.git' directories, and only works inside a git repo. # # @param $1 - The string to find. # @param $2 - The string to replace each occurrence of $1 with. sed-recursive() { git status > /dev/null && \ find . -type f -not -path '*.git/*' -print0 | xargs -0 sed -i '' "s/$1/$2/g" } alias sr=sed-recursive
Make 'sed-recursive' even safer by requiring VCS
:lock: Make 'sed-recursive' even safer by requiring VCS
Shell
mit
cooperka/personal-settings,cooperka/personal-settings,cooperka/Settings
shell
## Code Before: echoerr() { cat <<< "$@" 1>&2 } alias err=echoerr # Add a dir to the path (if it exists and isn't already added). addpath() { if [ -d "$1" ]; then if [[ ":$PATH:" != *":$1:"* ]]; then PATH="${PATH:+"$PATH:"}$1" fi else err "Not a directory: $1" fi } # Make a string replacement in ALL files RECURSIVELY starting in the current directory. # Intentionally ignores '.git' directories, unless you're already in it. # # @param $1 - The string to find. # @param $2 - The string to replace each occurrence of $1 with. sed-recursive() { find . -type f -not -path '*.git/*' -print0 | xargs -0 sed -i '' "s/$1/$2/g" } alias sr=sed-recursive ## Instruction: :lock: Make 'sed-recursive' even safer by requiring VCS ## Code After: echoerr() { cat <<< "$@" 1>&2 } alias err=echoerr # Add a dir to the path (if it exists and isn't already added). addpath() { if [ -d "$1" ]; then if [[ ":$PATH:" != *":$1:"* ]]; then PATH="${PATH:+"$PATH:"}$1" fi else err "Not a directory: $1" fi } # Make a string replacement in ALL files RECURSIVELY starting in the current directory. # For safety, this ignores files within hidden '.git' directories, and only works inside a git repo. # # @param $1 - The string to find. # @param $2 - The string to replace each occurrence of $1 with. sed-recursive() { git status > /dev/null && \ find . -type f -not -path '*.git/*' -print0 | xargs -0 sed -i '' "s/$1/$2/g" } alias sr=sed-recursive
f268c56938f7a6e9cb06f4eeb71cbcc01fc86238
opennms-doc/guide-install/src/asciidoc/text/newts/cassandra-debian.adoc
opennms-doc/guide-install/src/asciidoc/text/newts/cassandra-debian.adoc
// Allow GitHub image rendering :imagesdir: ../../images [[gi-install-cassandra-debian]] ==== Installing on Debian-based systems This section describes how to install the latest _Cassandra 2.1.x_ release on a _Debian_ based systems for _Newts_. The first steps add the _DataStax_ community repository and install the required _GPG Key_ to verify the integrity of the _DEB packages_. Installation of the package is done with _apt_ and the _Cassandra_ service is added to the run level configuration. NOTE: This description is build on _Debian 8_ and _Ubuntu 14.04 LTS_. .Add DataStax repository [source, bash] ---- vi /etc/apt/sources.list.d/cassandra.sources.list ---- .Content of the cassandra.sources.list file [source, bash] ---- deb http://debian.datastax.com/community stable main ---- .Install GPG key to verify DEB packages [source, bash] ---- wget -O - http://debian.datastax.com/debian/repo_key | apt-key add - ---- .Install latest Cassandra 2.1.x package [source, bash] ---- dsc21=2.1.8-1 cassandra=2.1.8 ---- The _Cassandra_ service is added to the run level configuration and is automatically started after installing the package. TIP: Verify if the _Cassandra_ service is automatically started after rebooting the server.
// Allow GitHub image rendering :imagesdir: ../../images [[gi-install-cassandra-debian]] ==== Installing on Debian-based systems This section describes how to install the latest _Cassandra 2.1.x_ release on a _Debian_ based systems for _Newts_. The first steps add the _DataStax_ community repository and install the required _GPG Key_ to verify the integrity of the _DEB packages_. Installation of the package is done with _apt_ and the _Cassandra_ service is added to the run level configuration. NOTE: This description is build on _Debian 8_ and _Ubuntu 14.04 LTS_. .Add DataStax repository [source, bash] ---- vi /etc/apt/sources.list.d/cassandra.sources.list ---- .Content of the cassandra.sources.list file [source, bash] ---- deb http://debian.datastax.com/community stable main ---- .Install GPG key to verify DEB packages [source, bash] ---- wget -O - http://debian.datastax.com/debian/repo_key | apt-key add - ---- .Install latest Cassandra 2.1.x package [source, bash] ---- apt-get update apt-get install dsc21=2.1.8-1 cassandra=2.1.8 ---- The _Cassandra_ service is added to the run level configuration and is automatically started after installing the package. TIP: Verify if the _Cassandra_ service is automatically started after rebooting the server.
Fix apt-get install command for Cassandra
HZN-325: Fix apt-get install command for Cassandra Fixed apt-get install command and added apt-get update after installing Cassandra repository.
AsciiDoc
agpl-3.0
aihua/opennms,aihua/opennms,aihua/opennms,aihua/opennms,aihua/opennms,aihua/opennms,aihua/opennms,aihua/opennms,aihua/opennms
asciidoc
## Code Before: // Allow GitHub image rendering :imagesdir: ../../images [[gi-install-cassandra-debian]] ==== Installing on Debian-based systems This section describes how to install the latest _Cassandra 2.1.x_ release on a _Debian_ based systems for _Newts_. The first steps add the _DataStax_ community repository and install the required _GPG Key_ to verify the integrity of the _DEB packages_. Installation of the package is done with _apt_ and the _Cassandra_ service is added to the run level configuration. NOTE: This description is build on _Debian 8_ and _Ubuntu 14.04 LTS_. .Add DataStax repository [source, bash] ---- vi /etc/apt/sources.list.d/cassandra.sources.list ---- .Content of the cassandra.sources.list file [source, bash] ---- deb http://debian.datastax.com/community stable main ---- .Install GPG key to verify DEB packages [source, bash] ---- wget -O - http://debian.datastax.com/debian/repo_key | apt-key add - ---- .Install latest Cassandra 2.1.x package [source, bash] ---- dsc21=2.1.8-1 cassandra=2.1.8 ---- The _Cassandra_ service is added to the run level configuration and is automatically started after installing the package. TIP: Verify if the _Cassandra_ service is automatically started after rebooting the server. ## Instruction: HZN-325: Fix apt-get install command for Cassandra Fixed apt-get install command and added apt-get update after installing Cassandra repository. ## Code After: // Allow GitHub image rendering :imagesdir: ../../images [[gi-install-cassandra-debian]] ==== Installing on Debian-based systems This section describes how to install the latest _Cassandra 2.1.x_ release on a _Debian_ based systems for _Newts_. The first steps add the _DataStax_ community repository and install the required _GPG Key_ to verify the integrity of the _DEB packages_. Installation of the package is done with _apt_ and the _Cassandra_ service is added to the run level configuration. NOTE: This description is build on _Debian 8_ and _Ubuntu 14.04 LTS_. .Add DataStax repository [source, bash] ---- vi /etc/apt/sources.list.d/cassandra.sources.list ---- .Content of the cassandra.sources.list file [source, bash] ---- deb http://debian.datastax.com/community stable main ---- .Install GPG key to verify DEB packages [source, bash] ---- wget -O - http://debian.datastax.com/debian/repo_key | apt-key add - ---- .Install latest Cassandra 2.1.x package [source, bash] ---- apt-get update apt-get install dsc21=2.1.8-1 cassandra=2.1.8 ---- The _Cassandra_ service is added to the run level configuration and is automatically started after installing the package. TIP: Verify if the _Cassandra_ service is automatically started after rebooting the server.
bad21dd19a4a4417161e7fd54fc19cdca4e62162
docs/en/edge/guide/getting-started/index.md
docs/en/edge/guide/getting-started/index.md
--- license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --- Getting Started Guides ====================== - Getting Started with Android - Getting Started with BlackBerry - Getting Started with BlackBerry 10 - Getting Started with iOS - Getting Started with Symbian - Getting Started with WebOS - Getting Started with Windows Phone 7 - Getting Started with Windows Phone 8 - Getting Started with Windows 8 - Getting Started with Bada - Getting Started with Tizen
--- license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --- Getting Started Guides ====================== Before developing for any of the platforms listed below, install cordova's command-line interface (CLI). (For details, see The Cordova Command-line Interface.) To develop Cordova applications, you must install SDKs for each mobile platform you are targeting. This installation is necessary regardless of whether you do the majority of your work in the SDK or use the CLI for your build cycle. This section tells you all you need to know to set up your development environment to support each platform: where to obtain the SDK, how to set up device emulators, how to connect devices for direct testing, and managing signing key requirements. - Getting Started with Android (Windows, Mac, Linux) - Getting Started with BlackBerry (Windows, Mac) - Getting Started with BlackBerry 10 (Windows, Mac) - Getting Started with iOS (Mac) - Getting Started with Symbian (Windows, Mac, Linux) - Getting Started with WebOS (Windows, Mac, Linux) - Getting Started with Windows Phone 7 (Windows 7 or 8) - Getting Started with Windows Phone 8 (Windows 8) - Getting Started with Windows 8 (Windows 8) - Getting Started with Bada (Windows) - Getting Started with Tizen (Windows, Linux)
Update Getting Started home page to focus on CLI.
[CB-3905] Update Getting Started home page to focus on CLI. - fill out getting started splash screen - update splash screen to focus on CLI prereq, omit archaic CL utils
Markdown
apache-2.0
bgashler1/cordova-docs,cpsloal/cordova-docs,csantanapr/cordova-docs,mhartington/cordova-docs,purplecabbage/cordova-docs,drbeermann/cordova-docs,RuRios/cordova-docs,shazron/cordova-docs,gylippus/cordova-docs,tony--/cordova-docs,monaca/cordova-docs,tripodsan/cordova-docs,apache/cordova-docs,purplecabbage/cordova-docs,zwacky/cordova-docs,tony--/cordova-docs,tony--/cordova-docs,gylippus/cordova-docs,csantanapr/cordova-docs,stevengill/cordova-docs,csantanapr/cordova-docs,apache/cordova-docs,shazron/cordova-docs,cfjedimaster/cordova-docs,RuRios/cordova-docs,riknoll/cordova-docs,drbeermann/cordova-docs,dubeejw/cordova-docs,Icenium/cordova-docs,shazron/cordova-docs,tripodsan/cordova-docs,purplecabbage/cordova-docs,cpsloal/cordova-docs,stevengill/cordova-docs,mhartington/cordova-docs,apache/cordova-docs,rakatyal/cordova-docs,rakatyal/cordova-docs,mallzee/cordova-docs,dubeejw/cordova-docs,zwacky/cordova-docs,riknoll/cordova-docs,stevengill/cordova-docs,kant2002/cordova-docs,kant2002/cordova-docs,shazron/cordova-docs,apache/cordova-docs,bgashler1/cordova-docs,mhartington/cordova-docs,omefire/cordova-docs,purplecabbage/cordova-docs,dubeejw/cordova-docs,mallzee/cordova-docs,monaca/cordova-docs,stevengill/cordova-docs,Icenium/cordova-docs,tripodsan/cordova-docs,omefire/cordova-docs,Icenium/cordova-docs,cfjedimaster/cordova-docs,riknoll/cordova-docs
markdown
## Code Before: --- license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --- Getting Started Guides ====================== - Getting Started with Android - Getting Started with BlackBerry - Getting Started with BlackBerry 10 - Getting Started with iOS - Getting Started with Symbian - Getting Started with WebOS - Getting Started with Windows Phone 7 - Getting Started with Windows Phone 8 - Getting Started with Windows 8 - Getting Started with Bada - Getting Started with Tizen ## Instruction: [CB-3905] Update Getting Started home page to focus on CLI. - fill out getting started splash screen - update splash screen to focus on CLI prereq, omit archaic CL utils ## Code After: --- license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --- Getting Started Guides ====================== Before developing for any of the platforms listed below, install cordova's command-line interface (CLI). (For details, see The Cordova Command-line Interface.) To develop Cordova applications, you must install SDKs for each mobile platform you are targeting. This installation is necessary regardless of whether you do the majority of your work in the SDK or use the CLI for your build cycle. This section tells you all you need to know to set up your development environment to support each platform: where to obtain the SDK, how to set up device emulators, how to connect devices for direct testing, and managing signing key requirements. - Getting Started with Android (Windows, Mac, Linux) - Getting Started with BlackBerry (Windows, Mac) - Getting Started with BlackBerry 10 (Windows, Mac) - Getting Started with iOS (Mac) - Getting Started with Symbian (Windows, Mac, Linux) - Getting Started with WebOS (Windows, Mac, Linux) - Getting Started with Windows Phone 7 (Windows 7 or 8) - Getting Started with Windows Phone 8 (Windows 8) - Getting Started with Windows 8 (Windows 8) - Getting Started with Bada (Windows) - Getting Started with Tizen (Windows, Linux)
eca034a59abbb369548f6db0eff12cc64ec408fd
open_spiel/games/hearts/README.md
open_spiel/games/hearts/README.md
OpenSpiel can support playing against Nathan Sturtevant's state of the art Hearts program xinxin. To enable this option, see `open_spiel/scripts/global_variables.sh`. For more information about xinxin, see its [github page](https://github.com/nathansttt/hearts) and/or [Nathan's Hearts research page](https://webdocs.cs.ualberta.ca/~nathanst/hearts.html).
OpenSpiel can support playing against Nathan Sturtevant's state of the art Hearts program xinxin (pronounced "sheen-sheen"). To enable this option, see `open_spiel/scripts/global_variables.sh`. For more information about xinxin, see its [github page](https://github.com/nathansttt/hearts) and/or [Nathan's Hearts research page](https://webdocs.cs.ualberta.ca/~nathanst/hearts.html).
Add xinxin pronunciation to readme.
Add xinxin pronunciation to readme.
Markdown
apache-2.0
deepmind/open_spiel,deepmind/open_spiel,deepmind/open_spiel,deepmind/open_spiel,deepmind/open_spiel,deepmind/open_spiel
markdown
## Code Before: OpenSpiel can support playing against Nathan Sturtevant's state of the art Hearts program xinxin. To enable this option, see `open_spiel/scripts/global_variables.sh`. For more information about xinxin, see its [github page](https://github.com/nathansttt/hearts) and/or [Nathan's Hearts research page](https://webdocs.cs.ualberta.ca/~nathanst/hearts.html). ## Instruction: Add xinxin pronunciation to readme. ## Code After: OpenSpiel can support playing against Nathan Sturtevant's state of the art Hearts program xinxin (pronounced "sheen-sheen"). To enable this option, see `open_spiel/scripts/global_variables.sh`. For more information about xinxin, see its [github page](https://github.com/nathansttt/hearts) and/or [Nathan's Hearts research page](https://webdocs.cs.ualberta.ca/~nathanst/hearts.html).
f032f2db179a8db4a2b8a7c29d43af7a1d40a8d8
.travis.yml
.travis.yml
language: node_js node_js: - "0.10" - "0.8" - "0.6" before_script: - wget http://s3.amazonaws.com/influxdb/influxdb_0.0.9_amd64.deb - sudo dpkg -i influxdb_0.0.9_amd64.deb script: npm run travis-test
language: node_js node_js: - "0.10" - "0.8" before_script: - wget http://s3.amazonaws.com/influxdb/influxdb_0.0.9_amd64.deb - sudo dpkg -i influxdb_0.0.9_amd64.deb script: npm run travis-test
Drop support for Node 0.6
Drop support for Node 0.6
YAML
mit
dandv/node-influx,dandv/node-influx,node-influx/node-influx,node-influx/node-influx
yaml
## Code Before: language: node_js node_js: - "0.10" - "0.8" - "0.6" before_script: - wget http://s3.amazonaws.com/influxdb/influxdb_0.0.9_amd64.deb - sudo dpkg -i influxdb_0.0.9_amd64.deb script: npm run travis-test ## Instruction: Drop support for Node 0.6 ## Code After: language: node_js node_js: - "0.10" - "0.8" before_script: - wget http://s3.amazonaws.com/influxdb/influxdb_0.0.9_amd64.deb - sudo dpkg -i influxdb_0.0.9_amd64.deb script: npm run travis-test
b8613edfbdaf27c9d6b74bff370d8a881f505564
app/styles/ui/history/_commit-list.scss
app/styles/ui/history/_commit-list.scss
@import '../../mixins'; /** A React component holding history's commit list */ #commit-list { display: flex; flex-direction: column; flex: 1; .commit { display: flex; flex-direction: row; align-items: center; width: 100%; height: 100%; border-bottom: var(--base-border); padding: 0 var(--spacing); .info { display: flex; flex-direction: column; margin-top: -5px; overflow: hidden; width: 100%; .description { display: flex; flex-direction: row; } .summary { font-weight: var(--font-weight-semibold); } .summary, .byline { @include ellipsis; } } } }
@import '../../mixins'; /** A React component holding history's commit list */ #commit-list { display: flex; flex-direction: column; flex: 1; .commit { display: flex; flex-direction: row; align-items: center; width: 100%; height: 100%; border-bottom: var(--base-border); padding: 0 var(--spacing); .info { display: flex; flex-direction: column; margin-top: -3px; overflow: hidden; width: 100%; .description { display: flex; flex-direction: row; margin-top: 3px; } .summary { font-weight: var(--font-weight-semibold); } .summary, .byline { @include ellipsis; } } } }
Add small space between commit summary and description
Add small space between commit summary and description This commit brings down commit description by 3px while keeping commit summary in place.
SCSS
mit
say25/desktop,shiftkey/desktop,shiftkey/desktop,artivilla/desktop,j-f1/forked-desktop,say25/desktop,say25/desktop,kactus-io/kactus,artivilla/desktop,kactus-io/kactus,desktop/desktop,shiftkey/desktop,kactus-io/kactus,j-f1/forked-desktop,artivilla/desktop,j-f1/forked-desktop,desktop/desktop,say25/desktop,shiftkey/desktop,artivilla/desktop,j-f1/forked-desktop,kactus-io/kactus,desktop/desktop,desktop/desktop
scss
## Code Before: @import '../../mixins'; /** A React component holding history's commit list */ #commit-list { display: flex; flex-direction: column; flex: 1; .commit { display: flex; flex-direction: row; align-items: center; width: 100%; height: 100%; border-bottom: var(--base-border); padding: 0 var(--spacing); .info { display: flex; flex-direction: column; margin-top: -5px; overflow: hidden; width: 100%; .description { display: flex; flex-direction: row; } .summary { font-weight: var(--font-weight-semibold); } .summary, .byline { @include ellipsis; } } } } ## Instruction: Add small space between commit summary and description This commit brings down commit description by 3px while keeping commit summary in place. ## Code After: @import '../../mixins'; /** A React component holding history's commit list */ #commit-list { display: flex; flex-direction: column; flex: 1; .commit { display: flex; flex-direction: row; align-items: center; width: 100%; height: 100%; border-bottom: var(--base-border); padding: 0 var(--spacing); .info { display: flex; flex-direction: column; margin-top: -3px; overflow: hidden; width: 100%; .description { display: flex; flex-direction: row; margin-top: 3px; } .summary { font-weight: var(--font-weight-semibold); } .summary, .byline { @include ellipsis; } } } }
00dd8775a885e5fa373a08976c15291197fc17c3
conf.yaml
conf.yaml
version: '2.0.0, now proudly on python :snake:' drunkdraw: date: null locales: Pacific: America/Los_Angeles Mountain: America/Denver Central: America/Chicago Eastern: America/New_York Grenich: UTC London: Europe/London references: false theme: null time: null emotions: butt: "\U0001F351" cool: "\U0001F952" lol: clown love: feel_heart garbage: obj_fish mario: hop_happy satan: devil yay: "\U0001F389" spicy: "\U0001F336"
version: '2.0.0, now proudly on python :snake:' drunkdraw: date: null locales: Pacific: America/Los_Angeles Mountain: America/Denver Central: America/Chicago Eastern: America/New_York Grenich: UTC London: Europe/London references: false theme: null time: null emotions: burrito: "\U0001F32F" butt: "\U0001F351" cool: "\U0001F952" garbage: obj_fish lol: clown love: feel_heart mario: hop_happy satan: devil spicy: "\U0001F336" yay: "\U0001F389"
Add neato burrito, sort emotions
Add neato burrito, sort emotions
YAML
mit
ibanner56/OtherDave
yaml
## Code Before: version: '2.0.0, now proudly on python :snake:' drunkdraw: date: null locales: Pacific: America/Los_Angeles Mountain: America/Denver Central: America/Chicago Eastern: America/New_York Grenich: UTC London: Europe/London references: false theme: null time: null emotions: butt: "\U0001F351" cool: "\U0001F952" lol: clown love: feel_heart garbage: obj_fish mario: hop_happy satan: devil yay: "\U0001F389" spicy: "\U0001F336" ## Instruction: Add neato burrito, sort emotions ## Code After: version: '2.0.0, now proudly on python :snake:' drunkdraw: date: null locales: Pacific: America/Los_Angeles Mountain: America/Denver Central: America/Chicago Eastern: America/New_York Grenich: UTC London: Europe/London references: false theme: null time: null emotions: burrito: "\U0001F32F" butt: "\U0001F351" cool: "\U0001F952" garbage: obj_fish lol: clown love: feel_heart mario: hop_happy satan: devil spicy: "\U0001F336" yay: "\U0001F389"
30a17083d4464304e7fc0744aa8d523d83523d8b
README.md
README.md
Lagoon solves what developers are dreaming about: A system that allows developers to locally develop their code and their services with Docker and run the exact same system in production. The same Docker images, the same service configurations and the same code. Please reference our [documentation](https://lagoon.readthedocs.io/) for detailed information on using, developing, and administering Lagoon.
Lagoon solves what developers are dreaming about: A system that allows developers to locally develop their code and their services with Docker and run the exact same system in production. The same Docker images, the same service configurations and the same code. Please reference our [documentation](https://lagoon.readthedocs.io/) for detailed information on using, developing, and administering Lagoon. ### Contribute Do you want to contribute to Lagoon? Fabulous! [See our Documentation](https://lagoon.readthedocs.io/en/latest/developing_lagoon/contributing/) on how to get started.
Make the contrib guidelines easier accessable
Make the contrib guidelines easier accessable
Markdown
apache-2.0
amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon
markdown
## Code Before: Lagoon solves what developers are dreaming about: A system that allows developers to locally develop their code and their services with Docker and run the exact same system in production. The same Docker images, the same service configurations and the same code. Please reference our [documentation](https://lagoon.readthedocs.io/) for detailed information on using, developing, and administering Lagoon. ## Instruction: Make the contrib guidelines easier accessable ## Code After: Lagoon solves what developers are dreaming about: A system that allows developers to locally develop their code and their services with Docker and run the exact same system in production. The same Docker images, the same service configurations and the same code. Please reference our [documentation](https://lagoon.readthedocs.io/) for detailed information on using, developing, and administering Lagoon. ### Contribute Do you want to contribute to Lagoon? Fabulous! [See our Documentation](https://lagoon.readthedocs.io/en/latest/developing_lagoon/contributing/) on how to get started.
bf4aef32820097be4ccb5219daebe563613400c2
README.md
README.md
PFA === Kaboom sur les chiotes, c'est top!
PFA === Tuto : NormalBombTuto : Start : 5 normal Bombs + Splash qui parle des bases du jeu. LineBombTuto : Start : 3 Line Bombs + Splash qui parle de la rotation. ConeBombTuto : Start : 3 Cone Bombs + Splash sur la rotation. XBombTuto : Start : 3 normal + 3 line + Splash qui parle de la combinaison de bombes. TutoCheckpointBS : Start : 2 normal Checkpoint 1 : 1 line + Splash qui parle des checkpoint. TutoHBombs : Start : 3 normal + 3 line + tuto sur le H (cocaine cocaine). UltimateBombTuto : Start : 1 normal + 1 line + 1 cone + tuto sur l'ultimate. TutoBonusTNT : Start : 1 cone + Splash sur la TNT. A-Maze-Me : Start : 2 line + 1 normal C1 (9;6) : +1 normale C2 (14;2) : +1 cone C3 (12;10) : +1 cone C4 (14;4) : +1 cone C5 (9;13) : +1 normale C6 (1;9) : +1 cone Difficulty : Medium/Hard. CombisTheG : Start : 1 line + 2 cone C1 : +1 line Difficulty : Easy DidUCheckTuto : Start : 2 line + 1 cone C1 : +2 normal Difficulty : Easy The Breach : Start : +2 normal + 1 line C1 : +1 line Difficulty : Easy
Add readme.rd who explain the components of maps.
Add readme.rd who explain the components of maps.
Markdown
mit
fiahil/Kaboom
markdown
## Code Before: PFA === Kaboom sur les chiotes, c'est top! ## Instruction: Add readme.rd who explain the components of maps. ## Code After: PFA === Tuto : NormalBombTuto : Start : 5 normal Bombs + Splash qui parle des bases du jeu. LineBombTuto : Start : 3 Line Bombs + Splash qui parle de la rotation. ConeBombTuto : Start : 3 Cone Bombs + Splash sur la rotation. XBombTuto : Start : 3 normal + 3 line + Splash qui parle de la combinaison de bombes. TutoCheckpointBS : Start : 2 normal Checkpoint 1 : 1 line + Splash qui parle des checkpoint. TutoHBombs : Start : 3 normal + 3 line + tuto sur le H (cocaine cocaine). UltimateBombTuto : Start : 1 normal + 1 line + 1 cone + tuto sur l'ultimate. TutoBonusTNT : Start : 1 cone + Splash sur la TNT. A-Maze-Me : Start : 2 line + 1 normal C1 (9;6) : +1 normale C2 (14;2) : +1 cone C3 (12;10) : +1 cone C4 (14;4) : +1 cone C5 (9;13) : +1 normale C6 (1;9) : +1 cone Difficulty : Medium/Hard. CombisTheG : Start : 1 line + 2 cone C1 : +1 line Difficulty : Easy DidUCheckTuto : Start : 2 line + 1 cone C1 : +2 normal Difficulty : Easy The Breach : Start : +2 normal + 1 line C1 : +1 line Difficulty : Easy
0300966ea5a1d97960dd8a0ec7128d363047751e
.travis.yml
.travis.yml
dist: xenial language: c compiler: - clang - gcc python: - "2.7" sudo: required before_install: # - sudo -H DEBIAN_FRONTEND=noninteractive apt-get update - sudo -H PATH="${PATH}:/usr/local/clang-3.4/bin" pip install -r requirements.txt - sudo -H DEBIAN_FRONTEND=noninteractive apt-get update # - sudo brew update # - sudo brew install openssl # - sudo brew install python --with-brewed-openssl - pip install --user cpp-coveralls env: global: - COVERALLS_PARALLEL=true script: sh -x ./scripts/do-test.sh after_success: - if [ "${CC}" = "gcc" ]; then coveralls --gcov gcov --gcov-options '\-lp'; fi
language: c compiler: - clang - gcc python: - "2.7" sudo: required before_install: # - sudo -H DEBIAN_FRONTEND=noninteractive apt-get update - sudo -H PATH="${PATH}:/usr/local/clang-3.4/bin" pip install -r requirements.txt - sudo -H DEBIAN_FRONTEND=noninteractive apt-get update # - sudo brew update # - sudo brew install openssl # - sudo brew install python --with-brewed-openssl - pip install --user cpp-coveralls env: global: - COVERALLS_PARALLEL=true script: sh -x ./scripts/do-test.sh after_success: - if [ "${CC}" = "gcc" ]; then coveralls --gcov gcov --gcov-options '\-lp'; fi
Revert "Switch to xenial as being a more modern platform."
Revert "Switch to xenial as being a more modern platform." This reverts commit 2f093dccf1b196880c0e18c90b7d79fdee3cb6c0.
YAML
bsd-2-clause
dsanders11/rtpproxy,sippy/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy,dsanders11/rtpproxy,sippy/rtpproxy
yaml
## Code Before: dist: xenial language: c compiler: - clang - gcc python: - "2.7" sudo: required before_install: # - sudo -H DEBIAN_FRONTEND=noninteractive apt-get update - sudo -H PATH="${PATH}:/usr/local/clang-3.4/bin" pip install -r requirements.txt - sudo -H DEBIAN_FRONTEND=noninteractive apt-get update # - sudo brew update # - sudo brew install openssl # - sudo brew install python --with-brewed-openssl - pip install --user cpp-coveralls env: global: - COVERALLS_PARALLEL=true script: sh -x ./scripts/do-test.sh after_success: - if [ "${CC}" = "gcc" ]; then coveralls --gcov gcov --gcov-options '\-lp'; fi ## Instruction: Revert "Switch to xenial as being a more modern platform." This reverts commit 2f093dccf1b196880c0e18c90b7d79fdee3cb6c0. ## Code After: language: c compiler: - clang - gcc python: - "2.7" sudo: required before_install: # - sudo -H DEBIAN_FRONTEND=noninteractive apt-get update - sudo -H PATH="${PATH}:/usr/local/clang-3.4/bin" pip install -r requirements.txt - sudo -H DEBIAN_FRONTEND=noninteractive apt-get update # - sudo brew update # - sudo brew install openssl # - sudo brew install python --with-brewed-openssl - pip install --user cpp-coveralls env: global: - COVERALLS_PARALLEL=true script: sh -x ./scripts/do-test.sh after_success: - if [ "${CC}" = "gcc" ]; then coveralls --gcov gcov --gcov-options '\-lp'; fi
4941d366ef06dad0b0b185787865bfc26e126ac6
tests/server_main.cc
tests/server_main.cc
/* * ============================================================================ * Filename: server_main.cc * Description: Server main for testing * Version: 1.0 * Created: 04/25/2015 06:37:53 PM * Revision: none * Compiler: gcc * Author: Rafael Gozlan, [email protected] * Organization: Flihabi * ============================================================================ */ #include <stdlib.h> #include <unistd.h> #include "server.hh" #define NB_TESTS 10 int main() { Server *s = new Server(); int ids[NB_TESTS]; for (int i = 0; i < NB_TESTS; ++i) ids[i] = s->execBytecode("This is some bytecode"); Result *r; for (int i = 0; i < NB_TESTS; ++i) { while ((r = s->getResult(ids[i])) == NULL) { std::cout << "Server: Waiting for result"; sleep(1); } std::cout << "Server received: " << r->value << std::endl; } }
/* * ============================================================================ * Filename: server_main.cc * Description: Server main for testing * Version: 1.0 * Created: 04/25/2015 06:37:53 PM * Revision: none * Compiler: gcc * Author: Rafael Gozlan, [email protected] * Organization: Flihabi * ============================================================================ */ #include <stdlib.h> #include <unistd.h> #include "server.hh" #define NB_TESTS 10 int main() { Server *s = new Server(); int ids[NB_TESTS]; std::string string = "This is some bytecode"; string += '\0'; string += "This is something else"; for (int i = 0; i < NB_TESTS; ++i) ids[i] = s->execBytecode(string); Result *r; for (int i = 0; i < NB_TESTS; ++i) { while ((r = s->getResult(ids[i])) == NULL) { std::cout << "Server: Waiting for result"; sleep(1); } std::cout << "Server received: " << r->value << std::endl; } }
Add stronger test for server
Testing: Add stronger test for server
C++
mit
FLIHABI/network,FLIHABI/network
c++
## Code Before: /* * ============================================================================ * Filename: server_main.cc * Description: Server main for testing * Version: 1.0 * Created: 04/25/2015 06:37:53 PM * Revision: none * Compiler: gcc * Author: Rafael Gozlan, [email protected] * Organization: Flihabi * ============================================================================ */ #include <stdlib.h> #include <unistd.h> #include "server.hh" #define NB_TESTS 10 int main() { Server *s = new Server(); int ids[NB_TESTS]; for (int i = 0; i < NB_TESTS; ++i) ids[i] = s->execBytecode("This is some bytecode"); Result *r; for (int i = 0; i < NB_TESTS; ++i) { while ((r = s->getResult(ids[i])) == NULL) { std::cout << "Server: Waiting for result"; sleep(1); } std::cout << "Server received: " << r->value << std::endl; } } ## Instruction: Testing: Add stronger test for server ## Code After: /* * ============================================================================ * Filename: server_main.cc * Description: Server main for testing * Version: 1.0 * Created: 04/25/2015 06:37:53 PM * Revision: none * Compiler: gcc * Author: Rafael Gozlan, [email protected] * Organization: Flihabi * ============================================================================ */ #include <stdlib.h> #include <unistd.h> #include "server.hh" #define NB_TESTS 10 int main() { Server *s = new Server(); int ids[NB_TESTS]; std::string string = "This is some bytecode"; string += '\0'; string += "This is something else"; for (int i = 0; i < NB_TESTS; ++i) ids[i] = s->execBytecode(string); Result *r; for (int i = 0; i < NB_TESTS; ++i) { while ((r = s->getResult(ids[i])) == NULL) { std::cout << "Server: Waiting for result"; sleep(1); } std::cout << "Server received: " << r->value << std::endl; } }
a9304a456bf3b7af2586fc8e1e79b407a7afe2fd
install.sh
install.sh
DOTFILES=".bash_aliases .bash_ps1 .bashrc .vimrc" PWD=`pwd` # Rename existing file with .old extension # and create a symbolic link in home directory to dotfiles # you can then update the dotfiles by simply executing 'git pull' use() { file=$1 if [ -f $HOME/$file ]; then echo -n "File '$HOME/$file' exists. Delete file? (Y/n) " read opt if [ "$opt" = "n" ]; then mv $HOME/$file $HOME/$file.old echo "Renamed '$HOME/$file' into '$HOME/$file.old'" else rm $HOME/$file echo "'$HOME/$file' deleted" fi fi ln -s $PWD/$file $HOME/$file } # Use all dotfiles for dotfile in $DOTFILES; do use $dotfile done echo "Dotfiles has been installed!" echo "To get the latest update of dotfiles, simply execute 'git pull' in this directory. Enjoy!" exit
DOTFILES=".bash_aliases .bash_ps1 .bashrc .vimrc" PWD=`pwd` # Rename existing file with .old extension # and create a symbolic link in home directory to dotfiles # you can then update the dotfiles by simply executing 'git pull' use() { file=$1 if [ -f $HOME/$file ]; then echo -n "File '$HOME/$file' exists. Delete file? (Y/n) " read opt if [ "$opt" = "n" ]; then mv $HOME/$file $HOME/$file.old echo "Renamed '$HOME/$file' into '$HOME/$file.old'" else rm $HOME/$file echo "'$HOME/$file' deleted" fi fi ln -s $PWD/$file $HOME/$file } # Catch interrupt signal (usually by pressing CTRL-C) trap 'echo "Interrupted by user. Aborting."; exit 1;' INT # Use all dotfiles for dotfile in $DOTFILES; do use $dotfile done echo "Dotfiles has been installed!" echo "To get the latest update of dotfiles, simply execute 'git pull' in this directory. Enjoy!" exit
Fix script to catch interrupt signal
Fix script to catch interrupt signal
Shell
mit
kemskems/dotfiles
shell
## Code Before: DOTFILES=".bash_aliases .bash_ps1 .bashrc .vimrc" PWD=`pwd` # Rename existing file with .old extension # and create a symbolic link in home directory to dotfiles # you can then update the dotfiles by simply executing 'git pull' use() { file=$1 if [ -f $HOME/$file ]; then echo -n "File '$HOME/$file' exists. Delete file? (Y/n) " read opt if [ "$opt" = "n" ]; then mv $HOME/$file $HOME/$file.old echo "Renamed '$HOME/$file' into '$HOME/$file.old'" else rm $HOME/$file echo "'$HOME/$file' deleted" fi fi ln -s $PWD/$file $HOME/$file } # Use all dotfiles for dotfile in $DOTFILES; do use $dotfile done echo "Dotfiles has been installed!" echo "To get the latest update of dotfiles, simply execute 'git pull' in this directory. Enjoy!" exit ## Instruction: Fix script to catch interrupt signal ## Code After: DOTFILES=".bash_aliases .bash_ps1 .bashrc .vimrc" PWD=`pwd` # Rename existing file with .old extension # and create a symbolic link in home directory to dotfiles # you can then update the dotfiles by simply executing 'git pull' use() { file=$1 if [ -f $HOME/$file ]; then echo -n "File '$HOME/$file' exists. Delete file? (Y/n) " read opt if [ "$opt" = "n" ]; then mv $HOME/$file $HOME/$file.old echo "Renamed '$HOME/$file' into '$HOME/$file.old'" else rm $HOME/$file echo "'$HOME/$file' deleted" fi fi ln -s $PWD/$file $HOME/$file } # Catch interrupt signal (usually by pressing CTRL-C) trap 'echo "Interrupted by user. Aborting."; exit 1;' INT # Use all dotfiles for dotfile in $DOTFILES; do use $dotfile done echo "Dotfiles has been installed!" echo "To get the latest update of dotfiles, simply execute 'git pull' in this directory. Enjoy!" exit
9427fbcd5b4753d55c2991b9be06ae5ec041442a
gitio.go
gitio.go
/* Package gitio shortens github urls using the git.io service. */ package gitio import ( "fmt" "io/ioutil" "net/http" "net/url" ) // Shorten a long github url. func Shorten(longurl string) (string, error) { resp, err := http.PostForm(`https://git.io/create`, url.Values{`url`: {longurl}}) if err != nil { return "", err } if resp.StatusCode != 200 { return "", fmt.Errorf("Expected 200 response, got: %d", resp.StatusCode) } text, err := ioutil.ReadAll(resp.Body) if err != nil { return "", fmt.Errorf("Error reading response from gitio: %v", err) } return fmt.Sprintf(`https://git.io/%s`, text), nil }
/* Package gitio shortens github urls using the git.io service. */ package gitio import ( "fmt" "io/ioutil" "net/http" "net/url" "time" ) // Shorten a long github url. func Shorten(longurl string) (string, error) { client := new(http.Client) client.Timeout = 5 * time.Second resp, err := client.PostForm(`https://git.io/create`, url.Values{`url`: {longurl}}) if err != nil { return "", err } if resp.StatusCode != 200 { return "", fmt.Errorf("Expected 200 response, got: %d", resp.StatusCode) } text, err := ioutil.ReadAll(resp.Body) if err != nil { return "", fmt.Errorf("Error reading response from gitio: %v", err) } return fmt.Sprintf(`https://git.io/%s`, text), nil }
Add 5s timeout to http call
Add 5s timeout to http call
Go
mit
aarondl/gitio
go
## Code Before: /* Package gitio shortens github urls using the git.io service. */ package gitio import ( "fmt" "io/ioutil" "net/http" "net/url" ) // Shorten a long github url. func Shorten(longurl string) (string, error) { resp, err := http.PostForm(`https://git.io/create`, url.Values{`url`: {longurl}}) if err != nil { return "", err } if resp.StatusCode != 200 { return "", fmt.Errorf("Expected 200 response, got: %d", resp.StatusCode) } text, err := ioutil.ReadAll(resp.Body) if err != nil { return "", fmt.Errorf("Error reading response from gitio: %v", err) } return fmt.Sprintf(`https://git.io/%s`, text), nil } ## Instruction: Add 5s timeout to http call ## Code After: /* Package gitio shortens github urls using the git.io service. */ package gitio import ( "fmt" "io/ioutil" "net/http" "net/url" "time" ) // Shorten a long github url. func Shorten(longurl string) (string, error) { client := new(http.Client) client.Timeout = 5 * time.Second resp, err := client.PostForm(`https://git.io/create`, url.Values{`url`: {longurl}}) if err != nil { return "", err } if resp.StatusCode != 200 { return "", fmt.Errorf("Expected 200 response, got: %d", resp.StatusCode) } text, err := ioutil.ReadAll(resp.Body) if err != nil { return "", fmt.Errorf("Error reading response from gitio: %v", err) } return fmt.Sprintf(`https://git.io/%s`, text), nil }
119a81563c137951b3310176b0ae41c3397c4ff5
prepare-deps.sh
prepare-deps.sh
cd deps git submodule update --recursive --remote cd che-core mvn clean install cd .. cd che mvn clean install cd .. cd user-dashboard mvn clean install cd .. cd cli mvn clean install cd .. cd ..
HOME_DIR=`pwd` command -v compass >/dev/null 2>&1 || { echo "I require compass but it's not installed. Install with ´sudo gem install compass --pre´ Aborting." >&2; exit 1; } cd $HOME_DIR/deps git submodule update --recursive --remote if [ $? -ne 0 ]; then echo "ERROR: Unable to update submodules." exit 1 fi cd $HOME_DIR/deps/che-core mvn clean install if [ $? -ne 0 ]; then echo "ERROR: che-core failed to build." exit 1 fi cd $HOME_DIR/deps/che mvn clean install if [ $? -ne 0 ]; then echo "ERROR: che failed to build." exit 1 fi cd $HOME_DIR/deps/user-dashboard mvn clean install if [ $? -ne 0 ]; then echo "ERROR: user-dashboard failed to build." exit 1 fi cd $HOME_DEPS/deps/cli mvn clean install if [ $? -ne 0 ]; then echo "ERROR: cli failed to build." exit 1 fi cd $HOME_DEPS echo "ALL DONE."
Check mvn build status for dependencies.
Check mvn build status for dependencies.
Shell
apache-2.0
AdaptiveMe/adaptive-services-dashbar,AdaptiveMe/adaptive-services-dashbar,AdaptiveMe/adaptive-services-dashbar,AdaptiveMe/adaptive-services-dashbar
shell
## Code Before: cd deps git submodule update --recursive --remote cd che-core mvn clean install cd .. cd che mvn clean install cd .. cd user-dashboard mvn clean install cd .. cd cli mvn clean install cd .. cd .. ## Instruction: Check mvn build status for dependencies. ## Code After: HOME_DIR=`pwd` command -v compass >/dev/null 2>&1 || { echo "I require compass but it's not installed. Install with ´sudo gem install compass --pre´ Aborting." >&2; exit 1; } cd $HOME_DIR/deps git submodule update --recursive --remote if [ $? -ne 0 ]; then echo "ERROR: Unable to update submodules." exit 1 fi cd $HOME_DIR/deps/che-core mvn clean install if [ $? -ne 0 ]; then echo "ERROR: che-core failed to build." exit 1 fi cd $HOME_DIR/deps/che mvn clean install if [ $? -ne 0 ]; then echo "ERROR: che failed to build." exit 1 fi cd $HOME_DIR/deps/user-dashboard mvn clean install if [ $? -ne 0 ]; then echo "ERROR: user-dashboard failed to build." exit 1 fi cd $HOME_DEPS/deps/cli mvn clean install if [ $? -ne 0 ]; then echo "ERROR: cli failed to build." exit 1 fi cd $HOME_DEPS echo "ALL DONE."
84182f77abe2bf2a689aa94c3b77a4feb808aac6
package.json
package.json
{ "name": "tblog", "version": "1.0.0", "description": "A blog implementation ", "main": "index.js", "repository": "https://github.com/darkamenosa/tblog.git", "author": "tuyenhx <[email protected]>", "license": "MIT", "scripts": { "start": "nps", "prepush": "npm start test && npm start build", "heroku-postbuild": "yarn start install && yarn start build" }, "devDependencies": { "coveralls": "^2.13.1", "husky": "^0.13.3", "nps": "^5.1.0", "nps-utils": "^1.2.0" }, "engines": { "node": "7.x", "yarn": "0.20.3" } }
{ "name": "tblog", "version": "1.0.0", "description": "A blog implementation ", "main": "index.js", "repository": "https://github.com/darkamenosa/tblog.git", "author": "tuyenhx <[email protected]>", "license": "MIT", "scripts": { "start": "nps", "prepush": "npm start test && npm start build", "heroku-postbuild": "yarn start install && yarn start build" }, "devDependencies": { "coveralls": "^2.13.1", "husky": "^0.13.3", "nps": "^5.1.0", "nps-utils": "^1.2.0" }, "engines": { "node": "7.x", "yarn": "0.20.3" }, "cacheDirectories": ["node_modules", "webclient/node_modules", "server/node_modules"] }
Add cache directory for heroku build
Add cache directory for heroku build
JSON
mit
darkamenosa/tblog,darkamenosa/tblog
json
## Code Before: { "name": "tblog", "version": "1.0.0", "description": "A blog implementation ", "main": "index.js", "repository": "https://github.com/darkamenosa/tblog.git", "author": "tuyenhx <[email protected]>", "license": "MIT", "scripts": { "start": "nps", "prepush": "npm start test && npm start build", "heroku-postbuild": "yarn start install && yarn start build" }, "devDependencies": { "coveralls": "^2.13.1", "husky": "^0.13.3", "nps": "^5.1.0", "nps-utils": "^1.2.0" }, "engines": { "node": "7.x", "yarn": "0.20.3" } } ## Instruction: Add cache directory for heroku build ## Code After: { "name": "tblog", "version": "1.0.0", "description": "A blog implementation ", "main": "index.js", "repository": "https://github.com/darkamenosa/tblog.git", "author": "tuyenhx <[email protected]>", "license": "MIT", "scripts": { "start": "nps", "prepush": "npm start test && npm start build", "heroku-postbuild": "yarn start install && yarn start build" }, "devDependencies": { "coveralls": "^2.13.1", "husky": "^0.13.3", "nps": "^5.1.0", "nps-utils": "^1.2.0" }, "engines": { "node": "7.x", "yarn": "0.20.3" }, "cacheDirectories": ["node_modules", "webclient/node_modules", "server/node_modules"] }
e72c1e21ec397c18694d73eb6a104ba9d7f2eb11
code/FacebookMetadataSiteConfig.php
code/FacebookMetadataSiteConfig.php
<?php class FacebookMetadataSiteConfig extends DataExtension { static $db = array( 'SkipToMainContentAccessKey' => 'VarChar(1)' ); static $has_one = array( 'FacebookLogo' => 'Image' ); public function updateCMSFields(FieldList $fields) { $tf2 = new TextField('SkipToMainContentAccessKey'); $tf2->setMaxLength(1); $fields->addFieldToTab('Root.FacebookMetadata', $tf2); $fields->renameField("SkipToMainContentAccessKey", _t('AccessKey.SKIP_TO_MAIN_CONTENT_ACCESS_KEY')); $fields->addFieldToTab("Root.FacebookMetadata", new UploadField("FacebookLogo", _t('Facebook.METADATA_LOGO', 'Image that will show in facebook when linking to this site. The image should be a square'))); } } ?>
<?php class FacebookMetadataSiteConfig extends DataExtension { static $db = array( 'SkipToMainContentAccessKey' => 'VarChar(1)' ); static $has_one = array( 'FacebookLogo' => 'Image' ); public function updateCMSFields(FieldList $fields) { $fields->renameField("SkipToMainContentAccessKey", _t('AccessKey.SKIP_TO_MAIN_CONTENT_ACCESS_KEY')); $fields->addFieldToTab("Root.FacebookMetadata", new UploadField("FacebookLogo", _t('Facebook.METADATA_LOGO', 'Image that will show in facebook when linking to this site. The image should be a square of minimum size 200px'))); } } ?>
Remove empty field, hangover from access keys module
FIX: Remove empty field, hangover from access keys module
PHP
bsd-3-clause
gordonbanderson/facebook-tools
php
## Code Before: <?php class FacebookMetadataSiteConfig extends DataExtension { static $db = array( 'SkipToMainContentAccessKey' => 'VarChar(1)' ); static $has_one = array( 'FacebookLogo' => 'Image' ); public function updateCMSFields(FieldList $fields) { $tf2 = new TextField('SkipToMainContentAccessKey'); $tf2->setMaxLength(1); $fields->addFieldToTab('Root.FacebookMetadata', $tf2); $fields->renameField("SkipToMainContentAccessKey", _t('AccessKey.SKIP_TO_MAIN_CONTENT_ACCESS_KEY')); $fields->addFieldToTab("Root.FacebookMetadata", new UploadField("FacebookLogo", _t('Facebook.METADATA_LOGO', 'Image that will show in facebook when linking to this site. The image should be a square'))); } } ?> ## Instruction: FIX: Remove empty field, hangover from access keys module ## Code After: <?php class FacebookMetadataSiteConfig extends DataExtension { static $db = array( 'SkipToMainContentAccessKey' => 'VarChar(1)' ); static $has_one = array( 'FacebookLogo' => 'Image' ); public function updateCMSFields(FieldList $fields) { $fields->renameField("SkipToMainContentAccessKey", _t('AccessKey.SKIP_TO_MAIN_CONTENT_ACCESS_KEY')); $fields->addFieldToTab("Root.FacebookMetadata", new UploadField("FacebookLogo", _t('Facebook.METADATA_LOGO', 'Image that will show in facebook when linking to this site. The image should be a square of minimum size 200px'))); } } ?>
454b054e3a0af670849bd5ed2e7aff3bafee050b
generator-templates/src/Application.php
generator-templates/src/Application.php
<?php namespace $$NAMESPACE$$; use Radvance\Framework\BaseWebApplication; use Radvance\Framework\FrameworkApplicationInterface; // use $$NAMESPACE$$\Repository\PdoExampleRepository; use RuntimeException; class Application extends BaseWebApplication implements FrameworkApplicationInterface { public function getRootPath() { return realpath(__DIR__ . '/../'); } protected function configureRepositories() { // Add repositories here // $this->addRepository(new PdoExampleRepository($this->pdo)); } }
<?php namespace $$NAMESPACE$$; use Radvance\Framework\BaseWebApplication; use Radvance\Framework\FrameworkApplicationInterface; // use $$NAMESPACE$$\Repository\PdoExampleRepository; use RuntimeException; class Application extends BaseWebApplication implements FrameworkApplicationInterface { public function getRootPath() { return realpath(__DIR__ . '/../'); } }
Use automatic repository configuration in generated application
Use automatic repository configuration in generated application
PHP
mit
Radvance/Radvance,boite/Radvance,Radvance/Radvance,Radvance/Radvance,boite/Radvance,boite/Radvance
php
## Code Before: <?php namespace $$NAMESPACE$$; use Radvance\Framework\BaseWebApplication; use Radvance\Framework\FrameworkApplicationInterface; // use $$NAMESPACE$$\Repository\PdoExampleRepository; use RuntimeException; class Application extends BaseWebApplication implements FrameworkApplicationInterface { public function getRootPath() { return realpath(__DIR__ . '/../'); } protected function configureRepositories() { // Add repositories here // $this->addRepository(new PdoExampleRepository($this->pdo)); } } ## Instruction: Use automatic repository configuration in generated application ## Code After: <?php namespace $$NAMESPACE$$; use Radvance\Framework\BaseWebApplication; use Radvance\Framework\FrameworkApplicationInterface; // use $$NAMESPACE$$\Repository\PdoExampleRepository; use RuntimeException; class Application extends BaseWebApplication implements FrameworkApplicationInterface { public function getRootPath() { return realpath(__DIR__ . '/../'); } }
038303b92561c47e8938d17ead399510d94707a1
ee-lang_item/src/main/kotlin/ee/lang/integ/EePaths.kt
ee-lang_item/src/main/kotlin/ee/lang/integ/EePaths.kt
package ee.lang.integ import ee.common.ext.isMac import java.nio.file.Paths val dPath = Paths.get(if (isMac) "/Users/ee/d" else "D:\\TC_CACHE\\eed") val eePath = Paths.get(if (isMac) "$dPath/ee" else "$dPath\\ee")
package ee.lang.integ import ee.common.ext.isWindows import java.nio.file.Paths val dPath = Paths.get(if (isWindows) "D:\\TC_CACHE\\eed" else "/Users/ee/d") val eePath = Paths.get(if (isWindows) "$dPath\\ee" else "$dPath/ee")
Change path of base development folder
Change path of base development folder
Kotlin
apache-2.0
eugeis/ee,eugeis/ee
kotlin
## Code Before: package ee.lang.integ import ee.common.ext.isMac import java.nio.file.Paths val dPath = Paths.get(if (isMac) "/Users/ee/d" else "D:\\TC_CACHE\\eed") val eePath = Paths.get(if (isMac) "$dPath/ee" else "$dPath\\ee") ## Instruction: Change path of base development folder ## Code After: package ee.lang.integ import ee.common.ext.isWindows import java.nio.file.Paths val dPath = Paths.get(if (isWindows) "D:\\TC_CACHE\\eed" else "/Users/ee/d") val eePath = Paths.get(if (isWindows) "$dPath\\ee" else "$dPath/ee")
2ff62772281df1e2df34a9682ad29c0b982d3f5e
extensions/theme-red/themes/Red-color-theme.json
extensions/theme-red/themes/Red-color-theme.json
{ "tokenColors": "./red.tmTheme", "colors": { "editorBackground": "#390000", "editorCursor": "#970000", "editorForeground": "#F8F8F8", "editorWhitespaces": "#c10000", "editorLineHighlight": "#0000004A", "editorSelection": "#750000" }, "name": "Red" }
{ "tokenColors": "./red.tmTheme", "colors": { "activityBarBackground": "#4B0000", "editorBackground": "#390000", "editorCursor": "#970000", "editorForeground": "#F8F8F8", "editorWhitespaces": "#c10000", "editorLineHighlight": "#0000004A", "editorSelection": "#750000", "inactiveTabBackground": "#300000", "sideBarBackground": "#300000" }, "name": "Red" }
Add some basic colors for the red theme
Add some basic colors for the red theme
JSON
mit
0xmohit/vscode,microsoft/vscode,landonepps/vscode,landonepps/vscode,rishii7/vscode,microlv/vscode,Zalastax/vscode,stringham/vscode,landonepps/vscode,DustinCampbell/vscode,rishii7/vscode,microlv/vscode,Microsoft/vscode,the-ress/vscode,Microsoft/vscode,Microsoft/vscode,microsoft/vscode,landonepps/vscode,joaomoreno/vscode,microsoft/vscode,microlv/vscode,Microsoft/vscode,veeramarni/vscode,radshit/vscode,landonepps/vscode,Zalastax/vscode,veeramarni/vscode,radshit/vscode,microsoft/vscode,matthewshirley/vscode,the-ress/vscode,rishii7/vscode,cleidigh/vscode,KattMingMing/vscode,matthewshirley/vscode,eamodio/vscode,veeramarni/vscode,the-ress/vscode,Zalastax/vscode,hoovercj/vscode,hoovercj/vscode,0xmohit/vscode,0xmohit/vscode,radshit/vscode,landonepps/vscode,matthewshirley/vscode,cleidigh/vscode,hungys/vscode,Krzysztof-Cieslak/vscode,the-ress/vscode,hoovercj/vscode,radshit/vscode,matthewshirley/vscode,microlv/vscode,hungys/vscode,Microsoft/vscode,0xmohit/vscode,mjbvz/vscode,veeramarni/vscode,mjbvz/vscode,DustinCampbell/vscode,microlv/vscode,hoovercj/vscode,joaomoreno/vscode,the-ress/vscode,stringham/vscode,mjbvz/vscode,KattMingMing/vscode,radshit/vscode,mjbvz/vscode,eamodio/vscode,microsoft/vscode,cleidigh/vscode,Zalastax/vscode,KattMingMing/vscode,rishii7/vscode,Krzysztof-Cieslak/vscode,radshit/vscode,cleidigh/vscode,Zalastax/vscode,microlv/vscode,0xmohit/vscode,veeramarni/vscode,mjbvz/vscode,veeramarni/vscode,KattMingMing/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,landonepps/vscode,gagangupt16/vscode,hoovercj/vscode,joaomoreno/vscode,Zalastax/vscode,gagangupt16/vscode,Zalastax/vscode,joaomoreno/vscode,DustinCampbell/vscode,Zalastax/vscode,the-ress/vscode,hungys/vscode,DustinCampbell/vscode,eamodio/vscode,hungys/vscode,Krzysztof-Cieslak/vscode,rishii7/vscode,stringham/vscode,gagangupt16/vscode,hungys/vscode,rishii7/vscode,hungys/vscode,eamodio/vscode,matthewshirley/vscode,hungys/vscode,hoovercj/vscode,0xmohit/vscode,0xmohit/vscode,veeramarni/vscode,KattMingMing/vscode,radshit/vscode,mjbvz/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,stringham/vscode,gagangupt16/vscode,stringham/vscode,KattMingMing/vscode,stringham/vscode,hoovercj/vscode,microsoft/vscode,0xmohit/vscode,KattMingMing/vscode,microsoft/vscode,mjbvz/vscode,KattMingMing/vscode,KattMingMing/vscode,Microsoft/vscode,KattMingMing/vscode,Microsoft/vscode,mjbvz/vscode,landonepps/vscode,hungys/vscode,microlv/vscode,gagangupt16/vscode,rishii7/vscode,hoovercj/vscode,0xmohit/vscode,gagangupt16/vscode,rishii7/vscode,mjbvz/vscode,matthewshirley/vscode,landonepps/vscode,0xmohit/vscode,radshit/vscode,matthewshirley/vscode,cleidigh/vscode,matthewshirley/vscode,gagangupt16/vscode,Microsoft/vscode,matthewshirley/vscode,hungys/vscode,rishii7/vscode,joaomoreno/vscode,DustinCampbell/vscode,hoovercj/vscode,Zalastax/vscode,cleidigh/vscode,DustinCampbell/vscode,landonepps/vscode,DustinCampbell/vscode,0xmohit/vscode,gagangupt16/vscode,microsoft/vscode,stringham/vscode,veeramarni/vscode,gagangupt16/vscode,the-ress/vscode,eamodio/vscode,microlv/vscode,microsoft/vscode,gagangupt16/vscode,DustinCampbell/vscode,hoovercj/vscode,hungys/vscode,cleidigh/vscode,mjbvz/vscode,microsoft/vscode,KattMingMing/vscode,DustinCampbell/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,0xmohit/vscode,DustinCampbell/vscode,rishii7/vscode,cra0zy/VSCode,eamodio/vscode,matthewshirley/vscode,hungys/vscode,the-ress/vscode,hoovercj/vscode,joaomoreno/vscode,stringham/vscode,microsoft/vscode,gagangupt16/vscode,microlv/vscode,matthewshirley/vscode,mjbvz/vscode,veeramarni/vscode,landonepps/vscode,KattMingMing/vscode,DustinCampbell/vscode,landonepps/vscode,joaomoreno/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,Microsoft/vscode,the-ress/vscode,mjbvz/vscode,Zalastax/vscode,stringham/vscode,joaomoreno/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,microlv/vscode,DustinCampbell/vscode,hungys/vscode,gagangupt16/vscode,radshit/vscode,the-ress/vscode,cleidigh/vscode,radshit/vscode,Krzysztof-Cieslak/vscode,joaomoreno/vscode,microsoft/vscode,Microsoft/vscode,microsoft/vscode,eamodio/vscode,cleidigh/vscode,mjbvz/vscode,stringham/vscode,microlv/vscode,Microsoft/vscode,DustinCampbell/vscode,microlv/vscode,microsoft/vscode,mjbvz/vscode,joaomoreno/vscode,veeramarni/vscode,the-ress/vscode,Microsoft/vscode,0xmohit/vscode,the-ress/vscode,radshit/vscode,Zalastax/vscode,mjbvz/vscode,joaomoreno/vscode,joaomoreno/vscode,Krzysztof-Cieslak/vscode,gagangupt16/vscode,Zalastax/vscode,stringham/vscode,microsoft/vscode,cleidigh/vscode,eamodio/vscode,Microsoft/vscode,Microsoft/vscode,hoovercj/vscode,eamodio/vscode,stringham/vscode,cleidigh/vscode,joaomoreno/vscode,microlv/vscode,stringham/vscode,gagangupt16/vscode,cleidigh/vscode,KattMingMing/vscode,hoovercj/vscode,radshit/vscode,joaomoreno/vscode,radshit/vscode,veeramarni/vscode,joaomoreno/vscode,gagangupt16/vscode,0xmohit/vscode,Krzysztof-Cieslak/vscode,DustinCampbell/vscode,microlv/vscode,hoovercj/vscode,eamodio/vscode,landonepps/vscode,cleidigh/vscode,matthewshirley/vscode,0xmohit/vscode,KattMingMing/vscode,the-ress/vscode,DustinCampbell/vscode,veeramarni/vscode,Zalastax/vscode,matthewshirley/vscode,microsoft/vscode,rishii7/vscode,eamodio/vscode,Microsoft/vscode,joaomoreno/vscode,the-ress/vscode,radshit/vscode,veeramarni/vscode,Krzysztof-Cieslak/vscode,rishii7/vscode,Krzysztof-Cieslak/vscode,Zalastax/vscode,DustinCampbell/vscode,rishii7/vscode,eamodio/vscode,hoovercj/vscode,hungys/vscode,joaomoreno/vscode,matthewshirley/vscode,radshit/vscode,gagangupt16/vscode,microlv/vscode,stringham/vscode,veeramarni/vscode,KattMingMing/vscode,Zalastax/vscode,rishii7/vscode,0xmohit/vscode,Krzysztof-Cieslak/vscode,matthewshirley/vscode,cleidigh/vscode,stringham/vscode,hungys/vscode,DustinCampbell/vscode,radshit/vscode,hungys/vscode,KattMingMing/vscode,veeramarni/vscode,landonepps/vscode,hungys/vscode,Microsoft/vscode,cleidigh/vscode,the-ress/vscode,stringham/vscode,rishii7/vscode,mjbvz/vscode,hoovercj/vscode,cleidigh/vscode,Zalastax/vscode,Krzysztof-Cieslak/vscode,microlv/vscode,landonepps/vscode,stringham/vscode,veeramarni/vscode,microlv/vscode,the-ress/vscode,landonepps/vscode,rishii7/vscode,veeramarni/vscode,matthewshirley/vscode,rishii7/vscode,radshit/vscode,KattMingMing/vscode,Krzysztof-Cieslak/vscode,landonepps/vscode,hungys/vscode,mjbvz/vscode,Zalastax/vscode,microsoft/vscode,hoovercj/vscode,0xmohit/vscode,eamodio/vscode,matthewshirley/vscode,cleidigh/vscode,gagangupt16/vscode
json
## Code Before: { "tokenColors": "./red.tmTheme", "colors": { "editorBackground": "#390000", "editorCursor": "#970000", "editorForeground": "#F8F8F8", "editorWhitespaces": "#c10000", "editorLineHighlight": "#0000004A", "editorSelection": "#750000" }, "name": "Red" } ## Instruction: Add some basic colors for the red theme ## Code After: { "tokenColors": "./red.tmTheme", "colors": { "activityBarBackground": "#4B0000", "editorBackground": "#390000", "editorCursor": "#970000", "editorForeground": "#F8F8F8", "editorWhitespaces": "#c10000", "editorLineHighlight": "#0000004A", "editorSelection": "#750000", "inactiveTabBackground": "#300000", "sideBarBackground": "#300000" }, "name": "Red" }
71ef2b5d2d489a5a2bcb86190b33797f4954290c
pkgs/os-specific/linux/eudev/default.nix
pkgs/os-specific/linux/eudev/default.nix
{stdenv, fetchurl, pkgconfig, glib, gperf}: let s = # Generated upstream information rec { baseName="eudev"; version="2.1.1"; name="${baseName}-${version}"; url="http://dev.gentoo.org/~blueness/eudev/eudev-${version}.tar.gz"; sha256="0shf5vqiz9fdxl95aa1a8vh0xjxwim3psc39wr2xr8lnahf11vva"; }; buildInputs = [ glib pkgconfig gperf ]; in stdenv.mkDerivation { inherit (s) name version; inherit buildInputs; src = fetchurl { inherit (s) url sha256; }; meta = { inherit (s) version; description = ''An udev fork by Gentoo''; license = stdenv.lib.licenses.gpl2Plus ; maintainers = [stdenv.lib.maintainers.raskin]; platforms = stdenv.lib.platforms.linux; homepage = ''http://www.gentoo.org/proj/en/eudev/''; downloadPage = ''http://dev.gentoo.org/~blueness/eudev/''; updateWalker = true; }; }
{stdenv, fetchurl, pkgconfig, glib, gperf, utillinux}: let s = # Generated upstream information rec { baseName="eudev"; version="2.1.1"; name="${baseName}-${version}"; url="http://dev.gentoo.org/~blueness/eudev/eudev-${version}.tar.gz"; sha256="0shf5vqiz9fdxl95aa1a8vh0xjxwim3psc39wr2xr8lnahf11vva"; }; buildInputs = [ glib pkgconfig gperf utillinux ]; in stdenv.mkDerivation { inherit (s) name version; inherit buildInputs; src = fetchurl { inherit (s) url sha256; }; meta = { inherit (s) version; description = ''An udev fork by Gentoo''; license = stdenv.lib.licenses.gpl2Plus ; maintainers = [stdenv.lib.maintainers.raskin]; platforms = stdenv.lib.platforms.linux; homepage = ''http://www.gentoo.org/proj/en/eudev/''; downloadPage = ''http://dev.gentoo.org/~blueness/eudev/''; updateWalker = true; }; }
Allow eudev to find blkid
Allow eudev to find blkid
Nix
mit
NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs
nix
## Code Before: {stdenv, fetchurl, pkgconfig, glib, gperf}: let s = # Generated upstream information rec { baseName="eudev"; version="2.1.1"; name="${baseName}-${version}"; url="http://dev.gentoo.org/~blueness/eudev/eudev-${version}.tar.gz"; sha256="0shf5vqiz9fdxl95aa1a8vh0xjxwim3psc39wr2xr8lnahf11vva"; }; buildInputs = [ glib pkgconfig gperf ]; in stdenv.mkDerivation { inherit (s) name version; inherit buildInputs; src = fetchurl { inherit (s) url sha256; }; meta = { inherit (s) version; description = ''An udev fork by Gentoo''; license = stdenv.lib.licenses.gpl2Plus ; maintainers = [stdenv.lib.maintainers.raskin]; platforms = stdenv.lib.platforms.linux; homepage = ''http://www.gentoo.org/proj/en/eudev/''; downloadPage = ''http://dev.gentoo.org/~blueness/eudev/''; updateWalker = true; }; } ## Instruction: Allow eudev to find blkid ## Code After: {stdenv, fetchurl, pkgconfig, glib, gperf, utillinux}: let s = # Generated upstream information rec { baseName="eudev"; version="2.1.1"; name="${baseName}-${version}"; url="http://dev.gentoo.org/~blueness/eudev/eudev-${version}.tar.gz"; sha256="0shf5vqiz9fdxl95aa1a8vh0xjxwim3psc39wr2xr8lnahf11vva"; }; buildInputs = [ glib pkgconfig gperf utillinux ]; in stdenv.mkDerivation { inherit (s) name version; inherit buildInputs; src = fetchurl { inherit (s) url sha256; }; meta = { inherit (s) version; description = ''An udev fork by Gentoo''; license = stdenv.lib.licenses.gpl2Plus ; maintainers = [stdenv.lib.maintainers.raskin]; platforms = stdenv.lib.platforms.linux; homepage = ''http://www.gentoo.org/proj/en/eudev/''; downloadPage = ''http://dev.gentoo.org/~blueness/eudev/''; updateWalker = true; }; }
21b4f3ca08b292bf9a20e6b87e94c404ac34ce70
lib/views/general/_orglink.rhtml
lib/views/general/_orglink.rhtml
<div><%= link_to "#{image_tag('navimg/logo-trans.png')} Make and explore Freedom of Information requests", frontpage_url, :id=>'logo' %> </div> <div id="orglogo"> <a href="http://www.mysociety.org">another really handy site by mysociety.org</a> </div>
<div><%= link_to "#{image_tag('navimg/logo-trans.png', :alt => 'WhatDoTheyKnow?')} Make and explore Freedom of Information requests", frontpage_url, :id=>'logo' %> </div> <div id="orglogo"> <a href="http://www.mysociety.org">another really handy site by mysociety.org</a> </div>
Include alt text for logo
Include alt text for logo
RHTML
mit
mysociety/whatdotheyknow-theme,mysociety/whatdotheyknow-theme,schlos/whatdotheyknow-theme,mysociety/whatdotheyknow-theme,schlos/whatdotheyknow-theme
rhtml
## Code Before: <div><%= link_to "#{image_tag('navimg/logo-trans.png')} Make and explore Freedom of Information requests", frontpage_url, :id=>'logo' %> </div> <div id="orglogo"> <a href="http://www.mysociety.org">another really handy site by mysociety.org</a> </div> ## Instruction: Include alt text for logo ## Code After: <div><%= link_to "#{image_tag('navimg/logo-trans.png', :alt => 'WhatDoTheyKnow?')} Make and explore Freedom of Information requests", frontpage_url, :id=>'logo' %> </div> <div id="orglogo"> <a href="http://www.mysociety.org">another really handy site by mysociety.org</a> </div>
abd78b35932cc89e125f651f3c290c357660dbb3
app/index.js
app/index.js
import 'babel-core/polyfill' import 'whatwg-fetch' import Promise from 'bluebird' Promise.longStackTraces() import React from 'react' React.initializeTouchEvents(true) import './helpers/bindKeys' import './startThings/startNotifications' import './startThings/startGlobalPollution' import './startThings/startDataLoading' import './startThings/startRouter'
import Promise from 'bluebird' Promise.longStackTraces() import 'babel-core/polyfill' import 'whatwg-fetch' import React from 'react' React.initializeTouchEvents(true) import './helpers/bindKeys' import './startThings/startNotifications' import './startThings/startGlobalPollution' import './startThings/startDataLoading' import './startThings/startRouter'
Move promise initialization to the first thing
Move promise initialization to the first thing
JavaScript
agpl-3.0
hawkrives/gobbldygook,hawkrives/gobbldygook,hawkrives/gobbldygook
javascript
## Code Before: import 'babel-core/polyfill' import 'whatwg-fetch' import Promise from 'bluebird' Promise.longStackTraces() import React from 'react' React.initializeTouchEvents(true) import './helpers/bindKeys' import './startThings/startNotifications' import './startThings/startGlobalPollution' import './startThings/startDataLoading' import './startThings/startRouter' ## Instruction: Move promise initialization to the first thing ## Code After: import Promise from 'bluebird' Promise.longStackTraces() import 'babel-core/polyfill' import 'whatwg-fetch' import React from 'react' React.initializeTouchEvents(true) import './helpers/bindKeys' import './startThings/startNotifications' import './startThings/startGlobalPollution' import './startThings/startDataLoading' import './startThings/startRouter'
d0cb94447a97f4d4a485574ce41dd0402ec8d9c1
.travis.yml
.travis.yml
notifications: recipients: - [email protected]
notifications: recipients: - [email protected] rvm: - 1.8.7 - 1.9.2
Build for 1.8 and 1.9
Build for 1.8 and 1.9
YAML
mit
putpat/rockstar,kauden/rockstar
yaml
## Code Before: notifications: recipients: - [email protected] ## Instruction: Build for 1.8 and 1.9 ## Code After: notifications: recipients: - [email protected] rvm: - 1.8.7 - 1.9.2