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
f16c0b91026f2e64cfa8c5c78bce367292e196b1
src/ext/components/scala-code-output.jade
src/ext/components/scala-code-output.jade
.flow-widget // ko with:scalaCodeView h4(data-bind="text:\"Status: \"+status") h4 Console Output: p(data-bind="text:output" style="white-space: pre-wrap") h4 Scala Response: p(data-bind="text: response, visible: scalaResponseVisible " style="white-space: pre-wrap") a(href="#" data-bind="click: toggleResponseVisibility, text: scalaLinkText") h4 Executed Code: p(data-bind="text: code, visible: scalaCodeVisible " style="white-space: pre-wrap") a(href="#" data-bind="click: toggleCodeVisibility, text: scalaCodeLinkText") // /ko
.flow-widget // ko with:scalaCodeView h4(data-bind="text:\"Status: \"+status") h4 Console Output: p(data-bind="text:output" style='white-space: pre-wrap; font-family: Courier') h4 Scala Response: p(data-bind="text: response, visible: scalaResponseVisible" style='white-space: pre-wrap; font-family: Courier') a(href="#" data-bind="click: toggleResponseVisibility, text: scalaLinkText") h4 Executed Code: p(data-bind="text: code, visible: scalaCodeVisible" style='white-space: pre-wrap; font-family: Courier') a(href="#" data-bind="click: toggleCodeVisibility, text: scalaCodeLinkText") // /ko
Use MonoSpace font in Scala cell console & interpreter output
[PUBDEV-5699] Use MonoSpace font in Scala cell console & interpreter output
Jade
mit
h2oai/h2o-flow,h2oai/h2o-flow
jade
## Code Before: .flow-widget // ko with:scalaCodeView h4(data-bind="text:\"Status: \"+status") h4 Console Output: p(data-bind="text:output" style="white-space: pre-wrap") h4 Scala Response: p(data-bind="text: response, visible: scalaResponseVisible " style="white-space: pre-wrap") a(href="#" data-bind="click: toggleResponseVisibility, text: scalaLinkText") h4 Executed Code: p(data-bind="text: code, visible: scalaCodeVisible " style="white-space: pre-wrap") a(href="#" data-bind="click: toggleCodeVisibility, text: scalaCodeLinkText") // /ko ## Instruction: [PUBDEV-5699] Use MonoSpace font in Scala cell console & interpreter output ## Code After: .flow-widget // ko with:scalaCodeView h4(data-bind="text:\"Status: \"+status") h4 Console Output: p(data-bind="text:output" style='white-space: pre-wrap; font-family: Courier') h4 Scala Response: p(data-bind="text: response, visible: scalaResponseVisible" style='white-space: pre-wrap; font-family: Courier') a(href="#" data-bind="click: toggleResponseVisibility, text: scalaLinkText") h4 Executed Code: p(data-bind="text: code, visible: scalaCodeVisible" style='white-space: pre-wrap; font-family: Courier') a(href="#" data-bind="click: toggleCodeVisibility, text: scalaCodeLinkText") // /ko
f2e43ebc40c2ec565a395d4321939fd9d88f49ec
QUICKSTART.md
QUICKSTART.md
mkdir tap_0.2.0 git clone -b tap_0.2.0 [email protected]:tap-git/tap.git cd tap mvn clean install cd samples mvn clean install hadoop fs -mkdir /tmp/inputs hadoop fs -put ../share/*.txt /tmp/inputs hadoop jar target/tap-samples-1.0-SNAPSHOT.jar tap.sample.WordCount -i /tmp/inputs -o /tmp/wcoutput hadoop fs -get /tmp/wcoutput/part-00000 . cat part-00000 .
mkdir tap_0.2.0 git clone -b tap_0.2.0 [email protected]:tap-git/tap.git cd tap mvn clean install cd samples mvn clean install hadoop fs -mkdir /tmp/inputs hadoop fs -put ../share/*.txt /tmp/inputs hadoop jar target/tap-samples-1.0-SNAPSHOT.jar tap.sample.WordCount -i /tmp/inputs -o /tmp/wcoutput hadoop fs -get /tmp/wcoutput/part-00000.avro .
Modify to show that output is an Avro file.
Modify to show that output is an Avro file.
Markdown
apache-2.0
tap-git/tap,tap-git/tap,tap-git/tap
markdown
## Code Before: mkdir tap_0.2.0 git clone -b tap_0.2.0 [email protected]:tap-git/tap.git cd tap mvn clean install cd samples mvn clean install hadoop fs -mkdir /tmp/inputs hadoop fs -put ../share/*.txt /tmp/inputs hadoop jar target/tap-samples-1.0-SNAPSHOT.jar tap.sample.WordCount -i /tmp/inputs -o /tmp/wcoutput hadoop fs -get /tmp/wcoutput/part-00000 . cat part-00000 . ## Instruction: Modify to show that output is an Avro file. ## Code After: mkdir tap_0.2.0 git clone -b tap_0.2.0 [email protected]:tap-git/tap.git cd tap mvn clean install cd samples mvn clean install hadoop fs -mkdir /tmp/inputs hadoop fs -put ../share/*.txt /tmp/inputs hadoop jar target/tap-samples-1.0-SNAPSHOT.jar tap.sample.WordCount -i /tmp/inputs -o /tmp/wcoutput hadoop fs -get /tmp/wcoutput/part-00000.avro .
7ca75d38392a861ea168dab0bd9f3c8b3982f443
classes/source_downloader.rb
classes/source_downloader.rb
class SourceDownloader include HashInit attr_accessor :spec, :download_location, :overwrite def download_pod_source_files puts "\n ----------------------" puts "\n Looking at #{@spec.name} #{@spec.version} \n".bold.blue cache_path = $active_folder + "/download_cache" if Dir.exists? @download_location if @overwrite command "rm -rf #{@download_location}" else return end end downloader = Pod::Downloader.for_target(@download_location, @spec.source) downloader.cache_root = @cache_path downloader.download end end
class SourceDownloader include HashInit attr_accessor :spec, :download_location, :overwrite def download_pod_source_files puts "\n ----------------------" puts "\n Looking at #{@spec.name} #{@spec.version} \n".bold.blue cache_path = File.join($active_folder, 'download_cache') if Dir.exists? @download_location if @overwrite command "rm -rf #{@download_location}" else return end end downloader = Pod::Downloader.for_target(@download_location, @spec.source) downloader.cache_root = cache_path downloader.download end end
Fix an issue where cache was disabled
[Downloader] Fix an issue where cache was disabled
Ruby
mit
CocoaPods/cocoadocs.org,jogu/cocoadocs.org,squarefrog/cocoadocs.org,ashfurrow/cocoadocs.org,jogu/cocoadocs.org,ashfurrow/cocoadocs.org,neonichu/cocoadocs.org,squarefrog/cocoadocs.org,CocoaPods/cocoadocs.org,briancroom/cocoadocs.org,neonichu/cocoadocs.org,CocoaPods/cocoadocs.org,briancroom/cocoadocs.org,neonichu/cocoadocs.org,jogu/cocoadocs.org,briancroom/cocoadocs.org,squarefrog/cocoadocs.org
ruby
## Code Before: class SourceDownloader include HashInit attr_accessor :spec, :download_location, :overwrite def download_pod_source_files puts "\n ----------------------" puts "\n Looking at #{@spec.name} #{@spec.version} \n".bold.blue cache_path = $active_folder + "/download_cache" if Dir.exists? @download_location if @overwrite command "rm -rf #{@download_location}" else return end end downloader = Pod::Downloader.for_target(@download_location, @spec.source) downloader.cache_root = @cache_path downloader.download end end ## Instruction: [Downloader] Fix an issue where cache was disabled ## Code After: class SourceDownloader include HashInit attr_accessor :spec, :download_location, :overwrite def download_pod_source_files puts "\n ----------------------" puts "\n Looking at #{@spec.name} #{@spec.version} \n".bold.blue cache_path = File.join($active_folder, 'download_cache') if Dir.exists? @download_location if @overwrite command "rm -rf #{@download_location}" else return end end downloader = Pod::Downloader.for_target(@download_location, @spec.source) downloader.cache_root = cache_path downloader.download end end
3342b3467cd33b89901b0ca85b61bf137a44d3c8
README.md
README.md
HElib ===== HElib is a software library that implements homomorphic encryption (HE). Currently available is an implementation of the [Brakerski-Gentry-Vaikuntanathan] [1] (BGV) scheme, along with many optimizations to make homomorphic evaluation runs faster, focusing mostly on effective use of the [Smart-Vercauteren] [2] ciphertext packing techniques and the [Gentry-Halevi-Smart] [3] optimizations. This library is written in C++ and uses the [NTL mathematical library] [4]. It is distributed under the terms of the [GNU General Public License] [5] (GPL). [1]: http://eprint.iacr.org/2011/277 "BGV12" [2]: http://eprint.iacr.org/2011/133 "SV11" [3]: http://eprint.iacr.org/2012/099 "GHS12" [4]: http://www.shoup.net/ntl/ "NTL" [5]: http://www.gnu.org/licenses/gpl.html "GPL"
HElib ===== HElib is a software library that implements [homomorphic encryption] [6] (HE). Currently available is an implementation of the [Brakerski-Gentry-Vaikuntanathan] [1] (BGV) scheme, along with many optimizations to make homomorphic evaluation runs faster, focusing mostly on effective use of the [Smart-Vercauteren] [2] ciphertext packing techniques and the [Gentry-Halevi-Smart] [3] optimizations. This library is written in C++ and uses the [NTL mathematical library] [4]. It is distributed under the terms of the [GNU General Public License] [5] (GPL). [1]: http://eprint.iacr.org/2011/277 "BGV12" [2]: http://eprint.iacr.org/2011/133 "SV11" [3]: http://eprint.iacr.org/2012/099 "GHS12" [4]: http://www.shoup.net/ntl/ "NTL" [5]: http://www.gnu.org/licenses/gpl.html "GPL" [6]: http://en.wikipedia.org/wiki/Homomorphic_encryption "Homomorphic encryption"
Add a link to wikipedia
Add a link to wikipedia There are people like me that needs a link to wikipedia to remember what homomorphic encryption means.
Markdown
apache-2.0
AlexanderViand/HElib,berserkr/HElib,shaih/HElib,berserkr/HElib,shaih/HElib,AlexanderViand/HElib,shaih/HElib,AlexanderViand/HElib,berserkr/HElib
markdown
## Code Before: HElib ===== HElib is a software library that implements homomorphic encryption (HE). Currently available is an implementation of the [Brakerski-Gentry-Vaikuntanathan] [1] (BGV) scheme, along with many optimizations to make homomorphic evaluation runs faster, focusing mostly on effective use of the [Smart-Vercauteren] [2] ciphertext packing techniques and the [Gentry-Halevi-Smart] [3] optimizations. This library is written in C++ and uses the [NTL mathematical library] [4]. It is distributed under the terms of the [GNU General Public License] [5] (GPL). [1]: http://eprint.iacr.org/2011/277 "BGV12" [2]: http://eprint.iacr.org/2011/133 "SV11" [3]: http://eprint.iacr.org/2012/099 "GHS12" [4]: http://www.shoup.net/ntl/ "NTL" [5]: http://www.gnu.org/licenses/gpl.html "GPL" ## Instruction: Add a link to wikipedia There are people like me that needs a link to wikipedia to remember what homomorphic encryption means. ## Code After: HElib ===== HElib is a software library that implements [homomorphic encryption] [6] (HE). Currently available is an implementation of the [Brakerski-Gentry-Vaikuntanathan] [1] (BGV) scheme, along with many optimizations to make homomorphic evaluation runs faster, focusing mostly on effective use of the [Smart-Vercauteren] [2] ciphertext packing techniques and the [Gentry-Halevi-Smart] [3] optimizations. This library is written in C++ and uses the [NTL mathematical library] [4]. It is distributed under the terms of the [GNU General Public License] [5] (GPL). [1]: http://eprint.iacr.org/2011/277 "BGV12" [2]: http://eprint.iacr.org/2011/133 "SV11" [3]: http://eprint.iacr.org/2012/099 "GHS12" [4]: http://www.shoup.net/ntl/ "NTL" [5]: http://www.gnu.org/licenses/gpl.html "GPL" [6]: http://en.wikipedia.org/wiki/Homomorphic_encryption "Homomorphic encryption"
c3b5661a2ed49284b7d968096615ffbac884a410
public/index.html
public/index.html
<!DOCTYPE html> <html> <head> <link href="/lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/> </head> <body> <h1>Hello world from index.html</h1> <script src="/lib/jquery/dist/jquery.min.js"></script> <script src="/lib/bootstrap/dist/js/bootstrap.min.js"></script> <script src="/lib/angular/angular.min.js"></script> <script src="/lib/angular-ui-router/release/angular-ui-router.min.js"></script> </body> </html>
<!DOCTYPE html> <html lang="en" ng-app="MeanAuthApp"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <title>MEAN Auth App</title> <!-- Bootstrap --> <link href="lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <h1>Welcome</h1> <nav> <a ui-sref="home">Home</a> | <a ui-sref="profile">Profile</a> | <a ui-sref="signup">Sign Up</a> | <a ui-sref="login">Login</a> </nav> <div ui-view></div> <script src="lib/jquery/dist/jquery.min.js"></script> <script src="lib/bootstrap/dist/js/bootstrap.min.js"></script> <script src="lib/angular/angular.min.js"></script> <script src="lib/angular-ui-router/release/angular-ui-router.min.js"></script> <script src="js/app.js"></script> <script src="views/login/login.controller.js"></script> </body> </html>
Fix script paths and add nav
Fix script paths and add nav
HTML
mit
DavidMax/mean-auth,DavidMax/mean-auth
html
## Code Before: <!DOCTYPE html> <html> <head> <link href="/lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/> </head> <body> <h1>Hello world from index.html</h1> <script src="/lib/jquery/dist/jquery.min.js"></script> <script src="/lib/bootstrap/dist/js/bootstrap.min.js"></script> <script src="/lib/angular/angular.min.js"></script> <script src="/lib/angular-ui-router/release/angular-ui-router.min.js"></script> </body> </html> ## Instruction: Fix script paths and add nav ## Code After: <!DOCTYPE html> <html lang="en" ng-app="MeanAuthApp"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <title>MEAN Auth App</title> <!-- Bootstrap --> <link href="lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <h1>Welcome</h1> <nav> <a ui-sref="home">Home</a> | <a ui-sref="profile">Profile</a> | <a ui-sref="signup">Sign Up</a> | <a ui-sref="login">Login</a> </nav> <div ui-view></div> <script src="lib/jquery/dist/jquery.min.js"></script> <script src="lib/bootstrap/dist/js/bootstrap.min.js"></script> <script src="lib/angular/angular.min.js"></script> <script src="lib/angular-ui-router/release/angular-ui-router.min.js"></script> <script src="js/app.js"></script> <script src="views/login/login.controller.js"></script> </body> </html>
f04b85d6536cdfcf3d51e237bde7c2e63a5c2946
server/server.py
server/server.py
import SimpleHTTPServer import SocketServer class KcaaHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): def do_HEAD(self): # Note: HTTP request handlers are not new-style classes. # super() cannot be used. SimpleHTTPServer.SimpleHTTPRequestHandler.do_HEAD(self) def do_GET(self): SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) def setup(args): httpd = SocketServer.TCPServer(('', args.server_port), KcaaHTTPRequestHandler) _, port = httpd.server_address root_url = 'http://127.0.0.1:{}/web/'.format(port) print 'KCAA server ready at {}'.format(root_url) return httpd, root_url
import SimpleHTTPServer import SocketServer class KcaaHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): CLIENT_PREFIX = '/client/' def do_HEAD(self): # Note: HTTP request handlers are not new-style classes. # super() cannot be used. if self.rewrite_to_client_path(): SimpleHTTPServer.SimpleHTTPRequestHandler.do_HEAD(self) def do_GET(self): if self.rewrite_to_client_path(): SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) def rewrite_to_client_path(self): if self.path.startswith(KcaaHTTPRequestHandler.CLIENT_PREFIX): self.path = '/' + self.path[len( KcaaHTTPRequestHandler.CLIENT_PREFIX):] return True else: return False def setup(args): httpd = SocketServer.TCPServer(('', args.server_port), KcaaHTTPRequestHandler) _, port = httpd.server_address root_url = 'http://127.0.0.1:{}/client/'.format(port) print 'KCAA server ready at {}'.format(root_url) return httpd, root_url
Handle only /client requests to file serving.
Handle only /client requests to file serving.
Python
apache-2.0
kcaa/kcaa,kcaa/kcaa,kcaa/kcaa,kcaa/kcaa
python
## Code Before: import SimpleHTTPServer import SocketServer class KcaaHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): def do_HEAD(self): # Note: HTTP request handlers are not new-style classes. # super() cannot be used. SimpleHTTPServer.SimpleHTTPRequestHandler.do_HEAD(self) def do_GET(self): SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) def setup(args): httpd = SocketServer.TCPServer(('', args.server_port), KcaaHTTPRequestHandler) _, port = httpd.server_address root_url = 'http://127.0.0.1:{}/web/'.format(port) print 'KCAA server ready at {}'.format(root_url) return httpd, root_url ## Instruction: Handle only /client requests to file serving. ## Code After: import SimpleHTTPServer import SocketServer class KcaaHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): CLIENT_PREFIX = '/client/' def do_HEAD(self): # Note: HTTP request handlers are not new-style classes. # super() cannot be used. if self.rewrite_to_client_path(): SimpleHTTPServer.SimpleHTTPRequestHandler.do_HEAD(self) def do_GET(self): if self.rewrite_to_client_path(): SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) def rewrite_to_client_path(self): if self.path.startswith(KcaaHTTPRequestHandler.CLIENT_PREFIX): self.path = '/' + self.path[len( KcaaHTTPRequestHandler.CLIENT_PREFIX):] return True else: return False def setup(args): httpd = SocketServer.TCPServer(('', args.server_port), KcaaHTTPRequestHandler) _, port = httpd.server_address root_url = 'http://127.0.0.1:{}/client/'.format(port) print 'KCAA server ready at {}'.format(root_url) return httpd, root_url
1fdc33b04d25fee097eab8b8614569992a0a4bf4
staging_vespalib/src/vespa/vespalib/util/scheduledexecutor.h
staging_vespalib/src/vespa/vespalib/util/scheduledexecutor.h
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/util/executor.h> #include <vespa/vespalib/util/time.h> #include <vector> class FNET_Transport; namespace vespalib { class TimerTask; /** * ScheduledExecutor is a class capable of running Tasks at a regular * interval. The timer can be reset to clear all tasks currently being * scheduled. */ class ScheduledExecutor { private: using TaskList = std::vector<std::unique_ptr<TimerTask>>; FNET_Transport & _transport; std::mutex _lock; TaskList _taskList; public: /** * Create a new timer, capable of scheduling tasks at fixed intervals. */ ScheduledExecutor(FNET_Transport & transport); /** * Destroys this timer, finishing the current task executing and then * finishing. */ ~ScheduledExecutor(); /** * Schedule new task to be executed at specified intervals. * * @param task The task to schedule. * @param delay The delay to wait before first execution. * @param interval The interval in seconds. */ void scheduleAtFixedRate(std::unique_ptr<Executor::Task> task, duration delay, duration interval); /** * Reset timer, clearing the list of task to execute. */ void reset(); }; }
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/util/executor.h> #include <vespa/vespalib/util/time.h> #include <mutex> #include <vector> class FNET_Transport; namespace vespalib { class TimerTask; /** * ScheduledExecutor is a class capable of running Tasks at a regular * interval. The timer can be reset to clear all tasks currently being * scheduled. */ class ScheduledExecutor { private: using TaskList = std::vector<std::unique_ptr<TimerTask>>; FNET_Transport & _transport; std::mutex _lock; TaskList _taskList; public: /** * Create a new timer, capable of scheduling tasks at fixed intervals. */ ScheduledExecutor(FNET_Transport & transport); /** * Destroys this timer, finishing the current task executing and then * finishing. */ ~ScheduledExecutor(); /** * Schedule new task to be executed at specified intervals. * * @param task The task to schedule. * @param delay The delay to wait before first execution. * @param interval The interval in seconds. */ void scheduleAtFixedRate(std::unique_ptr<Executor::Task> task, duration delay, duration interval); /** * Reset timer, clearing the list of task to execute. */ void reset(); }; }
Add include to get declaration for std::mutex (staging_vespalib).
Add include to get declaration for std::mutex (staging_vespalib).
C
apache-2.0
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
c
## Code Before: // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/util/executor.h> #include <vespa/vespalib/util/time.h> #include <vector> class FNET_Transport; namespace vespalib { class TimerTask; /** * ScheduledExecutor is a class capable of running Tasks at a regular * interval. The timer can be reset to clear all tasks currently being * scheduled. */ class ScheduledExecutor { private: using TaskList = std::vector<std::unique_ptr<TimerTask>>; FNET_Transport & _transport; std::mutex _lock; TaskList _taskList; public: /** * Create a new timer, capable of scheduling tasks at fixed intervals. */ ScheduledExecutor(FNET_Transport & transport); /** * Destroys this timer, finishing the current task executing and then * finishing. */ ~ScheduledExecutor(); /** * Schedule new task to be executed at specified intervals. * * @param task The task to schedule. * @param delay The delay to wait before first execution. * @param interval The interval in seconds. */ void scheduleAtFixedRate(std::unique_ptr<Executor::Task> task, duration delay, duration interval); /** * Reset timer, clearing the list of task to execute. */ void reset(); }; } ## Instruction: Add include to get declaration for std::mutex (staging_vespalib). ## Code After: // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/util/executor.h> #include <vespa/vespalib/util/time.h> #include <mutex> #include <vector> class FNET_Transport; namespace vespalib { class TimerTask; /** * ScheduledExecutor is a class capable of running Tasks at a regular * interval. The timer can be reset to clear all tasks currently being * scheduled. */ class ScheduledExecutor { private: using TaskList = std::vector<std::unique_ptr<TimerTask>>; FNET_Transport & _transport; std::mutex _lock; TaskList _taskList; public: /** * Create a new timer, capable of scheduling tasks at fixed intervals. */ ScheduledExecutor(FNET_Transport & transport); /** * Destroys this timer, finishing the current task executing and then * finishing. */ ~ScheduledExecutor(); /** * Schedule new task to be executed at specified intervals. * * @param task The task to schedule. * @param delay The delay to wait before first execution. * @param interval The interval in seconds. */ void scheduleAtFixedRate(std::unique_ptr<Executor::Task> task, duration delay, duration interval); /** * Reset timer, clearing the list of task to execute. */ void reset(); }; }
715b8f5c0fc246f4113ba5668ee8000e5746648a
spec/integration/repository_spec.rb
spec/integration/repository_spec.rb
require 'spec_helper' describe ROM::SQL::Repository do describe 'migration' do include_context 'database setup' context 'creating migrations inline' do subject(:repository) { rom.repositories[:default] } after do [:rabbits, :carrots].each do |name| repository.connection.drop_table?(name) end end it 'allows creating and running migrations' do migration = ROM::SQL.migration do up do create_table(:rabbits) do primary_key :id String :name end end down do drop_table(:rabbits) end end migration.apply(repository.connection, :up) expect(repository.connection[:rabbits]).to be_a(Sequel::Dataset) migration.apply(repository.connection, :down) expect(repository.connection.tables).to_not include(:rabbits) end end context 'running migrations from a file system' do let(:migration_dir) do Pathname(__FILE__).dirname.join('../fixtures/migrations').realpath end let(:migrator) { ROM::SQL::Migration::Migrator.new(conn, path: migration_dir) } before do ROM.setup(:sql, [conn, migrator: migrator]) ROM.finalize end it 'runs migrations from a specified directory' do ROM.env.repositories[:default].run_migrations end end end end
require 'spec_helper' describe ROM::SQL::Repository do describe 'migration' do let(:conn) { Sequel.connect(DB_URI) } context 'creating migrations inline' do subject(:repository) { ROM.env.repositories[:default] } before do ROM.setup(:sql, conn) ROM.finalize end after do [:rabbits, :carrots].each do |name| repository.connection.drop_table?(name) end end it 'allows creating and running migrations' do migration = ROM::SQL.migration do up do create_table(:rabbits) do primary_key :id String :name end end down do drop_table(:rabbits) end end migration.apply(repository.connection, :up) expect(repository.connection[:rabbits]).to be_a(Sequel::Dataset) migration.apply(repository.connection, :down) expect(repository.connection.tables).to_not include(:rabbits) end end context 'running migrations from a file system' do let(:migration_dir) do Pathname(__FILE__).dirname.join('../fixtures/migrations').realpath end let(:migrator) { ROM::SQL::Migration::Migrator.new(conn, path: migration_dir) } before do ROM.setup(:sql, [conn, migrator: migrator]) ROM.finalize end it 'runs migrations from a specified directory' do ROM.env.repositories[:default].run_migrations end end end end
Use custom db setup for migration tests
Use custom db setup for migration tests
Ruby
mit
spscream/rom-sql,rom-rb/rom-sql,rom-rb/rom-sql,kwando/rom-sql,jamesmoriarty/rom-sql
ruby
## Code Before: require 'spec_helper' describe ROM::SQL::Repository do describe 'migration' do include_context 'database setup' context 'creating migrations inline' do subject(:repository) { rom.repositories[:default] } after do [:rabbits, :carrots].each do |name| repository.connection.drop_table?(name) end end it 'allows creating and running migrations' do migration = ROM::SQL.migration do up do create_table(:rabbits) do primary_key :id String :name end end down do drop_table(:rabbits) end end migration.apply(repository.connection, :up) expect(repository.connection[:rabbits]).to be_a(Sequel::Dataset) migration.apply(repository.connection, :down) expect(repository.connection.tables).to_not include(:rabbits) end end context 'running migrations from a file system' do let(:migration_dir) do Pathname(__FILE__).dirname.join('../fixtures/migrations').realpath end let(:migrator) { ROM::SQL::Migration::Migrator.new(conn, path: migration_dir) } before do ROM.setup(:sql, [conn, migrator: migrator]) ROM.finalize end it 'runs migrations from a specified directory' do ROM.env.repositories[:default].run_migrations end end end end ## Instruction: Use custom db setup for migration tests ## Code After: require 'spec_helper' describe ROM::SQL::Repository do describe 'migration' do let(:conn) { Sequel.connect(DB_URI) } context 'creating migrations inline' do subject(:repository) { ROM.env.repositories[:default] } before do ROM.setup(:sql, conn) ROM.finalize end after do [:rabbits, :carrots].each do |name| repository.connection.drop_table?(name) end end it 'allows creating and running migrations' do migration = ROM::SQL.migration do up do create_table(:rabbits) do primary_key :id String :name end end down do drop_table(:rabbits) end end migration.apply(repository.connection, :up) expect(repository.connection[:rabbits]).to be_a(Sequel::Dataset) migration.apply(repository.connection, :down) expect(repository.connection.tables).to_not include(:rabbits) end end context 'running migrations from a file system' do let(:migration_dir) do Pathname(__FILE__).dirname.join('../fixtures/migrations').realpath end let(:migrator) { ROM::SQL::Migration::Migrator.new(conn, path: migration_dir) } before do ROM.setup(:sql, [conn, migrator: migrator]) ROM.finalize end it 'runs migrations from a specified directory' do ROM.env.repositories[:default].run_migrations end end end end
ee9aae915d9fd0b48f8af3a8f78809ac0f224271
app/views/question/_answer_item.html.erb
app/views/question/_answer_item.html.erb
<dt> <%= @category.meta.wikiname %> </dt> <dd> <div class='tellmemore'><%= link_to "More info", "http://discover.amee.com/categories/#{@category.meta.wikiname}" %></div> <% if @pi -%> <div class='amount'>= <%= @pi.total_amount %>kg</div> <% end -%> <% if @item && @ivd -%> <div class='details'> Item <span class='item'>"<%= @item.label %>"</span>, input parameter <span class='inputname'>"<%= @ivd.name%>"</span> </div> <% end -%> </dd> <% unless session[:categories].empty? %> <%= render :partial => 'thinking'%> <% end %>
<dt> <%= @category.meta.wikiname %> </dt> <dd> <div class='tellmemore'><%= link_to "More info", "http://discover.amee.com/categories/#{@category.meta.wikiname}" %></div> <div class='amount'> <% if @pi -%> = <%= @pi.total_amount %>kg <% else -%> There wasn't enough information to do a calculation here. Click More Info for more calculation options <% end -%> </div> <div class='details'> <% if @item && @ivd -%> Item <span class='item'>"<%= @item.label %>"</span>, input parameter <span class='inputname'>"<%= @ivd.name%>"</span> <% end -%> </div> </dd> <% unless session[:categories].empty? %> <%= render :partial => 'thinking'%> <% end %>
Add help text if calc failed
Add help text if calc failed
HTML+ERB
bsd-3-clause
OpenAMEE/askamee,OpenAMEE/askamee
html+erb
## Code Before: <dt> <%= @category.meta.wikiname %> </dt> <dd> <div class='tellmemore'><%= link_to "More info", "http://discover.amee.com/categories/#{@category.meta.wikiname}" %></div> <% if @pi -%> <div class='amount'>= <%= @pi.total_amount %>kg</div> <% end -%> <% if @item && @ivd -%> <div class='details'> Item <span class='item'>"<%= @item.label %>"</span>, input parameter <span class='inputname'>"<%= @ivd.name%>"</span> </div> <% end -%> </dd> <% unless session[:categories].empty? %> <%= render :partial => 'thinking'%> <% end %> ## Instruction: Add help text if calc failed ## Code After: <dt> <%= @category.meta.wikiname %> </dt> <dd> <div class='tellmemore'><%= link_to "More info", "http://discover.amee.com/categories/#{@category.meta.wikiname}" %></div> <div class='amount'> <% if @pi -%> = <%= @pi.total_amount %>kg <% else -%> There wasn't enough information to do a calculation here. Click More Info for more calculation options <% end -%> </div> <div class='details'> <% if @item && @ivd -%> Item <span class='item'>"<%= @item.label %>"</span>, input parameter <span class='inputname'>"<%= @ivd.name%>"</span> <% end -%> </div> </dd> <% unless session[:categories].empty? %> <%= render :partial => 'thinking'%> <% end %>
467c4dcb2de8e3f0f6e295be50d93049e07ccbf1
src/server/contest/templates/admin/base_site.html
src/server/contest/templates/admin/base_site.html
{% extends "admin/base_site.html" %} {% block footer %} <div align="right">Powered by Crux.</div> {% endblock %}
{% extends "admin/base_site.html" %} {% load static %} {% block extrahead %} <link rel="shortcut icon" href="{% static "/images/crux.ico" %}"> <link rel="icon" href="{% static "/images/crux.ico" %}" type = "image/x-icon"> {% endblock %} {% block footer %} <div align="right">Powered by Crux.</div> {% endblock %}
Add favicon to admin panel
ui: Add favicon to admin panel
HTML
mit
basu96/crux-judge,CRUx-BPHC/crux-judge,basu96/crux-judge,basu96/crux-judge,CRUx-BPHC/crux-judge,CRUx-BPHC/crux-judge,basu96/crux-judge,basu96/crux-judge
html
## Code Before: {% extends "admin/base_site.html" %} {% block footer %} <div align="right">Powered by Crux.</div> {% endblock %} ## Instruction: ui: Add favicon to admin panel ## Code After: {% extends "admin/base_site.html" %} {% load static %} {% block extrahead %} <link rel="shortcut icon" href="{% static "/images/crux.ico" %}"> <link rel="icon" href="{% static "/images/crux.ico" %}" type = "image/x-icon"> {% endblock %} {% block footer %} <div align="right">Powered by Crux.</div> {% endblock %}
3f39acba9619b7d415072dd907dfd39a9258bbe9
.travis.yml
.travis.yml
language: ruby cache: bundler rvm: - "2.1.1" - "2.1.2" notifications: irc: "chat.freenode.net#linkbot"
language: ruby cache: bundler rvm: - 2.1.5 - 2.1.1 - 2.1.2 notifications: slack: secure: I1vmcuvaVYyDOB+HJrjj6hgEMUq4c7V0PrQs5umTbqELdnlfsAfIwBxk8HYgoyrK18dt2ceLowYbvXYAHwc0AMWXzACfhsGRxE+kCcRfvzJ5sHoQSc5jfBhK3i1qIwh1+mSRLABIN51KdL3nihntX66C57DnqvMbmG/XkfKYNJA=
Remove IRC notifications; add Slack notifications
Remove IRC notifications; add Slack notifications
YAML
mit
markolson/linkbot
yaml
## Code Before: language: ruby cache: bundler rvm: - "2.1.1" - "2.1.2" notifications: irc: "chat.freenode.net#linkbot" ## Instruction: Remove IRC notifications; add Slack notifications ## Code After: language: ruby cache: bundler rvm: - 2.1.5 - 2.1.1 - 2.1.2 notifications: slack: secure: I1vmcuvaVYyDOB+HJrjj6hgEMUq4c7V0PrQs5umTbqELdnlfsAfIwBxk8HYgoyrK18dt2ceLowYbvXYAHwc0AMWXzACfhsGRxE+kCcRfvzJ5sHoQSc5jfBhK3i1qIwh1+mSRLABIN51KdL3nihntX66C57DnqvMbmG/XkfKYNJA=
2ce107313c1549e4d247043592a3b24050faf89c
shell/aliases-darwin.sh
shell/aliases-darwin.sh
alias cdf='cd "$(printfd)"' # Switch to directory selected in finder alias puf='pushd "$(printfd)"' # Push finder directory to the stack alias hide="chflags hidden" # Hide a file in Finder alias show="chflags nohidden" # Show a file in Finder alias cask="brew cask" # Easily install applications via homebrew
alias cdf='cd "$(printfd)"' # Switch to current Finder directory alias puf='pushd "$(printfd)"' # Push Finder directory to the stack alias ql="qlmanage -p >/dev/null 2>&1" # Open a file in quick look alias hide="chflags hidden" # Hide a file in Finder alias show="chflags nohidden" # Show a file in Finder alias cask="brew cask" # Easily install apps via homebrew alias reload="source ~/.bash_profile" # Reload bash configuration alias finder="open -a Finder" # Open a directory in Finder alias chrome="open -a Google\ Chrome" # Open a website in Google Chrome alias firefox="open -a Firefox" # Open a website in Firefox alias safari="open -a Safari" # Open a website in Safari alias preview="open -a Preview" # Display a preview of any type of file
Add aliases to macOS applications
feat: Add aliases to macOS applications
Shell
mit
dweidner/dotfiles,dweidner/dotfiles
shell
## Code Before: alias cdf='cd "$(printfd)"' # Switch to directory selected in finder alias puf='pushd "$(printfd)"' # Push finder directory to the stack alias hide="chflags hidden" # Hide a file in Finder alias show="chflags nohidden" # Show a file in Finder alias cask="brew cask" # Easily install applications via homebrew ## Instruction: feat: Add aliases to macOS applications ## Code After: alias cdf='cd "$(printfd)"' # Switch to current Finder directory alias puf='pushd "$(printfd)"' # Push Finder directory to the stack alias ql="qlmanage -p >/dev/null 2>&1" # Open a file in quick look alias hide="chflags hidden" # Hide a file in Finder alias show="chflags nohidden" # Show a file in Finder alias cask="brew cask" # Easily install apps via homebrew alias reload="source ~/.bash_profile" # Reload bash configuration alias finder="open -a Finder" # Open a directory in Finder alias chrome="open -a Google\ Chrome" # Open a website in Google Chrome alias firefox="open -a Firefox" # Open a website in Firefox alias safari="open -a Safari" # Open a website in Safari alias preview="open -a Preview" # Display a preview of any type of file
3ef9da421a5cf4a813385acb2106ec540d897c91
app/models/spree/product_export.rb
app/models/spree/product_export.rb
module Spree class ProductExport < ActiveRecord::Base has_attached_file :attachment validates_attachment :attachment, content_type: { content_type: "text/csv" } after_commit :run_export def finished? total_rows == processed_rows end def finish_percent if total_rows > 0 processed_rows / total_rows * 100.0 else 100 end end private def run_export SpreeProductsExport::ExportGenerator.generate(self) end end end
module Spree class ProductExport < ActiveRecord::Base has_attached_file :attachment validates_attachment :attachment, content_type: { content_type: "text/csv" } after_commit :run_export, on: :create def finished? total_rows == processed_rows end def finish_percent if total_rows > 0 processed_rows / total_rows * 100.0 else 100 end end private def run_export SpreeProductsExport::ExportGenerator.generate(self) end end end
Fix commit issue for run process
Fix commit issue for run process
Ruby
bsd-3-clause
chubarovNick/spree_products_exports,chubarovNick/spree_products_exports,chubarovNick/spree_products_exports
ruby
## Code Before: module Spree class ProductExport < ActiveRecord::Base has_attached_file :attachment validates_attachment :attachment, content_type: { content_type: "text/csv" } after_commit :run_export def finished? total_rows == processed_rows end def finish_percent if total_rows > 0 processed_rows / total_rows * 100.0 else 100 end end private def run_export SpreeProductsExport::ExportGenerator.generate(self) end end end ## Instruction: Fix commit issue for run process ## Code After: module Spree class ProductExport < ActiveRecord::Base has_attached_file :attachment validates_attachment :attachment, content_type: { content_type: "text/csv" } after_commit :run_export, on: :create def finished? total_rows == processed_rows end def finish_percent if total_rows > 0 processed_rows / total_rows * 100.0 else 100 end end private def run_export SpreeProductsExport::ExportGenerator.generate(self) end end end
e453b1c250e262671cf58a1cec670373192e50f8
lib/simple_form/bank_account_number/countries.rb
lib/simple_form/bank_account_number/countries.rb
module SimpleForm module BankAccountNumber COUNTRIES = { "AU" => [ { label: "6 digit BSB number", format: /\d{6}/ }, { label: "9 digit account number", format: /\d{9}/ }, ], "CA" => [ { label: "5 digit branch number", format: /\d{5}/ }, { label: "3 digit institution number", format: /\d{3}/ }, { label: "account number", format: /\d+/ }, ], "GB" => [ { label: "6 digit sort code", format: /\d{6}/ }, { label: "8 digit account number", format: /\d{8}/ }, ], "NZ" => [ { label: "2 digit bank number", format: /\d{2}/ }, { label: "4 digit branch number", format: /\d{4}/ }, { label: "7 digit account number", format: /\d{7}/ }, { label: "2 or 3 digit suffix", format: /\d{2,3}/ }, ], } DEFAULT_FORMAT = [ { label: "account number", format: /[A-Z0-9]+/ } ] end end
module SimpleForm module BankAccountNumber COUNTRIES = { "AU" => [ { label: "6 digit BSB number", format: /\d{6}/ }, { label: "6 to 9 digit account number", format: /\d{6,9}/ }, ], "CA" => [ { label: "8 or 9 digit transit number", format: /\d{8,9}/ }, { label: "7 to 12 digit account number", format: /\d{7,12}/ }, ], "GB" => [ { label: "6 digit sort code", format: /\d{6}/ }, { label: "7 to 10 digit account number", format: /\d{7,10}/ }, ], "NZ" => [ { label: "2 digit bank number", format: /\d{2}/ }, { label: "4 digit branch number", format: /\d{4}/ }, { label: "7 digit account number", format: /\d{7}/ }, { label: "2 or 3 digit suffix", format: /\d{2,3}/ }, ], } DEFAULT_FORMAT = [ { label: "account number", format: /[A-Z0-9]+/ } ] end end
Update formats to include edge cases
Update formats to include edge cases
Ruby
mit
buckybox/simple_form-bank_account_number
ruby
## Code Before: module SimpleForm module BankAccountNumber COUNTRIES = { "AU" => [ { label: "6 digit BSB number", format: /\d{6}/ }, { label: "9 digit account number", format: /\d{9}/ }, ], "CA" => [ { label: "5 digit branch number", format: /\d{5}/ }, { label: "3 digit institution number", format: /\d{3}/ }, { label: "account number", format: /\d+/ }, ], "GB" => [ { label: "6 digit sort code", format: /\d{6}/ }, { label: "8 digit account number", format: /\d{8}/ }, ], "NZ" => [ { label: "2 digit bank number", format: /\d{2}/ }, { label: "4 digit branch number", format: /\d{4}/ }, { label: "7 digit account number", format: /\d{7}/ }, { label: "2 or 3 digit suffix", format: /\d{2,3}/ }, ], } DEFAULT_FORMAT = [ { label: "account number", format: /[A-Z0-9]+/ } ] end end ## Instruction: Update formats to include edge cases ## Code After: module SimpleForm module BankAccountNumber COUNTRIES = { "AU" => [ { label: "6 digit BSB number", format: /\d{6}/ }, { label: "6 to 9 digit account number", format: /\d{6,9}/ }, ], "CA" => [ { label: "8 or 9 digit transit number", format: /\d{8,9}/ }, { label: "7 to 12 digit account number", format: /\d{7,12}/ }, ], "GB" => [ { label: "6 digit sort code", format: /\d{6}/ }, { label: "7 to 10 digit account number", format: /\d{7,10}/ }, ], "NZ" => [ { label: "2 digit bank number", format: /\d{2}/ }, { label: "4 digit branch number", format: /\d{4}/ }, { label: "7 digit account number", format: /\d{7}/ }, { label: "2 or 3 digit suffix", format: /\d{2,3}/ }, ], } DEFAULT_FORMAT = [ { label: "account number", format: /[A-Z0-9]+/ } ] end end
9e89757f5d7e696df7724577f341270e7870fefc
archive/nerves_bootstrap/templates/new/README.md
archive/nerves_bootstrap/templates/new/README.md
To start your Nerves app: * Install dependencies with `mix deps.get` * Create firmware with `mix firmware` * Burn to an SD card with `mix firmware.burn` ## Learn more * Official website: http://www.nerves-project.org/ * Discussion Slack elixir-lang #nerves * Source: https://github.com/nerves-project/nerves
To start your Nerves app: * Install dependencies with `mix deps.get` * Create firmware with `mix firmware` * Burn to an SD card with `mix firmware.burn` ## Learn more * Official docs: https://hexdocs.pm/nerves/getting-started.html * Official website: http://www.nerves-project.org/ * Discussion Slack elixir-lang #nerves ([Invite](https://elixir-slackin.herokuapp.com/)) * Source: https://github.com/nerves-project/nerves
Add doc and slack channel invite URLs
Add doc and slack channel invite URLs
Markdown
apache-2.0
nerves-project/nerves,nerves-project/nerves
markdown
## Code Before: To start your Nerves app: * Install dependencies with `mix deps.get` * Create firmware with `mix firmware` * Burn to an SD card with `mix firmware.burn` ## Learn more * Official website: http://www.nerves-project.org/ * Discussion Slack elixir-lang #nerves * Source: https://github.com/nerves-project/nerves ## Instruction: Add doc and slack channel invite URLs ## Code After: To start your Nerves app: * Install dependencies with `mix deps.get` * Create firmware with `mix firmware` * Burn to an SD card with `mix firmware.burn` ## Learn more * Official docs: https://hexdocs.pm/nerves/getting-started.html * Official website: http://www.nerves-project.org/ * Discussion Slack elixir-lang #nerves ([Invite](https://elixir-slackin.herokuapp.com/)) * Source: https://github.com/nerves-project/nerves
01dd4901532df4f3da51501d4f223c873dd49dd8
ideascube/tests/test_settings.py
ideascube/tests/test_settings.py
import glob import os import importlib import pytest @pytest.fixture(params=glob.glob('ideascube/conf/*.py')) def setting_module(request): basename = os.path.basename(request.param) module, _ = os.path.splitext(basename) return '.conf.%s' % module def test_setting_file(setting_module): from ideascube.forms import UserImportForm settings = importlib.import_module(setting_module, package="ideascube") assert isinstance(getattr(settings, 'IDEASCUBE_NAME', ''), str) for name, _ in getattr(settings, 'USER_IMPORT_FORMATS', []): assert hasattr(UserImportForm, '_get_{}_mapping'.format(name)) assert hasattr(UserImportForm, '_get_{}_reader'.format(name))
import glob import os import importlib import pytest @pytest.fixture(params=sorted([ f for f in glob.glob('ideascube/conf/*.py') if not f.endswith('/__init__.py') ])) def setting_module(request): basename = os.path.basename(request.param) module, _ = os.path.splitext(basename) return '.conf.%s' % module def test_setting_file(setting_module): from ideascube.forms import UserImportForm settings = importlib.import_module(setting_module, package="ideascube") assert isinstance(getattr(settings, 'IDEASCUBE_NAME', ''), str) for name, _ in getattr(settings, 'USER_IMPORT_FORMATS', []): assert hasattr(UserImportForm, '_get_{}_mapping'.format(name)) assert hasattr(UserImportForm, '_get_{}_reader'.format(name))
Improve the settings files testing fixture
tests: Improve the settings files testing fixture Let's order these files, as it makes it nicer in the pytest output. In addition, we can filter out the __init__.py file, since it is completely empty.
Python
agpl-3.0
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
python
## Code Before: import glob import os import importlib import pytest @pytest.fixture(params=glob.glob('ideascube/conf/*.py')) def setting_module(request): basename = os.path.basename(request.param) module, _ = os.path.splitext(basename) return '.conf.%s' % module def test_setting_file(setting_module): from ideascube.forms import UserImportForm settings = importlib.import_module(setting_module, package="ideascube") assert isinstance(getattr(settings, 'IDEASCUBE_NAME', ''), str) for name, _ in getattr(settings, 'USER_IMPORT_FORMATS', []): assert hasattr(UserImportForm, '_get_{}_mapping'.format(name)) assert hasattr(UserImportForm, '_get_{}_reader'.format(name)) ## Instruction: tests: Improve the settings files testing fixture Let's order these files, as it makes it nicer in the pytest output. In addition, we can filter out the __init__.py file, since it is completely empty. ## Code After: import glob import os import importlib import pytest @pytest.fixture(params=sorted([ f for f in glob.glob('ideascube/conf/*.py') if not f.endswith('/__init__.py') ])) def setting_module(request): basename = os.path.basename(request.param) module, _ = os.path.splitext(basename) return '.conf.%s' % module def test_setting_file(setting_module): from ideascube.forms import UserImportForm settings = importlib.import_module(setting_module, package="ideascube") assert isinstance(getattr(settings, 'IDEASCUBE_NAME', ''), str) for name, _ in getattr(settings, 'USER_IMPORT_FORMATS', []): assert hasattr(UserImportForm, '_get_{}_mapping'.format(name)) assert hasattr(UserImportForm, '_get_{}_reader'.format(name))
c35756410c3372249272175b14c57f26d588c344
client/views/home/residents/residents.html
client/views/home/residents/residents.html
<template name="homeResidents"> <div class="list-group"> {{# each residents }} <a href="/resident/{{ _id }}" title="{{ name }}" class="list-group-item">{{ firstName }} {{ lastInitial }}</a> {{/ each }} </div> </template>
<template name="homeResidents"> <div class="list-group"> {{# each residents }} {{> homeResident }} {{/ each }} </div> </template>
Refactor to single resident template
Refactor to single resident template
HTML
agpl-3.0
GeriLife/wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing
html
## Code Before: <template name="homeResidents"> <div class="list-group"> {{# each residents }} <a href="/resident/{{ _id }}" title="{{ name }}" class="list-group-item">{{ firstName }} {{ lastInitial }}</a> {{/ each }} </div> </template> ## Instruction: Refactor to single resident template ## Code After: <template name="homeResidents"> <div class="list-group"> {{# each residents }} {{> homeResident }} {{/ each }} </div> </template>
d4635706c1eb5ecdd13c0197706cebdc73ebe382
CMakeLists.txt
CMakeLists.txt
project(PhononGStreamer) cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR) option(USE_INSTALL_PLUGIN "Use GStreamer codec installation API" TRUE) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") find_package(Phonon REQUIRED) add_definitions(${QT_DEFINITIONS}) include_directories(${PHONON_INCLUDES} ${QT_INCLUDES}) set(PHONON_GST_MAJOR_VERSION "4") set(PHONON_GST_MINOR_VERSION "6") set(PHONON_GST_PATCH_VERSION "50") set(PHONON_GST_VERSION "${PHONON_GST_MAJOR_VERSION}.${PHONON_GST_MINOR_VERSION}.${PHONON_GST_PATCH_VERSION}") add_definitions(-DPHONON_GST_VERSION="${PHONON_GST_VERSION}") add_subdirectory(gstreamer) macro_display_feature_log()
project(PhononGStreamer) cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR) option(USE_INSTALL_PLUGIN "Use GStreamer codec installation API" TRUE) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") find_package(Phonon REQUIRED) add_definitions(${QT_DEFINITIONS}) include_directories(${PHONON_INCLUDES} ${QT_INCLUDES}) set(PHONON_GST_MAJOR_VERSION "4") set(PHONON_GST_MINOR_VERSION "6") set(PHONON_GST_PATCH_VERSION "50") set(PHONON_GST_VERSION "${PHONON_GST_MAJOR_VERSION}.${PHONON_GST_MINOR_VERSION}.${PHONON_GST_PATCH_VERSION}") add_definitions(-DPHONON_GST_VERSION="${PHONON_GST_VERSION}") add_subdirectory(gstreamer) macro_display_feature_log() add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/phonon-backend-gstreamer-${PHONON_GST_VERSION}.tar.xz COMMAND git archive --prefix=phonon-backend-gstreamer-${PHONON_GST_VERSION}/ HEAD | xz > ${CMAKE_BINARY_DIR}/phonon-backend-gstreamer-${PHONON_GST_VERSION}.tar.xz WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) add_custom_target( dist DEPENDS ${CMAKE_BINARY_DIR}/phonon-backend-gstreamer-${PHONON_GST_VERSION}.tar.xz )
Add a "dist" target for easy tarball generation
Add a "dist" target for easy tarball generation
Text
lgpl-2.1
KDE/phonon-gstreamer,shadeslayer/phonon-gstreamer,shadeslayer/phonon-gstreamer,shadeslayer/phonon-gstreamer,KDE/phonon-gstreamer
text
## Code Before: project(PhononGStreamer) cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR) option(USE_INSTALL_PLUGIN "Use GStreamer codec installation API" TRUE) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") find_package(Phonon REQUIRED) add_definitions(${QT_DEFINITIONS}) include_directories(${PHONON_INCLUDES} ${QT_INCLUDES}) set(PHONON_GST_MAJOR_VERSION "4") set(PHONON_GST_MINOR_VERSION "6") set(PHONON_GST_PATCH_VERSION "50") set(PHONON_GST_VERSION "${PHONON_GST_MAJOR_VERSION}.${PHONON_GST_MINOR_VERSION}.${PHONON_GST_PATCH_VERSION}") add_definitions(-DPHONON_GST_VERSION="${PHONON_GST_VERSION}") add_subdirectory(gstreamer) macro_display_feature_log() ## Instruction: Add a "dist" target for easy tarball generation ## Code After: project(PhononGStreamer) cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR) option(USE_INSTALL_PLUGIN "Use GStreamer codec installation API" TRUE) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") find_package(Phonon REQUIRED) add_definitions(${QT_DEFINITIONS}) include_directories(${PHONON_INCLUDES} ${QT_INCLUDES}) set(PHONON_GST_MAJOR_VERSION "4") set(PHONON_GST_MINOR_VERSION "6") set(PHONON_GST_PATCH_VERSION "50") set(PHONON_GST_VERSION "${PHONON_GST_MAJOR_VERSION}.${PHONON_GST_MINOR_VERSION}.${PHONON_GST_PATCH_VERSION}") add_definitions(-DPHONON_GST_VERSION="${PHONON_GST_VERSION}") add_subdirectory(gstreamer) macro_display_feature_log() add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/phonon-backend-gstreamer-${PHONON_GST_VERSION}.tar.xz COMMAND git archive --prefix=phonon-backend-gstreamer-${PHONON_GST_VERSION}/ HEAD | xz > ${CMAKE_BINARY_DIR}/phonon-backend-gstreamer-${PHONON_GST_VERSION}.tar.xz WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) add_custom_target( dist DEPENDS ${CMAKE_BINARY_DIR}/phonon-backend-gstreamer-${PHONON_GST_VERSION}.tar.xz )
f0543e103e57dab01ceaeaf2e06ae4d486747d56
webapp/webpack.config.js
webapp/webpack.config.js
var path = require('path'); var fs = require('fs'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = { entry: path.join(__dirname, 'src/frontend/app'), cache: true, output: { path: path.join(__dirname, '/public/'), filename: 'bundle.[hash].js' }, module: { loaders: [ { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') }, { test: /\.jsx?$/, loader: "babel-loader", exclude: /node_modules/ }, { test: /\.less$/, loader: "style-loader!css-loader!less-loader" }, { test: /\.(ttf|eot|otf|svg|woff|woff2)(\?.+)?$/, loader: "url-loader?limit=10000" }, { test: /\.scss$/, loader: "style!css!sass?includePaths[]=" + (path.resolve(__dirname, "./node_modules")) } ] }, plugins: [ new ExtractTextPlugin('bundle.[hash].css'), function() { this.plugin('done', function(stats) { fs.writeFile(path.resolve(__dirname, './public/hash'), stats.hash); }); } ], devtool: 'source-map' };
var path = require('path'); var fs = require('fs'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var webpack = require('webpack'); module.exports = { entry: path.join(__dirname, 'src/frontend/app'), cache: true, output: { path: path.join(__dirname, '/public/'), filename: 'bundle.[hash].js' }, module: { loaders: [ { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') }, { test: /\.jsx?$/, loader: "babel-loader", exclude: /node_modules/ }, { test: /\.less$/, loader: "style-loader!css-loader!less-loader" }, { test: /\.(ttf|eot|otf|svg|woff|woff2)(\?.+)?$/, loader: "url-loader?limit=10000" }, { test: /\.scss$/, loader: "style!css!sass?includePaths[]=" + (path.resolve(__dirname, "./node_modules")) } ] }, plugins: [ new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /nb$/), new ExtractTextPlugin('bundle.[hash].css'), function() { this.plugin('done', function(stats) { fs.writeFile(path.resolve(__dirname, './public/hash'), stats.hash); }); } ], devtool: 'source-map' };
Remove unused moment locales from webpack bundle
Remove unused moment locales from webpack bundle
JavaScript
bsd-3-clause
holderdeord/hdo-transcript-search,holderdeord/hdo-transcript-search,holderdeord/hdo-transcript-search,holderdeord/hdo-transcript-search
javascript
## Code Before: var path = require('path'); var fs = require('fs'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = { entry: path.join(__dirname, 'src/frontend/app'), cache: true, output: { path: path.join(__dirname, '/public/'), filename: 'bundle.[hash].js' }, module: { loaders: [ { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') }, { test: /\.jsx?$/, loader: "babel-loader", exclude: /node_modules/ }, { test: /\.less$/, loader: "style-loader!css-loader!less-loader" }, { test: /\.(ttf|eot|otf|svg|woff|woff2)(\?.+)?$/, loader: "url-loader?limit=10000" }, { test: /\.scss$/, loader: "style!css!sass?includePaths[]=" + (path.resolve(__dirname, "./node_modules")) } ] }, plugins: [ new ExtractTextPlugin('bundle.[hash].css'), function() { this.plugin('done', function(stats) { fs.writeFile(path.resolve(__dirname, './public/hash'), stats.hash); }); } ], devtool: 'source-map' }; ## Instruction: Remove unused moment locales from webpack bundle ## Code After: var path = require('path'); var fs = require('fs'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var webpack = require('webpack'); module.exports = { entry: path.join(__dirname, 'src/frontend/app'), cache: true, output: { path: path.join(__dirname, '/public/'), filename: 'bundle.[hash].js' }, module: { loaders: [ { test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader') }, { test: /\.jsx?$/, loader: "babel-loader", exclude: /node_modules/ }, { test: /\.less$/, loader: "style-loader!css-loader!less-loader" }, { test: /\.(ttf|eot|otf|svg|woff|woff2)(\?.+)?$/, loader: "url-loader?limit=10000" }, { test: /\.scss$/, loader: "style!css!sass?includePaths[]=" + (path.resolve(__dirname, "./node_modules")) } ] }, plugins: [ new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /nb$/), new ExtractTextPlugin('bundle.[hash].css'), function() { this.plugin('done', function(stats) { fs.writeFile(path.resolve(__dirname, './public/hash'), stats.hash); }); } ], devtool: 'source-map' };
f090827e22f0d44531732222c1b11f53ecb45d82
docs/Docker.md
docs/Docker.md
This document describes how to build and run a docker image containing all the CRS tests with FTW. ## Building image ``` % docker build -t ftw-test . ``` ## Running the image Run through the entire CRS v3 test corpus with www.whatever.com as the target. *NOTE:* the `-i` is required to attach stdin to the docker container. ``` % docker run -i ftw-test -d www.whatever.com ``` Test individual rule files: ``` % docker run -i ftw-test -d www.whatever.com -f - < mytest.yaml ```
This document describes how to build and run a docker image containing all the CRS tests with FTW. ## Building image ``` % docker build -t ftw-test . ``` ## Running the image Run through the entire CRS v3 test corpus with <hostname> as the target. *NOTE:* the `-i` is required to attach stdin to the docker container. ``` % docker run -i ftw-test -d <hostname> ``` Test individual rule files: ``` % docker run -i ftw-test -d <hostname> -f - < mytest.yaml ```
Generalize the host in the example
Generalize the host in the example
Markdown
apache-2.0
fastly/ftw,fastly/ftw
markdown
## Code Before: This document describes how to build and run a docker image containing all the CRS tests with FTW. ## Building image ``` % docker build -t ftw-test . ``` ## Running the image Run through the entire CRS v3 test corpus with www.whatever.com as the target. *NOTE:* the `-i` is required to attach stdin to the docker container. ``` % docker run -i ftw-test -d www.whatever.com ``` Test individual rule files: ``` % docker run -i ftw-test -d www.whatever.com -f - < mytest.yaml ``` ## Instruction: Generalize the host in the example ## Code After: This document describes how to build and run a docker image containing all the CRS tests with FTW. ## Building image ``` % docker build -t ftw-test . ``` ## Running the image Run through the entire CRS v3 test corpus with <hostname> as the target. *NOTE:* the `-i` is required to attach stdin to the docker container. ``` % docker run -i ftw-test -d <hostname> ``` Test individual rule files: ``` % docker run -i ftw-test -d <hostname> -f - < mytest.yaml ```
a8ca907618f60755db6028983df11cdc4c2c8ae1
.travis.yml
.travis.yml
before_install: gem install bundler rvm: - 1.8.7 - 1.9.2 - 1.9.3 - 2.1.0 - ree gemfile: - Gemfile - gemfiles/rspec2.gemfile
before_script: - gem install bundler - bundle install rvm: - 1.8.7 - 1.9.2 - 1.9.3 - 2.1.0 - ree gemfile: - Gemfile - gemfiles/rspec2.gemfile
Add bundle install to the before script for Travis.
Add bundle install to the before script for Travis.
YAML
mit
zackexplosion/yee-formatter,mattsears/nyan-cat-formatter,Brescia717/nyan-cat-formatter,StevenNunez/nyan-cat-formatter
yaml
## Code Before: before_install: gem install bundler rvm: - 1.8.7 - 1.9.2 - 1.9.3 - 2.1.0 - ree gemfile: - Gemfile - gemfiles/rspec2.gemfile ## Instruction: Add bundle install to the before script for Travis. ## Code After: before_script: - gem install bundler - bundle install rvm: - 1.8.7 - 1.9.2 - 1.9.3 - 2.1.0 - ree gemfile: - Gemfile - gemfiles/rspec2.gemfile
0043c4b3961751195316ce56776298108ae45232
src/assets/styles/vendor/_str-replace.scss
src/assets/styles/vendor/_str-replace.scss
// https://css-tricks.com/snippets/sass/str-replace-function/ /// Replace `$search` with `$replace` in `$string` /// @author Hugo Giraudel /// @param {String} $string - Initial string /// @param {String} $search - Substring to replace /// @param {String} $replace ('') - New value /// @return {String} - Updated string @function str-replace($string, $search, $replace: '') { $index: str-index($string, $search); @if $index { @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); } @return $string; }
// https://css-tricks.com/snippets/sass/str-replace-function/ /* stylelint-disable */ /// Replace `$search` with `$replace` in `$string` /// @author Hugo Giraudel /// @param {String} $string - Initial string /// @param {String} $search - Substring to replace /// @param {String} $replace ('') - New value /// @return {String} - Updated string @function str-replace($string, $search, $replace: '') { $index: str-index($string, $search); @if $index { @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); } @return $string; }
Disable stylelint for vendor file
Disable stylelint for vendor file
SCSS
mit
JacobDB/new-site,revxx14/new-site,JacobDB/new-site,revxx14/new-site,JacobDB/new-site
scss
## Code Before: // https://css-tricks.com/snippets/sass/str-replace-function/ /// Replace `$search` with `$replace` in `$string` /// @author Hugo Giraudel /// @param {String} $string - Initial string /// @param {String} $search - Substring to replace /// @param {String} $replace ('') - New value /// @return {String} - Updated string @function str-replace($string, $search, $replace: '') { $index: str-index($string, $search); @if $index { @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); } @return $string; } ## Instruction: Disable stylelint for vendor file ## Code After: // https://css-tricks.com/snippets/sass/str-replace-function/ /* stylelint-disable */ /// Replace `$search` with `$replace` in `$string` /// @author Hugo Giraudel /// @param {String} $string - Initial string /// @param {String} $search - Substring to replace /// @param {String} $replace ('') - New value /// @return {String} - Updated string @function str-replace($string, $search, $replace: '') { $index: str-index($string, $search); @if $index { @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); } @return $string; }
47f70187e6c823d03633756ad1933ea1640bfb32
FBAnnotationClusteringSwift.podspec
FBAnnotationClusteringSwift.podspec
Pod::Spec.new do |s| s.name = "FBAnnotationClusteringSwift" s.version = "2.0" s.summary = "This is a Swift translation of FBAnnotationClustering. Aggregates map pins into a single numbered cluster." s.description = <<-DESC Swift translation of FB Annotation Clustering, which clusters pins on the map for iOS. http://ribl.co/blog/2015/05/28/map-clustering-with-swift-how-we-implemented-it-into-the-ribl-ios-app/ DESC s.homepage = "https://github.com/freemiumdev/FBAnnotationClusteringSwift" s.license = 'MIT' s.author = { "Giuseppe Russo" => "[email protected]" } s.source = { :git => "https://github.com/freemiumdev/FBAnnotationClusteringSwift.git", :tag => s.version} s.platform = :ios, '8.0' s.requires_arc = true s.source_files = 'Pod/Classes/**/*' s.framework = 'MapKit' s.ios.framework = 'UIKit' end
Pod::Spec.new do |s| s.name = "FBAnnotationClusteringSwift" s.version = "2.0" s.summary = "This is a Swift translation of FBAnnotationClustering. Aggregates map pins into a single numbered cluster." s.description = <<-DESC Swift translation of FB Annotation Clustering, which clusters pins on the map for iOS. http://ribl.co/blog/2015/05/28/map-clustering-with-swift-how-we-implemented-it-into-the-ribl-ios-app/ DESC s.homepage = "https://github.com/freemiumdev/FBAnnotationClusteringSwift" s.license = 'MIT' s.author = { "Giuseppe Russo" => "[email protected]" } s.source = { :git => "https://github.com/freemiumdev/FBAnnotationClusteringSwift.git", :tag => s.version} s.platform = :ios, '8.0' s.requires_arc = true s.swift_version = '4.2' s.source_files = 'Pod/Classes/**/*' s.framework = 'MapKit' s.ios.framework = 'UIKit' end
Update podspec to specify swift version
Update podspec to specify swift version
Ruby
mit
ribl/FBAnnotationClusteringSwift,ribl/FBAnnotationClusteringSwift
ruby
## Code Before: Pod::Spec.new do |s| s.name = "FBAnnotationClusteringSwift" s.version = "2.0" s.summary = "This is a Swift translation of FBAnnotationClustering. Aggregates map pins into a single numbered cluster." s.description = <<-DESC Swift translation of FB Annotation Clustering, which clusters pins on the map for iOS. http://ribl.co/blog/2015/05/28/map-clustering-with-swift-how-we-implemented-it-into-the-ribl-ios-app/ DESC s.homepage = "https://github.com/freemiumdev/FBAnnotationClusteringSwift" s.license = 'MIT' s.author = { "Giuseppe Russo" => "[email protected]" } s.source = { :git => "https://github.com/freemiumdev/FBAnnotationClusteringSwift.git", :tag => s.version} s.platform = :ios, '8.0' s.requires_arc = true s.source_files = 'Pod/Classes/**/*' s.framework = 'MapKit' s.ios.framework = 'UIKit' end ## Instruction: Update podspec to specify swift version ## Code After: Pod::Spec.new do |s| s.name = "FBAnnotationClusteringSwift" s.version = "2.0" s.summary = "This is a Swift translation of FBAnnotationClustering. Aggregates map pins into a single numbered cluster." s.description = <<-DESC Swift translation of FB Annotation Clustering, which clusters pins on the map for iOS. http://ribl.co/blog/2015/05/28/map-clustering-with-swift-how-we-implemented-it-into-the-ribl-ios-app/ DESC s.homepage = "https://github.com/freemiumdev/FBAnnotationClusteringSwift" s.license = 'MIT' s.author = { "Giuseppe Russo" => "[email protected]" } s.source = { :git => "https://github.com/freemiumdev/FBAnnotationClusteringSwift.git", :tag => s.version} s.platform = :ios, '8.0' s.requires_arc = true s.swift_version = '4.2' s.source_files = 'Pod/Classes/**/*' s.framework = 'MapKit' s.ios.framework = 'UIKit' end
1fac6d01b1da0f8126bc49539eb1b5b04126866f
.travis.yml
.travis.yml
language: python addons: postgresql: "9.3" before_script: - sudo apt-get update - sudo apt-get install -qq libgeos-dev libproj-dev postgis - createdb -E UTF8 django_location - psql -U postgres -d django_location -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;" python: - "2.6" - "2.7" env: - DJANGO=1.6.1 install: - pip install psycopg2 - pip install -q Django==$DJANGO --use-mirrors - pip install -q -e . --use-mirrors script: - python setup.py test
language: python addons: postgresql: "9.3" before_script: - sudo apt-get update - sudo apt-get install -qq libgeos-dev libproj-dev postgis - createdb -E UTF8 django_location - psql -U postgres -d django_location -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;" python: - "2.6" - "2.7" env: - DJANGO=1.4.10 - DJANGO=1.5.5 - DJANGO=1.6.1 install: - pip install psycopg2 - pip install -q Django==$DJANGO --use-mirrors - pip install -q -e . --use-mirrors script: - python setup.py test
Add 1.4.10 and 1.5.5 to tested environments (in addition to 1.6.1)
Add 1.4.10 and 1.5.5 to tested environments (in addition to 1.6.1)
YAML
mit
coddingtonbear/django-location
yaml
## Code Before: language: python addons: postgresql: "9.3" before_script: - sudo apt-get update - sudo apt-get install -qq libgeos-dev libproj-dev postgis - createdb -E UTF8 django_location - psql -U postgres -d django_location -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;" python: - "2.6" - "2.7" env: - DJANGO=1.6.1 install: - pip install psycopg2 - pip install -q Django==$DJANGO --use-mirrors - pip install -q -e . --use-mirrors script: - python setup.py test ## Instruction: Add 1.4.10 and 1.5.5 to tested environments (in addition to 1.6.1) ## Code After: language: python addons: postgresql: "9.3" before_script: - sudo apt-get update - sudo apt-get install -qq libgeos-dev libproj-dev postgis - createdb -E UTF8 django_location - psql -U postgres -d django_location -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;" python: - "2.6" - "2.7" env: - DJANGO=1.4.10 - DJANGO=1.5.5 - DJANGO=1.6.1 install: - pip install psycopg2 - pip install -q Django==$DJANGO --use-mirrors - pip install -q -e . --use-mirrors script: - python setup.py test
47acc43835b02d14b96936140aa0c5a8ab0c809c
app/views/devise/sessions/new.html.erb
app/views/devise/sessions/new.html.erb
<div class="devise_main"> <h2>Sign in to District Housing</h2> <div class="spacer"></div> <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> <div><%= f.label :email %><br /> <%= f.email_field :email, :autofocus => true, class: 'simplebox' %></div> <div><%= f.label :password %><br /> <%= f.password_field :password, class: 'simplebox' %></div> <% if devise_mapping.rememberable? -%> <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div> <% end -%> <div><%= f.submit "Sign in", :class => 'signup-button' %></div> <% end %> <%= render "devise/shared/links" %> </div>
<div class="devise_main"> <h2>Sign in to District Housing</h2> <div class="spacer"></div> <p> Psst, hey you! This app is under development. You can log in with a pre-filled account and poke around, or create a new account if you like. The test account login is as follows: </p> <p> Login: [email protected] </p> <p> Password: password </p> <p> Add some issues or send some pull requests to <a href="https://github.com/codefordc/districthousing/issues">our Github!</a> And check out <a href="http://codefordc.org/">Code for DC!</a> </p> <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> <div><%= f.label :email %><br /> <%= f.email_field :email, :autofocus => true, class: 'simplebox' %></div> <div><%= f.label :password %><br /> <%= f.password_field :password, class: 'simplebox' %></div> <% if devise_mapping.rememberable? -%> <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div> <% end -%> <div><%= f.submit "Sign in", :class => 'signup-button' %></div> <% end %> <%= render "devise/shared/links" %> </div>
Put the test account creds on the login page
Put the test account creds on the login page To make it obvious.
HTML+ERB
mit
uncompiled/districthousing,codefordc/districthousing,MetricMike/districthousing,codefordc/districthousing,meiao/districthousing,adelevie/districthousing,uncompiled/districthousing,lankyfrenchman/dchousing-apps,MetricMike/districthousing,jrunningen/districthousing,codefordc/districthousing,adelevie/districthousing,lankyfrenchman/dchousing-apps,dclegalhackers/districthousing,uncompiled/districthousing,meiao/districthousing,meiao/districthousing,codefordc/districthousing,dmjurg/districthousing,jrunningen/districthousing,MetricMike/districthousing,dmjurg/districthousing,codefordc/districthousing,lankyfrenchman/dchousing-apps,meiao/districthousing,adelevie/districthousing,jrunningen/districthousing,dclegalhackers/districthousing,dmjurg/districthousing,dclegalhackers/districthousing,adelevie/districthousing,uncompiled/districthousing,meiao/districthousing,uncompiled/districthousing,jrunningen/districthousing,dmjurg/districthousing,dclegalhackers/districthousing,lankyfrenchman/dchousing-apps,jrunningen/districthousing,MetricMike/districthousing
html+erb
## Code Before: <div class="devise_main"> <h2>Sign in to District Housing</h2> <div class="spacer"></div> <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> <div><%= f.label :email %><br /> <%= f.email_field :email, :autofocus => true, class: 'simplebox' %></div> <div><%= f.label :password %><br /> <%= f.password_field :password, class: 'simplebox' %></div> <% if devise_mapping.rememberable? -%> <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div> <% end -%> <div><%= f.submit "Sign in", :class => 'signup-button' %></div> <% end %> <%= render "devise/shared/links" %> </div> ## Instruction: Put the test account creds on the login page To make it obvious. ## Code After: <div class="devise_main"> <h2>Sign in to District Housing</h2> <div class="spacer"></div> <p> Psst, hey you! This app is under development. You can log in with a pre-filled account and poke around, or create a new account if you like. The test account login is as follows: </p> <p> Login: [email protected] </p> <p> Password: password </p> <p> Add some issues or send some pull requests to <a href="https://github.com/codefordc/districthousing/issues">our Github!</a> And check out <a href="http://codefordc.org/">Code for DC!</a> </p> <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> <div><%= f.label :email %><br /> <%= f.email_field :email, :autofocus => true, class: 'simplebox' %></div> <div><%= f.label :password %><br /> <%= f.password_field :password, class: 'simplebox' %></div> <% if devise_mapping.rememberable? -%> <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div> <% end -%> <div><%= f.submit "Sign in", :class => 'signup-button' %></div> <% end %> <%= render "devise/shared/links" %> </div>
fd5bfd9f71903895b3643264316ef5d9113ea75f
lib/probes/active_record.rb
lib/probes/active_record.rb
module Probes module ActiveRecord module Base module ClassMethods def find_by_sql_with_probes(sql) Dtrace::Probe::ActionController.find_by_sql_start do |p| p.fire(sql) end results = find_by_sql_without_probes(sql) Dtrace::Probe::ActiveRecord.find_by_sql_finish do |p| p.fire(results.length) end results end end def self.included(base) base.extend ClassMethods Dtrace::Provider.create :active_record do |p| p.probe :find_by_sql_start, :string p.probe :find_by_sql_finish, :integer end base.class_eval do class << self alias_method_chain :find_by_sql, :probes end end end end module ConnectionAdapters module MysqlAdapter def execute_with_probes(sql, name = nil) Dtrace::Probe::ActiveRecordMysql.execute_start do |p| p.fire(sql) end results = execute_without_probes(sql, name) Dtrace::Probe::ActiveRecordMysql.execute_finish do |p| p.fire(results.inspect) end results end def self.included(base) Dtrace::Provider.create :active_record_mysql do |p| p.probe :execute_start, :string p.probe :execute_finish, :string end base.alias_method_chain :execute, :probes end end end end end
module Probes module ActiveRecord module Base module ClassMethods def find_by_sql_with_probes(sql) Dtrace::Probe::ActiveRecord.find_by_sql_start do |p| p.fire(sql) end results = find_by_sql_without_probes(sql) Dtrace::Probe::ActiveRecord.find_by_sql_finish do |p| p.fire(results.length) end results end end def self.included(base) base.extend ClassMethods Dtrace::Provider.create :active_record do |p| p.probe :find_by_sql_start, :string p.probe :find_by_sql_finish, :integer end base.class_eval do class << self alias_method_chain :find_by_sql, :probes end end end end module ConnectionAdapters module MysqlAdapter def execute_with_probes(sql, name = nil) Dtrace::Probe::ActiveRecordMysql.execute_start do |p| p.fire(sql) end results = execute_without_probes(sql, name) Dtrace::Probe::ActiveRecordMysql.execute_finish do |p| p.fire(results.inspect) end results end def self.included(base) Dtrace::Provider.create :active_record_mysql do |p| p.probe :execute_start, :string p.probe :execute_finish, :string end base.alias_method_chain :execute, :probes end end end end end
Correct call to ActiveRecord.find_by_sql probe, prompting exception on bad call to probes in ruby-dtrace.
Correct call to ActiveRecord.find_by_sql probe, prompting exception on bad call to probes in ruby-dtrace. git-svn-id: ee21a9573714ad23dc07274cc891719afe0bb9d1@358 0a37a38d-5523-0410-8951-9484fa28833c
Ruby
mit
chrisa/ruby-dtrace,chrisa/ruby-dtrace
ruby
## Code Before: module Probes module ActiveRecord module Base module ClassMethods def find_by_sql_with_probes(sql) Dtrace::Probe::ActionController.find_by_sql_start do |p| p.fire(sql) end results = find_by_sql_without_probes(sql) Dtrace::Probe::ActiveRecord.find_by_sql_finish do |p| p.fire(results.length) end results end end def self.included(base) base.extend ClassMethods Dtrace::Provider.create :active_record do |p| p.probe :find_by_sql_start, :string p.probe :find_by_sql_finish, :integer end base.class_eval do class << self alias_method_chain :find_by_sql, :probes end end end end module ConnectionAdapters module MysqlAdapter def execute_with_probes(sql, name = nil) Dtrace::Probe::ActiveRecordMysql.execute_start do |p| p.fire(sql) end results = execute_without_probes(sql, name) Dtrace::Probe::ActiveRecordMysql.execute_finish do |p| p.fire(results.inspect) end results end def self.included(base) Dtrace::Provider.create :active_record_mysql do |p| p.probe :execute_start, :string p.probe :execute_finish, :string end base.alias_method_chain :execute, :probes end end end end end ## Instruction: Correct call to ActiveRecord.find_by_sql probe, prompting exception on bad call to probes in ruby-dtrace. git-svn-id: ee21a9573714ad23dc07274cc891719afe0bb9d1@358 0a37a38d-5523-0410-8951-9484fa28833c ## Code After: module Probes module ActiveRecord module Base module ClassMethods def find_by_sql_with_probes(sql) Dtrace::Probe::ActiveRecord.find_by_sql_start do |p| p.fire(sql) end results = find_by_sql_without_probes(sql) Dtrace::Probe::ActiveRecord.find_by_sql_finish do |p| p.fire(results.length) end results end end def self.included(base) base.extend ClassMethods Dtrace::Provider.create :active_record do |p| p.probe :find_by_sql_start, :string p.probe :find_by_sql_finish, :integer end base.class_eval do class << self alias_method_chain :find_by_sql, :probes end end end end module ConnectionAdapters module MysqlAdapter def execute_with_probes(sql, name = nil) Dtrace::Probe::ActiveRecordMysql.execute_start do |p| p.fire(sql) end results = execute_without_probes(sql, name) Dtrace::Probe::ActiveRecordMysql.execute_finish do |p| p.fire(results.inspect) end results end def self.included(base) Dtrace::Provider.create :active_record_mysql do |p| p.probe :execute_start, :string p.probe :execute_finish, :string end base.alias_method_chain :execute, :probes end end end end end
4908ea70261bcaa53df750f40cf402b68524129d
README.md
README.md
勉強会用のスライド ==== ## リンク 以下は,各回のスライドへのリンクです. - reveal.js版 - [第1回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter01/chapter01.html) - [第2回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter02/chapter02.html) - [第3回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter03/chapter03.html) - GitHubのMarkdown版 - [第1回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter01/chapter01.md) - [第2回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter02/chapter02.md) - [第3回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter03/chapter03.md) ## LICENSE This software is released under the MIT License, see LICENSE.
勉強会用のスライド ==== ## リンク 以下は,各回のスライドへのリンクです. - reveal.js版 - [第1回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter01/chapter01.html) - [第2回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter02/chapter02.html) - [第3回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter03/chapter03.html) - [第4回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter04/chapter04.html) - GitHubのMarkdown版 - [第1回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter01/chapter01.md) - [第2回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter02/chapter02.md) - [第3回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter03/chapter03.md) - [第4回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter04/chapter04.md) ## LICENSE This software is released under the MIT License, see LICENSE.
Add a link to chapter04
Add a link to chapter04
Markdown
mit
koturn/LabStudyMeetingSlide2014,koturn/LabStudyMeetingSlide2014
markdown
## Code Before: 勉強会用のスライド ==== ## リンク 以下は,各回のスライドへのリンクです. - reveal.js版 - [第1回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter01/chapter01.html) - [第2回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter02/chapter02.html) - [第3回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter03/chapter03.html) - GitHubのMarkdown版 - [第1回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter01/chapter01.md) - [第2回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter02/chapter02.md) - [第3回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter03/chapter03.md) ## LICENSE This software is released under the MIT License, see LICENSE. ## Instruction: Add a link to chapter04 ## Code After: 勉強会用のスライド ==== ## リンク 以下は,各回のスライドへのリンクです. - reveal.js版 - [第1回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter01/chapter01.html) - [第2回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter02/chapter02.html) - [第3回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter03/chapter03.html) - [第4回](http://koturn.github.io/LabStudyMeetingSlide2014/chapter04/chapter04.html) - GitHubのMarkdown版 - [第1回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter01/chapter01.md) - [第2回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter02/chapter02.md) - [第3回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter03/chapter03.md) - [第4回](https://github.com/koturn/LabStudyMeetingSlide2014/blob/gh-pages/chapter04/chapter04.md) ## LICENSE This software is released under the MIT License, see LICENSE.
42cd990e5ac0f76ebd13a71486752ada917ef88e
extensions/build.xml
extensions/build.xml
<?xml version="1.0" encoding="UTF-8"?> <!--+ | | Google Refine Extensions Build File | +--> <project name="google-refine-extensions" default="build" basedir="."> <target name="build"> <echo message="Building extensions" /> <ant dir="sample-extension/" target="build" /> <ant dir="jython/" target="build" /> <ant dir="freebase/" target="build" /> <ant dir="gdata-extension/" target="build" /> </target> <target name="clean"> <echo message="cleaning extensions" /> <ant dir="sample-extension/" target="clean" /> <ant dir="jython/" target="clean" /> <ant dir="freebase/" target="clean" /> <ant dir="gdata-extension/" target="clean" /> </target> </project>
<?xml version="1.0" encoding="UTF-8"?> <!--+ | | Google Refine Extensions Build File | +--> <project name="google-refine-extensions" default="build" basedir="."> <target name="build"> <echo message="Building extensions" /> <ant dir="sample/" target="build" /> <ant dir="jython/" target="build" /> <ant dir="freebase/" target="build" /> <ant dir="gdata/" target="build" /> </target> <target name="clean"> <echo message="cleaning extensions" /> <ant dir="sample/" target="clean" /> <ant dir="jython/" target="clean" /> <ant dir="freebase/" target="clean" /> <ant dir="gdata/" target="clean" /> </target> </project>
Rename gdata and sample extensions to drop the -extension suffix
Rename gdata and sample extensions to drop the -extension suffix git-svn-id: 434d687192588585fc4b74a81d202f670dfb77fb@1539 7d457c2a-affb-35e4-300a-418c747d4874
XML
mit
DTL-FAIRData/FAIRifier,DTL-FAIRData/FAIRifier,DTL-FAIRData/FAIRifier,DTL-FAIRData/FAIRifier,DTL-FAIRData/FAIRifier,DTL-FAIRData/FAIRifier
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <!--+ | | Google Refine Extensions Build File | +--> <project name="google-refine-extensions" default="build" basedir="."> <target name="build"> <echo message="Building extensions" /> <ant dir="sample-extension/" target="build" /> <ant dir="jython/" target="build" /> <ant dir="freebase/" target="build" /> <ant dir="gdata-extension/" target="build" /> </target> <target name="clean"> <echo message="cleaning extensions" /> <ant dir="sample-extension/" target="clean" /> <ant dir="jython/" target="clean" /> <ant dir="freebase/" target="clean" /> <ant dir="gdata-extension/" target="clean" /> </target> </project> ## Instruction: Rename gdata and sample extensions to drop the -extension suffix git-svn-id: 434d687192588585fc4b74a81d202f670dfb77fb@1539 7d457c2a-affb-35e4-300a-418c747d4874 ## Code After: <?xml version="1.0" encoding="UTF-8"?> <!--+ | | Google Refine Extensions Build File | +--> <project name="google-refine-extensions" default="build" basedir="."> <target name="build"> <echo message="Building extensions" /> <ant dir="sample/" target="build" /> <ant dir="jython/" target="build" /> <ant dir="freebase/" target="build" /> <ant dir="gdata/" target="build" /> </target> <target name="clean"> <echo message="cleaning extensions" /> <ant dir="sample/" target="clean" /> <ant dir="jython/" target="clean" /> <ant dir="freebase/" target="clean" /> <ant dir="gdata/" target="clean" /> </target> </project>
da7018254fec7eb7e94967cf4b056256472368a5
lib/omniauth/strategies/joinme.rb
lib/omniauth/strategies/joinme.rb
require 'omniauth-oauth2' require 'omniauth/strategies/oauth2' module OmniAuth module Strategies class JoinMe < OmniAuth::Strategies::OAuth2 option :name, 'joinme' option :scope, 'user_info' option :client_options, { :site => 'https://api.join.me/v1', :authorize_url => 'https://secure.join.me/api/public/v1/auth/oauth2' } uid{ raw_info['email'] } info do { :name => raw_info['fullName'], :email => raw_info['email'] } end extra do { 'raw_info' => raw_info } end def raw_info @raw_info ||= access_token.get('https://api.join.me/v1/user').parsed end def request_phase parse_callback_url = full_host + script_name + '/account/auth/joinme/parse_callback' + query_string # Using implicit strategy will set response_type = token redirect client.implicit.authorize_url({:redirect_uri => parse_callback_url}.merge(authorize_params)) end protected def build_access_token ::OAuth2::AccessToken.from_hash(client, {:access_token => request.params['access_token']}) end end end end OmniAuth.config.add_camelization 'joinme', 'JoinMe'
require 'omniauth-oauth2' require 'omniauth/strategies/oauth2' module OmniAuth module Strategies class JoinMe < OmniAuth::Strategies::OAuth2 option :name, 'joinme' option :scope, 'user_info' option :client_options, { :site => 'https://api.join.me/v1', :authorize_url => 'https://secure.join.me/api/public/v1/auth/oauth2' } uid{ raw_info['email'] } info do { :name => raw_info['fullName'], :email => raw_info['email'] } end extra do { 'raw_info' => raw_info } end def raw_info @raw_info ||= access_token.get('https://api.join.me/v1/user').parsed end def request_phase parse_callback_url = full_host + script_name + '/account/auth/joinme/parse_callback' + query_string # Using implicit strategy will set response_type = token redirect client.implicit.authorize_url({:redirect_uri => parse_callback_url}.merge(authorize_params)) end def callback_phase if request.params['isAuthorizationRenewed'].present? # Our response doesn't contain any access token info so let's return # to our app's callback call_app! else super end end protected def build_access_token ::OAuth2::AccessToken.from_hash(client, {:access_token => request.params['access_token']}) end end end end OmniAuth.config.add_camelization 'joinme', 'JoinMe'
Add code to skip callback_phase if we renewed an existing authorization token
Add code to skip callback_phase if we renewed an existing authorization token
Ruby
mit
docsend/omniauth-joinme
ruby
## Code Before: require 'omniauth-oauth2' require 'omniauth/strategies/oauth2' module OmniAuth module Strategies class JoinMe < OmniAuth::Strategies::OAuth2 option :name, 'joinme' option :scope, 'user_info' option :client_options, { :site => 'https://api.join.me/v1', :authorize_url => 'https://secure.join.me/api/public/v1/auth/oauth2' } uid{ raw_info['email'] } info do { :name => raw_info['fullName'], :email => raw_info['email'] } end extra do { 'raw_info' => raw_info } end def raw_info @raw_info ||= access_token.get('https://api.join.me/v1/user').parsed end def request_phase parse_callback_url = full_host + script_name + '/account/auth/joinme/parse_callback' + query_string # Using implicit strategy will set response_type = token redirect client.implicit.authorize_url({:redirect_uri => parse_callback_url}.merge(authorize_params)) end protected def build_access_token ::OAuth2::AccessToken.from_hash(client, {:access_token => request.params['access_token']}) end end end end OmniAuth.config.add_camelization 'joinme', 'JoinMe' ## Instruction: Add code to skip callback_phase if we renewed an existing authorization token ## Code After: require 'omniauth-oauth2' require 'omniauth/strategies/oauth2' module OmniAuth module Strategies class JoinMe < OmniAuth::Strategies::OAuth2 option :name, 'joinme' option :scope, 'user_info' option :client_options, { :site => 'https://api.join.me/v1', :authorize_url => 'https://secure.join.me/api/public/v1/auth/oauth2' } uid{ raw_info['email'] } info do { :name => raw_info['fullName'], :email => raw_info['email'] } end extra do { 'raw_info' => raw_info } end def raw_info @raw_info ||= access_token.get('https://api.join.me/v1/user').parsed end def request_phase parse_callback_url = full_host + script_name + '/account/auth/joinme/parse_callback' + query_string # Using implicit strategy will set response_type = token redirect client.implicit.authorize_url({:redirect_uri => parse_callback_url}.merge(authorize_params)) end def callback_phase if request.params['isAuthorizationRenewed'].present? # Our response doesn't contain any access token info so let's return # to our app's callback call_app! else super end end protected def build_access_token ::OAuth2::AccessToken.from_hash(client, {:access_token => request.params['access_token']}) end end end end OmniAuth.config.add_camelization 'joinme', 'JoinMe'
4be5d87b67ad8b76e7ea2cd270bb85eb2417ab23
package.json
package.json
{ "name": "hallo", "description": "Simple rich text editor", "author": "Henri Bergius", "version": "0.0.1", "dependencies": {}, "devDependencies": { "async": ">=0.1.18", "docco-husky": ">=0.3.2", "uglify-js": ">=1.2.6" }, "docco_husky": { "output_dir": "docs", "project_name": "Hallo Editor" } }
{ "name": "hallo", "description": "Simple rich text editor", "author": "Henri Bergius <[email protected]>", "homepage": "http://bergie.github.com/hallo/", "version": "0.0.1", "dependencies": {}, "devDependencies": { "async": ">=0.1.18", "docco-husky": ">=0.3.2", "uglify-js": ">=1.2.6" }, "docco_husky": { "output_dir": "docs", "project_name": "Hallo Editor" } }
Add author email and Hallo homepage
Add author email and Hallo homepage
JSON
mit
GerHobbelt/hallo,GerHobbelt/hallo,cesarmarinhorj/hallo,pazof/hallo,bergie/hallo,roryok/hallo-winrt,iacdingping/hallo,roryok/hallo-winrt,iacdingping/hallo,pazof/hallo,CodericSandbox/hallo,cesarmarinhorj/hallo,Ninir/hallo,bergie/hallo,CodericSandbox/hallo
json
## Code Before: { "name": "hallo", "description": "Simple rich text editor", "author": "Henri Bergius", "version": "0.0.1", "dependencies": {}, "devDependencies": { "async": ">=0.1.18", "docco-husky": ">=0.3.2", "uglify-js": ">=1.2.6" }, "docco_husky": { "output_dir": "docs", "project_name": "Hallo Editor" } } ## Instruction: Add author email and Hallo homepage ## Code After: { "name": "hallo", "description": "Simple rich text editor", "author": "Henri Bergius <[email protected]>", "homepage": "http://bergie.github.com/hallo/", "version": "0.0.1", "dependencies": {}, "devDependencies": { "async": ">=0.1.18", "docco-husky": ">=0.3.2", "uglify-js": ">=1.2.6" }, "docco_husky": { "output_dir": "docs", "project_name": "Hallo Editor" } }
4d58b11a27165897b041e4362064115ed1fa820a
docs/reference.rst
docs/reference.rst
============= API Reference ============= .. toctree:: :maxdepth: 1 action_values agents distributions experiments
============= API Reference ============= .. toctree:: :maxdepth: 1 action_values agents distributions experiments recurrent
Add recurrent interface to docs
Add recurrent interface to docs
reStructuredText
mit
toslunar/chainerrl,toslunar/chainerrl
restructuredtext
## Code Before: ============= API Reference ============= .. toctree:: :maxdepth: 1 action_values agents distributions experiments ## Instruction: Add recurrent interface to docs ## Code After: ============= API Reference ============= .. toctree:: :maxdepth: 1 action_values agents distributions experiments recurrent
49b70972dd7454e9ed52823cb817d7c8078e3710
tasks/run-release-tests.sh
tasks/run-release-tests.sh
echo "${DIRECTOR_IP} ${DIRECTOR_NAME}" >> /etc/hosts export BOSH_CLIENT=$BOSH_USERNAME export BOSH_CLIENT_SECRET=$BOSH_PASSWORD export BOSH_DEPLOYMENT=$DEPLOYMENT_NAME export BOSH_ENVIRONMENT=$DIRECTOR_NAME if [ "$VARS_YAML" != "" ]; then export BOSH_CA_CERT=$(bosh2 int ${VARS_YAML} --path /director_ssl/ca) bosh2 int ${VARS_YAML} --path /sl_sshkey/private_key > /tmp/private.key export BOSH_ALL_PROXY=ssh+socks5://root@${DIRECTOR_NAME}:22?private-key=/tmp/private.key else export BOSH_CA_CERT=$(bosh2 int deployment-vars/environments/${ENVIRONMENT_NAME}/director/vars.yml --path /director_ssl/ca) fi cd $(dirname $0)/../../bits-service-system-test-source bosh2 manifest > manifest.yml export BITS_SERVICE_MANIFEST=manifest.yml bosh2 int ../deployment-vars/environments/${ENVIRONMENT_NAME}/deployment-vars-${DEPLOYMENT_NAME}.yml --path /bits_service_ssl/ca > /tmp/bits-service-ca.crt export BITS_SERVICE_CA_CERT=/tmp/bits-service-ca.crt bundle install bundle exec rake spec
echo "${DIRECTOR_IP} ${DIRECTOR_NAME}" >> /etc/hosts export BOSH_CLIENT=$BOSH_USERNAME export BOSH_CLIENT_SECRET=$BOSH_PASSWORD export BOSH_DEPLOYMENT=$DEPLOYMENT_NAME export BOSH_ENVIRONMENT=$DIRECTOR_NAME if [ "$VARS_YAML" != "" ]; then export BOSH_CA_CERT=$(bosh2 int ${VARS_YAML} --path /director_ssl/ca) bosh2 int ${VARS_YAML} --path /sl_sshkey/private_key > /tmp/private.key export BOSH_ALL_PROXY=ssh+socks5://root@${DIRECTOR_NAME}:22?private-key=/tmp/private.key chmod 600 /tmp/private.key else export BOSH_CA_CERT=$(bosh2 int deployment-vars/environments/${ENVIRONMENT_NAME}/director/vars.yml --path /director_ssl/ca) fi cd $(dirname $0)/../../bits-service-system-test-source bosh2 manifest > manifest.yml export BITS_SERVICE_MANIFEST=manifest.yml bosh2 int ../deployment-vars/environments/${ENVIRONMENT_NAME}/deployment-vars-${DEPLOYMENT_NAME}.yml --path /bits_service_ssl/ca > /tmp/bits-service-ca.crt export BITS_SERVICE_CA_CERT=/tmp/bits-service-ca.crt bundle install bundle exec rake spec
Fix file permissions for /tmp/private.key
Fix file permissions for /tmp/private.key
Shell
apache-2.0
cloudfoundry-incubator/bits-service-ci,cloudfoundry-incubator/bits-service-ci,cloudfoundry-incubator/bits-service-ci
shell
## Code Before: echo "${DIRECTOR_IP} ${DIRECTOR_NAME}" >> /etc/hosts export BOSH_CLIENT=$BOSH_USERNAME export BOSH_CLIENT_SECRET=$BOSH_PASSWORD export BOSH_DEPLOYMENT=$DEPLOYMENT_NAME export BOSH_ENVIRONMENT=$DIRECTOR_NAME if [ "$VARS_YAML" != "" ]; then export BOSH_CA_CERT=$(bosh2 int ${VARS_YAML} --path /director_ssl/ca) bosh2 int ${VARS_YAML} --path /sl_sshkey/private_key > /tmp/private.key export BOSH_ALL_PROXY=ssh+socks5://root@${DIRECTOR_NAME}:22?private-key=/tmp/private.key else export BOSH_CA_CERT=$(bosh2 int deployment-vars/environments/${ENVIRONMENT_NAME}/director/vars.yml --path /director_ssl/ca) fi cd $(dirname $0)/../../bits-service-system-test-source bosh2 manifest > manifest.yml export BITS_SERVICE_MANIFEST=manifest.yml bosh2 int ../deployment-vars/environments/${ENVIRONMENT_NAME}/deployment-vars-${DEPLOYMENT_NAME}.yml --path /bits_service_ssl/ca > /tmp/bits-service-ca.crt export BITS_SERVICE_CA_CERT=/tmp/bits-service-ca.crt bundle install bundle exec rake spec ## Instruction: Fix file permissions for /tmp/private.key ## Code After: echo "${DIRECTOR_IP} ${DIRECTOR_NAME}" >> /etc/hosts export BOSH_CLIENT=$BOSH_USERNAME export BOSH_CLIENT_SECRET=$BOSH_PASSWORD export BOSH_DEPLOYMENT=$DEPLOYMENT_NAME export BOSH_ENVIRONMENT=$DIRECTOR_NAME if [ "$VARS_YAML" != "" ]; then export BOSH_CA_CERT=$(bosh2 int ${VARS_YAML} --path /director_ssl/ca) bosh2 int ${VARS_YAML} --path /sl_sshkey/private_key > /tmp/private.key export BOSH_ALL_PROXY=ssh+socks5://root@${DIRECTOR_NAME}:22?private-key=/tmp/private.key chmod 600 /tmp/private.key else export BOSH_CA_CERT=$(bosh2 int deployment-vars/environments/${ENVIRONMENT_NAME}/director/vars.yml --path /director_ssl/ca) fi cd $(dirname $0)/../../bits-service-system-test-source bosh2 manifest > manifest.yml export BITS_SERVICE_MANIFEST=manifest.yml bosh2 int ../deployment-vars/environments/${ENVIRONMENT_NAME}/deployment-vars-${DEPLOYMENT_NAME}.yml --path /bits_service_ssl/ca > /tmp/bits-service-ca.crt export BITS_SERVICE_CA_CERT=/tmp/bits-service-ca.crt bundle install bundle exec rake spec
e45d6439d3858e70fde8f1dad1d72d8c291e8979
build-single-file-version.py
build-single-file-version.py
import os import stat import zipfile import StringIO package_dir = 'xyppy' python_directive = '#!/usr/bin/env python' packed = StringIO.StringIO() packed_writer = zipfile.ZipFile(packed, 'w', zipfile.ZIP_DEFLATED) for fname in os.listdir(package_dir): fpath = os.path.join(package_dir, fname) if os.path.isfile(fpath): packed_writer.write(fpath) packed_writer.writestr('__main__.py', ''' from xyppy import __main__ if __name__ == '__main__': __main__.main() ''') packed_writer.close() pyfile = package_dir + '.py' with open(pyfile, 'wb') as f: f.write(python_directive + '\n') f.write(packed.getvalue()) os.chmod(pyfile, stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH)
import os import stat import zipfile try: from StringIO import StringIO except ImportError: from io import BytesIO as StringIO package_dir = 'xyppy' python_directive = '#!/usr/bin/env python' packed = StringIO() packed_writer = zipfile.ZipFile(packed, 'w', zipfile.ZIP_DEFLATED) for fname in os.listdir(package_dir): fpath = os.path.join(package_dir, fname) if os.path.isfile(fpath): packed_writer.write(fpath) packed_writer.writestr('__main__.py', ''' from xyppy import __main__ if __name__ == '__main__': __main__.main() ''') packed_writer.close() pyfile = package_dir + '.py' with open(pyfile, 'wb') as f: shebang = bytes((python_directive + '\n').encode('ascii')) f.write(shebang) f.write(packed.getvalue()) os.chmod(pyfile, stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH)
Make the build script P2/3 compatible
Make the build script P2/3 compatible
Python
mit
theinternetftw/xyppy
python
## Code Before: import os import stat import zipfile import StringIO package_dir = 'xyppy' python_directive = '#!/usr/bin/env python' packed = StringIO.StringIO() packed_writer = zipfile.ZipFile(packed, 'w', zipfile.ZIP_DEFLATED) for fname in os.listdir(package_dir): fpath = os.path.join(package_dir, fname) if os.path.isfile(fpath): packed_writer.write(fpath) packed_writer.writestr('__main__.py', ''' from xyppy import __main__ if __name__ == '__main__': __main__.main() ''') packed_writer.close() pyfile = package_dir + '.py' with open(pyfile, 'wb') as f: f.write(python_directive + '\n') f.write(packed.getvalue()) os.chmod(pyfile, stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH) ## Instruction: Make the build script P2/3 compatible ## Code After: import os import stat import zipfile try: from StringIO import StringIO except ImportError: from io import BytesIO as StringIO package_dir = 'xyppy' python_directive = '#!/usr/bin/env python' packed = StringIO() packed_writer = zipfile.ZipFile(packed, 'w', zipfile.ZIP_DEFLATED) for fname in os.listdir(package_dir): fpath = os.path.join(package_dir, fname) if os.path.isfile(fpath): packed_writer.write(fpath) packed_writer.writestr('__main__.py', ''' from xyppy import __main__ if __name__ == '__main__': __main__.main() ''') packed_writer.close() pyfile = package_dir + '.py' with open(pyfile, 'wb') as f: shebang = bytes((python_directive + '\n').encode('ascii')) f.write(shebang) f.write(packed.getvalue()) os.chmod(pyfile, stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH)
76e3c1c8e4d97a9cf1b59edb17ebe664cf735d47
packages/xk/xkcd.yaml
packages/xk/xkcd.yaml
homepage: http://github.com/sellweek/xkcd changelog-type: '' hash: 6d15997bdd3fd191d7dc79c590e59e975d4c54a3b04c91b4093b9e0f622ef241 test-bench-deps: {} maintainer: [email protected] synopsis: Downloads the most recent xkcd comic. changelog: '' basic-deps: bytestring: ! '>=0.9' base: ! '>=4 && <5' filepath: ! '>=1.2' network: ! '>=2.3' HTTP: ! '>=4000.1.2' tagsoup: ! '>=0.12.6' directory: ! '>=1.1' all-versions: - '0.1' - 0.1.1 author: Róbert Selvek latest: 0.1.1 description-type: haddock description: Downloads the most recent xkcd comic into a folder on a disk. license-name: BSD-3-Clause
homepage: http://github.com/sellweek/xkcd changelog-type: '' hash: 558c3e1f981c92e2940ac3ea130c67268bf56d980762da6d5ab5ccc72b34c66b test-bench-deps: {} maintainer: [email protected] synopsis: Downloads the most recent xkcd comic. changelog: '' basic-deps: bytestring: ! '>=0.9' base: <0 && >=4 && <5 filepath: ! '>=1.2' network: ! '>=2.3' HTTP: ! '>=4000.1.2' tagsoup: ! '>=0.12.6' directory: ! '>=1.1' all-versions: - '0.1' - 0.1.1 author: Róbert Selvek latest: 0.1.1 description-type: haddock description: Downloads the most recent xkcd comic into a folder on a disk. license-name: BSD-3-Clause
Update from Hackage at 2019-05-03T22:07:26Z
Update from Hackage at 2019-05-03T22:07:26Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: http://github.com/sellweek/xkcd changelog-type: '' hash: 6d15997bdd3fd191d7dc79c590e59e975d4c54a3b04c91b4093b9e0f622ef241 test-bench-deps: {} maintainer: [email protected] synopsis: Downloads the most recent xkcd comic. changelog: '' basic-deps: bytestring: ! '>=0.9' base: ! '>=4 && <5' filepath: ! '>=1.2' network: ! '>=2.3' HTTP: ! '>=4000.1.2' tagsoup: ! '>=0.12.6' directory: ! '>=1.1' all-versions: - '0.1' - 0.1.1 author: Róbert Selvek latest: 0.1.1 description-type: haddock description: Downloads the most recent xkcd comic into a folder on a disk. license-name: BSD-3-Clause ## Instruction: Update from Hackage at 2019-05-03T22:07:26Z ## Code After: homepage: http://github.com/sellweek/xkcd changelog-type: '' hash: 558c3e1f981c92e2940ac3ea130c67268bf56d980762da6d5ab5ccc72b34c66b test-bench-deps: {} maintainer: [email protected] synopsis: Downloads the most recent xkcd comic. changelog: '' basic-deps: bytestring: ! '>=0.9' base: <0 && >=4 && <5 filepath: ! '>=1.2' network: ! '>=2.3' HTTP: ! '>=4000.1.2' tagsoup: ! '>=0.12.6' directory: ! '>=1.1' all-versions: - '0.1' - 0.1.1 author: Róbert Selvek latest: 0.1.1 description-type: haddock description: Downloads the most recent xkcd comic into a folder on a disk. license-name: BSD-3-Clause
0f4fca40ff977d1c9eca84db6c48a1cbe3b28dd1
src/extension/features/budget/remove-zero-categories/index.js
src/extension/features/budget/remove-zero-categories/index.js
import { Feature } from 'toolkit/extension/features/feature'; import { isCurrentRouteBudgetPage } from 'toolkit/extension/utils/ynab'; export class RemoveZeroCategories extends Feature { shouldInvoke() { return isCurrentRouteBudgetPage(); } invoke() { let coverOverbudgetingCategories = $('.modal-budget-overspending .dropdown-list > li'); coverOverbudgetingCategories.each(function() { let t = $(this) .find('.category-available') .attr('title'); // Category balance text. if (t == null) { return; } let categoryBalance = parseInt(t.replace(/[^\d-]/g, '')); if (categoryBalance <= 0) { $(this).remove(); } }); coverOverbudgetingCategories = $('.modal-budget-overspending .dropdown-list > li'); // Remove empty sections. for (let i = 0; i < coverOverbudgetingCategories.length - 1; i++) { if ( $(coverOverbudgetingCategories[i]).hasClass('section-item') && $(coverOverbudgetingCategories[i + 1]).hasClass('section-item') ) { $(coverOverbudgetingCategories[i]).remove(); } } // Remove last section empty. if (coverOverbudgetingCategories.last().hasClass('section-item')) { coverOverbudgetingCategories.last().remove(); } } observe(changedNodes) { if (!this.shouldInvoke()) { return; } if (changedNodes.has('dropdown-container categories-dropdown-container')) { this.invoke(); } } }
import { Feature } from 'toolkit/extension/features/feature'; import { isCurrentRouteBudgetPage } from 'toolkit/extension/utils/ynab'; export class RemoveZeroCategories extends Feature { shouldInvoke() { return isCurrentRouteBudgetPage(); } invoke() { let coverOverbudgetingCategories = $('.modal-budget-overspending .dropdown-list > li'); coverOverbudgetingCategories.each(function() { let t = $(this) .find('.category-available') .attr('title'); // Category balance text. if (t == null) { return; } let categoryBalance = parseInt(t.replace(/[^\d-]/g, '')); if (categoryBalance <= 0) { $(this).remove(); } }); coverOverbudgetingCategories = $('.modal-budget-overspending .dropdown-list > li'); // Remove empty sections. for (let i = 0; i < coverOverbudgetingCategories.length - 1; i++) { if ( $(coverOverbudgetingCategories[i]).hasClass('section-item') && $(coverOverbudgetingCategories[i + 1]).hasClass('section-item') ) { $(coverOverbudgetingCategories[i]).remove(); } } // Remove last section empty. if (coverOverbudgetingCategories.last().hasClass('section-item')) { coverOverbudgetingCategories.last().remove(); } } observe(changedNodes) { if (!this.shouldInvoke()) { return; } if (changedNodes.has('category-item-container')) { this.invoke(); } } }
Fix issue hiding zero-balance categories in move money menu
issue-1809: Fix issue hiding zero-balance categories in move money menu
JavaScript
mit
toolkit-for-ynab/toolkit-for-ynab,falkencreative/toolkit-for-ynab,dbaldon/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,falkencreative/toolkit-for-ynab,dbaldon/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,dbaldon/toolkit-for-ynab,falkencreative/toolkit-for-ynab,falkencreative/toolkit-for-ynab,dbaldon/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab
javascript
## Code Before: import { Feature } from 'toolkit/extension/features/feature'; import { isCurrentRouteBudgetPage } from 'toolkit/extension/utils/ynab'; export class RemoveZeroCategories extends Feature { shouldInvoke() { return isCurrentRouteBudgetPage(); } invoke() { let coverOverbudgetingCategories = $('.modal-budget-overspending .dropdown-list > li'); coverOverbudgetingCategories.each(function() { let t = $(this) .find('.category-available') .attr('title'); // Category balance text. if (t == null) { return; } let categoryBalance = parseInt(t.replace(/[^\d-]/g, '')); if (categoryBalance <= 0) { $(this).remove(); } }); coverOverbudgetingCategories = $('.modal-budget-overspending .dropdown-list > li'); // Remove empty sections. for (let i = 0; i < coverOverbudgetingCategories.length - 1; i++) { if ( $(coverOverbudgetingCategories[i]).hasClass('section-item') && $(coverOverbudgetingCategories[i + 1]).hasClass('section-item') ) { $(coverOverbudgetingCategories[i]).remove(); } } // Remove last section empty. if (coverOverbudgetingCategories.last().hasClass('section-item')) { coverOverbudgetingCategories.last().remove(); } } observe(changedNodes) { if (!this.shouldInvoke()) { return; } if (changedNodes.has('dropdown-container categories-dropdown-container')) { this.invoke(); } } } ## Instruction: issue-1809: Fix issue hiding zero-balance categories in move money menu ## Code After: import { Feature } from 'toolkit/extension/features/feature'; import { isCurrentRouteBudgetPage } from 'toolkit/extension/utils/ynab'; export class RemoveZeroCategories extends Feature { shouldInvoke() { return isCurrentRouteBudgetPage(); } invoke() { let coverOverbudgetingCategories = $('.modal-budget-overspending .dropdown-list > li'); coverOverbudgetingCategories.each(function() { let t = $(this) .find('.category-available') .attr('title'); // Category balance text. if (t == null) { return; } let categoryBalance = parseInt(t.replace(/[^\d-]/g, '')); if (categoryBalance <= 0) { $(this).remove(); } }); coverOverbudgetingCategories = $('.modal-budget-overspending .dropdown-list > li'); // Remove empty sections. for (let i = 0; i < coverOverbudgetingCategories.length - 1; i++) { if ( $(coverOverbudgetingCategories[i]).hasClass('section-item') && $(coverOverbudgetingCategories[i + 1]).hasClass('section-item') ) { $(coverOverbudgetingCategories[i]).remove(); } } // Remove last section empty. if (coverOverbudgetingCategories.last().hasClass('section-item')) { coverOverbudgetingCategories.last().remove(); } } observe(changedNodes) { if (!this.shouldInvoke()) { return; } if (changedNodes.has('category-item-container')) { this.invoke(); } } }
304b1dceed182b13f013084a0982de854772a1b6
README.md
README.md
MidiTumbler ======== This is the git repository, for the hardcore hacker types. If you just want to ***use*** MidiTumbler, download it from [my website](http://aetheria.co.uk/miditumbler.html). I've only tried to build this on Windows. I believe some of the code definitely won't work on Mac OS X, but I haven't given it a proper review. Setting up a build environment ==================== You'll need a copy of Box2D compiled as a static library, as well as the VST SDK. I set mine up so that in my Visual Studio 2010 folder I have a lib folder, into which I have put the Box2D source and VST SDK, as Box2D_v2.2.1 and vstsdk2.4, respectively. The project file uses relative paths, so you can do the same without having to touch the project properties. Obviously it's easily customisable :-)
MidiTumbler ======== This is the git repository, for the hardcore hacker types. If you just want to ***use*** MidiTumbler, download it from [my website](http://aetheria.co.uk/miditumbler.html). It's been built for Windows and OS X succesfully. A Linux port is unlikely. Setting up a build environment ==================== You'll need a copy of Box2D compiled as a static library, as well as the VST SDK. I set mine up so that in my Visual Studio 2010 folder I have a lib folder, into which I have put the Box2D source and VST SDK, as Box2D_v2.2.1 and vstsdk2.4, respectively. The project file uses relative paths, so you can do the same without having to touch the project properties. Obviously it's easily customisable :-)
Update Readme.MD regarding Mac port
Update Readme.MD regarding Mac port
Markdown
mit
telyn/MIDITumbler,telyn/MIDITumbler
markdown
## Code Before: MidiTumbler ======== This is the git repository, for the hardcore hacker types. If you just want to ***use*** MidiTumbler, download it from [my website](http://aetheria.co.uk/miditumbler.html). I've only tried to build this on Windows. I believe some of the code definitely won't work on Mac OS X, but I haven't given it a proper review. Setting up a build environment ==================== You'll need a copy of Box2D compiled as a static library, as well as the VST SDK. I set mine up so that in my Visual Studio 2010 folder I have a lib folder, into which I have put the Box2D source and VST SDK, as Box2D_v2.2.1 and vstsdk2.4, respectively. The project file uses relative paths, so you can do the same without having to touch the project properties. Obviously it's easily customisable :-) ## Instruction: Update Readme.MD regarding Mac port ## Code After: MidiTumbler ======== This is the git repository, for the hardcore hacker types. If you just want to ***use*** MidiTumbler, download it from [my website](http://aetheria.co.uk/miditumbler.html). It's been built for Windows and OS X succesfully. A Linux port is unlikely. Setting up a build environment ==================== You'll need a copy of Box2D compiled as a static library, as well as the VST SDK. I set mine up so that in my Visual Studio 2010 folder I have a lib folder, into which I have put the Box2D source and VST SDK, as Box2D_v2.2.1 and vstsdk2.4, respectively. The project file uses relative paths, so you can do the same without having to touch the project properties. Obviously it's easily customisable :-)
3841a68e77e3c6d0e15c388f800ddd896d1039c1
content/interpretive-research.md
content/interpretive-research.md
--- date: 2021-11-21T13:44:45-04:00 description: "The dismal science" tags: ["research"] title: "Interpretive Research" --- # Interpretive research **Interpretive research** is [research](research.md) that attempts to derive theories from [data](data.md) that is too contextual, incomplete, or subjective for quantitative analysis. ## Interpretive research resources * [Research Methods for the Social Sciences, Chapter 12: Interpretive Research](https://courses.lumenlearning.com/suny-hccc-research-methods/chapter/chapter-12-interpretive-research/)
--- date: 2021-11-21T13:44:45-04:00 description: "Research that attempts to derive theories from data that is too contextual, incomplete, or subjective for quantitative analysis" tags: ["research"] title: "Interpretive Research" --- # Interpretive research **Interpretive research** is [research](research.md) that attempts to derive theories from [data](data.md) that is too contextual, incomplete, or subjective for quantitative [analysis](data-analysis.md). ## Interpretive research resources * [Research Methods for the Social Sciences, Chapter 12: Interpretive Research](https://courses.lumenlearning.com/suny-hccc-research-methods/chapter/chapter-12-interpretive-research/)
Add description, cross-link to data-analysis
Add description, cross-link to data-analysis
Markdown
mit
jamestharpe/jamestharpe.com,jamestharpe/jamestharpe.com,jamestharpe/jamestharpe.com
markdown
## Code Before: --- date: 2021-11-21T13:44:45-04:00 description: "The dismal science" tags: ["research"] title: "Interpretive Research" --- # Interpretive research **Interpretive research** is [research](research.md) that attempts to derive theories from [data](data.md) that is too contextual, incomplete, or subjective for quantitative analysis. ## Interpretive research resources * [Research Methods for the Social Sciences, Chapter 12: Interpretive Research](https://courses.lumenlearning.com/suny-hccc-research-methods/chapter/chapter-12-interpretive-research/) ## Instruction: Add description, cross-link to data-analysis ## Code After: --- date: 2021-11-21T13:44:45-04:00 description: "Research that attempts to derive theories from data that is too contextual, incomplete, or subjective for quantitative analysis" tags: ["research"] title: "Interpretive Research" --- # Interpretive research **Interpretive research** is [research](research.md) that attempts to derive theories from [data](data.md) that is too contextual, incomplete, or subjective for quantitative [analysis](data-analysis.md). ## Interpretive research resources * [Research Methods for the Social Sciences, Chapter 12: Interpretive Research](https://courses.lumenlearning.com/suny-hccc-research-methods/chapter/chapter-12-interpretive-research/)
3eed777c78da1e69a16eb2303d2e89a9d22d34ce
views/index.erb
views/index.erb
<h2>Welcome to PizzaShop</h2> <div class="row"> <% @products.each do |p| %> <div class="col-md-3"> <div> <%= p.title %> </div> <div> <img src="<%= p.path_to_image %>" /> </div> <div> <%= p.description %> </div> <div> Size: <%= p.size %> cm </div> <div> Price: <%= p.price %> rub. </div> </div> <% end %> </div> <br /> <br /> <button class="btn btn-primary" onclick="something()">Click me!</button>
<h2>Welcome to PizzaShop</h2> <div class="row"> <% @products.each do |p| %> <div class="col-md-3"> <div> <%= p.title %> </div> <div> <img src="<%= p.path_to_image %>" /> </div> <div> <%= p.description %> </div> <div> Size: <%= p.size %> cm </div> <div> Price: <%= p.price %> rub. </div> <div> <button class="btn btn-sm btn-success">Add to cart</button> </div> </div> <% end %> </div> <br /> <br /> <button class="btn btn-primary" onclick="something()">Click me!</button>
Add button to each product
Add button to each product
HTML+ERB
mit
Disa0808/PizzaShop,Disa0808/PizzaShop,Disa0808/PizzaShop
html+erb
## Code Before: <h2>Welcome to PizzaShop</h2> <div class="row"> <% @products.each do |p| %> <div class="col-md-3"> <div> <%= p.title %> </div> <div> <img src="<%= p.path_to_image %>" /> </div> <div> <%= p.description %> </div> <div> Size: <%= p.size %> cm </div> <div> Price: <%= p.price %> rub. </div> </div> <% end %> </div> <br /> <br /> <button class="btn btn-primary" onclick="something()">Click me!</button> ## Instruction: Add button to each product ## Code After: <h2>Welcome to PizzaShop</h2> <div class="row"> <% @products.each do |p| %> <div class="col-md-3"> <div> <%= p.title %> </div> <div> <img src="<%= p.path_to_image %>" /> </div> <div> <%= p.description %> </div> <div> Size: <%= p.size %> cm </div> <div> Price: <%= p.price %> rub. </div> <div> <button class="btn btn-sm btn-success">Add to cart</button> </div> </div> <% end %> </div> <br /> <br /> <button class="btn btn-primary" onclick="something()">Click me!</button>
208081800ab7e6217ec0f88e76c2dffd32187db1
whyp/shell.py
whyp/shell.py
import os from pysyte.types.paths import path def value(key): """A value from the shell environment, defaults to empty string >>> value('SHELL') is not None True """ try: return os.environ[key] except KeyError: return '' def paths(name=None): """A list of paths in the environment's PATH >>> '/bin' in paths() True """ path_value = value(name or 'PATH') path_strings = path_value.split(':') path_paths = [path(_) for _ in path_strings] return path_paths def path_commands(): """Gives a dictionary of all executable files in the environment's PATH >>> path_commands()['python'] == sys.executable or True True """ commands = {} for path_dir in paths(): for file_path in path_dir.list_files(): if not file_path.isexec(): continue if file_path.name in commands: continue commands[file_path.name] = file_path return commands _path_commands = path_commands() def which(name): """Looks for the name as an executable is shell's PATH If name is not found, look for name.exe If still not found, return empty string >>> which('python') == sys.executable or True True """ try: commands = _path_commands return commands[name] except KeyError: if name.endswith('.exe'): return '' return which('%s.exe' % name) def is_path_command(name): return name in _path_commands
import os from pysyte.types.paths import path def value(key): """A value from the shell environment, defaults to empty string >>> value('SHELL') is not None True """ try: return os.environ[key] except KeyError: return '' def paths(name=None): """A list of paths in the environment's PATH >>> '/bin' in paths() True """ path_value = value(name or 'PATH') path_strings = path_value.split(':') path_paths = [path(_) for _ in path_strings] return path_paths def path_commands(): """Gives a dictionary of all executable files in the environment's PATH >>> path_commands()['python'] == sys.executable or True True """ commands = {} for path_dir in paths(): if not path_dir.isdir(): continue for file_path in path_dir.list_files(): if not file_path.isexec(): continue if file_path.name in commands: continue commands[file_path.name] = file_path return commands _path_commands = path_commands() def which(name): """Looks for the name as an executable is shell's PATH If name is not found, look for name.exe If still not found, return empty string >>> which('python') == sys.executable or True True """ try: commands = _path_commands return commands[name] except KeyError: if name.endswith('.exe'): return '' return which('%s.exe' % name) def is_path_command(name): return name in _path_commands
Allow for missing directories in $PATH
Allow for missing directories in $PATH
Python
mit
jalanb/what,jalanb/what
python
## Code Before: import os from pysyte.types.paths import path def value(key): """A value from the shell environment, defaults to empty string >>> value('SHELL') is not None True """ try: return os.environ[key] except KeyError: return '' def paths(name=None): """A list of paths in the environment's PATH >>> '/bin' in paths() True """ path_value = value(name or 'PATH') path_strings = path_value.split(':') path_paths = [path(_) for _ in path_strings] return path_paths def path_commands(): """Gives a dictionary of all executable files in the environment's PATH >>> path_commands()['python'] == sys.executable or True True """ commands = {} for path_dir in paths(): for file_path in path_dir.list_files(): if not file_path.isexec(): continue if file_path.name in commands: continue commands[file_path.name] = file_path return commands _path_commands = path_commands() def which(name): """Looks for the name as an executable is shell's PATH If name is not found, look for name.exe If still not found, return empty string >>> which('python') == sys.executable or True True """ try: commands = _path_commands return commands[name] except KeyError: if name.endswith('.exe'): return '' return which('%s.exe' % name) def is_path_command(name): return name in _path_commands ## Instruction: Allow for missing directories in $PATH ## Code After: import os from pysyte.types.paths import path def value(key): """A value from the shell environment, defaults to empty string >>> value('SHELL') is not None True """ try: return os.environ[key] except KeyError: return '' def paths(name=None): """A list of paths in the environment's PATH >>> '/bin' in paths() True """ path_value = value(name or 'PATH') path_strings = path_value.split(':') path_paths = [path(_) for _ in path_strings] return path_paths def path_commands(): """Gives a dictionary of all executable files in the environment's PATH >>> path_commands()['python'] == sys.executable or True True """ commands = {} for path_dir in paths(): if not path_dir.isdir(): continue for file_path in path_dir.list_files(): if not file_path.isexec(): continue if file_path.name in commands: continue commands[file_path.name] = file_path return commands _path_commands = path_commands() def which(name): """Looks for the name as an executable is shell's PATH If name is not found, look for name.exe If still not found, return empty string >>> which('python') == sys.executable or True True """ try: commands = _path_commands return commands[name] except KeyError: if name.endswith('.exe'): return '' return which('%s.exe' % name) def is_path_command(name): return name in _path_commands
2a371593a13e9ffee81cde3fd56131471e2572ed
README.md
README.md
[![Linux build status](https://img.shields.io/travis/VanJanssen/safe-c/master.svg?label=Linux)](https://travis-ci.org/VanJanssen/safe-c) [![Windows Build Status](https://img.shields.io/appveyor/ci/ErwinJanssen/safe-c-53f81/master.svg?label=Windows)](https://ci.appveyor.com/project/ErwinJanssen/safe-c-53f81/branch/master) [![Coverity Scan](https://img.shields.io/coverity/scan/10836.svg?label=Coverity)](https://scan.coverity.com/projects/vanjanssen-safe-c) Elegan-C (pronounced "elegancy") is a C library that helps you write code that is simpler, less verbose and generally more elegant. It does this by providing utility functions and wrapper functions around the standard C library.
[![Linux build status](https://img.shields.io/travis/VanJanssen/elegan-c/master.svg?label=Linux)](https://travis-ci.org/VanJanssen/elegan-c) [![Windows Build Status](https://img.shields.io/appveyor/ci/ErwinJanssen/elegan-c/master.svg?label=Windows)](https://ci.appveyor.com/project/ErwinJanssen/elegan-c/branch/master) [![Coverity Scan](https://img.shields.io/coverity/scan/10836.svg?label=Coverity)](https://scan.coverity.com/projects/vanjanssen-elegan-c) Elegan-C (pronounced "elegancy") is a C library that helps you write code that is simpler, less verbose and generally more elegant. It does this by providing utility functions and wrapper functions around the standard C library.
Update shields.io badges in to reflect new name
Update shields.io badges in to reflect new name The new name also means that the Travis, Appveyor and Criterion badges have to be update with up to date links.
Markdown
mit
ErwinJanssen/elegan-c,VanJanssen/safe-c,VanJanssen/elegan-c
markdown
## Code Before: [![Linux build status](https://img.shields.io/travis/VanJanssen/safe-c/master.svg?label=Linux)](https://travis-ci.org/VanJanssen/safe-c) [![Windows Build Status](https://img.shields.io/appveyor/ci/ErwinJanssen/safe-c-53f81/master.svg?label=Windows)](https://ci.appveyor.com/project/ErwinJanssen/safe-c-53f81/branch/master) [![Coverity Scan](https://img.shields.io/coverity/scan/10836.svg?label=Coverity)](https://scan.coverity.com/projects/vanjanssen-safe-c) Elegan-C (pronounced "elegancy") is a C library that helps you write code that is simpler, less verbose and generally more elegant. It does this by providing utility functions and wrapper functions around the standard C library. ## Instruction: Update shields.io badges in to reflect new name The new name also means that the Travis, Appveyor and Criterion badges have to be update with up to date links. ## Code After: [![Linux build status](https://img.shields.io/travis/VanJanssen/elegan-c/master.svg?label=Linux)](https://travis-ci.org/VanJanssen/elegan-c) [![Windows Build Status](https://img.shields.io/appveyor/ci/ErwinJanssen/elegan-c/master.svg?label=Windows)](https://ci.appveyor.com/project/ErwinJanssen/elegan-c/branch/master) [![Coverity Scan](https://img.shields.io/coverity/scan/10836.svg?label=Coverity)](https://scan.coverity.com/projects/vanjanssen-elegan-c) Elegan-C (pronounced "elegancy") is a C library that helps you write code that is simpler, less verbose and generally more elegant. It does this by providing utility functions and wrapper functions around the standard C library.
c4b81e242dd1d093c74406734493b5aeaf95c464
src/CMakeLists.txt
src/CMakeLists.txt
cmake_minimum_required(VERSION 2.8) project(homulib) if (NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # If not using Visual Studio C++ # Why use of stdlib produces so many warnings? # No, really, why? endif() set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/../") include_directories(../headers) set(SOURCE_LIB ADSR.cpp BrownNoise.cpp Generators.cpp KS_ext_filters.cpp KarplusStrong.cpp KarplusStrongFilter.cpp KarplusStrongBattery.cpp PinkNoise.cpp ringbuffer.cpp Sinewave.cpp Triangle.cpp Square.cpp WhiteNoise.cpp Delay.cpp Distortion.cpp Reverb.cpp AllPass.cpp SampleRate.cpp cwrapper.cpp ) add_library(homulib SHARED ${SOURCE_LIB}) add_library(homulib-static STATIC ${SOURCE_LIB})
cmake_minimum_required(VERSION 2.8) project(homulib) if (NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # If not using Visual Studio C++ # Why use of stdlib produces so many warnings? # No, really, why? endif() set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/../") include_directories(../include) file(GLOB HEADERS "../include/*.h" ) # Added ${HEADERS} here just to tell QtCreator that headers belong to project set(SOURCE_LIB ADSR.cpp BrownNoise.cpp Generators.cpp KS_ext_filters.cpp KarplusStrong.cpp KarplusStrongFilter.cpp KarplusStrongBattery.cpp PinkNoise.cpp ringbuffer.cpp Sinewave.cpp Triangle.cpp Square.cpp WhiteNoise.cpp Delay.cpp Distortion.cpp Reverb.cpp AllPass.cpp SampleRate.cpp cwrapper.cpp ${HEADERS} ) add_library(homulib SHARED ${SOURCE_LIB}) add_library(homulib-static STATIC ${SOURCE_LIB})
Make Qt Creator understand header location.
Make Qt Creator understand header location.
Text
mit
Penguinum/Homulib,Penguinum/Homulib
text
## Code Before: cmake_minimum_required(VERSION 2.8) project(homulib) if (NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # If not using Visual Studio C++ # Why use of stdlib produces so many warnings? # No, really, why? endif() set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/../") include_directories(../headers) set(SOURCE_LIB ADSR.cpp BrownNoise.cpp Generators.cpp KS_ext_filters.cpp KarplusStrong.cpp KarplusStrongFilter.cpp KarplusStrongBattery.cpp PinkNoise.cpp ringbuffer.cpp Sinewave.cpp Triangle.cpp Square.cpp WhiteNoise.cpp Delay.cpp Distortion.cpp Reverb.cpp AllPass.cpp SampleRate.cpp cwrapper.cpp ) add_library(homulib SHARED ${SOURCE_LIB}) add_library(homulib-static STATIC ${SOURCE_LIB}) ## Instruction: Make Qt Creator understand header location. ## Code After: cmake_minimum_required(VERSION 2.8) project(homulib) if (NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # If not using Visual Studio C++ # Why use of stdlib produces so many warnings? # No, really, why? endif() set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/../") include_directories(../include) file(GLOB HEADERS "../include/*.h" ) # Added ${HEADERS} here just to tell QtCreator that headers belong to project set(SOURCE_LIB ADSR.cpp BrownNoise.cpp Generators.cpp KS_ext_filters.cpp KarplusStrong.cpp KarplusStrongFilter.cpp KarplusStrongBattery.cpp PinkNoise.cpp ringbuffer.cpp Sinewave.cpp Triangle.cpp Square.cpp WhiteNoise.cpp Delay.cpp Distortion.cpp Reverb.cpp AllPass.cpp SampleRate.cpp cwrapper.cpp ${HEADERS} ) add_library(homulib SHARED ${SOURCE_LIB}) add_library(homulib-static STATIC ${SOURCE_LIB})
feb46bed4745f0012923655c3b6b318b192528c9
cask.sh
cask.sh
brew doctor # Install some OS X apps using Cask echo "• Installing Homebrew Cask and some apps" brew install caskroom/cask/brew-cask for app in "github-desktop" "hopper-disassembler" "skype" "the-unarchiver" "transmission" "sketch" "coderunner" "slack" "0xed" "virtualbox" "dropdmg" "atom" "pacifist" "dash" "wwdc" "marked" "vlc" "hammerspoon" "firefox" "paw" "hex-fiend" "gpgtools" "rb-app-checker-lite"; do brew cask install "${app}" done # Also install the latest iTerm2 nightly build (if needed) if [[ ! -d "/Applications/iTerm.app" ]]; then echo "• Installing iTerm2 (latest)" brew tap caskroom/versions brew cask install iterm2-nightly brew untap caskroom/versions fi brew cask cleanup
brew doctor # Install some OS X apps using Cask echo "• Installing Homebrew Cask and some apps" brew install caskroom/cask/brew-cask for app in "iterm2" "github-desktop" "hopper-disassembler" "skype" "the-unarchiver" "transmission" "sketch" "coderunner" "slack" "0xed" "virtualbox" "dropdmg" "atom" "pacifist" "dash" "wwdc" "marked" "vlc" "hammerspoon" "firefox" "paw" "hex-fiend" "gpgtools" "rb-app-checker-lite"; do brew cask install "${app}" done brew cask cleanup
Install stable version of iTerm2 instead of a nightly build
Install stable version of iTerm2 instead of a nightly build
Shell
mit
rodionovd/dotfiles,rodionovd/dotfiles
shell
## Code Before: brew doctor # Install some OS X apps using Cask echo "• Installing Homebrew Cask and some apps" brew install caskroom/cask/brew-cask for app in "github-desktop" "hopper-disassembler" "skype" "the-unarchiver" "transmission" "sketch" "coderunner" "slack" "0xed" "virtualbox" "dropdmg" "atom" "pacifist" "dash" "wwdc" "marked" "vlc" "hammerspoon" "firefox" "paw" "hex-fiend" "gpgtools" "rb-app-checker-lite"; do brew cask install "${app}" done # Also install the latest iTerm2 nightly build (if needed) if [[ ! -d "/Applications/iTerm.app" ]]; then echo "• Installing iTerm2 (latest)" brew tap caskroom/versions brew cask install iterm2-nightly brew untap caskroom/versions fi brew cask cleanup ## Instruction: Install stable version of iTerm2 instead of a nightly build ## Code After: brew doctor # Install some OS X apps using Cask echo "• Installing Homebrew Cask and some apps" brew install caskroom/cask/brew-cask for app in "iterm2" "github-desktop" "hopper-disassembler" "skype" "the-unarchiver" "transmission" "sketch" "coderunner" "slack" "0xed" "virtualbox" "dropdmg" "atom" "pacifist" "dash" "wwdc" "marked" "vlc" "hammerspoon" "firefox" "paw" "hex-fiend" "gpgtools" "rb-app-checker-lite"; do brew cask install "${app}" done brew cask cleanup
388f827315841cd9014cedb0350be5d34b15a2f1
main.go
main.go
package main import "fmt" import "os" import "bufio" import "strings" import "time" import "strconv" import "flag" func main() { dur := flag.Duration("d", time.Second, "duration unit") flag.Parse() scanner := bufio.NewScanner(os.Stdin) for scanner.Scan() { line := scanner.Text() // fmt.Println(line) // Println will add back the final '\n' if strings.HasPrefix(line, "Benchmark") { fields := strings.Fields(line) if len(fields) < 4 || fields[3] != "ns/op" { fmt.Println(line) continue } nsPerOp, err := strconv.ParseInt(fields[2], 10, 64) if err != nil { fmt.Println(line) continue } opsPerDur := dur.Nanoseconds() / nsPerOp fmt.Printf("%s\t%d ops/%v\n", line, opsPerDur, dur) continue } fmt.Println(line) } if err := scanner.Err(); err != nil { fmt.Fprintln(os.Stderr, "reading standard input:", err) } }
package main import "fmt" import "os" import "bufio" import "strings" import "time" import "strconv" import "flag" func main() { dur := flag.Duration("d", time.Second, "duration unit") flag.Parse() scanner := bufio.NewScanner(os.Stdin) for scanner.Scan() { line := scanner.Text() // fmt.Println(line) // Println will add back the final '\n' if strings.HasPrefix(line, "Benchmark") { fields := strings.Fields(line) if len(fields) < 4 || fields[3] != "ns/op" { fmt.Println(line) continue } nsPerOp, err := strconv.ParseFloat(fields[2], 64) if err != nil { fmt.Println(line) continue } opsPerDur := int64(float64(dur.Nanoseconds()) / nsPerOp) fmt.Printf("%s\t%d ops/%v\n", line, opsPerDur, dur) continue } fmt.Println(line) } if err := scanner.Err(); err != nil { fmt.Fprintln(os.Stderr, "reading standard input:", err) } }
Support floating point ns/op lines
Support floating point ns/op lines
Go
apache-2.0
advincze/benchfmt
go
## Code Before: package main import "fmt" import "os" import "bufio" import "strings" import "time" import "strconv" import "flag" func main() { dur := flag.Duration("d", time.Second, "duration unit") flag.Parse() scanner := bufio.NewScanner(os.Stdin) for scanner.Scan() { line := scanner.Text() // fmt.Println(line) // Println will add back the final '\n' if strings.HasPrefix(line, "Benchmark") { fields := strings.Fields(line) if len(fields) < 4 || fields[3] != "ns/op" { fmt.Println(line) continue } nsPerOp, err := strconv.ParseInt(fields[2], 10, 64) if err != nil { fmt.Println(line) continue } opsPerDur := dur.Nanoseconds() / nsPerOp fmt.Printf("%s\t%d ops/%v\n", line, opsPerDur, dur) continue } fmt.Println(line) } if err := scanner.Err(); err != nil { fmt.Fprintln(os.Stderr, "reading standard input:", err) } } ## Instruction: Support floating point ns/op lines ## Code After: package main import "fmt" import "os" import "bufio" import "strings" import "time" import "strconv" import "flag" func main() { dur := flag.Duration("d", time.Second, "duration unit") flag.Parse() scanner := bufio.NewScanner(os.Stdin) for scanner.Scan() { line := scanner.Text() // fmt.Println(line) // Println will add back the final '\n' if strings.HasPrefix(line, "Benchmark") { fields := strings.Fields(line) if len(fields) < 4 || fields[3] != "ns/op" { fmt.Println(line) continue } nsPerOp, err := strconv.ParseFloat(fields[2], 64) if err != nil { fmt.Println(line) continue } opsPerDur := int64(float64(dur.Nanoseconds()) / nsPerOp) fmt.Printf("%s\t%d ops/%v\n", line, opsPerDur, dur) continue } fmt.Println(line) } if err := scanner.Err(); err != nil { fmt.Fprintln(os.Stderr, "reading standard input:", err) } }
da314ab34cb13c1de66b96da2eab1484639e124b
fiona/compat.py
fiona/compat.py
try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict
import collections from six.moves import UserDict try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict # Users can pass in objects that subclass a few different objects # More specifically, rasterio has a CRS() class that subclasses UserDict() # In Python 2 UserDict() is in its own module and does not subclass Mapping() DICT_TYPES = (dict, collections.Mapping, UserDict)
Add a DICT_TYPES variable so we can do isinstance() checks against all the builtin dict-like objects
Add a DICT_TYPES variable so we can do isinstance() checks against all the builtin dict-like objects
Python
bsd-3-clause
Toblerity/Fiona,rbuffat/Fiona,rbuffat/Fiona,Toblerity/Fiona
python
## Code Before: try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict ## Instruction: Add a DICT_TYPES variable so we can do isinstance() checks against all the builtin dict-like objects ## Code After: import collections from six.moves import UserDict try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict # Users can pass in objects that subclass a few different objects # More specifically, rasterio has a CRS() class that subclasses UserDict() # In Python 2 UserDict() is in its own module and does not subclass Mapping() DICT_TYPES = (dict, collections.Mapping, UserDict)
c9509613ec42f1bed30aabfea1ebf34c97c79493
articles/libraries/lock/v11/migration-angular.md
articles/libraries/lock/v11/migration-angular.md
--- section: libraries title: Migrating Angular applications to Lock 11 description: How to migrate Angular applications to Lock 11 toc: true --- # Migrating Angular Applications to Lock v11 Angular applications can use Lock.js directly without any kind of wrapper library. All Angular applications will be using Lock 10, so you can follow the [Migrating from Lock.js v10](migration-v10-v11.md) guide.
--- section: libraries title: Migrating Angular applications to Lock 11 description: How to migrate Angular applications to Lock 11 --- # Migrating Angular Applications to Lock v11 Angular applications can use Lock directly without any kind of wrapper library. All Angular applications will be using Lock 10, so you can follow the [Migrating from Lock.js v10](/libraries/lock/v11/migration-v10-v11) guide.
Replace Lock.js, remove toc, fix broken link
Replace Lock.js, remove toc, fix broken link
Markdown
mit
auth0/docs,jeffreylees/docs,auth0/docs,yvonnewilson/docs,jeffreylees/docs,auth0/docs,yvonnewilson/docs,yvonnewilson/docs,jeffreylees/docs
markdown
## Code Before: --- section: libraries title: Migrating Angular applications to Lock 11 description: How to migrate Angular applications to Lock 11 toc: true --- # Migrating Angular Applications to Lock v11 Angular applications can use Lock.js directly without any kind of wrapper library. All Angular applications will be using Lock 10, so you can follow the [Migrating from Lock.js v10](migration-v10-v11.md) guide. ## Instruction: Replace Lock.js, remove toc, fix broken link ## Code After: --- section: libraries title: Migrating Angular applications to Lock 11 description: How to migrate Angular applications to Lock 11 --- # Migrating Angular Applications to Lock v11 Angular applications can use Lock directly without any kind of wrapper library. All Angular applications will be using Lock 10, so you can follow the [Migrating from Lock.js v10](/libraries/lock/v11/migration-v10-v11) guide.
93642740c78d633c8ffd34603794a0d3565d02dc
.travis/install.sh
.travis/install.sh
set -e set -x sudo add-apt-repository -y "ppa:lukasaoz/openssl101-ppa" sudo apt-get -y update sudo apt-get install -y --force-yes openssl libssl1.0.0 libssl-dev pip install . pip install -r test_requirements.txt
set -e set -x lsb_release -a sudo add-apt-repository -y "ppa:lukasaoz/openssl101-ppa" sudo apt-get -y update sudo apt-get install -y --force-yes openssl libssl1.0.0 pip install . pip install -r test_requirements.txt
Revert "Be explicit about libssl-dev."
Revert "Be explicit about libssl-dev." This reverts commit a9c2143d4f9611854381cd9f41c14d7a4a7d032d as part of a reversion of the cipher suites work.
Shell
mit
jdecuyper/hyper,lawnmowerlatte/hyper,masaori335/hyper,masaori335/hyper,fredthomsen/hyper,lawnmowerlatte/hyper,plucury/hyper,Lukasa/hyper,irvind/hyper,Lukasa/hyper,fredthomsen/hyper,irvind/hyper,plucury/hyper,jdecuyper/hyper
shell
## Code Before: set -e set -x sudo add-apt-repository -y "ppa:lukasaoz/openssl101-ppa" sudo apt-get -y update sudo apt-get install -y --force-yes openssl libssl1.0.0 libssl-dev pip install . pip install -r test_requirements.txt ## Instruction: Revert "Be explicit about libssl-dev." This reverts commit a9c2143d4f9611854381cd9f41c14d7a4a7d032d as part of a reversion of the cipher suites work. ## Code After: set -e set -x lsb_release -a sudo add-apt-repository -y "ppa:lukasaoz/openssl101-ppa" sudo apt-get -y update sudo apt-get install -y --force-yes openssl libssl1.0.0 pip install . pip install -r test_requirements.txt
743b678a2113f7f93d4c0cc27aa73745700a460a
bazaar/listings/filters.py
bazaar/listings/filters.py
from __future__ import unicode_literals import django_filters from .models import Listing class ListingFilter(django_filters.FilterSet): title = django_filters.CharFilter(lookup_type="icontains") class Meta: model = Listing fields = ['title', "publishings__store", "publishings__available_units"]
from __future__ import unicode_literals from django import forms import django_filters from ..filters import BaseFilterSet from .models import Listing class LowStockListingFilter(django_filters.Filter): field_class = forms.BooleanField def filter(self, qs, value): if value: qs = qs.filter(pk__in=Listing.objects.low_stock_ids()) return qs class ListingFilter(BaseFilterSet): title = django_filters.CharFilter(lookup_type="icontains") low_stock = LowStockListingFilter() class Meta: model = Listing fields = ["title", "publishings__store", "publishings__available_units"]
Add filter for low stock listings
Add filter for low stock listings
Python
bsd-2-clause
meghabhoj/NEWBAZAAR,meghabhoj/NEWBAZAAR,evonove/django-bazaar,meghabhoj/NEWBAZAAR,evonove/django-bazaar,evonove/django-bazaar
python
## Code Before: from __future__ import unicode_literals import django_filters from .models import Listing class ListingFilter(django_filters.FilterSet): title = django_filters.CharFilter(lookup_type="icontains") class Meta: model = Listing fields = ['title', "publishings__store", "publishings__available_units"] ## Instruction: Add filter for low stock listings ## Code After: from __future__ import unicode_literals from django import forms import django_filters from ..filters import BaseFilterSet from .models import Listing class LowStockListingFilter(django_filters.Filter): field_class = forms.BooleanField def filter(self, qs, value): if value: qs = qs.filter(pk__in=Listing.objects.low_stock_ids()) return qs class ListingFilter(BaseFilterSet): title = django_filters.CharFilter(lookup_type="icontains") low_stock = LowStockListingFilter() class Meta: model = Listing fields = ["title", "publishings__store", "publishings__available_units"]
44467b6eb92d615f20539020fe0d04618a1a6d15
src/js/constants/MapConstants.js
src/js/constants/MapConstants.js
// Action type constants export const SWITCH_FACTION = 'SWITCH_FACTION'; export const TOGGLE_FILTER = 'TOGGLE_FILTER'; export const TOGGLE_GROUP = 'TOGGLE_GROUP'; // Component type constants export const FILTER_GROUP = 'FILTER_GROUP'; export const FACTION_GROUP = 'FACTION_GROUP';
// Action type constants export const SWITCH_FACTION = 'SWITCH_FACTION'; export const TOGGLE_FILTER = 'TOGGLE_FILTER'; export const TOGGLE_GROUP = 'TOGGLE_GROUP'; // Component type constants export const FILTER_GROUP = 'FILTER_GROUP'; export const FACTION_GROUP = 'FACTION_GROUP'; // Faction names export const RADIANT = 'RADIANT'; export const DIRE = 'DIRE'; export const NEUTRAL = 'NEUTRAL';
Add new constants to keep track of factions
Add new constants to keep track of factions
JavaScript
mit
kusera/sentrii,kusera/sentrii
javascript
## Code Before: // Action type constants export const SWITCH_FACTION = 'SWITCH_FACTION'; export const TOGGLE_FILTER = 'TOGGLE_FILTER'; export const TOGGLE_GROUP = 'TOGGLE_GROUP'; // Component type constants export const FILTER_GROUP = 'FILTER_GROUP'; export const FACTION_GROUP = 'FACTION_GROUP'; ## Instruction: Add new constants to keep track of factions ## Code After: // Action type constants export const SWITCH_FACTION = 'SWITCH_FACTION'; export const TOGGLE_FILTER = 'TOGGLE_FILTER'; export const TOGGLE_GROUP = 'TOGGLE_GROUP'; // Component type constants export const FILTER_GROUP = 'FILTER_GROUP'; export const FACTION_GROUP = 'FACTION_GROUP'; // Faction names export const RADIANT = 'RADIANT'; export const DIRE = 'DIRE'; export const NEUTRAL = 'NEUTRAL';
04d9a541245fb7ff00f35f120a384e54c860c378
README.md
README.md
vagrant_cloud ============= *Very* minimalistic ruby wrapper for the [Vagrant Cloud API](https://atlas.hashicorp.com/docs). Consisting of four basic classes for your *account*, *boxes*, *versions* and *providers*. Usage ----- The *vagrant_cloud* gem is hosted on [RubyGems](https://rubygems.org/gems/vagrant_cloud), see installation instructions there. Example usage: ```ruby account = VagrantCloud::Account.new('<username>', '<access_token>') box = vagrant_cloud.ensure_box('my_box') version = box.ensure_version('0.0.1') provider_foo = version.ensure_provider('foo', 'http://example.com/foo.box') provider_bar = version.ensure_provider('bar', 'http://example.com/bar.box') version.release puts provider_foo.download_url ```
vagrant_cloud [![Build Status](https://travis-ci.org/cargomedia/vagrant_cloud.svg)](https://travis-ci.org/cargomedia/vagrant_cloud) ============= *Very* minimalistic ruby wrapper for the [Vagrant Cloud API](https://atlas.hashicorp.com/docs). Consisting of four basic classes for your *account*, *boxes*, *versions* and *providers*. Usage ----- The *vagrant_cloud* gem is hosted on [RubyGems](https://rubygems.org/gems/vagrant_cloud), see installation instructions there. Example usage: ```ruby account = VagrantCloud::Account.new('<username>', '<access_token>') box = vagrant_cloud.ensure_box('my_box') version = box.ensure_version('0.0.1') provider_foo = version.ensure_provider('foo', 'http://example.com/foo.box') provider_bar = version.ensure_provider('bar', 'http://example.com/bar.box') version.release puts provider_foo.download_url ```
Add travis badge to readme
Add travis badge to readme
Markdown
mit
cargomedia/vagrant_cloud,njam/vagrant_cloud
markdown
## Code Before: vagrant_cloud ============= *Very* minimalistic ruby wrapper for the [Vagrant Cloud API](https://atlas.hashicorp.com/docs). Consisting of four basic classes for your *account*, *boxes*, *versions* and *providers*. Usage ----- The *vagrant_cloud* gem is hosted on [RubyGems](https://rubygems.org/gems/vagrant_cloud), see installation instructions there. Example usage: ```ruby account = VagrantCloud::Account.new('<username>', '<access_token>') box = vagrant_cloud.ensure_box('my_box') version = box.ensure_version('0.0.1') provider_foo = version.ensure_provider('foo', 'http://example.com/foo.box') provider_bar = version.ensure_provider('bar', 'http://example.com/bar.box') version.release puts provider_foo.download_url ``` ## Instruction: Add travis badge to readme ## Code After: vagrant_cloud [![Build Status](https://travis-ci.org/cargomedia/vagrant_cloud.svg)](https://travis-ci.org/cargomedia/vagrant_cloud) ============= *Very* minimalistic ruby wrapper for the [Vagrant Cloud API](https://atlas.hashicorp.com/docs). Consisting of four basic classes for your *account*, *boxes*, *versions* and *providers*. Usage ----- The *vagrant_cloud* gem is hosted on [RubyGems](https://rubygems.org/gems/vagrant_cloud), see installation instructions there. Example usage: ```ruby account = VagrantCloud::Account.new('<username>', '<access_token>') box = vagrant_cloud.ensure_box('my_box') version = box.ensure_version('0.0.1') provider_foo = version.ensure_provider('foo', 'http://example.com/foo.box') provider_bar = version.ensure_provider('bar', 'http://example.com/bar.box') version.release puts provider_foo.download_url ```
c882f4f5722c639410fa1f710b12476e64404d2d
shinken/webui/plugins_skonf/elements/htdocs/css/hosts.css
shinken/webui/plugins_skonf/elements/htdocs/css/hosts.css
.object_host { display : inline; padding: 7px; border : 2px; } .object_host .host_name { width: 120px; background: white; } .object_host .display_name { width: 120px; background: white; } .object_host .address { width: 120px; background: white; } .object_host .realm { width: 120px; background: white; } .object_host .poller_tag { width: 120px; background: white; } .object_host .use { width: 500px; background: white; } .table tbody + tbody { border-top: none !important; }
/** * Copyright (C) 2009-2013: * Gabes Jean, [email protected] * Andreas Karfusehr, [email protected] * * This file is part of Shinken. * * Shinken is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Shinken is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Shinken. If not, see <http://www.gnu.org/licenses/>. * **/ .object_host { display : inline; padding: 7px; border : 2px; } .object_host .host_name { width: 120px; background: white; } .object_host .display_name { width: 120px; background: white; } .object_host .address { width: 120px; background: white; } .object_host .realm { width: 120px; background: white; } .object_host .poller_tag { width: 120px; background: white; } .object_host .use { width: 500px; background: white; } .table tbody + tbody { border-top: none !important; }
Add License to css file / Skonf
Add License to css file / Skonf
CSS
agpl-3.0
claneys/shinken,KerkhoffTechnologies/shinken,mohierf/shinken,peeyush-tm/shinken,kaji-project/shinken,rledisez/shinken,staute/shinken_deb,ddurieux/alignak,dfranco/shinken,claneys/shinken,h4wkmoon/shinken,KerkhoffTechnologies/shinken,fpeyre/shinken,lets-software/shinken,rednach/krill,tal-nino/shinken,naparuba/shinken,Aimage/shinken,lets-software/shinken,geektophe/shinken,Simage/shinken,Simage/shinken,savoirfairelinux/shinken,rledisez/shinken,h4wkmoon/shinken,KerkhoffTechnologies/shinken,h4wkmoon/shinken,staute/shinken_package,fpeyre/shinken,KerkhoffTechnologies/shinken,tal-nino/shinken,staute/shinken_deb,rednach/krill,mohierf/shinken,Aimage/shinken,fpeyre/shinken,xorpaul/shinken,naparuba/shinken,titilambert/alignak,geektophe/shinken,mohierf/shinken,gst/alignak,staute/shinken_package,titilambert/alignak,dfranco/shinken,geektophe/shinken,h4wkmoon/shinken,savoirfairelinux/shinken,Alignak-monitoring/alignak,geektophe/shinken,tal-nino/shinken,fpeyre/shinken,savoirfairelinux/shinken,peeyush-tm/shinken,ddurieux/alignak,naparuba/shinken,rledisez/shinken,peeyush-tm/shinken,titilambert/alignak,fpeyre/shinken,Aimage/shinken,mohierf/shinken,rednach/krill,xorpaul/shinken,gst/alignak,staute/shinken_deb,titilambert/alignak,claneys/shinken,kaji-project/shinken,Simage/shinken,xorpaul/shinken,lets-software/shinken,rednach/krill,dfranco/shinken,staute/shinken_package,xorpaul/shinken,naparuba/shinken,ddurieux/alignak,lets-software/shinken,staute/shinken_package,tal-nino/shinken,Simage/shinken,kaji-project/shinken,peeyush-tm/shinken,ddurieux/alignak,xorpaul/shinken,xorpaul/shinken,claneys/shinken,lets-software/shinken,dfranco/shinken,KerkhoffTechnologies/shinken,fpeyre/shinken,xorpaul/shinken,Aimage/shinken,peeyush-tm/shinken,savoirfairelinux/shinken,h4wkmoon/shinken,tal-nino/shinken,peeyush-tm/shinken,staute/shinken_deb,Aimage/shinken,mohierf/shinken,geektophe/shinken,dfranco/shinken,dfranco/shinken,kaji-project/shinken,staute/shinken_package,h4wkmoon/shinken,Simage/shinken,naparuba/shinken,kaji-project/shinken,ddurieux/alignak,staute/shinken_deb,ddurieux/alignak,rledisez/shinken,staute/shinken_deb,claneys/shinken,mohierf/shinken,staute/shinken_package,claneys/shinken,rednach/krill,gst/alignak,Aimage/shinken,KerkhoffTechnologies/shinken,gst/alignak,lets-software/shinken,Simage/shinken,rledisez/shinken,tal-nino/shinken,Alignak-monitoring/alignak,h4wkmoon/shinken,h4wkmoon/shinken,xorpaul/shinken,savoirfairelinux/shinken,geektophe/shinken,savoirfairelinux/shinken,rledisez/shinken,naparuba/shinken,kaji-project/shinken,kaji-project/shinken,rednach/krill
css
## Code Before: .object_host { display : inline; padding: 7px; border : 2px; } .object_host .host_name { width: 120px; background: white; } .object_host .display_name { width: 120px; background: white; } .object_host .address { width: 120px; background: white; } .object_host .realm { width: 120px; background: white; } .object_host .poller_tag { width: 120px; background: white; } .object_host .use { width: 500px; background: white; } .table tbody + tbody { border-top: none !important; } ## Instruction: Add License to css file / Skonf ## Code After: /** * Copyright (C) 2009-2013: * Gabes Jean, [email protected] * Andreas Karfusehr, [email protected] * * This file is part of Shinken. * * Shinken is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Shinken is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Shinken. If not, see <http://www.gnu.org/licenses/>. * **/ .object_host { display : inline; padding: 7px; border : 2px; } .object_host .host_name { width: 120px; background: white; } .object_host .display_name { width: 120px; background: white; } .object_host .address { width: 120px; background: white; } .object_host .realm { width: 120px; background: white; } .object_host .poller_tag { width: 120px; background: white; } .object_host .use { width: 500px; background: white; } .table tbody + tbody { border-top: none !important; }
bd263c953beb94678690deb4b0eb93cb87ea0dec
source/js/components/header.js
source/js/components/header.js
var React = require('react'); var Header = React.createClass({ render: function() { return ( <div className="header"> <input className="search" onChange={this.props.searchHandler} /> <button className="clear" onClick={this.props.clearHandler}>clear</button> <button className="pause" onClick={this.props.pauseHandler}>pause</button> <button className="resume" onClick={this.props.resumeHandler}>resume</button> </div> ); } }); module.exports = Header;
var React = require('react'); var Header = React.createClass({ render: function() { return ( <div className="header"> <input className="search" placeholder="Search" onChange={this.props.searchHandler} /> <button className="clear" onClick={this.props.clearHandler}>clear</button> <button className="pause" onClick={this.props.pauseHandler}>pause</button> <button className="resume" onClick={this.props.resumeHandler}>resume</button> </div> ); } }); module.exports = Header;
Add “Search” placeholder text to input field.
Add “Search” placeholder text to input field.
JavaScript
bsd-3-clause
louisbl/tv,geek/tv,louisbl/tv,geek/tv,lloydbenson/tv,lloydbenson/tv
javascript
## Code Before: var React = require('react'); var Header = React.createClass({ render: function() { return ( <div className="header"> <input className="search" onChange={this.props.searchHandler} /> <button className="clear" onClick={this.props.clearHandler}>clear</button> <button className="pause" onClick={this.props.pauseHandler}>pause</button> <button className="resume" onClick={this.props.resumeHandler}>resume</button> </div> ); } }); module.exports = Header; ## Instruction: Add “Search” placeholder text to input field. ## Code After: var React = require('react'); var Header = React.createClass({ render: function() { return ( <div className="header"> <input className="search" placeholder="Search" onChange={this.props.searchHandler} /> <button className="clear" onClick={this.props.clearHandler}>clear</button> <button className="pause" onClick={this.props.pauseHandler}>pause</button> <button className="resume" onClick={this.props.resumeHandler}>resume</button> </div> ); } }); module.exports = Header;
ce77c0e2059e864600d70bcc0f5a06f2b0035a0f
lib/pagelime-rack.rb
lib/pagelime-rack.rb
require 'pagelime' require 'rack/pagelime'
require_relative 'pagelime' require_relative 'pagelime/s3_client' require_relative 'pagelime/xml_processor' require_relative 'rack/pagelime' Pagelime.configure do |config| config.client_class = Pagelime::S3Client config.processor_class = Pagelime::XmlProcessor end
Use configure block to setup defaults
Use configure block to setup defaults
Ruby
mit
eanticev/pagelime_rack
ruby
## Code Before: require 'pagelime' require 'rack/pagelime' ## Instruction: Use configure block to setup defaults ## Code After: require_relative 'pagelime' require_relative 'pagelime/s3_client' require_relative 'pagelime/xml_processor' require_relative 'rack/pagelime' Pagelime.configure do |config| config.client_class = Pagelime::S3Client config.processor_class = Pagelime::XmlProcessor end
fbe446727b35680e747c74816995f6b7912fffeb
syslights_server.py
syslights_server.py
import sys import time import glob import serial import psutil CPU_INTERVAL = 0.5 CONNECT_TIMEOUT = 2 BAUD = 4800 def update_loop(conn): while True: load = psutil.cpu_percent(interval=CPU_INTERVAL) scaled_load = int(load * 10) message = str(scaled_load).encode('ascii') conn.write(message) def connect_serial(DEVICE, BAUD): conn = serial.Serial(DEVICE, BAUD) # wtf conn.baudrate = 300 conn.baudrate = BAUD return conn def main(): while True: try: with connect_serial(glob.glob('/dev/ttyUSB?')[0], BAUD) as conn: update_loop(conn) except IOError: print('Connection with %s failed! Retrying in %d seconds...' % (DEVICE, CONNECT_TIMEOUT), file=sys.stderr) time.sleep(CONNECT_TIMEOUT) if __name__ == '__main__': main()
import sys import time import glob import serial import psutil CPU_INTERVAL = 0.5 CONNECT_TIMEOUT = 2 BAUD = 4800 def update_loop(conn): while True: load = psutil.cpu_percent(interval=CPU_INTERVAL) scaled_load = int(load * 10) message = str(scaled_load).encode('ascii') conn.write(message) def connect_serial(): devices = glob.glob('/dev/ttyUSB?') if not devices: raise IOError() conn = serial.Serial(devices[0], BAUD) # wtf conn.baudrate = 300 conn.baudrate = BAUD return conn def main(): while True: try: with connect_serial() as conn: update_loop(conn) except IOError: print('Connection failed! Retrying in %d seconds...' % CONNECT_TIMEOUT, file=sys.stderr) time.sleep(CONNECT_TIMEOUT) if __name__ == '__main__': main()
Fix error handling in server
Fix error handling in server
Python
mit
swarmer/syslights
python
## Code Before: import sys import time import glob import serial import psutil CPU_INTERVAL = 0.5 CONNECT_TIMEOUT = 2 BAUD = 4800 def update_loop(conn): while True: load = psutil.cpu_percent(interval=CPU_INTERVAL) scaled_load = int(load * 10) message = str(scaled_load).encode('ascii') conn.write(message) def connect_serial(DEVICE, BAUD): conn = serial.Serial(DEVICE, BAUD) # wtf conn.baudrate = 300 conn.baudrate = BAUD return conn def main(): while True: try: with connect_serial(glob.glob('/dev/ttyUSB?')[0], BAUD) as conn: update_loop(conn) except IOError: print('Connection with %s failed! Retrying in %d seconds...' % (DEVICE, CONNECT_TIMEOUT), file=sys.stderr) time.sleep(CONNECT_TIMEOUT) if __name__ == '__main__': main() ## Instruction: Fix error handling in server ## Code After: import sys import time import glob import serial import psutil CPU_INTERVAL = 0.5 CONNECT_TIMEOUT = 2 BAUD = 4800 def update_loop(conn): while True: load = psutil.cpu_percent(interval=CPU_INTERVAL) scaled_load = int(load * 10) message = str(scaled_load).encode('ascii') conn.write(message) def connect_serial(): devices = glob.glob('/dev/ttyUSB?') if not devices: raise IOError() conn = serial.Serial(devices[0], BAUD) # wtf conn.baudrate = 300 conn.baudrate = BAUD return conn def main(): while True: try: with connect_serial() as conn: update_loop(conn) except IOError: print('Connection failed! Retrying in %d seconds...' % CONNECT_TIMEOUT, file=sys.stderr) time.sleep(CONNECT_TIMEOUT) if __name__ == '__main__': main()
26b39b539a4fd863cad9f1732466fcdc331d3cd6
jets/c/xeb.c
jets/c/xeb.c
/* j/3/xeb.c ** */ #include "all.h" /* functions */ u3_noun u3qc_xeb(u3_atom a) { mpz_t a_mp; if ( __(u3a_is_dog(a)) ) { u3r_mp(a_mp, a); size_t log = mpz_sizeinbase(a_mp, 2); mpz_t b_mp; mpz_init_set_ui(b_mp, log); return u3i_mp(b_mp); } else { mpz_init_set_ui(a_mp, a); c3_d x = mpz_sizeinbase(a_mp, 2); mpz_t b_mp; mpz_init_set_ui(b_mp, x); return u3i_mp(b_mp); } } u3_noun u3wc_xeb( u3_noun cor) { u3_noun a; if ( (u3_none == (a = u3r_at(u3x_sam, cor))) || (c3n == u3ud(a)) ) { return u3m_bail(c3__exit); } else { return u3qc_xeb(a); } }
/* j/3/xeb.c ** */ #include "all.h" /* functions */ u3_noun u3qc_xeb(u3_atom a) { mpz_t a_mp; if ( __(u3a_is_dog(a)) ) { u3r_mp(a_mp, a); c3_d x = mpz_sizeinbase(a_mp, 2); mpz_t b_mp; mpz_init_set_ui(b_mp, x); return u3i_mp(b_mp); } else { mpz_init_set_ui(a_mp, a); c3_d x = mpz_sizeinbase(a_mp, 2); mpz_t b_mp; mpz_init_set_ui(b_mp, x); return u3i_mp(b_mp); } } u3_noun u3wc_xeb( u3_noun cor) { u3_noun a; if ( (u3_none == (a = u3r_at(u3x_sam, cor))) || (c3n == u3ud(a)) ) { return u3m_bail(c3__exit); } else { return u3qc_xeb(a); } }
Use urbit types instead of size_t
Use urbit types instead of size_t
C
mit
rsaarelm/urbit,dphiffer/urbit,Gunga/urbit,yebyen/urbit,jpt4/urbit,dphiffer/urbit,Gunga/urbit,galenwp/urbit,chc4/urbit,bvschwartz/urbit,daveloyall/urbit,rsaarelm/urbit,galenwp/urbit,jpt4/urbit,chc4/urbit,jpt4/urbit,rsaarelm/urbit,galenwp/urbit,dphiffer/urbit,dphiffer/urbit,jpt4/urbit,daveloyall/urbit,burtonsamograd/urbit,daveloyall/urbit,chc4/urbit,jpt4/urbit,philippeback/urbit,8l/urbit,yebyen/urbit,philippeback/urbit,bvschwartz/urbit,yebyen/urbit,bollu/urbit,philippeback/urbit,bollu/urbit,yebyen/urbit,8l/urbit,8l/urbit,Gunga/urbit,urbit/archaeology-factor,dphiffer/urbit,daveloyall/urbit,burtonsamograd/urbit,bollu/urbit,urbit/archaeology-factor,jpt4/urbit,rsaarelm/urbit,galenwp/urbit,bollu/urbit,bvschwartz/urbit,urbit/archaeology-factor,rsaarelm/urbit,dphiffer/urbit,burtonsamograd/urbit,galenwp/urbit,8l/urbit,dphiffer/urbit,bvschwartz/urbit,yebyen/urbit,jpt4/urbit,Gunga/urbit,jpt4/urbit,daveloyall/urbit,Gunga/urbit,daveloyall/urbit,bvschwartz/urbit,bollu/urbit,rsaarelm/urbit,urbit/archaeology-factor,bollu/urbit,urbit/archaeology-factor,galenwp/urbit,bvschwartz/urbit,rsaarelm/urbit,dphiffer/urbit,daveloyall/urbit,chc4/urbit,yebyen/urbit,burtonsamograd/urbit,galenwp/urbit,daveloyall/urbit,galenwp/urbit,galenwp/urbit,bvschwartz/urbit,rsaarelm/urbit,urbit/archaeology-factor,8l/urbit,bollu/urbit,philippeback/urbit,yebyen/urbit,chc4/urbit,Gunga/urbit,burtonsamograd/urbit,philippeback/urbit,daveloyall/urbit,bvschwartz/urbit,bollu/urbit,yebyen/urbit,rsaarelm/urbit,chc4/urbit,philippeback/urbit,urbit/archaeology-factor,yebyen/urbit,8l/urbit,galenwp/urbit,8l/urbit,bvschwartz/urbit,8l/urbit,chc4/urbit,burtonsamograd/urbit,urbit/archaeology-factor,burtonsamograd/urbit,bollu/urbit,rsaarelm/urbit,8l/urbit,burtonsamograd/urbit,bvschwartz/urbit,Gunga/urbit,chc4/urbit,chc4/urbit,dphiffer/urbit,jpt4/urbit,Gunga/urbit,8l/urbit,bollu/urbit,urbit/archaeology-factor,chc4/urbit,yebyen/urbit,philippeback/urbit,jpt4/urbit,burtonsamograd/urbit,Gunga/urbit,urbit/archaeology-factor,philippeback/urbit,philippeback/urbit,philippeback/urbit,Gunga/urbit,daveloyall/urbit,burtonsamograd/urbit,dphiffer/urbit
c
## Code Before: /* j/3/xeb.c ** */ #include "all.h" /* functions */ u3_noun u3qc_xeb(u3_atom a) { mpz_t a_mp; if ( __(u3a_is_dog(a)) ) { u3r_mp(a_mp, a); size_t log = mpz_sizeinbase(a_mp, 2); mpz_t b_mp; mpz_init_set_ui(b_mp, log); return u3i_mp(b_mp); } else { mpz_init_set_ui(a_mp, a); c3_d x = mpz_sizeinbase(a_mp, 2); mpz_t b_mp; mpz_init_set_ui(b_mp, x); return u3i_mp(b_mp); } } u3_noun u3wc_xeb( u3_noun cor) { u3_noun a; if ( (u3_none == (a = u3r_at(u3x_sam, cor))) || (c3n == u3ud(a)) ) { return u3m_bail(c3__exit); } else { return u3qc_xeb(a); } } ## Instruction: Use urbit types instead of size_t ## Code After: /* j/3/xeb.c ** */ #include "all.h" /* functions */ u3_noun u3qc_xeb(u3_atom a) { mpz_t a_mp; if ( __(u3a_is_dog(a)) ) { u3r_mp(a_mp, a); c3_d x = mpz_sizeinbase(a_mp, 2); mpz_t b_mp; mpz_init_set_ui(b_mp, x); return u3i_mp(b_mp); } else { mpz_init_set_ui(a_mp, a); c3_d x = mpz_sizeinbase(a_mp, 2); mpz_t b_mp; mpz_init_set_ui(b_mp, x); return u3i_mp(b_mp); } } u3_noun u3wc_xeb( u3_noun cor) { u3_noun a; if ( (u3_none == (a = u3r_at(u3x_sam, cor))) || (c3n == u3ud(a)) ) { return u3m_bail(c3__exit); } else { return u3qc_xeb(a); } }
24283da9ef5b7307896ffb0c332fbbc92f0bc40e
lib/csp.js
lib/csp.js
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const config = require('./config'); const HEADERS = ['X-Content-Security-Policy', 'Content-Security-Policy']; const VALUE = [ "default-src 'self' " + config.get('personaUrl'), "img-src 'self' data:" ].join(';'); module.exports = function cspFactory(routes) { return function csp(req, res, next) { if (routes.indexOf(req.path) > -1) { HEADERS.forEach(function(header) { res.setHeader(header, VALUE); }); } next(); }; };
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const config = require('./config'); const HEADERS = ['X-Content-Security-Policy', 'Content-Security-Policy']; const VALUE = [ "default-src 'self' " + config.get('personaUrl'), "img-src 'self' data:", "frame-src https://accounts.google.com" ].join(';'); module.exports = function cspFactory(routes) { return function csp(req, res, next) { if (routes.indexOf(req.path) > -1) { HEADERS.forEach(function(header) { res.setHeader(header, VALUE); }); } next(); }; };
Allow the logout iframe to work
Allow the logout iframe to work
JavaScript
mpl-2.0
mozilla/persona-gmail-bridge,mozilla/persona-gmail-bridge
javascript
## Code Before: /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const config = require('./config'); const HEADERS = ['X-Content-Security-Policy', 'Content-Security-Policy']; const VALUE = [ "default-src 'self' " + config.get('personaUrl'), "img-src 'self' data:" ].join(';'); module.exports = function cspFactory(routes) { return function csp(req, res, next) { if (routes.indexOf(req.path) > -1) { HEADERS.forEach(function(header) { res.setHeader(header, VALUE); }); } next(); }; }; ## Instruction: Allow the logout iframe to work ## Code After: /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const config = require('./config'); const HEADERS = ['X-Content-Security-Policy', 'Content-Security-Policy']; const VALUE = [ "default-src 'self' " + config.get('personaUrl'), "img-src 'self' data:", "frame-src https://accounts.google.com" ].join(';'); module.exports = function cspFactory(routes) { return function csp(req, res, next) { if (routes.indexOf(req.path) > -1) { HEADERS.forEach(function(header) { res.setHeader(header, VALUE); }); } next(); }; };
a820f824fabc6c80b59b8d19ed94f8d6706c1dd0
NOTICE.txt
NOTICE.txt
popHealth Copyright 2010 Federal Health Architecture This product includes software developed at Project Laika (http://projectlaika.org/). This software contains code derived from the open source Laika software project, including various modifications by the MITRE Corporation http://www.mitre.org, the Certification Commission for Healthcare Information Technology http://www.cchit.org, Citius Tech http://www.citiustech.com/, and Open Sourcery http://www.opensourcery.com/.
popHealth Copyright 2010 Federal Health Architecture This product includes software developed at Project Laika (http://projectlaika.org/). This software contains code derived from the open source Laika software project, including various modifications by the MITRE Corporation http://www.mitre.org, the Certification Commission for Healthcare Information Technology http://www.cchit.org, Citius Tech http://www.citiustech.com/, and Open Sourcery http://www.opensourcery.com/. This software contains code and modifications contributed by eHealthConnecticut, Alabama Medicaid, Northwestern University, and OSEHRA.
Update attribution notice per release 4.0
Update attribution notice per release 4.0
Text
apache-2.0
alabama-medicaid-mu/popHealth,alabama-medicaid-mu/popHealth,OSEHRA/popHealth,lrasmus/popHealth,OSEHRA/popHealth,OSEHRA/popHealth,lrasmus/popHealth,alabama-medicaid-mu/popHealth,lrasmus/popHealth,alabama-medicaid-mu/popHealth,OSEHRA/popHealth,lrasmus/popHealth
text
## Code Before: popHealth Copyright 2010 Federal Health Architecture This product includes software developed at Project Laika (http://projectlaika.org/). This software contains code derived from the open source Laika software project, including various modifications by the MITRE Corporation http://www.mitre.org, the Certification Commission for Healthcare Information Technology http://www.cchit.org, Citius Tech http://www.citiustech.com/, and Open Sourcery http://www.opensourcery.com/. ## Instruction: Update attribution notice per release 4.0 ## Code After: popHealth Copyright 2010 Federal Health Architecture This product includes software developed at Project Laika (http://projectlaika.org/). This software contains code derived from the open source Laika software project, including various modifications by the MITRE Corporation http://www.mitre.org, the Certification Commission for Healthcare Information Technology http://www.cchit.org, Citius Tech http://www.citiustech.com/, and Open Sourcery http://www.opensourcery.com/. This software contains code and modifications contributed by eHealthConnecticut, Alabama Medicaid, Northwestern University, and OSEHRA.
7eb4c509f317d4c03f297891776be76c07c5f600
README.md
README.md
The code for the samples is contained in individual folders on this repository. Follow the instructions at [Getting Started on Google Cloud Platform for Java](http://cloud.google.com/java/getting-started) or the README files in each folder for instructions on how to run locally and deploy. Managed VMs on Google Cloud Platform use the [Java Servlets](http://www.oracle.com/technetwork/java/overview-137084.html) & [Java Server Pages](http://www.oracle.com/technetwork/java/index-jsp-138231.html) on [Jetty](http://www.eclipse.org/jetty/). 1. [Helloworld-servlet](helloworld-servlet) Servlet based Hello World app 1. [HelloWorld-jsp](helloworld-jsp) Java Server Pages based Hello World app 1. [HelloWorld-springboot](helloworld-springboot) Spring Boot based Hello World app 1. [Bookshelf](bookshelf) A full featured app that demonstrates Authentication and CRUD operations for [Cloud Datastore](https://cloud.google.com/datastore/docs/concepts/overview?hl=en) and [Cloud SQL](https://cloud.google.com/sql/docs/introduction). ## Contributing changes * See [CONTRIBUTING.md](CONTRIBUTING.md) ## Licensing * See [LICENSE](LICENSE) Java is a registered trademark of Oracle Corporation and/or its affiliates.
The code for the samples is contained in individual folders on this repository. Follow the instructions at [Getting Started on Google Cloud Platform for Java](https://cloud.google.com/java/) or the README files in each folder for instructions on how to run locally and deploy. Managed VMs on Google Cloud Platform use the [Java Servlets](http://www.oracle.com/technetwork/java/overview-137084.html) & [Java Server Pages](http://www.oracle.com/technetwork/java/index-jsp-138231.html) on [Jetty](http://www.eclipse.org/jetty/). 1. [Helloworld-servlet](helloworld-servlet) Servlet based Hello World app 1. [HelloWorld-jsp](helloworld-jsp) Java Server Pages based Hello World app 1. [HelloWorld-springboot](helloworld-springboot) Spring Boot based Hello World app 1. [Bookshelf](bookshelf) A full featured app that demonstrates Authentication and CRUD operations for [Cloud Datastore](https://cloud.google.com/datastore/docs/concepts/overview?hl=en) and [Cloud SQL](https://cloud.google.com/sql/docs/introduction). ## Contributing changes * See [CONTRIBUTING.md](CONTRIBUTING.md) ## Licensing * See [LICENSE](LICENSE) Java is a registered trademark of Oracle Corporation and/or its affiliates.
Fix broken link to Java getting started.
Fix broken link to Java getting started. The link https://cloud.google.com/java/getting-started/ still 404s. This changes the link to the main https://cloud.google.com/java/ landing page. Fixes https://github.com/GoogleCloudPlatform/getting-started-java/issues/10.
Markdown
apache-2.0
ludoch/getting-started-java,Stevers146/appengine-springboot-gradle,skjhavit/GCPJavaProjectTrial1,briandealwis/getting-started-java,GoogleCloudPlatform/getting-started-java,GoogleCloudPlatform/getting-started-java,Stevers146/appengine-springboot-gradle,briandealwis/getting-started-java,skjhavit/GCPJavaProjectTrial1,ludoch/getting-started-java,GoogleCloudPlatform/getting-started-java,ludoch/getting-started-java,skjhavit/GCPJavaProjectTrial1
markdown
## Code Before: The code for the samples is contained in individual folders on this repository. Follow the instructions at [Getting Started on Google Cloud Platform for Java](http://cloud.google.com/java/getting-started) or the README files in each folder for instructions on how to run locally and deploy. Managed VMs on Google Cloud Platform use the [Java Servlets](http://www.oracle.com/technetwork/java/overview-137084.html) & [Java Server Pages](http://www.oracle.com/technetwork/java/index-jsp-138231.html) on [Jetty](http://www.eclipse.org/jetty/). 1. [Helloworld-servlet](helloworld-servlet) Servlet based Hello World app 1. [HelloWorld-jsp](helloworld-jsp) Java Server Pages based Hello World app 1. [HelloWorld-springboot](helloworld-springboot) Spring Boot based Hello World app 1. [Bookshelf](bookshelf) A full featured app that demonstrates Authentication and CRUD operations for [Cloud Datastore](https://cloud.google.com/datastore/docs/concepts/overview?hl=en) and [Cloud SQL](https://cloud.google.com/sql/docs/introduction). ## Contributing changes * See [CONTRIBUTING.md](CONTRIBUTING.md) ## Licensing * See [LICENSE](LICENSE) Java is a registered trademark of Oracle Corporation and/or its affiliates. ## Instruction: Fix broken link to Java getting started. The link https://cloud.google.com/java/getting-started/ still 404s. This changes the link to the main https://cloud.google.com/java/ landing page. Fixes https://github.com/GoogleCloudPlatform/getting-started-java/issues/10. ## Code After: The code for the samples is contained in individual folders on this repository. Follow the instructions at [Getting Started on Google Cloud Platform for Java](https://cloud.google.com/java/) or the README files in each folder for instructions on how to run locally and deploy. Managed VMs on Google Cloud Platform use the [Java Servlets](http://www.oracle.com/technetwork/java/overview-137084.html) & [Java Server Pages](http://www.oracle.com/technetwork/java/index-jsp-138231.html) on [Jetty](http://www.eclipse.org/jetty/). 1. [Helloworld-servlet](helloworld-servlet) Servlet based Hello World app 1. [HelloWorld-jsp](helloworld-jsp) Java Server Pages based Hello World app 1. [HelloWorld-springboot](helloworld-springboot) Spring Boot based Hello World app 1. [Bookshelf](bookshelf) A full featured app that demonstrates Authentication and CRUD operations for [Cloud Datastore](https://cloud.google.com/datastore/docs/concepts/overview?hl=en) and [Cloud SQL](https://cloud.google.com/sql/docs/introduction). ## Contributing changes * See [CONTRIBUTING.md](CONTRIBUTING.md) ## Licensing * See [LICENSE](LICENSE) Java is a registered trademark of Oracle Corporation and/or its affiliates.
9f758bec33d4f1c64ec47904f9ed957f1587fbf2
app/assets/stylesheets/layout/_nav.scss
app/assets/stylesheets/layout/_nav.scss
.l-page-nav { overflow: hidden; @include media($navigation-full-width) { position: absolute; top: -4px; right: 4px; margin: 0; overflow: visible; } .nav__list { float: right; overflow: hidden; margin-bottom: 0; transition: max-height .8s ease-in-out; @include media($navigation-full-width) { display: inline-block; width: $navigation-width; float: none; margin: 8px -138px 0 138px; overflow: visible; } .js-enabled & { max-height: 0; } &.active { max-height: 500px; } } .nav__mobile { position: absolute; right: 0; top: 25px; } .circle--s { margin-bottom: 0; float: left; position: relative; top: 1px; } }
.l-page-nav { overflow: hidden; @include media($navigation-full-width) { position: absolute; top: -4px; right: 4px; margin: 0; overflow: visible; } .nav__list { float: right; overflow: hidden; margin-bottom: 0; transition: max-height .8s ease-in-out; @include media($navigation-full-width) { display: inline-block; float: none; overflow: visible; position: relative; top: 3px; right: 35px; } .js-enabled & { max-height: 0; } &.active { max-height: 500px; } } .nav__mobile { position: absolute; right: 0; top: 25px; } .circle--s { margin-bottom: 0; float: left; position: relative; top: 1px; } }
Improve styling for dropdown navigation to prevent x-overflow
Improve styling for dropdown navigation to prevent x-overflow
SCSS
mit
guidance-guarantee-programme/pension_guidance,guidance-guarantee-programme/pension_guidance,guidance-guarantee-programme/pension_guidance
scss
## Code Before: .l-page-nav { overflow: hidden; @include media($navigation-full-width) { position: absolute; top: -4px; right: 4px; margin: 0; overflow: visible; } .nav__list { float: right; overflow: hidden; margin-bottom: 0; transition: max-height .8s ease-in-out; @include media($navigation-full-width) { display: inline-block; width: $navigation-width; float: none; margin: 8px -138px 0 138px; overflow: visible; } .js-enabled & { max-height: 0; } &.active { max-height: 500px; } } .nav__mobile { position: absolute; right: 0; top: 25px; } .circle--s { margin-bottom: 0; float: left; position: relative; top: 1px; } } ## Instruction: Improve styling for dropdown navigation to prevent x-overflow ## Code After: .l-page-nav { overflow: hidden; @include media($navigation-full-width) { position: absolute; top: -4px; right: 4px; margin: 0; overflow: visible; } .nav__list { float: right; overflow: hidden; margin-bottom: 0; transition: max-height .8s ease-in-out; @include media($navigation-full-width) { display: inline-block; float: none; overflow: visible; position: relative; top: 3px; right: 35px; } .js-enabled & { max-height: 0; } &.active { max-height: 500px; } } .nav__mobile { position: absolute; right: 0; top: 25px; } .circle--s { margin-bottom: 0; float: left; position: relative; top: 1px; } }
7389bea7c3c144aefed99e25d551eff30aeda29d
resource/lua.go
resource/lua.go
package resource import ( "github.com/layeh/gopher-luar" "github.com/yuin/gopher-lua" ) // LuaRegisterBuiltin registers resource providers in Lua func LuaRegisterBuiltin(L *lua.LState) { for typ, provider := range providerRegistry { // Wrap resource providers, so that we can properly handle any // errors returned by providers during resource instantiation. // Since we don't want to return the error to Lua, this is the // place where we handle any errors returned by providers. wrapper := func(L *lua.LState) int { r, err := provider(L.CheckString(1)) if err != nil { L.RaiseError(err.Error()) } L.Push(luar.New(L, r)) return 1 } tbl := L.NewTable() tbl.RawSetH(lua.LString("new"), L.NewFunction(wrapper)) L.SetGlobal(typ, tbl) } }
package resource import ( "github.com/layeh/gopher-luar" "github.com/yuin/gopher-lua" ) // LuaRegisterBuiltin registers resource providers in Lua func LuaRegisterBuiltin(L *lua.LState) { for typ, provider := range providerRegistry { // Wrap resource providers, so that we can properly handle any // errors returned by providers during resource instantiation. // Since we don't want to return the error to Lua, this is the // place where we handle any errors returned by providers. wrapper := func(p Provider) lua.LGFunction { return func(L *lua.LState) int { // Create the resource by calling it's provider r, err := p(L.CheckString(1)) if err != nil { L.RaiseError(err.Error()) } L.Push(luar.New(L, r)) return 1 // Number of arguments returned to Lua } } tbl := L.NewTable() tbl.RawSetH(lua.LString("new"), L.NewFunction(wrapper(provider))) L.SetGlobal(typ, tbl) } }
Fix Lua resource wrapper function
resource: Fix Lua resource wrapper function
Go
mit
ranjithamca/gru
go
## Code Before: package resource import ( "github.com/layeh/gopher-luar" "github.com/yuin/gopher-lua" ) // LuaRegisterBuiltin registers resource providers in Lua func LuaRegisterBuiltin(L *lua.LState) { for typ, provider := range providerRegistry { // Wrap resource providers, so that we can properly handle any // errors returned by providers during resource instantiation. // Since we don't want to return the error to Lua, this is the // place where we handle any errors returned by providers. wrapper := func(L *lua.LState) int { r, err := provider(L.CheckString(1)) if err != nil { L.RaiseError(err.Error()) } L.Push(luar.New(L, r)) return 1 } tbl := L.NewTable() tbl.RawSetH(lua.LString("new"), L.NewFunction(wrapper)) L.SetGlobal(typ, tbl) } } ## Instruction: resource: Fix Lua resource wrapper function ## Code After: package resource import ( "github.com/layeh/gopher-luar" "github.com/yuin/gopher-lua" ) // LuaRegisterBuiltin registers resource providers in Lua func LuaRegisterBuiltin(L *lua.LState) { for typ, provider := range providerRegistry { // Wrap resource providers, so that we can properly handle any // errors returned by providers during resource instantiation. // Since we don't want to return the error to Lua, this is the // place where we handle any errors returned by providers. wrapper := func(p Provider) lua.LGFunction { return func(L *lua.LState) int { // Create the resource by calling it's provider r, err := p(L.CheckString(1)) if err != nil { L.RaiseError(err.Error()) } L.Push(luar.New(L, r)) return 1 // Number of arguments returned to Lua } } tbl := L.NewTable() tbl.RawSetH(lua.LString("new"), L.NewFunction(wrapper(provider))) L.SetGlobal(typ, tbl) } }
90b17c87c26bcfceae79a6d8c0890035bbb57d16
.travis.yml
.travis.yml
language: php php: - 5.5.9 - 5.6 - 7.0 - 7.1 before_install: echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini install: composer install
language: php php: - 5.5.9 - 5.6 - 7.0 - 7.1 before_script: - pecl -q install mongo && echo "extension=mongo.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` - composer install
Use pecl to install MongoDB
Use pecl to install MongoDB
YAML
mit
awurth/silex-user,awurth/silex-user
yaml
## Code Before: language: php php: - 5.5.9 - 5.6 - 7.0 - 7.1 before_install: echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini install: composer install ## Instruction: Use pecl to install MongoDB ## Code After: language: php php: - 5.5.9 - 5.6 - 7.0 - 7.1 before_script: - pecl -q install mongo && echo "extension=mongo.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` - composer install
b27bebfd56213eb5e119cf817e2824b3abb734c2
bin/start-server.sh
bin/start-server.sh
set -e cd /home/ubuntu/pageshot/server export DB_HOST=pageshot.czvvrkdqhklf.us-east-1.rds.amazonaws.com export DB_USER=pageshot export DB_PASS=pageshot NODE=/home/ubuntu/.nvm/versions/node/v0.12.0/bin/node exec $NODE ./run &>> /home/ubuntu/pageshot.logs
set -e cd /home/ubuntu/pageshot/server export DB_HOST=pageshot.czvvrkdqhklf.us-east-1.rds.amazonaws.com export DB_USER=pageshot export DB_PASS=pageshot export DB_NAME=pageshot export NODE_ENV=production NODE=/home/ubuntu/.nvm/versions/node/v0.12.0/bin/node exec $NODE ./run &>> /home/ubuntu/pageshot.logs
Tweak the environment for production
Tweak the environment for production
Shell
mpl-2.0
mozilla-services/screenshots,fzzzy/pageshot,mozilla-services/pageshot,mozilla-services/pageshot,mozilla-services/screenshots,mozilla-services/pageshot,fzzzy/pageshot,fzzzy/pageshot,mozilla-services/screenshots,fzzzy/pageshot,mozilla-services/pageshot,mozilla-services/screenshots
shell
## Code Before: set -e cd /home/ubuntu/pageshot/server export DB_HOST=pageshot.czvvrkdqhklf.us-east-1.rds.amazonaws.com export DB_USER=pageshot export DB_PASS=pageshot NODE=/home/ubuntu/.nvm/versions/node/v0.12.0/bin/node exec $NODE ./run &>> /home/ubuntu/pageshot.logs ## Instruction: Tweak the environment for production ## Code After: set -e cd /home/ubuntu/pageshot/server export DB_HOST=pageshot.czvvrkdqhklf.us-east-1.rds.amazonaws.com export DB_USER=pageshot export DB_PASS=pageshot export DB_NAME=pageshot export NODE_ENV=production NODE=/home/ubuntu/.nvm/versions/node/v0.12.0/bin/node exec $NODE ./run &>> /home/ubuntu/pageshot.logs
aa127c5db2a3cab3c2046b53aac59d99516306bf
src/main/java/com/carpentersblocks/entity/item/EntityBase.java
src/main/java/com/carpentersblocks/entity/item/EntityBase.java
package com.carpentersblocks.entity.item; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import com.carpentersblocks.util.protection.IProtected; import com.carpentersblocks.util.protection.ProtectedObject; public class EntityBase extends Entity implements IProtected { private final static byte ID_OWNER = 12; private final static String TAG_OWNER = "owner"; public EntityBase(World world) { super(world); } public EntityBase(World world, EntityPlayer entityPlayer) { this(world); setOwner(new ProtectedObject(entityPlayer)); } @Override public void setOwner(ProtectedObject obj) { getDataWatcher().updateObject(ID_OWNER, obj); } @Override public String getOwner() { return getDataWatcher().getWatchableObjectString(ID_OWNER); } @Override protected void entityInit() { getDataWatcher().addObject(ID_OWNER, new String("")); } @Override protected void readEntityFromNBT(NBTTagCompound nbtTagCompound) { getDataWatcher().updateObject(ID_OWNER, String.valueOf(nbtTagCompound.getString(TAG_OWNER))); } @Override protected void writeEntityToNBT(NBTTagCompound nbtTagCompound) { nbtTagCompound.setString(TAG_OWNER, getDataWatcher().getWatchableObjectString(ID_OWNER)); } }
package com.carpentersblocks.entity.item; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import com.carpentersblocks.util.protection.IProtected; import com.carpentersblocks.util.protection.ProtectedObject; public class EntityBase extends Entity implements IProtected { private final static byte ID_OWNER = 12; private final static String TAG_OWNER = "owner"; public EntityBase(World world) { super(world); } public EntityBase(World world, EntityPlayer entityPlayer) { this(world); setOwner(new ProtectedObject(entityPlayer)); } @Override public void setOwner(ProtectedObject obj) { getDataWatcher().updateObject(ID_OWNER, obj.toString()); } @Override public String getOwner() { return getDataWatcher().getWatchableObjectString(ID_OWNER); } @Override protected void entityInit() { getDataWatcher().addObject(ID_OWNER, new String("")); } @Override protected void readEntityFromNBT(NBTTagCompound nbtTagCompound) { getDataWatcher().updateObject(ID_OWNER, String.valueOf(nbtTagCompound.getString(TAG_OWNER))); } @Override protected void writeEntityToNBT(NBTTagCompound nbtTagCompound) { nbtTagCompound.setString(TAG_OWNER, getDataWatcher().getWatchableObjectString(ID_OWNER)); } }
Fix broken tiles (dev bug only).
Fix broken tiles (dev bug only).
Java
lgpl-2.1
Mineshopper/carpentersblocks,Techern/carpentersblocks,burpingdog1/carpentersblocks
java
## Code Before: package com.carpentersblocks.entity.item; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import com.carpentersblocks.util.protection.IProtected; import com.carpentersblocks.util.protection.ProtectedObject; public class EntityBase extends Entity implements IProtected { private final static byte ID_OWNER = 12; private final static String TAG_OWNER = "owner"; public EntityBase(World world) { super(world); } public EntityBase(World world, EntityPlayer entityPlayer) { this(world); setOwner(new ProtectedObject(entityPlayer)); } @Override public void setOwner(ProtectedObject obj) { getDataWatcher().updateObject(ID_OWNER, obj); } @Override public String getOwner() { return getDataWatcher().getWatchableObjectString(ID_OWNER); } @Override protected void entityInit() { getDataWatcher().addObject(ID_OWNER, new String("")); } @Override protected void readEntityFromNBT(NBTTagCompound nbtTagCompound) { getDataWatcher().updateObject(ID_OWNER, String.valueOf(nbtTagCompound.getString(TAG_OWNER))); } @Override protected void writeEntityToNBT(NBTTagCompound nbtTagCompound) { nbtTagCompound.setString(TAG_OWNER, getDataWatcher().getWatchableObjectString(ID_OWNER)); } } ## Instruction: Fix broken tiles (dev bug only). ## Code After: package com.carpentersblocks.entity.item; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import com.carpentersblocks.util.protection.IProtected; import com.carpentersblocks.util.protection.ProtectedObject; public class EntityBase extends Entity implements IProtected { private final static byte ID_OWNER = 12; private final static String TAG_OWNER = "owner"; public EntityBase(World world) { super(world); } public EntityBase(World world, EntityPlayer entityPlayer) { this(world); setOwner(new ProtectedObject(entityPlayer)); } @Override public void setOwner(ProtectedObject obj) { getDataWatcher().updateObject(ID_OWNER, obj.toString()); } @Override public String getOwner() { return getDataWatcher().getWatchableObjectString(ID_OWNER); } @Override protected void entityInit() { getDataWatcher().addObject(ID_OWNER, new String("")); } @Override protected void readEntityFromNBT(NBTTagCompound nbtTagCompound) { getDataWatcher().updateObject(ID_OWNER, String.valueOf(nbtTagCompound.getString(TAG_OWNER))); } @Override protected void writeEntityToNBT(NBTTagCompound nbtTagCompound) { nbtTagCompound.setString(TAG_OWNER, getDataWatcher().getWatchableObjectString(ID_OWNER)); } }
fd7ec2e7505352ca5cfd20d60e42dab7a019a559
_config.yml
_config.yml
highlighter: pygments markdown: rdiscount rdiscount: extensions: [smart] permalink: /:title.html paginate: 5 gems: [jekyll-paginate] port: 3000 safe: true # edit here to achieve your personal greatness url: http://sadhu89.github.io/ baseurl: "" title: Carlos Rojas author: Carlos Rojas description: Personal blog and resume avatar: profile.jpeg email: [email protected] github: sadhu89 # username twitter: CarlosSadhu linkedin: crojasn stackoverflow: users/4808245/carlos-sadhu-rojas-Ñiquen #e.g: users/2735833/proton1h1 #Comment out if you don't want disqus disqus: carlossadhu google_analytics: UA-69391421-1 # needed for travis-ci build exclude: [vendor]
highlighter: pygments markdown: rdiscount rdiscount: extensions: [smart] permalink: /:title.html paginate: 5 gems: [jekyll-paginate] port: 3000 safe: true # edit here to achieve your personal greatness url: http://sadhu89.github.io/ baseurl: "" title: Carlos Rojas author: Carlos Rojas description: Personal blog and resume avatar: profile.jpeg email: [email protected] github: sadhu89 # username twitter: CarlosSadhu linkedin: crojasn stackoverflow: users/4808245/carlos-sadhu-rojas-Ñiquen #Comment out if you don't want disqus disqus: carlossadhu google_analytics: UA-76952875-1 # needed for travis-ci build exclude: [vendor]
Update google analytics tracking code
Update google analytics tracking code
YAML
mit
sadhu89/sadhu89.github.io,sadhu89/sadhu89.github.io,sadhu89/sadhu89.github.io
yaml
## Code Before: highlighter: pygments markdown: rdiscount rdiscount: extensions: [smart] permalink: /:title.html paginate: 5 gems: [jekyll-paginate] port: 3000 safe: true # edit here to achieve your personal greatness url: http://sadhu89.github.io/ baseurl: "" title: Carlos Rojas author: Carlos Rojas description: Personal blog and resume avatar: profile.jpeg email: [email protected] github: sadhu89 # username twitter: CarlosSadhu linkedin: crojasn stackoverflow: users/4808245/carlos-sadhu-rojas-Ñiquen #e.g: users/2735833/proton1h1 #Comment out if you don't want disqus disqus: carlossadhu google_analytics: UA-69391421-1 # needed for travis-ci build exclude: [vendor] ## Instruction: Update google analytics tracking code ## Code After: highlighter: pygments markdown: rdiscount rdiscount: extensions: [smart] permalink: /:title.html paginate: 5 gems: [jekyll-paginate] port: 3000 safe: true # edit here to achieve your personal greatness url: http://sadhu89.github.io/ baseurl: "" title: Carlos Rojas author: Carlos Rojas description: Personal blog and resume avatar: profile.jpeg email: [email protected] github: sadhu89 # username twitter: CarlosSadhu linkedin: crojasn stackoverflow: users/4808245/carlos-sadhu-rojas-Ñiquen #Comment out if you don't want disqus disqus: carlossadhu google_analytics: UA-76952875-1 # needed for travis-ci build exclude: [vendor]
35fa52e231b78500c72f190b8ccfe0db6ff2003f
.goreleaser.yml
.goreleaser.yml
builds: - main: cmd/process-exporter/main.go binary: cmd/process-exporter flags: -tags netgo goos: - linux - darwin - freebsd - openbsd - netbsd - dragonfly goarch: - amd64 - 386 - arm - arm64 - ppc64 - ppc64le release: draft: false prerelease: false dockers: - image: ncabatoff/process-exporter dockerfile: Dockerfile.goreleaser binary: cmd/process-exporter goos: linux goarch: amd64 tag_templates: - latest - "{{ .Version }}"
builds: - main: cmd/process-exporter/main.go binary: cmd/process-exporter flags: -tags netgo goos: - linux goarch: - amd64 - 386 - arm - arm64 - ppc64 - ppc64le release: draft: false prerelease: false dockers: - image: ncabatoff/process-exporter dockerfile: Dockerfile.goreleaser binary: cmd/process-exporter goos: linux goarch: amd64 tag_templates: - latest - "{{ .Version }}"
Remove builds for non-linux OSes, since we only support linux (oops).
Remove builds for non-linux OSes, since we only support linux (oops).
YAML
mit
ncabatoff/process-exporter,ncabatoff/process-exporter
yaml
## Code Before: builds: - main: cmd/process-exporter/main.go binary: cmd/process-exporter flags: -tags netgo goos: - linux - darwin - freebsd - openbsd - netbsd - dragonfly goarch: - amd64 - 386 - arm - arm64 - ppc64 - ppc64le release: draft: false prerelease: false dockers: - image: ncabatoff/process-exporter dockerfile: Dockerfile.goreleaser binary: cmd/process-exporter goos: linux goarch: amd64 tag_templates: - latest - "{{ .Version }}" ## Instruction: Remove builds for non-linux OSes, since we only support linux (oops). ## Code After: builds: - main: cmd/process-exporter/main.go binary: cmd/process-exporter flags: -tags netgo goos: - linux goarch: - amd64 - 386 - arm - arm64 - ppc64 - ppc64le release: draft: false prerelease: false dockers: - image: ncabatoff/process-exporter dockerfile: Dockerfile.goreleaser binary: cmd/process-exporter goos: linux goarch: amd64 tag_templates: - latest - "{{ .Version }}"
ffb47027cd5415d13fa1f42c933996887fa06fd6
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig( { pkg: grunt.file.readJSON('package.json'), shell: { rebuild: { command: 'npm install --build-from-source' }, benchmarkNode: { command: 'node benchmark/node/benchmark.js' }, startServer: { command: 'cd tmp/gemfire && gfsh start server --dir=server --cache-xml-file=../../benchmark/xml/BenchmarkServer.xml --name=server' }, stopServer: { command: 'cd tmp/gemfire && gfsh stop server --dir=server', }, benchmarkJava: { command: [ 'cd benchmark/java', './gradlew clean run -q' ].join(" && ") } }, jasmine_node: { all: ['spec/'] } } ); grunt.loadNpmTasks('grunt-jasmine-node'); grunt.loadNpmTasks('grunt-shell'); grunt.registerTask('build', ['shell:rebuild']); grunt.registerTask('test', ['jasmine_node:all']); grunt.registerTask('server:start', ['shell:startServer']); grunt.registerTask('server:stop', ['shell:stopServer']); grunt.registerTask('server:restart', ['server:stop', 'server:start']); grunt.registerTask('benchmark:node', ['build', 'shell:benchmarkNode']); grunt.registerTask('benchmark:java', ['shell:benchmarkJava']); grunt.registerTask('benchmark', ['benchmark:node', 'benchmark:java']); grunt.registerTask('default', ['build', 'test']); };
module.exports = function(grunt) { grunt.initConfig( { pkg: grunt.file.readJSON('package.json'), shell: { rebuild: { command: 'npm install --build-from-source' }, benchmarkNode: { command: 'node benchmark/node/benchmark.js' }, startServer: { command: 'cd tmp/gemfire && gfsh start server --dir=server --log-level=warning --cache-xml-file=../../benchmark/xml/BenchmarkServer.xml --name=server' }, stopServer: { command: 'cd tmp/gemfire && gfsh stop server --dir=server', }, benchmarkJava: { command: [ 'cd benchmark/java', './gradlew clean run -q' ].join(" && ") } }, jasmine_node: { all: ['spec/'] } } ); grunt.loadNpmTasks('grunt-jasmine-node'); grunt.loadNpmTasks('grunt-shell'); grunt.registerTask('build', ['shell:rebuild']); grunt.registerTask('test', ['jasmine_node:all']); grunt.registerTask('server:start', ['shell:startServer']); grunt.registerTask('server:stop', ['shell:stopServer']); grunt.registerTask('server:restart', ['server:stop', 'server:start']); grunt.registerTask('benchmark:node', ['build', 'shell:benchmarkNode']); grunt.registerTask('benchmark:java', ['shell:benchmarkJava']); grunt.registerTask('benchmark', ['benchmark:node', 'benchmark:java']); grunt.registerTask('default', ['build', 'test']); };
Reduce gemfire server logging to warning
Reduce gemfire server logging to warning
JavaScript
bsd-2-clause
gemfire/node-gemfire,mross-pivotal/node-gemfire,mross-pivotal/node-gemfire,mross-pivotal/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire,gemfire/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire
javascript
## Code Before: module.exports = function(grunt) { grunt.initConfig( { pkg: grunt.file.readJSON('package.json'), shell: { rebuild: { command: 'npm install --build-from-source' }, benchmarkNode: { command: 'node benchmark/node/benchmark.js' }, startServer: { command: 'cd tmp/gemfire && gfsh start server --dir=server --cache-xml-file=../../benchmark/xml/BenchmarkServer.xml --name=server' }, stopServer: { command: 'cd tmp/gemfire && gfsh stop server --dir=server', }, benchmarkJava: { command: [ 'cd benchmark/java', './gradlew clean run -q' ].join(" && ") } }, jasmine_node: { all: ['spec/'] } } ); grunt.loadNpmTasks('grunt-jasmine-node'); grunt.loadNpmTasks('grunt-shell'); grunt.registerTask('build', ['shell:rebuild']); grunt.registerTask('test', ['jasmine_node:all']); grunt.registerTask('server:start', ['shell:startServer']); grunt.registerTask('server:stop', ['shell:stopServer']); grunt.registerTask('server:restart', ['server:stop', 'server:start']); grunt.registerTask('benchmark:node', ['build', 'shell:benchmarkNode']); grunt.registerTask('benchmark:java', ['shell:benchmarkJava']); grunt.registerTask('benchmark', ['benchmark:node', 'benchmark:java']); grunt.registerTask('default', ['build', 'test']); }; ## Instruction: Reduce gemfire server logging to warning ## Code After: module.exports = function(grunt) { grunt.initConfig( { pkg: grunt.file.readJSON('package.json'), shell: { rebuild: { command: 'npm install --build-from-source' }, benchmarkNode: { command: 'node benchmark/node/benchmark.js' }, startServer: { command: 'cd tmp/gemfire && gfsh start server --dir=server --log-level=warning --cache-xml-file=../../benchmark/xml/BenchmarkServer.xml --name=server' }, stopServer: { command: 'cd tmp/gemfire && gfsh stop server --dir=server', }, benchmarkJava: { command: [ 'cd benchmark/java', './gradlew clean run -q' ].join(" && ") } }, jasmine_node: { all: ['spec/'] } } ); grunt.loadNpmTasks('grunt-jasmine-node'); grunt.loadNpmTasks('grunt-shell'); grunt.registerTask('build', ['shell:rebuild']); grunt.registerTask('test', ['jasmine_node:all']); grunt.registerTask('server:start', ['shell:startServer']); grunt.registerTask('server:stop', ['shell:stopServer']); grunt.registerTask('server:restart', ['server:stop', 'server:start']); grunt.registerTask('benchmark:node', ['build', 'shell:benchmarkNode']); grunt.registerTask('benchmark:java', ['shell:benchmarkJava']); grunt.registerTask('benchmark', ['benchmark:node', 'benchmark:java']); grunt.registerTask('default', ['build', 'test']); };
7a996b138622742b61f9c0eed1fa6b4d83bb85cc
backends.json
backends.json
[{"gamePort":7890,"gameHost":"localhost","gameType":"Acquire"}]
[{ "gamePort": 7890, "gameHost": "localhost", "gameType": "Acquire" }, { "gamePort": 9999, "gameHost": "localhost", "gameType": "Bautzen1945" }]
Add config for Bautzen backend
Add config for Bautzen backend
JSON
apache-2.0
abailly/hsgames,abailly/hsgames,abailly/hsgames
json
## Code Before: [{"gamePort":7890,"gameHost":"localhost","gameType":"Acquire"}] ## Instruction: Add config for Bautzen backend ## Code After: [{ "gamePort": 7890, "gameHost": "localhost", "gameType": "Acquire" }, { "gamePort": 9999, "gameHost": "localhost", "gameType": "Bautzen1945" }]
8292d0026ec5bf44e9ad1350b695c3ee4017e9dd
README.md
README.md
*GraphQL, but for your lights* ## Why? Because GraphQL is amazing and so is home automation and I'm not choosing between them you can't make me. ## Trying it out First off, you need lights. The special kind you can control with your smartphone and pretend you're telekinetic. I get mine from [Philips](http://www2.meethue.com/en-us/products/?category=131159). I think you can use other types, but I've never tried. Assuming you've got some lights, do these things: 1. Clone this repo 2. Install (`npm install` or `yarn install` or whatever the cool kids do these days) 3. Do `yarn register`. That'll poll your Hue bridge until you press the link button 4. `yarn start` :tada: Open your browser to `localhost:8080` and try some queries! **Lazy person copy & paste** ```sh git clone https://github.com/PsychoLlama/filament.git && cd filament npm install echo "Press the giant button on your Hue bridge" npm run register npm start ``` ## Disclaimer I'm not affiliated with Philips in any way. I'm just a guy on the internet playing with code :heart:
*GraphQL, but for your lights* ## Why? Because GraphQL is amazing and so is home automation and I'm not choosing between them you can't make me. ## Trying it out First off, you need lights. The special kind you can control with your smartphone and pretend you're telekinetic. I get mine from [Philips](http://www2.meethue.com/en-us/products/?category=131159). I think you can use other types, but I've never tried. Assuming you've got some lights, do these things: 1. Clone this repo 2. Install (`npm install` or `yarn install` or whatever the cool kids do these days) 3. Do `yarn register`. That'll poll your Hue bridge until you press the link button 4. `yarn build` 5. `yarn start` :tada: Open your browser to `localhost:8080` and try some queries! **Lazy person copy & paste** ```sh git clone https://github.com/PsychoLlama/filament.git && cd filament npm install echo "Press the giant button on your Hue bridge" npm run register npm run build npm start ``` ## Disclaimer I'm not affiliated with Philips in any way. I'm just a guy on the internet playing with code :heart:
Add build step to setup instructions
Add build step to setup instructions
Markdown
mit
PsychoLlama/filament,PsychoLlama/filament
markdown
## Code Before: *GraphQL, but for your lights* ## Why? Because GraphQL is amazing and so is home automation and I'm not choosing between them you can't make me. ## Trying it out First off, you need lights. The special kind you can control with your smartphone and pretend you're telekinetic. I get mine from [Philips](http://www2.meethue.com/en-us/products/?category=131159). I think you can use other types, but I've never tried. Assuming you've got some lights, do these things: 1. Clone this repo 2. Install (`npm install` or `yarn install` or whatever the cool kids do these days) 3. Do `yarn register`. That'll poll your Hue bridge until you press the link button 4. `yarn start` :tada: Open your browser to `localhost:8080` and try some queries! **Lazy person copy & paste** ```sh git clone https://github.com/PsychoLlama/filament.git && cd filament npm install echo "Press the giant button on your Hue bridge" npm run register npm start ``` ## Disclaimer I'm not affiliated with Philips in any way. I'm just a guy on the internet playing with code :heart: ## Instruction: Add build step to setup instructions ## Code After: *GraphQL, but for your lights* ## Why? Because GraphQL is amazing and so is home automation and I'm not choosing between them you can't make me. ## Trying it out First off, you need lights. The special kind you can control with your smartphone and pretend you're telekinetic. I get mine from [Philips](http://www2.meethue.com/en-us/products/?category=131159). I think you can use other types, but I've never tried. Assuming you've got some lights, do these things: 1. Clone this repo 2. Install (`npm install` or `yarn install` or whatever the cool kids do these days) 3. Do `yarn register`. That'll poll your Hue bridge until you press the link button 4. `yarn build` 5. `yarn start` :tada: Open your browser to `localhost:8080` and try some queries! **Lazy person copy & paste** ```sh git clone https://github.com/PsychoLlama/filament.git && cd filament npm install echo "Press the giant button on your Hue bridge" npm run register npm run build npm start ``` ## Disclaimer I'm not affiliated with Philips in any way. I'm just a guy on the internet playing with code :heart:
1e4551bc7a99ccc39f0a491c2ce30b8aff6309e6
hawtio-plugin-examples/social-plugin/src/main/webapp/plugin/js/navbar.js
hawtio-plugin-examples/social-plugin/src/main/webapp/plugin/js/navbar.js
/** * @module SOCIAL */ var SOCIAL = (function (SOCIAL) { /** * @property breadcrumbs * @type {{content: string, title: string, isValid: isValid, href: string}[]} * * Data structure that defines the sub-level tabs for * our plugin, used by the navbar controller to show * or hide tabs based on some criteria */ SOCIAL.breadcrumbs = [ { content: '<i class="icon-comments"></i> User', title: "Search info about a User", isValid: function () { return true; }, href: "#/social/user" }, { content: '<i class="icon-cogs"></i> Tweets', title: "Search Tweets", isValid: function () { return true; }, href: "#/social/tweets" } ]; /** * @function NavBarController * * @param $scope * * The controller for this plugin's navigation bar * */ SOCIAL.NavBarController = function ($scope) { $scope.breadcrumbs = SOCIAL.breadcrumbs; $scope.isValid = function(link) { return true; }; }; return SOCIAL; }(SOCIAL || { }));
/** * @module SOCIAL */ var SOCIAL = (function (SOCIAL) { /** * @property breadcrumbs * @type {{content: string, title: string, isValid: isValid, href: string}[]} * * Data structure that defines the sub-level tabs for * our plugin, used by the navbar controller to show * or hide tabs based on some criteria */ SOCIAL.breadcrumbs = [ { content: '<i class="icon-user"></i> User', title: "Search info about a Twitter User", isValid: function () { return true; }, href: "#/social/user" }, { content: '<i class="icon-search"></i> Tweets', title: "Search Tweets based on keywords", isValid: function () { return true; }, href: "#/social/tweets" } ]; /** * @function NavBarController * * @param $scope * * The controller for this plugin's navigation bar * */ SOCIAL.NavBarController = function ($scope) { $scope.breadcrumbs = SOCIAL.breadcrumbs; $scope.isValid = function(link) { return true; }; }; return SOCIAL; }(SOCIAL || { }));
Use font awesome user and search iscons
Use font awesome user and search iscons
JavaScript
apache-2.0
voipme2/hawtio,telefunken/hawtio,skarsaune/hawtio,samkeeleyong/hawtio,rajdavies/hawtio,stalet/hawtio,Fatze/hawtio,padmaragl/hawtio,grgrzybek/hawtio,samkeeleyong/hawtio,rajdavies/hawtio,tadayosi/hawtio,samkeeleyong/hawtio,andytaylor/hawtio,uguy/hawtio,tadayosi/hawtio,jfbreault/hawtio,telefunken/hawtio,mposolda/hawtio,padmaragl/hawtio,voipme2/hawtio,stalet/hawtio,hawtio/hawtio,mposolda/hawtio,fortyrunner/hawtio,jfbreault/hawtio,rajdavies/hawtio,andytaylor/hawtio,fortyrunner/hawtio,hawtio/hawtio,Fatze/hawtio,uguy/hawtio,grgrzybek/hawtio,mposolda/hawtio,samkeeleyong/hawtio,grgrzybek/hawtio,grgrzybek/hawtio,skarsaune/hawtio,andytaylor/hawtio,telefunken/hawtio,tadayosi/hawtio,uguy/hawtio,skarsaune/hawtio,samkeeleyong/hawtio,tadayosi/hawtio,hawtio/hawtio,padmaragl/hawtio,voipme2/hawtio,mposolda/hawtio,stalet/hawtio,andytaylor/hawtio,stalet/hawtio,grgrzybek/hawtio,Fatze/hawtio,skarsaune/hawtio,stalet/hawtio,padmaragl/hawtio,fortyrunner/hawtio,Fatze/hawtio,skarsaune/hawtio,telefunken/hawtio,tadayosi/hawtio,mposolda/hawtio,voipme2/hawtio,voipme2/hawtio,Fatze/hawtio,hawtio/hawtio,telefunken/hawtio,rajdavies/hawtio,jfbreault/hawtio,jfbreault/hawtio,uguy/hawtio,uguy/hawtio,hawtio/hawtio,andytaylor/hawtio,fortyrunner/hawtio,padmaragl/hawtio,rajdavies/hawtio,jfbreault/hawtio
javascript
## Code Before: /** * @module SOCIAL */ var SOCIAL = (function (SOCIAL) { /** * @property breadcrumbs * @type {{content: string, title: string, isValid: isValid, href: string}[]} * * Data structure that defines the sub-level tabs for * our plugin, used by the navbar controller to show * or hide tabs based on some criteria */ SOCIAL.breadcrumbs = [ { content: '<i class="icon-comments"></i> User', title: "Search info about a User", isValid: function () { return true; }, href: "#/social/user" }, { content: '<i class="icon-cogs"></i> Tweets', title: "Search Tweets", isValid: function () { return true; }, href: "#/social/tweets" } ]; /** * @function NavBarController * * @param $scope * * The controller for this plugin's navigation bar * */ SOCIAL.NavBarController = function ($scope) { $scope.breadcrumbs = SOCIAL.breadcrumbs; $scope.isValid = function(link) { return true; }; }; return SOCIAL; }(SOCIAL || { })); ## Instruction: Use font awesome user and search iscons ## Code After: /** * @module SOCIAL */ var SOCIAL = (function (SOCIAL) { /** * @property breadcrumbs * @type {{content: string, title: string, isValid: isValid, href: string}[]} * * Data structure that defines the sub-level tabs for * our plugin, used by the navbar controller to show * or hide tabs based on some criteria */ SOCIAL.breadcrumbs = [ { content: '<i class="icon-user"></i> User', title: "Search info about a Twitter User", isValid: function () { return true; }, href: "#/social/user" }, { content: '<i class="icon-search"></i> Tweets', title: "Search Tweets based on keywords", isValid: function () { return true; }, href: "#/social/tweets" } ]; /** * @function NavBarController * * @param $scope * * The controller for this plugin's navigation bar * */ SOCIAL.NavBarController = function ($scope) { $scope.breadcrumbs = SOCIAL.breadcrumbs; $scope.isValid = function(link) { return true; }; }; return SOCIAL; }(SOCIAL || { }));
7bd2fb444644f1ea125fba76562a8e8b22b71cad
.travis.yml
.travis.yml
language: node_js node_js: - "4.0.0" - "4.1.0" - "iojs" - "node"
language: node_js node_js: - "4.0.0" - "4.1.0" - "iojs" - "node" notifications: email: false
Disable e-mail notifications on Travis CI
Disable e-mail notifications on Travis CI
YAML
mit
fjorgemota/jimple
yaml
## Code Before: language: node_js node_js: - "4.0.0" - "4.1.0" - "iojs" - "node" ## Instruction: Disable e-mail notifications on Travis CI ## Code After: language: node_js node_js: - "4.0.0" - "4.1.0" - "iojs" - "node" notifications: email: false
26d650b888ae7c1e110ab2bcc2abd2fa49c16c80
draft-3/userguide-intro.md
draft-3/userguide-intro.md
Hello! This guide will introduce you to writing tool wrappers and workflows using the Common Workflow Language (CWL). This guide describes the current stable specification, draft 3. Note: This document is a work in progress. Not all features are covered, yet. <!--ToC--> # Introduction CWL is a way to describe command line tools and connect them together to create workflows. Because CWL is a specification and not a specific piece of software, tools and workflows described using CWL are portable across a variety of platforms that support the CWL standard. CWL has roots in "make" and many similar tools that determine order of execution based on dependencies between tasks. However unlike "make", CWL tasks are isolated and you must be explicit about your inputs and outputs. The benefit of explicitness and isolation are flexibility, portability, and scalability: tools and workflows described with CWL can transparently leverage technologies such as Docker, be used with CWL implementations from different vendors, and is well suited for describing large-scale workflows in cluster, cloud and high performance computing environments where tasks are scheduled in parallel across many nodes.
Hello! The Common Workflow Language user guide has moved to [http://www.commonwl.org/user_guide/](http://www.commonwl.org/user_guide/)
Remove draft-3 userguide and link to the new URL
Remove draft-3 userguide and link to the new URL
Markdown
apache-2.0
mr-c/common-workflow-language,hmenager/common-workflow-language,hmenager/common-workflow-language,dleehr/common-workflow-language,common-workflow-language/common-workflow-language,common-workflow-language/common-workflow-language,mr-c/common-workflow-language,dleehr/common-workflow-language,common-workflow-language/common-workflow-language,hmenager/common-workflow-language,dleehr/common-workflow-language,curoverse/common-workflow-language,hmenager/common-workflow-language,mr-c/common-workflow-language,common-workflow-language/common-workflow-language,curoverse/common-workflow-language,dleehr/common-workflow-language
markdown
## Code Before: Hello! This guide will introduce you to writing tool wrappers and workflows using the Common Workflow Language (CWL). This guide describes the current stable specification, draft 3. Note: This document is a work in progress. Not all features are covered, yet. <!--ToC--> # Introduction CWL is a way to describe command line tools and connect them together to create workflows. Because CWL is a specification and not a specific piece of software, tools and workflows described using CWL are portable across a variety of platforms that support the CWL standard. CWL has roots in "make" and many similar tools that determine order of execution based on dependencies between tasks. However unlike "make", CWL tasks are isolated and you must be explicit about your inputs and outputs. The benefit of explicitness and isolation are flexibility, portability, and scalability: tools and workflows described with CWL can transparently leverage technologies such as Docker, be used with CWL implementations from different vendors, and is well suited for describing large-scale workflows in cluster, cloud and high performance computing environments where tasks are scheduled in parallel across many nodes. ## Instruction: Remove draft-3 userguide and link to the new URL ## Code After: Hello! The Common Workflow Language user guide has moved to [http://www.commonwl.org/user_guide/](http://www.commonwl.org/user_guide/)
b11e547a8f3fa583860e2baf7c4fddfdf8f10dbb
prepare_deploy.sh
prepare_deploy.sh
set -e DEPLOY_DIR="odin" VER_MAJOR="1" VER_MINOR="0" VER_PATCH="0" if [ -d "$DEPLOY_DIR" ]; then rm -rf "$DEPLOY_DIR" fi # rm -rf ./pyodin/logs/* # mkdir "$DEPLOY_DIR" cp -aR client "$DEPLOY_DIR" cp -aR install "$DEPLOY_DIR" cp -aR pyodin "$DEPLOY_DIR" cp -aR server "$DEPLOY_DIR" DEPLOY_FILE_NAME="odin_${VER_MAJOR}_${VER_MINOR}_${VER_PATCH}_${VER_FLAG}".tar.gz tar cvzf "$DEPLOY_FILE_NAME" "$DEPLOY_DIR" if [ ! -f "$DEPLOY_FILE_NAME" ]; then echo "Deploy build failed." exit 1 fi rm -rf "$DEPLOY_DIR" echo "Deploy build complete."
set -e DEPLOY_DIR="odin" VER_MAJOR="1" VER_MINOR="0" VER_PATCH="0" if [ -d "$DEPLOY_DIR" ]; then rm -rf "$DEPLOY_DIR" fi # rm -rf ./pyodin/logs/* # mkdir "$DEPLOY_DIR" mkdir "$DEPLOY_DIR/app" cp -aR client/app "$DEPLOY_DIR/app" cp -aR install "$DEPLOY_DIR" cp -aR pyodin "$DEPLOY_DIR" cp -aR server "$DEPLOY_DIR" DEPLOY_FILE_NAME="odin_${VER_MAJOR}_${VER_MINOR}_${VER_PATCH}_${VER_FLAG}".tar.gz tar cvzf "$DEPLOY_FILE_NAME" "$DEPLOY_DIR" if [ ! -f "$DEPLOY_FILE_NAME" ]; then echo "Deploy build failed." exit 1 fi rm -rf "$DEPLOY_DIR" echo "Deploy build complete."
Change the client part deploy
Change the client part deploy
Shell
mit
vassilux/odin,vassilux/odin,vassilux/odin,vassilux/odin
shell
## Code Before: set -e DEPLOY_DIR="odin" VER_MAJOR="1" VER_MINOR="0" VER_PATCH="0" if [ -d "$DEPLOY_DIR" ]; then rm -rf "$DEPLOY_DIR" fi # rm -rf ./pyodin/logs/* # mkdir "$DEPLOY_DIR" cp -aR client "$DEPLOY_DIR" cp -aR install "$DEPLOY_DIR" cp -aR pyodin "$DEPLOY_DIR" cp -aR server "$DEPLOY_DIR" DEPLOY_FILE_NAME="odin_${VER_MAJOR}_${VER_MINOR}_${VER_PATCH}_${VER_FLAG}".tar.gz tar cvzf "$DEPLOY_FILE_NAME" "$DEPLOY_DIR" if [ ! -f "$DEPLOY_FILE_NAME" ]; then echo "Deploy build failed." exit 1 fi rm -rf "$DEPLOY_DIR" echo "Deploy build complete." ## Instruction: Change the client part deploy ## Code After: set -e DEPLOY_DIR="odin" VER_MAJOR="1" VER_MINOR="0" VER_PATCH="0" if [ -d "$DEPLOY_DIR" ]; then rm -rf "$DEPLOY_DIR" fi # rm -rf ./pyodin/logs/* # mkdir "$DEPLOY_DIR" mkdir "$DEPLOY_DIR/app" cp -aR client/app "$DEPLOY_DIR/app" cp -aR install "$DEPLOY_DIR" cp -aR pyodin "$DEPLOY_DIR" cp -aR server "$DEPLOY_DIR" DEPLOY_FILE_NAME="odin_${VER_MAJOR}_${VER_MINOR}_${VER_PATCH}_${VER_FLAG}".tar.gz tar cvzf "$DEPLOY_FILE_NAME" "$DEPLOY_DIR" if [ ! -f "$DEPLOY_FILE_NAME" ]; then echo "Deploy build failed." exit 1 fi rm -rf "$DEPLOY_DIR" echo "Deploy build complete."
954a83d61f8166f9048c350076177b4036a8d923
tests/phpunit/Unit/Rule/UnorderedListTest.php
tests/phpunit/Unit/Rule/UnorderedListTest.php
<?php # -*- coding: utf-8 -*- namespace Bueltge\Marksimple\Tests\Unit\Rule; use Bueltge\Marksimple\Rule; use Bueltge\Marksimple\Rule\ElementRuleInterface; use Bueltge\Marksimple\Tests\Unit\AbstractRuleTestCase; class UnorderedListTest extends AbstractRuleTestCase { public function returnRule(): ElementRuleInterface { return new Rule\UnorderedList(); } public function provideList() { yield 'asterix' => ['* List Element', '<ul><li>List Element</li></ul>']; $input = '- List Element'; $expected = '<ul><li>List Element</li></ul>'; $text = 'Lorum ipsum'; yield 'minus' => [$input, $expected]; yield 'text before' => ["$text\n$input", "$text\n$expected"]; yield 'text after' => ["$input\n$text", "$expected\n$text"]; yield 'text before and after' => ["$text\n$input\n$text", "$text\n$expected\n$text"]; $input = <<<Markdown * item 1 * item 2 * item 3 Markdown; $expected = '<ul><li>item 1</li><li>item 2</li><li>item 3</li></ul>'; yield 'multiple items' => [$input, $expected]; } }
<?php # -*- coding: utf-8 -*- namespace Bueltge\Marksimple\Tests\Unit\Rule; use Bueltge\Marksimple\Rule; use Bueltge\Marksimple\Rule\ElementRuleInterface; use Bueltge\Marksimple\Tests\Unit\AbstractRuleTestCase; class UnorderedListTest extends AbstractRuleTestCase { public function returnRule(): ElementRuleInterface { return new Rule\UnorderedList(); } public function provideList() { yield 'asterix' => ['* List Element', '<ul><li>List Element</li></ul>']; $input = '- List Element'; $expected = '<ul><li>List Element</li></ul>'; $text = 'Lorum ipsum'; yield 'minus' => [$input, $expected]; yield 'text before' => ["$text\n$input", "$text\n$expected"]; yield 'text after' => ["$input\n$text", "$expected\n$text"]; yield 'text before and after' => ["$text\n$input\n$text", "$text\n$expected\n$text"]; $input = <<<Markdown * item 1 * item 2 * item 3 Markdown; $expected = '<ul><li>item 1</li></ul> <ul><li>item 2</li></ul> <ul><li>item 3</li></ul>'; yield 'multiple items' => [$input, $expected]; } }
Fix ul list test; needs clean up for lists
Fix ul list test; needs clean up for lists
PHP
mit
bueltge/marksimple,bueltge/marksimple
php
## Code Before: <?php # -*- coding: utf-8 -*- namespace Bueltge\Marksimple\Tests\Unit\Rule; use Bueltge\Marksimple\Rule; use Bueltge\Marksimple\Rule\ElementRuleInterface; use Bueltge\Marksimple\Tests\Unit\AbstractRuleTestCase; class UnorderedListTest extends AbstractRuleTestCase { public function returnRule(): ElementRuleInterface { return new Rule\UnorderedList(); } public function provideList() { yield 'asterix' => ['* List Element', '<ul><li>List Element</li></ul>']; $input = '- List Element'; $expected = '<ul><li>List Element</li></ul>'; $text = 'Lorum ipsum'; yield 'minus' => [$input, $expected]; yield 'text before' => ["$text\n$input", "$text\n$expected"]; yield 'text after' => ["$input\n$text", "$expected\n$text"]; yield 'text before and after' => ["$text\n$input\n$text", "$text\n$expected\n$text"]; $input = <<<Markdown * item 1 * item 2 * item 3 Markdown; $expected = '<ul><li>item 1</li><li>item 2</li><li>item 3</li></ul>'; yield 'multiple items' => [$input, $expected]; } } ## Instruction: Fix ul list test; needs clean up for lists ## Code After: <?php # -*- coding: utf-8 -*- namespace Bueltge\Marksimple\Tests\Unit\Rule; use Bueltge\Marksimple\Rule; use Bueltge\Marksimple\Rule\ElementRuleInterface; use Bueltge\Marksimple\Tests\Unit\AbstractRuleTestCase; class UnorderedListTest extends AbstractRuleTestCase { public function returnRule(): ElementRuleInterface { return new Rule\UnorderedList(); } public function provideList() { yield 'asterix' => ['* List Element', '<ul><li>List Element</li></ul>']; $input = '- List Element'; $expected = '<ul><li>List Element</li></ul>'; $text = 'Lorum ipsum'; yield 'minus' => [$input, $expected]; yield 'text before' => ["$text\n$input", "$text\n$expected"]; yield 'text after' => ["$input\n$text", "$expected\n$text"]; yield 'text before and after' => ["$text\n$input\n$text", "$text\n$expected\n$text"]; $input = <<<Markdown * item 1 * item 2 * item 3 Markdown; $expected = '<ul><li>item 1</li></ul> <ul><li>item 2</li></ul> <ul><li>item 3</li></ul>'; yield 'multiple items' => [$input, $expected]; } }
ea8b3f42dd2cf21aadf333ba9262a864a0fc5267
autocloud/web/templates/job_output.html
autocloud/web/templates/job_output.html
{% extends "master.html" %} {% block body %} <div class="container"> <p>Output for task: {{ job.taskid }}</p> <pre>{{ job.output }}</pre> <div> {% endblock %}
{% extends "master.html" %} {% block body %} <a class="pull-right" href="{{ url_for('job_details') }}">Go to job details</a> <div class="container"> <p>Output for task: {{ job.taskid }}</p> <pre>{{ job.output }}</pre> </div> {% endblock %}
Add job details link to output page
Add job details link to output page
HTML
agpl-3.0
kushaldas/autocloud,kushaldas/autocloud,maxamillion/autocloud,kushaldas/autocloud,kushaldas/autocloud,maxamillion/autocloud,maxamillion/autocloud,maxamillion/autocloud
html
## Code Before: {% extends "master.html" %} {% block body %} <div class="container"> <p>Output for task: {{ job.taskid }}</p> <pre>{{ job.output }}</pre> <div> {% endblock %} ## Instruction: Add job details link to output page ## Code After: {% extends "master.html" %} {% block body %} <a class="pull-right" href="{{ url_for('job_details') }}">Go to job details</a> <div class="container"> <p>Output for task: {{ job.taskid }}</p> <pre>{{ job.output }}</pre> </div> {% endblock %}
9c41acc9dee4c6ef78da23025d8e310feafdf4a9
lib/radiant-radiant_validators-extension.rb
lib/radiant-radiant_validators-extension.rb
module RadiantRadiantValidatorsExtension VERSION = "1.1.1" SUMMARY = "Radiant Validators for Radiant CMS" DESCRIPTION = "Makes Radiant better by adding radiant_validators!" URL = "http://github.com/JediFreeman/Radiant-Validators-Extension" AUTHORS = ["Ben Evans"] EMAIL = ["[email protected]"] end
module RadiantRadiantValidatorsExtension VERSION = "1.1.1" SUMMARY = "Radiant Validators for Radiant CMS" DESCRIPTION = "Extension to allow overriding of built-in validators in Radiant" URL = "http://github.com/JediFreeman/Radiant-Validators-Extension" AUTHORS = ["Ben Evans"] EMAIL = ["[email protected]"] end
Fix description that shows up in Radiant Admin
Fix description that shows up in Radiant Admin
Ruby
mit
JediFreeman/Radiant-Validators-Extension
ruby
## Code Before: module RadiantRadiantValidatorsExtension VERSION = "1.1.1" SUMMARY = "Radiant Validators for Radiant CMS" DESCRIPTION = "Makes Radiant better by adding radiant_validators!" URL = "http://github.com/JediFreeman/Radiant-Validators-Extension" AUTHORS = ["Ben Evans"] EMAIL = ["[email protected]"] end ## Instruction: Fix description that shows up in Radiant Admin ## Code After: module RadiantRadiantValidatorsExtension VERSION = "1.1.1" SUMMARY = "Radiant Validators for Radiant CMS" DESCRIPTION = "Extension to allow overriding of built-in validators in Radiant" URL = "http://github.com/JediFreeman/Radiant-Validators-Extension" AUTHORS = ["Ben Evans"] EMAIL = ["[email protected]"] end
10dcb1d956b1584d64aa53efc63b834aed7d702c
app/views/icons/show.haml
app/views/icons/show.haml
= icon_tag @icon %br Keyword: = @icon.keyword - if @icon.credit %br Credit: = @icon.credit - if @icon.user_id == current_user.try(:id) %br = link_to "Make avatar", avatar_icon_path(@icon), method: :post %br = link_to "Edit icon", edit_icon_path(@icon) %br = link_to "Delete icon", icon_path(@icon), method: :delete, confirm: 'Are you sure you want to delete this icon?'
= icon_tag @icon %br Keyword: = @icon.keyword - if @icon.credit %br Credit: = @icon.credit - if @icon.user_id == current_user.try(:id) %br = link_to "Make avatar", avatar_icon_path(@icon), method: :post %br = link_to "Edit icon", edit_icon_path(@icon) %br = link_to "Delete icon", icon_path(@icon), method: :delete, confirm: 'Are you sure you want to delete this icon?' - if @icon.galleries %br %br .post-header .padding-15 Galleries %table - @icon.galleries.order(:name).each do |gallery| = render partial: 'galleries/single', locals: {gallery: gallery, klass: 'subber', skip_forms: true}
Add galleries to icon view page
Add galleries to icon view page
Haml
mit
Marri/glowfic,Marri/glowfic,Marri/glowfic,Marri/glowfic
haml
## Code Before: = icon_tag @icon %br Keyword: = @icon.keyword - if @icon.credit %br Credit: = @icon.credit - if @icon.user_id == current_user.try(:id) %br = link_to "Make avatar", avatar_icon_path(@icon), method: :post %br = link_to "Edit icon", edit_icon_path(@icon) %br = link_to "Delete icon", icon_path(@icon), method: :delete, confirm: 'Are you sure you want to delete this icon?' ## Instruction: Add galleries to icon view page ## Code After: = icon_tag @icon %br Keyword: = @icon.keyword - if @icon.credit %br Credit: = @icon.credit - if @icon.user_id == current_user.try(:id) %br = link_to "Make avatar", avatar_icon_path(@icon), method: :post %br = link_to "Edit icon", edit_icon_path(@icon) %br = link_to "Delete icon", icon_path(@icon), method: :delete, confirm: 'Are you sure you want to delete this icon?' - if @icon.galleries %br %br .post-header .padding-15 Galleries %table - @icon.galleries.order(:name).each do |gallery| = render partial: 'galleries/single', locals: {gallery: gallery, klass: 'subber', skip_forms: true}
bcd4f5c0b79851a91d09ed548394202015da915f
package.json
package.json
{ "name": "Xigen-EasyProjects-Timer", "main": "index.html", "version" : "1.0.0", "window": { "toolbar": false, "title": "Xigen Timer", "width": 900, "height": 445, "max_width": 900, "max_height": 445, "min_width": 900, "min_height": 445, "frame" : false }, "devDependencies": { "grunt-node-webkit-builder": "~0.1.17", "grunt": "~0.4.2" }, "dependencies": { "node-rest-client": "*" } }
{ "name": "Xigen-EasyProjects-Timer", "main": "index.html", "author" : "Matt Malone <[email protected]>", "version" : "1.0.0", "description" : "A timer for the EasyProjects.NET project management system", "contributors": [ { "name": "Ben McCarthy", "email": "[email protected]" } ], "repository" : { "type" : "git", "url" : "http://github.com/XigenBen/Xigen-Timer.git" }, "window": { "toolbar": false, "title": "Xigen Timer", "width": 900, "height": 445, "max_width": 900, "max_height": 445, "min_width": 900, "min_height": 445, "frame" : false }, "devDependencies": { "grunt-node-webkit-builder": "~0.1.17", "grunt": "~0.4.2" }, "dependencies": { "node-rest-client": "*" } }
Update Package.json with more details.
Update Package.json with more details.
JSON
mit
XigenBen/Xigen-Timer
json
## Code Before: { "name": "Xigen-EasyProjects-Timer", "main": "index.html", "version" : "1.0.0", "window": { "toolbar": false, "title": "Xigen Timer", "width": 900, "height": 445, "max_width": 900, "max_height": 445, "min_width": 900, "min_height": 445, "frame" : false }, "devDependencies": { "grunt-node-webkit-builder": "~0.1.17", "grunt": "~0.4.2" }, "dependencies": { "node-rest-client": "*" } } ## Instruction: Update Package.json with more details. ## Code After: { "name": "Xigen-EasyProjects-Timer", "main": "index.html", "author" : "Matt Malone <[email protected]>", "version" : "1.0.0", "description" : "A timer for the EasyProjects.NET project management system", "contributors": [ { "name": "Ben McCarthy", "email": "[email protected]" } ], "repository" : { "type" : "git", "url" : "http://github.com/XigenBen/Xigen-Timer.git" }, "window": { "toolbar": false, "title": "Xigen Timer", "width": 900, "height": 445, "max_width": 900, "max_height": 445, "min_width": 900, "min_height": 445, "frame" : false }, "devDependencies": { "grunt-node-webkit-builder": "~0.1.17", "grunt": "~0.4.2" }, "dependencies": { "node-rest-client": "*" } }
16362ad8af981a18f06bdc4c999dc2c4ae2c796a
src/GeneaLabs/Phpgmaps/PhpgmapsServiceProvider.php
src/GeneaLabs/Phpgmaps/PhpgmapsServiceProvider.php
<?php namespace GeneaLabs\Phpgmaps; use GeneaLabs\Phpgmaps\Facades\PhpgmapsFacade; use Illuminate\Foundation\AliasLoader; use Illuminate\Support\ServiceProvider; class PhpgmapsServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = false; /** * Bootstrap the application events. * * @return void */ public function boot() { } /** * Register the service provider. * * @return void */ public function register() { $this->app['phpgmaps'] = $this->app->share(function ($app) { return new Phpgmaps(); }); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return array('phpgmaps'); } }
<?php namespace GeneaLabs\Phpgmaps; use GeneaLabs\Phpgmaps\Facades\PhpgmapsFacade; use Illuminate\Foundation\AliasLoader; use Illuminate\Support\ServiceProvider; class PhpgmapsServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = false; /** * Bootstrap the application events. * * @return void */ public function boot() { } /** * Register the service provider. * * @return void */ public function register() { $this->app['phpgmaps'] = $this->app->share(function ($app) { return new Phpgmaps(['http' => $app->make('request')->secure()]); }); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return array('phpgmaps'); } }
Set schema (http or https) config setting
Set schema (http or https) config setting
PHP
mit
GeneaLabs/Phpgmaps
php
## Code Before: <?php namespace GeneaLabs\Phpgmaps; use GeneaLabs\Phpgmaps\Facades\PhpgmapsFacade; use Illuminate\Foundation\AliasLoader; use Illuminate\Support\ServiceProvider; class PhpgmapsServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = false; /** * Bootstrap the application events. * * @return void */ public function boot() { } /** * Register the service provider. * * @return void */ public function register() { $this->app['phpgmaps'] = $this->app->share(function ($app) { return new Phpgmaps(); }); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return array('phpgmaps'); } } ## Instruction: Set schema (http or https) config setting ## Code After: <?php namespace GeneaLabs\Phpgmaps; use GeneaLabs\Phpgmaps\Facades\PhpgmapsFacade; use Illuminate\Foundation\AliasLoader; use Illuminate\Support\ServiceProvider; class PhpgmapsServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = false; /** * Bootstrap the application events. * * @return void */ public function boot() { } /** * Register the service provider. * * @return void */ public function register() { $this->app['phpgmaps'] = $this->app->share(function ($app) { return new Phpgmaps(['http' => $app->make('request')->secure()]); }); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return array('phpgmaps'); } }
2fa3fca750fde8a0579177847e936ed88b682057
README.md
README.md
[![Travis Badge](https://img.shields.io/travis/funcool/buddy-core.svg?style=flat)](https://travis-ci.org/funcool/buddy-core "Travis Badge") [![Dependencies Status](http://jarkeeper.com/funcool/buddy-core/status.svg)](http://jarkeeper.com/funcool/buddy-core) *buddy-core* module is dedicated to provide a Clojure friendly Cryptographic Api. [![Clojars Project](http://clojars.org/buddy/buddy-core/latest-version.svg)](http://clojars.org/buddy/buddy-core) See the [documentation](https://funcool.github.io/buddy-core/latest/) for more detailed information.
[![Travis Badge](https://img.shields.io/travis/funcool/buddy-core.svg?style=flat)](https://travis-ci.org/funcool/buddy-core "Travis Badge") [![Dependencies Status](http://jarkeeper.com/funcool/buddy-core/status.svg)](http://jarkeeper.com/funcool/buddy-core) *buddy-core* module is dedicated to provide a Clojure friendly Cryptographic Api. [![Clojars Project](http://clojars.org/buddy/buddy-core/latest-version.svg)](http://clojars.org/buddy/buddy-core) See the [documentation](https://funcool.github.io/buddy-core/latest/) or [api reference](https://funcool.github.io/buddy-core/latest/api/) for more detailed information.
Update readme with api docs link.
Update readme with api docs link.
Markdown
apache-2.0
funcool/buddy-core,funcool/buddy-core
markdown
## Code Before: [![Travis Badge](https://img.shields.io/travis/funcool/buddy-core.svg?style=flat)](https://travis-ci.org/funcool/buddy-core "Travis Badge") [![Dependencies Status](http://jarkeeper.com/funcool/buddy-core/status.svg)](http://jarkeeper.com/funcool/buddy-core) *buddy-core* module is dedicated to provide a Clojure friendly Cryptographic Api. [![Clojars Project](http://clojars.org/buddy/buddy-core/latest-version.svg)](http://clojars.org/buddy/buddy-core) See the [documentation](https://funcool.github.io/buddy-core/latest/) for more detailed information. ## Instruction: Update readme with api docs link. ## Code After: [![Travis Badge](https://img.shields.io/travis/funcool/buddy-core.svg?style=flat)](https://travis-ci.org/funcool/buddy-core "Travis Badge") [![Dependencies Status](http://jarkeeper.com/funcool/buddy-core/status.svg)](http://jarkeeper.com/funcool/buddy-core) *buddy-core* module is dedicated to provide a Clojure friendly Cryptographic Api. [![Clojars Project](http://clojars.org/buddy/buddy-core/latest-version.svg)](http://clojars.org/buddy/buddy-core) See the [documentation](https://funcool.github.io/buddy-core/latest/) or [api reference](https://funcool.github.io/buddy-core/latest/api/) for more detailed information.
0d1f9406b88afc0a7bd7e13dd6ff8edf537d9ff2
.travis.yml
.travis.yml
language: cpp compiler: - gcc - clang branches: only: - master before_install: # Update submodules before install - git submodule update --init --recursive before_script: - sudo apt-get update -qq - sudo apt-get install -qq libssl-dev script: - make clean all - sudo make install - cd build - ./run_tests
language: cpp compiler: - gcc - clang branches: only: - master before_install: # Update submodules before install - git submodule update --init --recursive before_script: - sudo apt-get update -qq - sudo apt-get install -qq libssl-dev script: - make clean all - sudo make install - cd build # On Linux, the `run_tests` binary is linked against `./libsslpkix.so.X` # so we need to set `LD_LIBRARY_PATH` to the current directory. - export LD_LIBRARY_PATH=. - ./run_tests
Make Travis export LD_LIBRARY_PATH before testing on Linux.
Make Travis export LD_LIBRARY_PATH before testing on Linux.
YAML
bsd-3-clause
jweyrich/sslpkix,jweyrich/sslpkix
yaml
## Code Before: language: cpp compiler: - gcc - clang branches: only: - master before_install: # Update submodules before install - git submodule update --init --recursive before_script: - sudo apt-get update -qq - sudo apt-get install -qq libssl-dev script: - make clean all - sudo make install - cd build - ./run_tests ## Instruction: Make Travis export LD_LIBRARY_PATH before testing on Linux. ## Code After: language: cpp compiler: - gcc - clang branches: only: - master before_install: # Update submodules before install - git submodule update --init --recursive before_script: - sudo apt-get update -qq - sudo apt-get install -qq libssl-dev script: - make clean all - sudo make install - cd build # On Linux, the `run_tests` binary is linked against `./libsslpkix.so.X` # so we need to set `LD_LIBRARY_PATH` to the current directory. - export LD_LIBRARY_PATH=. - ./run_tests
79caaf5112f98d6c4b81d968995b501d5ec25520
Library/Homebrew/tap_migrations.rb
Library/Homebrew/tap_migrations.rb
TAP_MIGRATIONS = { 'octave' => 'homebrew/science', 'opencv' => 'homebrew/science', 'grads' => 'homebrew/binary', 'denyhosts' => 'homebrew/boneyard', 'ipopt' => 'homebrew/science', 'qfits' => 'homebrew/boneyard', 'blackbox' => 'homebrew/boneyard', 'libgtextutils' => 'homebrew/science', 'syslog-ng' => 'homebrew/boneyard', 'librets' => 'homebrew/boneyard', 'drizzle' => 'homebrew/boneyard', 'boost149' => 'homebrew/versions', 'aimage' => 'homebrew/boneyard', 'cmucl' => 'homebrew/binary', 'lmutil' => 'homebrew/binary', 'jscoverage' => 'homebrew/boneyard', 'jsl' => 'homebrew/binary', 'nlopt' => 'homebrew/science', 'comparepdf' => 'homebrew/boneyard', 'colormake' => 'homebrew/headonly', }
TAP_MIGRATIONS = { 'octave' => 'homebrew/science', 'opencv' => 'homebrew/science', 'grads' => 'homebrew/binary', 'denyhosts' => 'homebrew/boneyard', 'ipopt' => 'homebrew/science', 'qfits' => 'homebrew/boneyard', 'blackbox' => 'homebrew/boneyard', 'libgtextutils' => 'homebrew/science', 'syslog-ng' => 'homebrew/boneyard', 'librets' => 'homebrew/boneyard', 'drizzle' => 'homebrew/boneyard', 'boost149' => 'homebrew/versions', 'aimage' => 'homebrew/boneyard', 'cmucl' => 'homebrew/binary', 'lmutil' => 'homebrew/binary', 'jscoverage' => 'homebrew/boneyard', 'jsl' => 'homebrew/binary', 'nlopt' => 'homebrew/science', 'comparepdf' => 'homebrew/boneyard', 'colormake' => 'homebrew/headonly', 'wkhtmltopdf' => 'homebrew/boneyard', }
Move wkhtmltopdf to the boneyard
Move wkhtmltopdf to the boneyard Closes Homebrew/homebrew#26813.
Ruby
bsd-2-clause
muellermartin/dist,reitermarkus/brew,EricFromCanada/brew,AnastasiaSulyagina/brew,DomT4/brew,alyssais/brew,mahori/brew,claui/brew,reelsense/brew,nandub/brew,hanxue/linuxbrew,konqui/brew,konqui/brew,JCount/brew,sjackman/homebrew,hanxue/linuxbrew,tonyg/homebrew,sjackman/homebrew,rwhogg/brew,staticfloat/brew,muellermartin/dist,jmsundar/brew,palxex/brew,Homebrew/brew,vitorgalvao/brew,jmsundar/brew,DomT4/brew,konqui/brew,Homebrew/brew,bfontaine/brew,zmwangx/brew,maxim-belkin/brew,pseudocody/brew,amar-laksh/brew_sudo,muellermartin/dist,vitorgalvao/brew,nandub/brew,alyssais/brew,Homebrew/brew,mahori/brew,zmwangx/brew,mahori/brew,mahori/brew,gregory-nisbet/brew,konqui/brew,staticfloat/brew,ilovezfs/brew,mistydemeo/homebrew,reitermarkus/brew,rwhogg/brew,EricFromCanada/brew,mistydemeo/homebrew,toonetown/homebrew,amar-laksh/brew_sudo,aw1621107/brew,tonyg/homebrew,maxim-belkin/brew,reelsense/brew,amar-laksh/brew_sudo,Linuxbrew/brew,AnastasiaSulyagina/brew,EricFromCanada/brew,palxex/brew,gordonmcshane/homebrew,nandub/brew,reelsense/brew,pseudocody/brew,tonyg/homebrew,sjackman/homebrew,jmsundar/brew,rwhogg/brew,Linuxbrew/brew,JCount/brew,JCount/brew,reitermarkus/brew,gordonmcshane/homebrew,hanxue/linuxbrew,DomT4/brew,pseudocody/brew,sjackman/homebrew,alyssais/brew,claui/brew,MikeMcQuaid/brew,gordonmcshane/homebrew,toonetown/homebrew,gregory-nisbet/brew,ilovezfs/brew,aw1621107/brew,mistydemeo/homebrew,mgrimes/brew,staticfloat/brew,DomT4/brew,toonetown/homebrew,claui/brew,zmwangx/brew,AnastasiaSulyagina/brew,mgrimes/brew,bfontaine/brew,vitorgalvao/brew,mgrimes/brew,vitorgalvao/brew,MikeMcQuaid/brew,nandub/brew,Linuxbrew/brew,aw1621107/brew,claui/brew,JCount/brew,Linuxbrew/brew,gregory-nisbet/brew,bfontaine/brew,EricFromCanada/brew,MikeMcQuaid/brew,Homebrew/brew,ilovezfs/brew,reitermarkus/brew,palxex/brew,MikeMcQuaid/brew,maxim-belkin/brew
ruby
## Code Before: TAP_MIGRATIONS = { 'octave' => 'homebrew/science', 'opencv' => 'homebrew/science', 'grads' => 'homebrew/binary', 'denyhosts' => 'homebrew/boneyard', 'ipopt' => 'homebrew/science', 'qfits' => 'homebrew/boneyard', 'blackbox' => 'homebrew/boneyard', 'libgtextutils' => 'homebrew/science', 'syslog-ng' => 'homebrew/boneyard', 'librets' => 'homebrew/boneyard', 'drizzle' => 'homebrew/boneyard', 'boost149' => 'homebrew/versions', 'aimage' => 'homebrew/boneyard', 'cmucl' => 'homebrew/binary', 'lmutil' => 'homebrew/binary', 'jscoverage' => 'homebrew/boneyard', 'jsl' => 'homebrew/binary', 'nlopt' => 'homebrew/science', 'comparepdf' => 'homebrew/boneyard', 'colormake' => 'homebrew/headonly', } ## Instruction: Move wkhtmltopdf to the boneyard Closes Homebrew/homebrew#26813. ## Code After: TAP_MIGRATIONS = { 'octave' => 'homebrew/science', 'opencv' => 'homebrew/science', 'grads' => 'homebrew/binary', 'denyhosts' => 'homebrew/boneyard', 'ipopt' => 'homebrew/science', 'qfits' => 'homebrew/boneyard', 'blackbox' => 'homebrew/boneyard', 'libgtextutils' => 'homebrew/science', 'syslog-ng' => 'homebrew/boneyard', 'librets' => 'homebrew/boneyard', 'drizzle' => 'homebrew/boneyard', 'boost149' => 'homebrew/versions', 'aimage' => 'homebrew/boneyard', 'cmucl' => 'homebrew/binary', 'lmutil' => 'homebrew/binary', 'jscoverage' => 'homebrew/boneyard', 'jsl' => 'homebrew/binary', 'nlopt' => 'homebrew/science', 'comparepdf' => 'homebrew/boneyard', 'colormake' => 'homebrew/headonly', 'wkhtmltopdf' => 'homebrew/boneyard', }
82c31bb6827b162fbee956d9552d4d3414de5c3b
composer.json
composer.json
{ "name": "fail-whale/fail-whale", "description": "A robust error handler and pretty printer for PHP", "authors": [ { "name": "Jesse Schalken", "email": "[email protected]" } ], "require": { "phpunit/phpunit": "3.7.*" }, "autoload": { "classmap": [ "src/" ] } }
{ "name": "fail-whale/fail-whale", "description": "A robust error handler and pretty printer for PHP", "minimum-stability": "stable", "license": "MIT", "authors": [ { "name": "Jesse Schalken", "email": "[email protected]" } ], "require-dev": { "phpunit/phpunit": "*" }, "autoload": { "classmap": ["src/"] } }
Update comopser.json with license and minimium-stability
Update comopser.json with license and minimium-stability
JSON
mit
jesseschalken/fail-whale,jesseschalken/fail-whale
json
## Code Before: { "name": "fail-whale/fail-whale", "description": "A robust error handler and pretty printer for PHP", "authors": [ { "name": "Jesse Schalken", "email": "[email protected]" } ], "require": { "phpunit/phpunit": "3.7.*" }, "autoload": { "classmap": [ "src/" ] } } ## Instruction: Update comopser.json with license and minimium-stability ## Code After: { "name": "fail-whale/fail-whale", "description": "A robust error handler and pretty printer for PHP", "minimum-stability": "stable", "license": "MIT", "authors": [ { "name": "Jesse Schalken", "email": "[email protected]" } ], "require-dev": { "phpunit/phpunit": "*" }, "autoload": { "classmap": ["src/"] } }
6983e30713a77476ae3a0419ff955bce988c1229
js/main.js
js/main.js
/* -------------------------------------------------------------------------- Initialize --------------------------------------------------------------------------- */ $(document).ready(function() { /* Syntax Highlighter --------------------------------------------------------------------------- */ SyntaxHighlighter.defaults['toolbar'] = false; SyntaxHighlighter.defaults['gutter'] = false; SyntaxHighlighter.all(); SyntaxHighlighter.highlight(); }); /* -------------------------------------------------------------------------- Follow sidebar --------------------------------------------------------------------------- */ $(function() { var $sidebar = $(".sidebar"), $window = $(window), $start = $sidebar.offset().top - 98; $window.scroll(function() { if ($window.scrollTop() > $start) { $sidebar.addClass("sidebar-scrolled"); } else { $sidebar.removeClass("sidebar-scrolled"); } }); }); /* -------------------------------------------------------------------------- Smooth scrolling and add style on click section --------------------------------------------------------------------------- */ /* https://css-tricks.com/snippets/jquery/smooth-scrolling/ */ $(function() { $('.sidebar-menu-element a').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $('.sidebar-menu-element a').removeClass('is-active'); $(this).addClass('is-active'); $('html,body').animate({ scrollTop: target.offset().top }, 700); return false; } } }); });
/* -------------------------------------------------------------------------- Initialize --------------------------------------------------------------------------- */ $(document).ready(function() { /* Syntax Highlighter --------------------------------------------------------------------------- */ SyntaxHighlighter.defaults['toolbar'] = false; SyntaxHighlighter.defaults['gutter'] = false; SyntaxHighlighter.all(); SyntaxHighlighter.highlight(); }); /* -------------------------------------------------------------------------- Follow sidebar --------------------------------------------------------------------------- */ $(function() { var $sidebar = $(".sidebar"), $window = $(window), $start = $sidebar.offset().top - 98; $window.scroll(function() { if ($window.scrollTop() > $start) { $sidebar.addClass("sidebar-scrolled"); } else { $sidebar.removeClass("sidebar-scrolled"); } }); }); /* -------------------------------------------------------------------------- Smooth scrolling and add style on click section --------------------------------------------------------------------------- */ /* https://css-tricks.com/snippets/jquery/smooth-scrolling/ */ $(function() { $('.sidebar-menu-element a').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { // Add class on click sidebar element /*$('.sidebar-menu-element a').removeClass('is-active'); $(this).addClass('is-active');*/ $('html,body').animate({ scrollTop: target.offset().top }, 700); return false; } } }); });
Comment code to add class on click sidebar element
Comment code to add class on click sidebar element
JavaScript
mit
AitorRodriguez990/documentation-template,AitorRodriguez990/documentation-template
javascript
## Code Before: /* -------------------------------------------------------------------------- Initialize --------------------------------------------------------------------------- */ $(document).ready(function() { /* Syntax Highlighter --------------------------------------------------------------------------- */ SyntaxHighlighter.defaults['toolbar'] = false; SyntaxHighlighter.defaults['gutter'] = false; SyntaxHighlighter.all(); SyntaxHighlighter.highlight(); }); /* -------------------------------------------------------------------------- Follow sidebar --------------------------------------------------------------------------- */ $(function() { var $sidebar = $(".sidebar"), $window = $(window), $start = $sidebar.offset().top - 98; $window.scroll(function() { if ($window.scrollTop() > $start) { $sidebar.addClass("sidebar-scrolled"); } else { $sidebar.removeClass("sidebar-scrolled"); } }); }); /* -------------------------------------------------------------------------- Smooth scrolling and add style on click section --------------------------------------------------------------------------- */ /* https://css-tricks.com/snippets/jquery/smooth-scrolling/ */ $(function() { $('.sidebar-menu-element a').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $('.sidebar-menu-element a').removeClass('is-active'); $(this).addClass('is-active'); $('html,body').animate({ scrollTop: target.offset().top }, 700); return false; } } }); }); ## Instruction: Comment code to add class on click sidebar element ## Code After: /* -------------------------------------------------------------------------- Initialize --------------------------------------------------------------------------- */ $(document).ready(function() { /* Syntax Highlighter --------------------------------------------------------------------------- */ SyntaxHighlighter.defaults['toolbar'] = false; SyntaxHighlighter.defaults['gutter'] = false; SyntaxHighlighter.all(); SyntaxHighlighter.highlight(); }); /* -------------------------------------------------------------------------- Follow sidebar --------------------------------------------------------------------------- */ $(function() { var $sidebar = $(".sidebar"), $window = $(window), $start = $sidebar.offset().top - 98; $window.scroll(function() { if ($window.scrollTop() > $start) { $sidebar.addClass("sidebar-scrolled"); } else { $sidebar.removeClass("sidebar-scrolled"); } }); }); /* -------------------------------------------------------------------------- Smooth scrolling and add style on click section --------------------------------------------------------------------------- */ /* https://css-tricks.com/snippets/jquery/smooth-scrolling/ */ $(function() { $('.sidebar-menu-element a').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { // Add class on click sidebar element /*$('.sidebar-menu-element a').removeClass('is-active'); $(this).addClass('is-active');*/ $('html,body').animate({ scrollTop: target.offset().top }, 700); return false; } } }); });
e53d56bb5164d985abd43aa3d71930fdeeaded44
schema/CodeError.schema.yaml
schema/CodeError.schema.yaml
title: CodeError '@id': stencila:CodeError extends: Entity role: secondary status: unstable category: code description: An error that occured when parsing, compiling or executing some Code. properties: errorType: '@id': stencila:errorType description: The type of error. type: string message: '@id': stencila:errorMessage description: The error message or brief description of the error. type: string trace: '@id': stencila:trace description: Stack trace leading up to the error. type: string required: - message
title: CodeError '@id': stencila:CodeError extends: Entity role: tertiary status: unstable category: code description: An error that occurred when parsing, compiling or executing a Code node. properties: errorType: '@id': stencila:errorType description: The type of error e.g. "SyntaxError", "ZeroDivisionError". $comment: | Many languages have the concept of alternative types of errors. For example, Python has various [classes of exceptions](https://docs.python.org/3/tutorial/errors.html). This property is intended to be used for storing these type names as additional information that maybe useful to the user attempting to resolve the error. type: string errorMessage: '@id': stencila:errorMessage aliases: - message description: The error message or brief description of the error. type: string stackTrace: '@id': stencila:stackTrace aliases: - trace description: Stack trace leading up to the error. type: string required: - message
Modify prop names; errorType comment
fix(CodeError): Modify prop names; errorType comment The property names `message` and `trace` have a higher chance of clashing with e.g. schema.org in the future. Also `errorMessage` is more consistent with `errorType`.
YAML
apache-2.0
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
yaml
## Code Before: title: CodeError '@id': stencila:CodeError extends: Entity role: secondary status: unstable category: code description: An error that occured when parsing, compiling or executing some Code. properties: errorType: '@id': stencila:errorType description: The type of error. type: string message: '@id': stencila:errorMessage description: The error message or brief description of the error. type: string trace: '@id': stencila:trace description: Stack trace leading up to the error. type: string required: - message ## Instruction: fix(CodeError): Modify prop names; errorType comment The property names `message` and `trace` have a higher chance of clashing with e.g. schema.org in the future. Also `errorMessage` is more consistent with `errorType`. ## Code After: title: CodeError '@id': stencila:CodeError extends: Entity role: tertiary status: unstable category: code description: An error that occurred when parsing, compiling or executing a Code node. properties: errorType: '@id': stencila:errorType description: The type of error e.g. "SyntaxError", "ZeroDivisionError". $comment: | Many languages have the concept of alternative types of errors. For example, Python has various [classes of exceptions](https://docs.python.org/3/tutorial/errors.html). This property is intended to be used for storing these type names as additional information that maybe useful to the user attempting to resolve the error. type: string errorMessage: '@id': stencila:errorMessage aliases: - message description: The error message or brief description of the error. type: string stackTrace: '@id': stencila:stackTrace aliases: - trace description: Stack trace leading up to the error. type: string required: - message
1431abf38074bd0de1e097a55f67f5b44b9c741a
Resources/config/routing.yml
Resources/config/routing.yml
canal_tp_meth_homepage: pattern: / defaults: { _controller: CanalTPMethBundle:Default:index } canal_tp_meth_menu: pattern: /navigation/{current_route} defaults: { _controller: CanalTPMethBundle:Default:navigation, current_route: null } canal_tp_meth_stop_point_list: pattern: /coverage/{coverage_id}/network/{network_id}/line/{line_id}/route/{route_id}/list defaults: { _controller: CanalTPMethBundle:StopPoint:list } canal_tp_meth_line_choose_layout: pattern: /coverage/{coverage_id}/network/{network_id}/line/{line_id}/choose_layout/route/{route_id} defaults: { _controller: CanalTPMethBundle:Line:chooseLayout } canal_tp_meth_line_edit_layout: pattern: /line/{line_id}/edit_layout defaults: { _controller: CanalTPMethBundle:Line:editLayout }
canal_tp_meth_homepage: pattern: / defaults: { _controller: CanalTPMethBundle:Default:index } canal_tp_meth_menu: pattern: /navigation/{current_route} defaults: { _controller: CanalTPMethBundle:Default:navigation, current_route: null } canal_tp_meth_stop_point_list: pattern: /coverage/{coverage_id}/network/{network_id}/line/{line_id}/route/{route_id}/list defaults: { _controller: CanalTPMethBundle:StopPoint:list } canal_tp_meth_line_choose_layout: pattern: /coverage/{coverage_id}/network/{network_id}/line/{line_id}/choose_layout/route/{route_id} defaults: { _controller: CanalTPMethBundle:Line:chooseLayout } canal_tp_meth_line_edit_layout: pattern: /line/{line_id}/edit_layout defaults: { _controller: CanalTPMethBundle:Line:editLayout } canal_tp_meth_block_get_form: pattern: /get_form/{block_type} defaults: { _controller: CanalTPMethBundle:Block:getForm, block_type: null } options: expose: true
Add option to expose routes to javascript
Add option to expose routes to javascript
YAML
agpl-3.0
CanalTP/MttBundle,CanalTP/MttBundle,dvdn/MttBundle,datanel/MttBundle,Tisseo/MttBundle,datanel/MttBundle,datanel/MttBundle,dvdn/MttBundle,Tisseo/MttBundle,dvdn/MttBundle,CanalTP/MttBundle,Tisseo/MttBundle
yaml
## Code Before: canal_tp_meth_homepage: pattern: / defaults: { _controller: CanalTPMethBundle:Default:index } canal_tp_meth_menu: pattern: /navigation/{current_route} defaults: { _controller: CanalTPMethBundle:Default:navigation, current_route: null } canal_tp_meth_stop_point_list: pattern: /coverage/{coverage_id}/network/{network_id}/line/{line_id}/route/{route_id}/list defaults: { _controller: CanalTPMethBundle:StopPoint:list } canal_tp_meth_line_choose_layout: pattern: /coverage/{coverage_id}/network/{network_id}/line/{line_id}/choose_layout/route/{route_id} defaults: { _controller: CanalTPMethBundle:Line:chooseLayout } canal_tp_meth_line_edit_layout: pattern: /line/{line_id}/edit_layout defaults: { _controller: CanalTPMethBundle:Line:editLayout } ## Instruction: Add option to expose routes to javascript ## Code After: canal_tp_meth_homepage: pattern: / defaults: { _controller: CanalTPMethBundle:Default:index } canal_tp_meth_menu: pattern: /navigation/{current_route} defaults: { _controller: CanalTPMethBundle:Default:navigation, current_route: null } canal_tp_meth_stop_point_list: pattern: /coverage/{coverage_id}/network/{network_id}/line/{line_id}/route/{route_id}/list defaults: { _controller: CanalTPMethBundle:StopPoint:list } canal_tp_meth_line_choose_layout: pattern: /coverage/{coverage_id}/network/{network_id}/line/{line_id}/choose_layout/route/{route_id} defaults: { _controller: CanalTPMethBundle:Line:chooseLayout } canal_tp_meth_line_edit_layout: pattern: /line/{line_id}/edit_layout defaults: { _controller: CanalTPMethBundle:Line:editLayout } canal_tp_meth_block_get_form: pattern: /get_form/{block_type} defaults: { _controller: CanalTPMethBundle:Block:getForm, block_type: null } options: expose: true
c08d065c5397afd0509450925fed8e80798e7f19
_drafts/2016-11-30-vim-clojure.md
_drafts/2016-11-30-vim-clojure.md
--- title: A Clojure + Vim setup tags: [clojure, programming, vim, plugin] --- Those in Emacs land need not worry about excellent Lisp and REPL support. Here in Vim land, the ground is less certain. There have been a myriad of attempts to provide paredit-like editing and slime-like evaluating to the modular editors in Vim land. Here's a contemporary look at providing the expected slurpage, barfage, evaluation, and more. http://blog.venanti.us/clojure-vim/
--- title: A Clojure + Vim setup tags: [clojure, programming, vim, plugin] --- Those in Emacs land need not worry about excellent Lisp and REPL support. Here in Vim land, the ground is less certain. There have been a myriad of attempts to provide paredit-like editing and slime-like evaluating to the modular editors in Vim land. Here's a contemporary look at providing the expected slurpage, barfage, evaluation, and more. http://blog.venanti.us/clojure-vim/ http://usevim.com/2015/02/25/clojure/
Add another reference to quote
Add another reference to quote
Markdown
mit
jeaye/jeaye.github.io,jeaye/jeaye.github.io
markdown
## Code Before: --- title: A Clojure + Vim setup tags: [clojure, programming, vim, plugin] --- Those in Emacs land need not worry about excellent Lisp and REPL support. Here in Vim land, the ground is less certain. There have been a myriad of attempts to provide paredit-like editing and slime-like evaluating to the modular editors in Vim land. Here's a contemporary look at providing the expected slurpage, barfage, evaluation, and more. http://blog.venanti.us/clojure-vim/ ## Instruction: Add another reference to quote ## Code After: --- title: A Clojure + Vim setup tags: [clojure, programming, vim, plugin] --- Those in Emacs land need not worry about excellent Lisp and REPL support. Here in Vim land, the ground is less certain. There have been a myriad of attempts to provide paredit-like editing and slime-like evaluating to the modular editors in Vim land. Here's a contemporary look at providing the expected slurpage, barfage, evaluation, and more. http://blog.venanti.us/clojure-vim/ http://usevim.com/2015/02/25/clojure/
055bd0f5f9c711e28cc7c0bf1dc6c0bcc8b205f8
client/src/components/footer/index.js
client/src/components/footer/index.js
import BottomNavigation from '@material-ui/core/BottomNavigation'; import BottomNavigationAction from '@material-ui/core/BottomNavigationAction'; import React, { Component } from 'react'; import './index.css' import kitwareLogo from './Kitware_Full_Logo.png'; import strobeLogo from './strobe.png'; import berkeleyLogo from './berkeley.jpg'; const style = { height: '5rem' } export default class Footer extends Component { render = () => { return ( <BottomNavigation style={style}> <BottomNavigationAction icon={<img className='bottom-logo' src={kitwareLogo} alt="Kitware" />} onClick={() => this.select(0)} href="http://www.kitware.com" target="_blank" /> <BottomNavigationAction icon={<img className='bottom-logo' src={strobeLogo} alt="STROBE" />} onClick={() => this.select(0)} href="http://strobe.colorado.edu/" target="_blank" /> <BottomNavigationAction icon={<img className='bottom-logo' src={berkeleyLogo} alt="Berkeley Lab" />} onClick={() => this.select(0)} href="http://www.lbl.gov/" target="_blank" /> </BottomNavigation> ); } }
import BottomNavigation from '@material-ui/core/BottomNavigation'; import BottomNavigationAction from '@material-ui/core/BottomNavigationAction'; import React, { Component } from 'react'; import './index.css' import uclaLogo from './ucla.png'; import kitwareLogo from './Kitware_Full_Logo.png'; import strobeLogo from './strobe.png'; import berkeleyLogo from './berkeley.jpg'; const style = { height: '5rem' } export default class Footer extends Component { render = () => { return ( <BottomNavigation style={style}> <BottomNavigationAction icon={<img className='bottom-logo' src={uclaLogo} alt="UCLA" />} onClick={() => this.select(0)} href="http://www.ucla.edu/" target="_blank" /> <BottomNavigationAction icon={<img className='bottom-logo' src={kitwareLogo} alt="Kitware" />} onClick={() => this.select(0)} href="http://www.kitware.com" target="_blank" /> <BottomNavigationAction icon={<img className='bottom-logo' src={strobeLogo} alt="STROBE" />} onClick={() => this.select(0)} href="http://strobe.colorado.edu/" target="_blank" /> <BottomNavigationAction icon={<img className='bottom-logo' src={berkeleyLogo} alt="Berkeley Lab" />} onClick={() => this.select(0)} href="http://www.lbl.gov/" target="_blank" /> </BottomNavigation> ); } }
Add the UCLA icon back
Add the UCLA icon back
JavaScript
bsd-3-clause
OpenChemistry/materialsdatabank,OpenChemistry/materialsdatabank,OpenChemistry/materialsdatabank,OpenChemistry/materialsdatabank
javascript
## Code Before: import BottomNavigation from '@material-ui/core/BottomNavigation'; import BottomNavigationAction from '@material-ui/core/BottomNavigationAction'; import React, { Component } from 'react'; import './index.css' import kitwareLogo from './Kitware_Full_Logo.png'; import strobeLogo from './strobe.png'; import berkeleyLogo from './berkeley.jpg'; const style = { height: '5rem' } export default class Footer extends Component { render = () => { return ( <BottomNavigation style={style}> <BottomNavigationAction icon={<img className='bottom-logo' src={kitwareLogo} alt="Kitware" />} onClick={() => this.select(0)} href="http://www.kitware.com" target="_blank" /> <BottomNavigationAction icon={<img className='bottom-logo' src={strobeLogo} alt="STROBE" />} onClick={() => this.select(0)} href="http://strobe.colorado.edu/" target="_blank" /> <BottomNavigationAction icon={<img className='bottom-logo' src={berkeleyLogo} alt="Berkeley Lab" />} onClick={() => this.select(0)} href="http://www.lbl.gov/" target="_blank" /> </BottomNavigation> ); } } ## Instruction: Add the UCLA icon back ## Code After: import BottomNavigation from '@material-ui/core/BottomNavigation'; import BottomNavigationAction from '@material-ui/core/BottomNavigationAction'; import React, { Component } from 'react'; import './index.css' import uclaLogo from './ucla.png'; import kitwareLogo from './Kitware_Full_Logo.png'; import strobeLogo from './strobe.png'; import berkeleyLogo from './berkeley.jpg'; const style = { height: '5rem' } export default class Footer extends Component { render = () => { return ( <BottomNavigation style={style}> <BottomNavigationAction icon={<img className='bottom-logo' src={uclaLogo} alt="UCLA" />} onClick={() => this.select(0)} href="http://www.ucla.edu/" target="_blank" /> <BottomNavigationAction icon={<img className='bottom-logo' src={kitwareLogo} alt="Kitware" />} onClick={() => this.select(0)} href="http://www.kitware.com" target="_blank" /> <BottomNavigationAction icon={<img className='bottom-logo' src={strobeLogo} alt="STROBE" />} onClick={() => this.select(0)} href="http://strobe.colorado.edu/" target="_blank" /> <BottomNavigationAction icon={<img className='bottom-logo' src={berkeleyLogo} alt="Berkeley Lab" />} onClick={() => this.select(0)} href="http://www.lbl.gov/" target="_blank" /> </BottomNavigation> ); } }
aac5ea6d37d606ecb9a7378f183146eb80b0cba9
usr.bin/ftp/Makefile
usr.bin/ftp/Makefile
LUKEMFTP= ${.CURDIR}/../../contrib/lukemftp .PATH: ${LUKEMFTP}/src PROG= ftp SRCS= cmds.c cmdtab.c complete.c domacro.c fetch.c ftp.c main.c ruserpass.c \ util.c CFLAGS+=-I${.CURDIR} -I${LUKEMFTP} LDADD+= -ledit -ltermcap -lutil DPADD+= ${LIBEDIT} ${LIBTERMCAP} ${LIBUTIL} LINKS= ${BINDIR}/ftp ${BINDIR}/pftp \ ${BINDIR}/ftp ${BINDIR}/gate-ftp MLINKS= ftp.1 pftp.1 \ ftp.1 gate-ftp.1 .include <bsd.prog.mk>
LUKEMFTP= ${.CURDIR}/../../contrib/lukemftp .PATH: ${LUKEMFTP}/src PROG= ftp SRCS= cmds.c cmdtab.c complete.c domacro.c fetch.c ftp.c main.c progressbar.c \ ruserpass.c util.c CFLAGS+=-I${.CURDIR} -I${LUKEMFTP} LDADD+= -ledit -ltermcap -lutil DPADD+= ${LIBEDIT} ${LIBTERMCAP} ${LIBUTIL} LINKS= ${BINDIR}/ftp ${BINDIR}/pftp \ ${BINDIR}/ftp ${BINDIR}/gate-ftp MLINKS= ftp.1 pftp.1 \ ftp.1 gate-ftp.1 .include <bsd.prog.mk>
Update for latest lukemftp import.
Update for latest lukemftp import.
unknown
bsd-3-clause
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
unknown
## Code Before: LUKEMFTP= ${.CURDIR}/../../contrib/lukemftp .PATH: ${LUKEMFTP}/src PROG= ftp SRCS= cmds.c cmdtab.c complete.c domacro.c fetch.c ftp.c main.c ruserpass.c \ util.c CFLAGS+=-I${.CURDIR} -I${LUKEMFTP} LDADD+= -ledit -ltermcap -lutil DPADD+= ${LIBEDIT} ${LIBTERMCAP} ${LIBUTIL} LINKS= ${BINDIR}/ftp ${BINDIR}/pftp \ ${BINDIR}/ftp ${BINDIR}/gate-ftp MLINKS= ftp.1 pftp.1 \ ftp.1 gate-ftp.1 .include <bsd.prog.mk> ## Instruction: Update for latest lukemftp import. ## Code After: LUKEMFTP= ${.CURDIR}/../../contrib/lukemftp .PATH: ${LUKEMFTP}/src PROG= ftp SRCS= cmds.c cmdtab.c complete.c domacro.c fetch.c ftp.c main.c progressbar.c \ ruserpass.c util.c CFLAGS+=-I${.CURDIR} -I${LUKEMFTP} LDADD+= -ledit -ltermcap -lutil DPADD+= ${LIBEDIT} ${LIBTERMCAP} ${LIBUTIL} LINKS= ${BINDIR}/ftp ${BINDIR}/pftp \ ${BINDIR}/ftp ${BINDIR}/gate-ftp MLINKS= ftp.1 pftp.1 \ ftp.1 gate-ftp.1 .include <bsd.prog.mk>
6a17d505ce4fbeb761e6dd1656027c8602ea93d3
lib/dataproviders/README.md
lib/dataproviders/README.md
ocUsageCharts Adapters ====================== DataProviders are responsible for the retrieving and storing of the data for that specific chart type Implement DataProviderInterface to actually add multiple charts.
ocUsageCharts DataProviders =========================== DataProviders are responsible for the retrieving and storing of the data for that specific chart type Implement DataProviderInterface to actually add multiple charts.
Rename from adapter to provider in readme
Rename from adapter to provider in readme
Markdown
mit
arnovr/ocusagecharts,arnovr/ocusagecharts,arnovr/ocusagecharts
markdown
## Code Before: ocUsageCharts Adapters ====================== DataProviders are responsible for the retrieving and storing of the data for that specific chart type Implement DataProviderInterface to actually add multiple charts. ## Instruction: Rename from adapter to provider in readme ## Code After: ocUsageCharts DataProviders =========================== DataProviders are responsible for the retrieving and storing of the data for that specific chart type Implement DataProviderInterface to actually add multiple charts.
0b6b90a91390551fffebacea55e9cccb4fa3d277
capmetrics_etl/cli.py
capmetrics_etl/cli.py
import click from . import etl @click.command() @click.option('--test', default=False) def run(test): if not test: etl.run_excel_etl() else: click.echo('Capmetrics test.') # Call run function when module deployed as script. This is approach is common # within the python community if __name__ == '__main__': run()
import click import configparser import json from . import etl def parse_capmetrics_configuration(config_parser): worksheet_names = json.loads(config_parser['capmetrics']['worksheet_names']) capmetrics_configuration = { 'timezone': 'America/Chicago', 'engine': config_parser['capmetrics']['engine'], 'worksheet_names': worksheet_names } if 'timezone' in config_parser['capmetrics']: capmetrics_configuration['timezone'] = config_parser['capmetrics']['timezone'] return capmetrics_configuration @click.command() @click.argument('config') @click.option('--test', default=False) def run(config, test): if not test: config_parser = configparser.ConfigParser() # make parsing of config file names case-sensitive config_parser.optionxform = str config_parser.read(config) capmetrics_configuration = parse_capmetrics_configuration(config_parser) etl.run_excel_etl(capmetrics_configuration) else: click.echo('Capmetrics CLI test.') # Call run function when module deployed as script. This is approach is common # within the python community if __name__ == '__main__': run()
Add configuration parsing to CLI.
Add configuration parsing to CLI.
Python
mit
jga/capmetrics-etl,jga/capmetrics-etl
python
## Code Before: import click from . import etl @click.command() @click.option('--test', default=False) def run(test): if not test: etl.run_excel_etl() else: click.echo('Capmetrics test.') # Call run function when module deployed as script. This is approach is common # within the python community if __name__ == '__main__': run() ## Instruction: Add configuration parsing to CLI. ## Code After: import click import configparser import json from . import etl def parse_capmetrics_configuration(config_parser): worksheet_names = json.loads(config_parser['capmetrics']['worksheet_names']) capmetrics_configuration = { 'timezone': 'America/Chicago', 'engine': config_parser['capmetrics']['engine'], 'worksheet_names': worksheet_names } if 'timezone' in config_parser['capmetrics']: capmetrics_configuration['timezone'] = config_parser['capmetrics']['timezone'] return capmetrics_configuration @click.command() @click.argument('config') @click.option('--test', default=False) def run(config, test): if not test: config_parser = configparser.ConfigParser() # make parsing of config file names case-sensitive config_parser.optionxform = str config_parser.read(config) capmetrics_configuration = parse_capmetrics_configuration(config_parser) etl.run_excel_etl(capmetrics_configuration) else: click.echo('Capmetrics CLI test.') # Call run function when module deployed as script. This is approach is common # within the python community if __name__ == '__main__': run()
e893682e6a4b60e080ecc20e66d1aee7e800385f
feed_healthcheck.rb
feed_healthcheck.rb
require 'typhoeus' require 'feedjira' require 'yaml' CONFIG = YAML.load_file('config.yml') feeds = [] one_year_ago = Time.now - (365*24*60*60) errors = {} hydra = Typhoeus::Hydra.new CONFIG['feeds'].each do |feed| request = Typhoeus::Request.new(feed, followlocation: true) request.on_complete do |response| if response.success? && response.body.length > 0 begin latest = Feedjira.parse(response.body).entries.sort_by(&:published).last if !latest puts "No posts found: #{feed}" errors[feed][:length] = true elsif latest.published < one_year_ago puts "Not updated in over 1 year: #{feed}" errors[feed][:recent] = true end rescue Feedjira::NoParserAvailable puts "Failed parsing feed: #{feed}" errors[feed][:parse] = true end else puts "Failed to load feed: #{feed}" errors[feed][:fetch] = true end end hydra.queue(request) end hydra.run pp errors
require 'typhoeus' require 'feedjira' require 'yaml' CONFIG = YAML.load_file('config.yml') feeds = [] one_year_ago = Time.now - (365*24*60*60) errors = {} hydra = Typhoeus::Hydra.new CONFIG['feeds'].each do |feed| request = Typhoeus::Request.new(feed, followlocation: true) request.on_complete do |response| if response.success? && response.body.length > 0 begin latest = Feedjira.parse(response.body).entries.sort_by(&:published).last if !latest puts "No posts found: #{feed}" errors[feed] = :length elsif latest.published < one_year_ago puts "Not updated in over 1 year: #{feed}" errors[feed] = :recent end rescue Feedjira::NoParserAvailable puts "Failed parsing feed: #{feed}" errors[feed] = :parse end else puts "Failed to load feed: #{feed}" errors[feed] = :fetch end end hydra.queue(request) end hydra.run pp errors exit(1) if errors.size > 0
Update feed healthcheck script to hopefully work with Github Actions
Update feed healthcheck script to hopefully work with Github Actions
Ruby
mit
codatory/indyhackers.org-planet
ruby
## Code Before: require 'typhoeus' require 'feedjira' require 'yaml' CONFIG = YAML.load_file('config.yml') feeds = [] one_year_ago = Time.now - (365*24*60*60) errors = {} hydra = Typhoeus::Hydra.new CONFIG['feeds'].each do |feed| request = Typhoeus::Request.new(feed, followlocation: true) request.on_complete do |response| if response.success? && response.body.length > 0 begin latest = Feedjira.parse(response.body).entries.sort_by(&:published).last if !latest puts "No posts found: #{feed}" errors[feed][:length] = true elsif latest.published < one_year_ago puts "Not updated in over 1 year: #{feed}" errors[feed][:recent] = true end rescue Feedjira::NoParserAvailable puts "Failed parsing feed: #{feed}" errors[feed][:parse] = true end else puts "Failed to load feed: #{feed}" errors[feed][:fetch] = true end end hydra.queue(request) end hydra.run pp errors ## Instruction: Update feed healthcheck script to hopefully work with Github Actions ## Code After: require 'typhoeus' require 'feedjira' require 'yaml' CONFIG = YAML.load_file('config.yml') feeds = [] one_year_ago = Time.now - (365*24*60*60) errors = {} hydra = Typhoeus::Hydra.new CONFIG['feeds'].each do |feed| request = Typhoeus::Request.new(feed, followlocation: true) request.on_complete do |response| if response.success? && response.body.length > 0 begin latest = Feedjira.parse(response.body).entries.sort_by(&:published).last if !latest puts "No posts found: #{feed}" errors[feed] = :length elsif latest.published < one_year_ago puts "Not updated in over 1 year: #{feed}" errors[feed] = :recent end rescue Feedjira::NoParserAvailable puts "Failed parsing feed: #{feed}" errors[feed] = :parse end else puts "Failed to load feed: #{feed}" errors[feed] = :fetch end end hydra.queue(request) end hydra.run pp errors exit(1) if errors.size > 0
bd50ef20cf470e7d0c26bb1419e2f854f885a811
config/schedule.rb
config/schedule.rb
env 'PATH', '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' every :day, at: '9:00am' do runner 'Assignment.send_reminders!' end
env 'PATH', '/opt/ruby/bin:/usr/sbin:/usr/bin:/sbin:/bin' every :day, at: '9:00am' do runner 'Assignment.send_reminders!' end
Change the path to where ruby will be
Change the path to where ruby will be
Ruby
mit
umts/screaming-dinosaur,umts/garrulous-garbanzo,umts/screaming-dinosaur,umts/garrulous-garbanzo,umts/screaming-dinosaur,umts/garrulous-garbanzo
ruby
## Code Before: env 'PATH', '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' every :day, at: '9:00am' do runner 'Assignment.send_reminders!' end ## Instruction: Change the path to where ruby will be ## Code After: env 'PATH', '/opt/ruby/bin:/usr/sbin:/usr/bin:/sbin:/bin' every :day, at: '9:00am' do runner 'Assignment.send_reminders!' end
e8fda18ae32095a99bc0f6b9ef52ac6280575e5b
index.html
index.html
--- layout: default title: Android Design Patterns --- {% for post in paginator.posts %} <article class="snippet"> <div class="side"> <div class="date-posted"> <span class="date-block">{{ post.date | date: "%b %d %Y" }}</span> </div> </div> <div class="body"> <header> <h2 class="post-title no-border"><a href="{{ post.url }}">{{ post.title }}</a></h2> </header> {{ post.excerpt }} <footer> <a rel="full-article" href="{{ post.url }}">Continue reading&#8230;</a> </footer> </div> <div class="clearfix"></div> </article> {% endfor %} {% if paginator.previous_page or paginator.next_page %} <div class="mod-pagination"> {% if paginator.previous_page %} {% if paginator.previous_page == 1 %} <div class="prev"><a href="/">&#171; Newer</a></div> {% else %} <div class="prev"><a href="/page{{ paginator.previous_page }}">&#171; Newer</a></div> {% endif %} {% endif %} {% if paginator.next_page %} <div class="next"><a href="/page{{ paginator.next_page }}">Older &#187;</a></div> {% endif %} </div> {% endif %}
--- layout: default title: Android Design Patterns --- {% for post in paginator.posts %} <article class="snippet"> <div class="side"> <div class="date-posted"> <span class="date-block">{{ post.date | date: "%b %-d %Y" }}</span> </div> </div> <div class="body"> <header><h2 class="post-title no-border"><a href="{{ post.url }}">{{ post.title }}</a></h2></header> {{ post.excerpt }} <footer><a rel="full-article" href="{{ post.url }}">Continue reading&#8230;</a></footer> </div> <div class="clearfix"></div> </article> {% endfor %} {% if paginator.previous_page or paginator.next_page %} <div class="mod-pagination"> {% if paginator.previous_page %} {% if paginator.previous_page == 1 %} <div class="prev"><a href="/">&#171; Newer</a></div> {% else %} <div class="prev"><a href="/page{{ paginator.previous_page }}">&#171; Newer</a></div> {% endif %} {% endif %} {% if paginator.next_page %} <div class="next"><a href="/page{{ paginator.next_page }}">Older &#187;</a></div> {% endif %} </div> {% endif %}
Remove trailing zeros from timestamp
Remove trailing zeros from timestamp
HTML
mit
alexjlockwood/alexjlockwood.github.io,alexjlockwood/alexjlockwood.github.io,alexjlockwood/AndroidDesignPatterns,alexjlockwood/alexjlockwood.github.io,alexjlockwood/AndroidDesignPatterns,alexjlockwood/AndroidDesignPatterns
html
## Code Before: --- layout: default title: Android Design Patterns --- {% for post in paginator.posts %} <article class="snippet"> <div class="side"> <div class="date-posted"> <span class="date-block">{{ post.date | date: "%b %d %Y" }}</span> </div> </div> <div class="body"> <header> <h2 class="post-title no-border"><a href="{{ post.url }}">{{ post.title }}</a></h2> </header> {{ post.excerpt }} <footer> <a rel="full-article" href="{{ post.url }}">Continue reading&#8230;</a> </footer> </div> <div class="clearfix"></div> </article> {% endfor %} {% if paginator.previous_page or paginator.next_page %} <div class="mod-pagination"> {% if paginator.previous_page %} {% if paginator.previous_page == 1 %} <div class="prev"><a href="/">&#171; Newer</a></div> {% else %} <div class="prev"><a href="/page{{ paginator.previous_page }}">&#171; Newer</a></div> {% endif %} {% endif %} {% if paginator.next_page %} <div class="next"><a href="/page{{ paginator.next_page }}">Older &#187;</a></div> {% endif %} </div> {% endif %} ## Instruction: Remove trailing zeros from timestamp ## Code After: --- layout: default title: Android Design Patterns --- {% for post in paginator.posts %} <article class="snippet"> <div class="side"> <div class="date-posted"> <span class="date-block">{{ post.date | date: "%b %-d %Y" }}</span> </div> </div> <div class="body"> <header><h2 class="post-title no-border"><a href="{{ post.url }}">{{ post.title }}</a></h2></header> {{ post.excerpt }} <footer><a rel="full-article" href="{{ post.url }}">Continue reading&#8230;</a></footer> </div> <div class="clearfix"></div> </article> {% endfor %} {% if paginator.previous_page or paginator.next_page %} <div class="mod-pagination"> {% if paginator.previous_page %} {% if paginator.previous_page == 1 %} <div class="prev"><a href="/">&#171; Newer</a></div> {% else %} <div class="prev"><a href="/page{{ paginator.previous_page }}">&#171; Newer</a></div> {% endif %} {% endif %} {% if paginator.next_page %} <div class="next"><a href="/page{{ paginator.next_page }}">Older &#187;</a></div> {% endif %} </div> {% endif %}
14ef66d00f92e7df03871c98b6cadbdc5fb5d245
lib/tasks/organisations.rake
lib/tasks/organisations.rake
require 'organisation_importer' namespace :organisations do desc "Imports organisations from the data.gov.uk hierarchy" task :import => :environment do response = Net::HTTP.get_response("data.gov.uk","/api/action/group_tree?type=organization") json = JSON.parse(response.body) results = json['result'] puts "#{results.length} top level organisations found" OrganisationImporter.populate(results) end end
require 'organisation_importer' namespace :organisations do #work around that heroku schedule only allows up to daily task :weekly_import => :environment do if Time.now.monday? Rake::Task["organisations:import"].execute end end desc "Imports organisations from the data.gov.uk hierarchy" task :import => :environment do response = Net::HTTP.get_response("data.gov.uk","/api/action/group_tree?type=organization") json = JSON.parse(response.body) results = json['result'] puts "#{results.length} top level organisations found" OrganisationImporter.populate(results) end end
Add rake task to be called by heroku scheduler
Add rake task to be called by heroku scheduler
Ruby
mit
theodi/ODMAT,theodi/ODMAT,theodi/ODMAT,theodi/pathway,theodi/pathway,theodi/pathway
ruby
## Code Before: require 'organisation_importer' namespace :organisations do desc "Imports organisations from the data.gov.uk hierarchy" task :import => :environment do response = Net::HTTP.get_response("data.gov.uk","/api/action/group_tree?type=organization") json = JSON.parse(response.body) results = json['result'] puts "#{results.length} top level organisations found" OrganisationImporter.populate(results) end end ## Instruction: Add rake task to be called by heroku scheduler ## Code After: require 'organisation_importer' namespace :organisations do #work around that heroku schedule only allows up to daily task :weekly_import => :environment do if Time.now.monday? Rake::Task["organisations:import"].execute end end desc "Imports organisations from the data.gov.uk hierarchy" task :import => :environment do response = Net::HTTP.get_response("data.gov.uk","/api/action/group_tree?type=organization") json = JSON.parse(response.body) results = json['result'] puts "#{results.length} top level organisations found" OrganisationImporter.populate(results) end end
5540e2125813f51b33f59c008bebfdf24d7e4c75
composer.json
composer.json
{ "name": "pdepend/pdepend", "description": "Official version of pdepend to be handled with Composer", "license": "BSD-3-Clause", "require": { "php": ">=5.3.7" }, "require": { "symfony/dependency-injection": ">=2.4", "symfony/filesystem": ">=2.4", "symfony/config": ">=2.4" }, "require-dev": { "phpunit/phpunit": "4.*@stable", "squizlabs/php_codesniffer": "@stable" }, "bin": ["src/bin/pdepend"], "autoload": { "psr-0": {"PDepend\\": "src/main/php/"} } }
{ "name": "pdepend/pdepend", "description": "Official version of pdepend to be handled with Composer", "license": "BSD-3-Clause", "require": { "php": ">=5.3.7" }, "require": { "symfony/dependency-injection": "^2.3.0", "symfony/filesystem": "^2.3.0", "symfony/config": "^2.3.0" }, "require-dev": { "phpunit/phpunit": "4.*@stable", "squizlabs/php_codesniffer": "@stable" }, "bin": ["src/bin/pdepend"], "autoload": { "psr-0": {"PDepend\\": "src/main/php/"} } }
Allow to use any Symfony 2.x release equal or greater 2.3
Allow to use any Symfony 2.x release equal or greater 2.3
JSON
bsd-3-clause
pdepend/pdepend,pdepend/pdepend
json
## Code Before: { "name": "pdepend/pdepend", "description": "Official version of pdepend to be handled with Composer", "license": "BSD-3-Clause", "require": { "php": ">=5.3.7" }, "require": { "symfony/dependency-injection": ">=2.4", "symfony/filesystem": ">=2.4", "symfony/config": ">=2.4" }, "require-dev": { "phpunit/phpunit": "4.*@stable", "squizlabs/php_codesniffer": "@stable" }, "bin": ["src/bin/pdepend"], "autoload": { "psr-0": {"PDepend\\": "src/main/php/"} } } ## Instruction: Allow to use any Symfony 2.x release equal or greater 2.3 ## Code After: { "name": "pdepend/pdepend", "description": "Official version of pdepend to be handled with Composer", "license": "BSD-3-Clause", "require": { "php": ">=5.3.7" }, "require": { "symfony/dependency-injection": "^2.3.0", "symfony/filesystem": "^2.3.0", "symfony/config": "^2.3.0" }, "require-dev": { "phpunit/phpunit": "4.*@stable", "squizlabs/php_codesniffer": "@stable" }, "bin": ["src/bin/pdepend"], "autoload": { "psr-0": {"PDepend\\": "src/main/php/"} } }
fd86da77fdc2ca916f6064dc24d6ef5f34c5bce6
video/README.md
video/README.md
Using Docker to use the latest FFMPEG https://hub.docker.com/r/jrottenberg/ffmpeg/ * Convert input video file (input.MTS) in the **current directory** into an MP4 * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.MTS /temp/output.MP4` * [Rotate MP4 video without re-encoding](https://stackoverflow.com/questions/25031557/rotate-mp4-videos-without-re-encoding) * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.MP4 -c copy -metadata:s:v:0 rotate=90 /temp/output.MP4` * Delay begining (_-ss_) and/or trim end (_-t_). [Time syntax reference](http://ffmpeg.org/ffmpeg-utils.html#time-duration-syntax) * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.MTS -ss 8 -t 7 /temp/output.MP4` * [More ffmpeg command details](../public/galleries/demo/media/videos/README.md)
[Using Docker to use the latest FFMPEG](https://hub.docker.com/r/jrottenberg/ffmpeg/) * Convert input video file (input.MTS) in the **current directory** into an MP4 * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.MTS /temp/output.MP4` * [Rotate MP4 video without re-encoding](https://stackoverflow.com/questions/25031557/rotate-mp4-videos-without-re-encoding) * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.MP4 -c copy -metadata:s:v:0 rotate=90 /temp/output.MP4` * Delay beginning (_-ss_) and/or trim duration (_-t_). [Time syntax reference](http://ffmpeg.org/ffmpeg-utils.html#time-duration-syntax) * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.MTS -ss 8 -t 7 /temp/output.MP4` * [Convert AVI to MP4 - generate H.264 content for Apple software/devices](https://apple.stackexchange.com/questions/166553/why-wont-video-from-ffmpeg-show-in-quicktime-imovie-or-quick-preview#166554) use `-pix_fmt yuv420p` * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.avi -pix_fmt yuv420p /temp/output.MP4` * [More ffmpeg command details](../public/galleries/demo/media/videos/README.md)
Document converting AVI to MP4
fix(Video): Document converting AVI to MP4
Markdown
mit
danactive/history,danactive/history
markdown
## Code Before: Using Docker to use the latest FFMPEG https://hub.docker.com/r/jrottenberg/ffmpeg/ * Convert input video file (input.MTS) in the **current directory** into an MP4 * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.MTS /temp/output.MP4` * [Rotate MP4 video without re-encoding](https://stackoverflow.com/questions/25031557/rotate-mp4-videos-without-re-encoding) * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.MP4 -c copy -metadata:s:v:0 rotate=90 /temp/output.MP4` * Delay begining (_-ss_) and/or trim end (_-t_). [Time syntax reference](http://ffmpeg.org/ffmpeg-utils.html#time-duration-syntax) * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.MTS -ss 8 -t 7 /temp/output.MP4` * [More ffmpeg command details](../public/galleries/demo/media/videos/README.md) ## Instruction: fix(Video): Document converting AVI to MP4 ## Code After: [Using Docker to use the latest FFMPEG](https://hub.docker.com/r/jrottenberg/ffmpeg/) * Convert input video file (input.MTS) in the **current directory** into an MP4 * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.MTS /temp/output.MP4` * [Rotate MP4 video without re-encoding](https://stackoverflow.com/questions/25031557/rotate-mp4-videos-without-re-encoding) * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.MP4 -c copy -metadata:s:v:0 rotate=90 /temp/output.MP4` * Delay beginning (_-ss_) and/or trim duration (_-t_). [Time syntax reference](http://ffmpeg.org/ffmpeg-utils.html#time-duration-syntax) * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.MTS -ss 8 -t 7 /temp/output.MP4` * [Convert AVI to MP4 - generate H.264 content for Apple software/devices](https://apple.stackexchange.com/questions/166553/why-wont-video-from-ffmpeg-show-in-quicktime-imovie-or-quick-preview#166554) use `-pix_fmt yuv420p` * `docker run -v $PWD:/temp/ jrottenberg/ffmpeg -stats -i /temp/input.avi -pix_fmt yuv420p /temp/output.MP4` * [More ffmpeg command details](../public/galleries/demo/media/videos/README.md)
c6ce1f31e4e45e36995e45a16b5155fa6a119a55
spec/models/attachment_spec.rb
spec/models/attachment_spec.rb
require 'spec_helper' describe Attachment do it { should belong_to(:object) } it { should validate_presence_of(:file) } it "show the avaible codes" do Attachment.codes.should eq([['Brief-Template', 'Prawn::LetterDocument']]) end context "when new" do specify { should_not be_valid } its(:to_s) { should == "" } end context "when file is nil" do before(:all) { subject.file = nil } its(:to_s) { should == "" } end context "when properly initialized" do subject { Factory.build :attachment } its(:to_s) { should =~ /MyString/ } end end
require 'spec_helper' describe Attachment do it { should belong_to(:object) } it { should validate_presence_of(:file) } context "when new" do specify { should_not be_valid } its(:to_s) { should == "" } end context "when file is nil" do before(:all) { subject.file = nil } its(:to_s) { should == "" } end context "when properly initialized" do subject { Factory.build :attachment } its(:to_s) { should =~ /MyString/ } end end
Remove a test on an old test for the attribute code.
Remove a test on an old test for the attribute code.
Ruby
agpl-3.0
wtag/bookyt,silvermind/bookyt,huerlisi/bookyt,silvermind/bookyt,silvermind/bookyt,wtag/bookyt,hauledev/bookyt,gaapt/bookyt,xuewenfei/bookyt,silvermind/bookyt,hauledev/bookyt,xuewenfei/bookyt,huerlisi/bookyt,gaapt/bookyt,wtag/bookyt,hauledev/bookyt,huerlisi/bookyt,hauledev/bookyt,gaapt/bookyt,gaapt/bookyt,xuewenfei/bookyt
ruby
## Code Before: require 'spec_helper' describe Attachment do it { should belong_to(:object) } it { should validate_presence_of(:file) } it "show the avaible codes" do Attachment.codes.should eq([['Brief-Template', 'Prawn::LetterDocument']]) end context "when new" do specify { should_not be_valid } its(:to_s) { should == "" } end context "when file is nil" do before(:all) { subject.file = nil } its(:to_s) { should == "" } end context "when properly initialized" do subject { Factory.build :attachment } its(:to_s) { should =~ /MyString/ } end end ## Instruction: Remove a test on an old test for the attribute code. ## Code After: require 'spec_helper' describe Attachment do it { should belong_to(:object) } it { should validate_presence_of(:file) } context "when new" do specify { should_not be_valid } its(:to_s) { should == "" } end context "when file is nil" do before(:all) { subject.file = nil } its(:to_s) { should == "" } end context "when properly initialized" do subject { Factory.build :attachment } its(:to_s) { should =~ /MyString/ } end end
00751402578705896ca4bba6640d47f6ae3121b4
README.md
README.md
bemlinter [![Build Status](https://travis-ci.org/M6Web/bemlinter.svg?branch=master)](https://travis-ci.org/M6Web/bemlinter) ====== A tool belt to lint bem components: * [bemlinter](https://github.com/M6Web/bemlinter/blob/master/packages/bemlinter/README.md): A cli tool to lint bem component isolation in CSS / SCSS files * [gulp-bemlinter](https://github.com/M6Web/bemlinter/blob/master/packages/gulp-bemlinter/README.md): A gulp plugin to lint bem component isolation in CSS / SCSS files To developers ------ It's a monorepo managed with [lerna](https://lernajs.io/). To install the project: ```sh npm install -g [email protected] lerna bootstrap ``` To launch tests: ```sh lerna run test ```
bemlinter [![Build Status](https://travis-ci.org/M6Web/bemlinter.svg?branch=master)](https://travis-ci.org/M6Web/bemlinter) ====== A tool belt to lint bem components: * [bemlinter](https://github.com/M6Web/bemlinter/blob/master/packages/bemlinter/README.md): A cli tool to lint bem component isolation in CSS / SCSS files * [gulp-bemlinter](https://github.com/M6Web/bemlinter/blob/master/packages/gulp-bemlinter/README.md): A gulp plugin to lint bem component isolation in CSS / SCSS files To developers ------ It's a monorepo managed with [lerna](https://lernajs.io/). To install the project: ```sh npm install -g [email protected] lerna bootstrap ``` To launch tests: ```sh lerna run test ``` To update jest snapshots: ```sh lerna run test -- -- -u ```
Add documentation to update jest snapshot for all packages
Add documentation to update jest snapshot for all packages
Markdown
mit
M6Web/bemlinter
markdown
## Code Before: bemlinter [![Build Status](https://travis-ci.org/M6Web/bemlinter.svg?branch=master)](https://travis-ci.org/M6Web/bemlinter) ====== A tool belt to lint bem components: * [bemlinter](https://github.com/M6Web/bemlinter/blob/master/packages/bemlinter/README.md): A cli tool to lint bem component isolation in CSS / SCSS files * [gulp-bemlinter](https://github.com/M6Web/bemlinter/blob/master/packages/gulp-bemlinter/README.md): A gulp plugin to lint bem component isolation in CSS / SCSS files To developers ------ It's a monorepo managed with [lerna](https://lernajs.io/). To install the project: ```sh npm install -g [email protected] lerna bootstrap ``` To launch tests: ```sh lerna run test ``` ## Instruction: Add documentation to update jest snapshot for all packages ## Code After: bemlinter [![Build Status](https://travis-ci.org/M6Web/bemlinter.svg?branch=master)](https://travis-ci.org/M6Web/bemlinter) ====== A tool belt to lint bem components: * [bemlinter](https://github.com/M6Web/bemlinter/blob/master/packages/bemlinter/README.md): A cli tool to lint bem component isolation in CSS / SCSS files * [gulp-bemlinter](https://github.com/M6Web/bemlinter/blob/master/packages/gulp-bemlinter/README.md): A gulp plugin to lint bem component isolation in CSS / SCSS files To developers ------ It's a monorepo managed with [lerna](https://lernajs.io/). To install the project: ```sh npm install -g [email protected] lerna bootstrap ``` To launch tests: ```sh lerna run test ``` To update jest snapshots: ```sh lerna run test -- -- -u ```
70a5c72d3f69c6b0962e74c7be6b83dff6da42cf
lib/ropian/meter/raritan.rb
lib/ropian/meter/raritan.rb
module Ropian module Meter class Raritan def inspect "#<#{self.class} #{@manager.host}@#{@manager.community}>" end def initialize(ip_addr, community, version = :SNMPv2c) @manager = SNMP::Manager.new(:Host => ip_addr, :Community => community, :Version => version) end # Amps in total on whole bar def total_amps oid = SNMP::ObjectId.new("1.3.6.1.4.1.13742.4.1.4.2.1.3.1") amps_for_oid(oid) end # Amps per outlet def outlet_amps(outlet_index) oid = SNMP::ObjectId.new("1.3.6.1.4.1.13742.4.1.2.2.1.4") + outlet_index amps_for_oid(oid) end protected def amps_for_oid(oid) @manager.get(oid).varbind_list.first.value.to_f / 1000 end end end end
module Ropian module Meter class Raritan UnitCurrent = SNMP::ObjectId.new("1.3.6.1.4.1.13742.4.1.4.2.1.3.1") OutletCurrent = SNMP::ObjectId.new("1.3.6.1.4.1.13742.4.1.2.2.1.4") def inspect "#<#{self.class} #{@manager.host}@#{@manager.community}>" end def initialize(ip_addr, community, version = :SNMPv2c) @manager = SNMP::Manager.new(:Host => ip_addr, :Community => community, :Version => version) end def collect # :yields: total_amps, hash_of_outlet_amps results = Hash.new @manager.walk(OutletCurrent) do |r| r.each do |varbind| results[varbind.name.index(OutletCurrent)] = varbind.value.to_f / 1000 end end yield total_amps, results end # Amps in total on whole bar def total_amps amps_for_oid(UnitCurrent) end # Amps per outlet def outlet_amps(outlet_index) amps_for_oid(OutletCurrent + outlet_index) end protected def amps_for_oid(oid) @manager.get(oid).varbind_list.first.value.to_f / 1000 end end end end
Add collection method for gathering all outlet details at once
Add collection method for gathering all outlet details at once
Ruby
mit
m247/ropian
ruby
## Code Before: module Ropian module Meter class Raritan def inspect "#<#{self.class} #{@manager.host}@#{@manager.community}>" end def initialize(ip_addr, community, version = :SNMPv2c) @manager = SNMP::Manager.new(:Host => ip_addr, :Community => community, :Version => version) end # Amps in total on whole bar def total_amps oid = SNMP::ObjectId.new("1.3.6.1.4.1.13742.4.1.4.2.1.3.1") amps_for_oid(oid) end # Amps per outlet def outlet_amps(outlet_index) oid = SNMP::ObjectId.new("1.3.6.1.4.1.13742.4.1.2.2.1.4") + outlet_index amps_for_oid(oid) end protected def amps_for_oid(oid) @manager.get(oid).varbind_list.first.value.to_f / 1000 end end end end ## Instruction: Add collection method for gathering all outlet details at once ## Code After: module Ropian module Meter class Raritan UnitCurrent = SNMP::ObjectId.new("1.3.6.1.4.1.13742.4.1.4.2.1.3.1") OutletCurrent = SNMP::ObjectId.new("1.3.6.1.4.1.13742.4.1.2.2.1.4") def inspect "#<#{self.class} #{@manager.host}@#{@manager.community}>" end def initialize(ip_addr, community, version = :SNMPv2c) @manager = SNMP::Manager.new(:Host => ip_addr, :Community => community, :Version => version) end def collect # :yields: total_amps, hash_of_outlet_amps results = Hash.new @manager.walk(OutletCurrent) do |r| r.each do |varbind| results[varbind.name.index(OutletCurrent)] = varbind.value.to_f / 1000 end end yield total_amps, results end # Amps in total on whole bar def total_amps amps_for_oid(UnitCurrent) end # Amps per outlet def outlet_amps(outlet_index) amps_for_oid(OutletCurrent + outlet_index) end protected def amps_for_oid(oid) @manager.get(oid).varbind_list.first.value.to_f / 1000 end end end end
b344bdded07d4427f95c2ec2c691e1f95c6742a9
README.md
README.md
Create a static web site for your music using the metadata in your mp3 files.
Create a static web site for your music using the metadata in your mp3 files. Usage: copy all your mp3 files into the songfiles directory, then run the script. Look for an autobandsite-build directory in the parent directory. Copy these files to your web site.
Put some info in the realm.
Put some info in the realm.
Markdown
mit
chrooke/autobandsite
markdown
## Code Before: Create a static web site for your music using the metadata in your mp3 files. ## Instruction: Put some info in the realm. ## Code After: Create a static web site for your music using the metadata in your mp3 files. Usage: copy all your mp3 files into the songfiles directory, then run the script. Look for an autobandsite-build directory in the parent directory. Copy these files to your web site.
d528147c03178a2832fe3fa8a3d0621748b28e07
zsh/bindkeys.zsh
zsh/bindkeys.zsh
bindkey -e # Autoload some shit autoload -Uz up-line-or-beginning-search autoload -Uz down-line-or-beginning-search zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search # Search in history with up and down arrows bindkey '\eOA' up-line-or-beginning-search bindkey '\e[A' up-line-or-beginning-search bindkey '\eOB' down-line-or-beginning-search bindkey '\e[B' down-line-or-beginning-search # Navigate back and forward in words and lines bindkey "[D" backward-word bindkey "[C" forward-word bindkey "[A" beginning-of-line bindkey "[B" end-of-line # Kill the whole line with CTRL + U bindkey "^U" kill-whole-line
bindkey -e # Autoload some shit autoload -Uz up-line-or-beginning-search autoload -Uz down-line-or-beginning-search zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search # Search in history with up and down arrows bindkey '\eOA' up-line-or-beginning-search bindkey '\e[A' up-line-or-beginning-search bindkey '\eOB' down-line-or-beginning-search bindkey '\e[B' down-line-or-beginning-search # Navigate back and forward in words and lines bindkey "[D" backward-word bindkey "[C" forward-word bindkey "[A" beginning-of-line bindkey "[B" end-of-line bindkey "^?" backward-delete-char # Kill the whole line with CTRL + U bindkey "^U" kill-whole-line
Make backspace delete characters in zsh
Make backspace delete characters in zsh
Shell
mit
Ash-Crow/dotfiles
shell
## Code Before: bindkey -e # Autoload some shit autoload -Uz up-line-or-beginning-search autoload -Uz down-line-or-beginning-search zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search # Search in history with up and down arrows bindkey '\eOA' up-line-or-beginning-search bindkey '\e[A' up-line-or-beginning-search bindkey '\eOB' down-line-or-beginning-search bindkey '\e[B' down-line-or-beginning-search # Navigate back and forward in words and lines bindkey "[D" backward-word bindkey "[C" forward-word bindkey "[A" beginning-of-line bindkey "[B" end-of-line # Kill the whole line with CTRL + U bindkey "^U" kill-whole-line ## Instruction: Make backspace delete characters in zsh ## Code After: bindkey -e # Autoload some shit autoload -Uz up-line-or-beginning-search autoload -Uz down-line-or-beginning-search zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search # Search in history with up and down arrows bindkey '\eOA' up-line-or-beginning-search bindkey '\e[A' up-line-or-beginning-search bindkey '\eOB' down-line-or-beginning-search bindkey '\e[B' down-line-or-beginning-search # Navigate back and forward in words and lines bindkey "[D" backward-word bindkey "[C" forward-word bindkey "[A" beginning-of-line bindkey "[B" end-of-line bindkey "^?" backward-delete-char # Kill the whole line with CTRL + U bindkey "^U" kill-whole-line