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
|
---|---|---|---|---|---|---|---|---|---|---|---|
5c2fd18cfadc8fc42ebec6853df2161f8ec623a2
|
lib/blazer/adapters/mongodb_adapter.rb
|
lib/blazer/adapters/mongodb_adapter.rb
|
module Blazer
module Adapters
class MongodbAdapter < BaseAdapter
def run_statement(statement, comment)
columns = []
rows = []
error = nil
begin
documents = db.command({:$eval => "#{statement.strip}.toArray()"}).documents.first["retval"]
columns = documents.flat_map { |r| r.keys }.uniq
rows = documents.map { |r| columns.map { |c| r[c] } }
rescue => e
error = e.message
end
[columns, rows, error]
end
def tables
db.collection_names
end
def preview_statement
"db.{table}.find().limit(10)"
end
protected
def client
@client ||= Mongo::Client.new(settings["url"], connect_timeout: 1, socket_timeout: 1, server_selection_timeout: 1)
end
def db
@db ||= client.database
end
end
end
end
|
module Blazer
module Adapters
class MongodbAdapter < BaseAdapter
def run_statement(statement, comment)
columns = []
rows = []
error = nil
begin
documents = db.command({:$eval => "#{statement.strip}.toArray()", nolock: true}).documents.first["retval"]
columns = documents.flat_map { |r| r.keys }.uniq
rows = documents.map { |r| columns.map { |c| r[c] } }
rescue => e
error = e.message
end
[columns, rows, error]
end
def tables
db.collection_names
end
def preview_statement
"db.{table}.find().limit(10)"
end
protected
def client
@client ||= Mongo::Client.new(settings["url"], connect_timeout: 1, socket_timeout: 1, server_selection_timeout: 1)
end
def db
@db ||= client.database
end
end
end
end
|
Use nolock: true for Mongo
|
Use nolock: true for Mongo [skip ci]
|
Ruby
|
mit
|
ankane/blazer,ankane/blazer,ankane/blazer
|
ruby
|
## Code Before:
module Blazer
module Adapters
class MongodbAdapter < BaseAdapter
def run_statement(statement, comment)
columns = []
rows = []
error = nil
begin
documents = db.command({:$eval => "#{statement.strip}.toArray()"}).documents.first["retval"]
columns = documents.flat_map { |r| r.keys }.uniq
rows = documents.map { |r| columns.map { |c| r[c] } }
rescue => e
error = e.message
end
[columns, rows, error]
end
def tables
db.collection_names
end
def preview_statement
"db.{table}.find().limit(10)"
end
protected
def client
@client ||= Mongo::Client.new(settings["url"], connect_timeout: 1, socket_timeout: 1, server_selection_timeout: 1)
end
def db
@db ||= client.database
end
end
end
end
## Instruction:
Use nolock: true for Mongo [skip ci]
## Code After:
module Blazer
module Adapters
class MongodbAdapter < BaseAdapter
def run_statement(statement, comment)
columns = []
rows = []
error = nil
begin
documents = db.command({:$eval => "#{statement.strip}.toArray()", nolock: true}).documents.first["retval"]
columns = documents.flat_map { |r| r.keys }.uniq
rows = documents.map { |r| columns.map { |c| r[c] } }
rescue => e
error = e.message
end
[columns, rows, error]
end
def tables
db.collection_names
end
def preview_statement
"db.{table}.find().limit(10)"
end
protected
def client
@client ||= Mongo::Client.new(settings["url"], connect_timeout: 1, socket_timeout: 1, server_selection_timeout: 1)
end
def db
@db ||= client.database
end
end
end
end
|
78661466bf46f26d088e49e7e873f2a250b3fb41
|
lib/rspec/parameterized/table_syntax.rb
|
lib/rspec/parameterized/table_syntax.rb
|
require 'binding_of_caller'
require 'rspec/parameterized/table'
module RSpec
module Parameterized
module TableSyntaxImplement
def |(other)
where_binding = binding.of_caller(1) # get where block binding
caller_instance = eval("self", where_binding) # get caller instance (ExampleGroup)
if caller_instance.instance_variable_defined?(:@__parameter_table)
table = caller_instance.instance_variable_get(:@__parameter_table)
else
table = RSpec::Parameterized::Table.new
caller_instance.instance_variable_set(:@__parameter_table, table)
end
row = Table::Row.new(self)
table.add_row(row)
row.add_param(other)
table
end
end
module TableSyntax
refine Object do
include TableSyntaxImplement
end
refine Fixnum do
include TableSyntaxImplement
end
refine Bignum do
include TableSyntaxImplement
end
refine Array do
include TableSyntaxImplement
end
refine NilClass do
include TableSyntaxImplement
end
refine TrueClass do
include TableSyntaxImplement
end
refine FalseClass do
include TableSyntaxImplement
end
end
end
end
|
require 'binding_of_caller'
require 'rspec/parameterized/table'
module RSpec
module Parameterized
module TableSyntaxImplement
def |(other)
where_binding = binding.of_caller(1) # get where block binding
caller_instance = eval("self", where_binding) # get caller instance (ExampleGroup)
if caller_instance.instance_variable_defined?(:@__parameter_table)
table = caller_instance.instance_variable_get(:@__parameter_table)
else
table = RSpec::Parameterized::Table.new
caller_instance.instance_variable_set(:@__parameter_table, table)
end
row = Table::Row.new(self)
table.add_row(row)
row.add_param(other)
table
end
end
module TableSyntax
refine Object do
include TableSyntaxImplement
end
if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create("2.4.0")
refine Integer do
include TableSyntaxImplement
end
else
refine Fixnum do
include TableSyntaxImplement
end
refine Bignum do
include TableSyntaxImplement
end
end
refine Array do
include TableSyntaxImplement
end
refine NilClass do
include TableSyntaxImplement
end
refine TrueClass do
include TableSyntaxImplement
end
refine FalseClass do
include TableSyntaxImplement
end
end
end
end
|
Fix deprecation warning on ruby 2.4.0
|
Fix deprecation warning on ruby 2.4.0
lib/rspec/parameterized/table_syntax.rb:30: warning: constant ::Fixnum is deprecated
lib/rspec/parameterized/table_syntax.rb:34: warning: constant ::Bignum is deprecated
|
Ruby
|
mit
|
sue445/rspec-parameterized,tomykaira/rspec-parameterized
|
ruby
|
## Code Before:
require 'binding_of_caller'
require 'rspec/parameterized/table'
module RSpec
module Parameterized
module TableSyntaxImplement
def |(other)
where_binding = binding.of_caller(1) # get where block binding
caller_instance = eval("self", where_binding) # get caller instance (ExampleGroup)
if caller_instance.instance_variable_defined?(:@__parameter_table)
table = caller_instance.instance_variable_get(:@__parameter_table)
else
table = RSpec::Parameterized::Table.new
caller_instance.instance_variable_set(:@__parameter_table, table)
end
row = Table::Row.new(self)
table.add_row(row)
row.add_param(other)
table
end
end
module TableSyntax
refine Object do
include TableSyntaxImplement
end
refine Fixnum do
include TableSyntaxImplement
end
refine Bignum do
include TableSyntaxImplement
end
refine Array do
include TableSyntaxImplement
end
refine NilClass do
include TableSyntaxImplement
end
refine TrueClass do
include TableSyntaxImplement
end
refine FalseClass do
include TableSyntaxImplement
end
end
end
end
## Instruction:
Fix deprecation warning on ruby 2.4.0
lib/rspec/parameterized/table_syntax.rb:30: warning: constant ::Fixnum is deprecated
lib/rspec/parameterized/table_syntax.rb:34: warning: constant ::Bignum is deprecated
## Code After:
require 'binding_of_caller'
require 'rspec/parameterized/table'
module RSpec
module Parameterized
module TableSyntaxImplement
def |(other)
where_binding = binding.of_caller(1) # get where block binding
caller_instance = eval("self", where_binding) # get caller instance (ExampleGroup)
if caller_instance.instance_variable_defined?(:@__parameter_table)
table = caller_instance.instance_variable_get(:@__parameter_table)
else
table = RSpec::Parameterized::Table.new
caller_instance.instance_variable_set(:@__parameter_table, table)
end
row = Table::Row.new(self)
table.add_row(row)
row.add_param(other)
table
end
end
module TableSyntax
refine Object do
include TableSyntaxImplement
end
if Gem::Version.create(RUBY_VERSION) >= Gem::Version.create("2.4.0")
refine Integer do
include TableSyntaxImplement
end
else
refine Fixnum do
include TableSyntaxImplement
end
refine Bignum do
include TableSyntaxImplement
end
end
refine Array do
include TableSyntaxImplement
end
refine NilClass do
include TableSyntaxImplement
end
refine TrueClass do
include TableSyntaxImplement
end
refine FalseClass do
include TableSyntaxImplement
end
end
end
end
|
89cb346ab57c33805368a2fb5249f1e4694a60df
|
core/src/main/scala/stainless/ast/Graphs.scala
|
core/src/main/scala/stainless/ast/Graphs.scala
|
/* Copyright 2009-2018 EPFL, Lausanne */
package stainless
package ast
import inox.utils.Graphs._
trait CallGraph extends inox.ast.CallGraph {
protected val trees: Trees
import trees._
protected class FunctionCollector extends super.FunctionCollector with TreeTraverser {
override def traverse(pat: Pattern): Unit = pat match {
case UnapplyPattern(_, _, id, _, _) =>
register(id)
super.traverse(pat)
case _ =>
super.traverse(pat)
}
override def traverse(flag: Flag): Unit = flag match {
case IsUnapply(isEmpty, get) =>
register(isEmpty)
register(get)
super.traverse(flag)
case _ =>
super.traverse(flag)
}
}
override protected def getFunctionCollector = new FunctionCollector
}
trait DependencyGraph extends inox.ast.DependencyGraph with CallGraph {
import trees._
protected class SortCollector extends super.SortCollector with TreeTraverser {
override def traverse(pat: Pattern): Unit = pat match {
case ADTPattern(_, id, _, _) =>
register(id)
super.traverse(pat)
case _ =>
super.traverse(pat)
}
}
override protected def getSortCollector = new SortCollector
}
|
/* Copyright 2009-2018 EPFL, Lausanne */
package stainless
package ast
import inox.utils.Graphs._
trait CallGraph extends inox.ast.CallGraph {
protected val trees: Trees
import trees._
protected class FunctionCollector extends super.FunctionCollector with TreeTraverser {
override def traverse(pat: Pattern): Unit = pat match {
case UnapplyPattern(_, _, id, _, _) =>
register(id)
super.traverse(pat)
case _ =>
super.traverse(pat)
}
override def traverse(flag: Flag): Unit = flag match {
case IsUnapply(isEmpty, get) =>
register(isEmpty)
register(get)
super.traverse(flag)
case _ =>
super.traverse(flag)
}
}
override protected def getFunctionCollector = new FunctionCollector
}
trait DependencyGraph extends inox.ast.DependencyGraph with CallGraph {
import trees._
protected class SortCollector extends super.SortCollector with TreeTraverser {
override def traverse(pat: Pattern): Unit = pat match {
case ADTPattern(_, id, _, _) =>
register(symbols.getConstructor(id).sort)
super.traverse(pat)
case _ =>
super.traverse(pat)
}
}
override protected def getSortCollector = new SortCollector
}
|
Fix error in dependency graph computation
|
Fix error in dependency graph computation
|
Scala
|
apache-2.0
|
epfl-lara/stainless,epfl-lara/stainless,epfl-lara/stainless,epfl-lara/stainless
|
scala
|
## Code Before:
/* Copyright 2009-2018 EPFL, Lausanne */
package stainless
package ast
import inox.utils.Graphs._
trait CallGraph extends inox.ast.CallGraph {
protected val trees: Trees
import trees._
protected class FunctionCollector extends super.FunctionCollector with TreeTraverser {
override def traverse(pat: Pattern): Unit = pat match {
case UnapplyPattern(_, _, id, _, _) =>
register(id)
super.traverse(pat)
case _ =>
super.traverse(pat)
}
override def traverse(flag: Flag): Unit = flag match {
case IsUnapply(isEmpty, get) =>
register(isEmpty)
register(get)
super.traverse(flag)
case _ =>
super.traverse(flag)
}
}
override protected def getFunctionCollector = new FunctionCollector
}
trait DependencyGraph extends inox.ast.DependencyGraph with CallGraph {
import trees._
protected class SortCollector extends super.SortCollector with TreeTraverser {
override def traverse(pat: Pattern): Unit = pat match {
case ADTPattern(_, id, _, _) =>
register(id)
super.traverse(pat)
case _ =>
super.traverse(pat)
}
}
override protected def getSortCollector = new SortCollector
}
## Instruction:
Fix error in dependency graph computation
## Code After:
/* Copyright 2009-2018 EPFL, Lausanne */
package stainless
package ast
import inox.utils.Graphs._
trait CallGraph extends inox.ast.CallGraph {
protected val trees: Trees
import trees._
protected class FunctionCollector extends super.FunctionCollector with TreeTraverser {
override def traverse(pat: Pattern): Unit = pat match {
case UnapplyPattern(_, _, id, _, _) =>
register(id)
super.traverse(pat)
case _ =>
super.traverse(pat)
}
override def traverse(flag: Flag): Unit = flag match {
case IsUnapply(isEmpty, get) =>
register(isEmpty)
register(get)
super.traverse(flag)
case _ =>
super.traverse(flag)
}
}
override protected def getFunctionCollector = new FunctionCollector
}
trait DependencyGraph extends inox.ast.DependencyGraph with CallGraph {
import trees._
protected class SortCollector extends super.SortCollector with TreeTraverser {
override def traverse(pat: Pattern): Unit = pat match {
case ADTPattern(_, id, _, _) =>
register(symbols.getConstructor(id).sort)
super.traverse(pat)
case _ =>
super.traverse(pat)
}
}
override protected def getSortCollector = new SortCollector
}
|
3fafc9998cf4f9259d19bb425362cca6350b12bd
|
webpack/babel-loader-rule.js
|
webpack/babel-loader-rule.js
|
const path = require('path');
// These modules are already transpiled and should be excluded
const folioScopeBlacklist = [
'react-githubish-mentions',
].map(segment => path.join('@folio', segment));
// We want to transpile files inside node_modules/@folio or outside
// any node_modules directory. And definitely not files in
// node_modules outside the @folio namespace even if some parent
// directory happens to be in @folio.
//
// fn is the path after all symlinks are resolved so we need to be
// wary of all the edge cases yarn link will find for us.
function babelLoaderTest(fileName) {
const nodeModIdx = fileName.lastIndexOf('node_modules');
if (fileName.endsWith('.js')
&& (nodeModIdx === -1 || fileName.lastIndexOf('@folio') > nodeModIdx)
&& (folioScopeBlacklist.findIndex(ignore => fileName.includes(ignore)) === -1)) {
return true;
}
return false;
}
module.exports = {
test: babelLoaderTest,
loader: 'babel-loader',
options: {
cacheDirectory: true,
presets: [
[require.resolve('babel-preset-env'), { modules: false }],
[require.resolve('babel-preset-stage-2')],
[require.resolve('babel-preset-react')],
],
plugins: [
[require.resolve('babel-plugin-transform-decorators-legacy')],
[require.resolve('react-hot-loader/babel')]
]
},
};
|
const path = require('path');
// These modules are already transpiled and should be excluded
const folioScopeBlacklist = [
'react-githubish-mentions',
'react-big-calendar',
].map(segment => path.join('@folio', segment));
// We want to transpile files inside node_modules/@folio or outside
// any node_modules directory. And definitely not files in
// node_modules outside the @folio namespace even if some parent
// directory happens to be in @folio.
//
// fn is the path after all symlinks are resolved so we need to be
// wary of all the edge cases yarn link will find for us.
function babelLoaderTest(fileName) {
const nodeModIdx = fileName.lastIndexOf('node_modules');
if (fileName.endsWith('.js')
&& (nodeModIdx === -1 || fileName.lastIndexOf('@folio') > nodeModIdx)
&& (folioScopeBlacklist.findIndex(ignore => fileName.includes(ignore)) === -1)) {
return true;
}
return false;
}
module.exports = {
test: babelLoaderTest,
loader: 'babel-loader',
options: {
cacheDirectory: true,
presets: [
[require.resolve('babel-preset-env'), { modules: false }],
[require.resolve('babel-preset-stage-2')],
[require.resolve('babel-preset-react')],
],
plugins: [
[require.resolve('babel-plugin-transform-decorators-legacy')],
[require.resolve('react-hot-loader/babel')]
]
},
};
|
Exclude folio/react-big-calendar from being transpiled during a platform build
|
Exclude folio/react-big-calendar from being transpiled during a platform build
|
JavaScript
|
apache-2.0
|
folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core
|
javascript
|
## Code Before:
const path = require('path');
// These modules are already transpiled and should be excluded
const folioScopeBlacklist = [
'react-githubish-mentions',
].map(segment => path.join('@folio', segment));
// We want to transpile files inside node_modules/@folio or outside
// any node_modules directory. And definitely not files in
// node_modules outside the @folio namespace even if some parent
// directory happens to be in @folio.
//
// fn is the path after all symlinks are resolved so we need to be
// wary of all the edge cases yarn link will find for us.
function babelLoaderTest(fileName) {
const nodeModIdx = fileName.lastIndexOf('node_modules');
if (fileName.endsWith('.js')
&& (nodeModIdx === -1 || fileName.lastIndexOf('@folio') > nodeModIdx)
&& (folioScopeBlacklist.findIndex(ignore => fileName.includes(ignore)) === -1)) {
return true;
}
return false;
}
module.exports = {
test: babelLoaderTest,
loader: 'babel-loader',
options: {
cacheDirectory: true,
presets: [
[require.resolve('babel-preset-env'), { modules: false }],
[require.resolve('babel-preset-stage-2')],
[require.resolve('babel-preset-react')],
],
plugins: [
[require.resolve('babel-plugin-transform-decorators-legacy')],
[require.resolve('react-hot-loader/babel')]
]
},
};
## Instruction:
Exclude folio/react-big-calendar from being transpiled during a platform build
## Code After:
const path = require('path');
// These modules are already transpiled and should be excluded
const folioScopeBlacklist = [
'react-githubish-mentions',
'react-big-calendar',
].map(segment => path.join('@folio', segment));
// We want to transpile files inside node_modules/@folio or outside
// any node_modules directory. And definitely not files in
// node_modules outside the @folio namespace even if some parent
// directory happens to be in @folio.
//
// fn is the path after all symlinks are resolved so we need to be
// wary of all the edge cases yarn link will find for us.
function babelLoaderTest(fileName) {
const nodeModIdx = fileName.lastIndexOf('node_modules');
if (fileName.endsWith('.js')
&& (nodeModIdx === -1 || fileName.lastIndexOf('@folio') > nodeModIdx)
&& (folioScopeBlacklist.findIndex(ignore => fileName.includes(ignore)) === -1)) {
return true;
}
return false;
}
module.exports = {
test: babelLoaderTest,
loader: 'babel-loader',
options: {
cacheDirectory: true,
presets: [
[require.resolve('babel-preset-env'), { modules: false }],
[require.resolve('babel-preset-stage-2')],
[require.resolve('babel-preset-react')],
],
plugins: [
[require.resolve('babel-plugin-transform-decorators-legacy')],
[require.resolve('react-hot-loader/babel')]
]
},
};
|
cdc77f145659b9dae096f004f68438a45c4fe093
|
src/edu/usc/glidein/service/state/SiteEventCode.java
|
src/edu/usc/glidein/service/state/SiteEventCode.java
|
package edu.usc.glidein.service.state;
public enum SiteEventCode implements EventCode
{
SUBMIT, /* User requested submit */
INSTALL_SUCCESS, /* Condor installed successfully */
INSTALL_FAILED, /* Condor installation failed */
REMOVE, /* User requested remove */
UNINSTALL_SUCCESS, /* Condor uninstalled successfully */
UNINSTALL_FAILED, /* Condor uninstall failed */
GLIDEIN_FINISHED, /* Glidein finished */
DELETE /* User requested delete */
}
|
package edu.usc.glidein.service.state;
public enum SiteEventCode implements EventCode
{
SUBMIT, /* User requested submit */
INSTALL_SUCCESS, /* Condor installed successfully */
INSTALL_FAILED, /* Condor installation failed */
REMOVE, /* User requested remove */
UNINSTALL_SUCCESS, /* Condor uninstalled successfully */
UNINSTALL_FAILED, /* Condor uninstall failed */
GLIDEIN_DELETED, /* Glidein deleted */
DELETE /* User requested delete */
}
|
Change GLIDEIN_FINISHED to GLIDEIN_DELETED to make it clear when this event occurs
|
Change GLIDEIN_FINISHED to GLIDEIN_DELETED to make it clear when this event occurs
git-svn-id: bdb5f82b9b83a1400e05d69d262344b821646179@1387 e217846f-e12e-0410-a4e5-89ccaea66ff7
|
Java
|
apache-2.0
|
juve/corral,juve/corral,juve/corral
|
java
|
## Code Before:
package edu.usc.glidein.service.state;
public enum SiteEventCode implements EventCode
{
SUBMIT, /* User requested submit */
INSTALL_SUCCESS, /* Condor installed successfully */
INSTALL_FAILED, /* Condor installation failed */
REMOVE, /* User requested remove */
UNINSTALL_SUCCESS, /* Condor uninstalled successfully */
UNINSTALL_FAILED, /* Condor uninstall failed */
GLIDEIN_FINISHED, /* Glidein finished */
DELETE /* User requested delete */
}
## Instruction:
Change GLIDEIN_FINISHED to GLIDEIN_DELETED to make it clear when this event occurs
git-svn-id: bdb5f82b9b83a1400e05d69d262344b821646179@1387 e217846f-e12e-0410-a4e5-89ccaea66ff7
## Code After:
package edu.usc.glidein.service.state;
public enum SiteEventCode implements EventCode
{
SUBMIT, /* User requested submit */
INSTALL_SUCCESS, /* Condor installed successfully */
INSTALL_FAILED, /* Condor installation failed */
REMOVE, /* User requested remove */
UNINSTALL_SUCCESS, /* Condor uninstalled successfully */
UNINSTALL_FAILED, /* Condor uninstall failed */
GLIDEIN_DELETED, /* Glidein deleted */
DELETE /* User requested delete */
}
|
af7385b27ea04747f7e781de09a5ccd66bef3f05
|
to.etc.domui/src/main/java/to/etc/domui/server/FilterConfigParameters.java
|
to.etc.domui/src/main/java/to/etc/domui/server/FilterConfigParameters.java
|
package to.etc.domui.server;
import org.eclipse.jdt.annotation.NonNull;
import javax.servlet.FilterConfig;
import java.io.File;
import java.net.URL;
public class FilterConfigParameters implements ConfigParameters {
@NonNull
private FilterConfig m_fc;
@NonNull
private File m_webFileRoot;
public FilterConfigParameters(@NonNull FilterConfig fc, @NonNull File webFileRoot) {
m_fc = fc;
m_webFileRoot = webFileRoot;
}
@Override
public String getString(@NonNull String name) {
return m_fc.getInitParameter(name);
}
@NonNull
@Override
public File getWebFileRoot() {
return m_webFileRoot;
}
@NonNull
@Override
public URL getResourcePath(@NonNull String path) throws Exception {
URL url = m_fc.getServletContext().getResource(path);
return url;
}
}
|
package to.etc.domui.server;
import org.eclipse.jdt.annotation.NonNull;
import javax.servlet.FilterConfig;
import java.io.File;
import java.net.URL;
public class FilterConfigParameters implements ConfigParameters {
@NonNull
private FilterConfig m_fc;
@NonNull
private File m_webFileRoot;
public FilterConfigParameters(@NonNull FilterConfig fc, @NonNull File webFileRoot) {
m_fc = fc;
m_webFileRoot = webFileRoot;
}
@Override
public String getString(@NonNull String name) {
return m_fc.getInitParameter(name);
}
@NonNull
@Override
public File getWebFileRoot() {
return m_webFileRoot;
}
@NonNull
@Override
public URL getResourcePath(@NonNull String path) throws Exception {
if(path.startsWith("/"))
return m_fc.getServletContext().getResource(path);
return m_fc.getServletContext().getResource("/" + path); // Always nice to have a relative path start with /. Morons.
}
}
|
Make sure the relative path passed to getResource() starts with a /, sigh. Very bad design.
|
Make sure the relative path passed to getResource() starts with a /, sigh. Very bad design.
|
Java
|
lgpl-2.1
|
fjalvingh/domui,fjalvingh/domui,fjalvingh/domui,fjalvingh/domui,fjalvingh/domui,fjalvingh/domui,fjalvingh/domui
|
java
|
## Code Before:
package to.etc.domui.server;
import org.eclipse.jdt.annotation.NonNull;
import javax.servlet.FilterConfig;
import java.io.File;
import java.net.URL;
public class FilterConfigParameters implements ConfigParameters {
@NonNull
private FilterConfig m_fc;
@NonNull
private File m_webFileRoot;
public FilterConfigParameters(@NonNull FilterConfig fc, @NonNull File webFileRoot) {
m_fc = fc;
m_webFileRoot = webFileRoot;
}
@Override
public String getString(@NonNull String name) {
return m_fc.getInitParameter(name);
}
@NonNull
@Override
public File getWebFileRoot() {
return m_webFileRoot;
}
@NonNull
@Override
public URL getResourcePath(@NonNull String path) throws Exception {
URL url = m_fc.getServletContext().getResource(path);
return url;
}
}
## Instruction:
Make sure the relative path passed to getResource() starts with a /, sigh. Very bad design.
## Code After:
package to.etc.domui.server;
import org.eclipse.jdt.annotation.NonNull;
import javax.servlet.FilterConfig;
import java.io.File;
import java.net.URL;
public class FilterConfigParameters implements ConfigParameters {
@NonNull
private FilterConfig m_fc;
@NonNull
private File m_webFileRoot;
public FilterConfigParameters(@NonNull FilterConfig fc, @NonNull File webFileRoot) {
m_fc = fc;
m_webFileRoot = webFileRoot;
}
@Override
public String getString(@NonNull String name) {
return m_fc.getInitParameter(name);
}
@NonNull
@Override
public File getWebFileRoot() {
return m_webFileRoot;
}
@NonNull
@Override
public URL getResourcePath(@NonNull String path) throws Exception {
if(path.startsWith("/"))
return m_fc.getServletContext().getResource(path);
return m_fc.getServletContext().getResource("/" + path); // Always nice to have a relative path start with /. Morons.
}
}
|
5d49629cd1c6e83f3e7559faa5820d01d13e458b
|
SingularityService/src/main/java/com/hubspot/singularity/data/UserManager.java
|
SingularityService/src/main/java/com/hubspot/singularity/data/UserManager.java
|
package com.hubspot.singularity.data;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.utils.ZKPaths;
import com.codahale.metrics.MetricRegistry;
import com.google.common.base.Optional;
import com.google.inject.Inject;
import com.hubspot.singularity.SingularityUserSettings;
import com.hubspot.singularity.config.SingularityConfiguration;
import com.hubspot.singularity.data.transcoders.Transcoder;
public class UserManager extends CuratorManager {
private final Transcoder<SingularityUserSettings> settingsTranscoder;
private static final String USER_ROOT = "/users";
private static final String SETTINGS_ROOT = USER_ROOT + "/settings";
@Inject
public UserManager(CuratorFramework curator, SingularityConfiguration configuration, MetricRegistry metricRegistry,
Transcoder<SingularityUserSettings> settingsTranscoder) {
super(curator, configuration, metricRegistry);
this.settingsTranscoder = settingsTranscoder;
}
private String getUserSettingsPath(String id) {
return ZKPaths.makePath(SETTINGS_ROOT, id);
}
public void deleteUserSettings(String id) {
delete(getUserSettingsPath(id));
}
public Optional<SingularityUserSettings> getUserSettings(String id) {
return getData(getUserSettingsPath(id), settingsTranscoder);
}
public void updateUserSettings(String id, SingularityUserSettings userSettings) {
save(getUserSettingsPath(id), userSettings, settingsTranscoder);
}
}
|
package com.hubspot.singularity.data;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.utils.ZKPaths;
import com.codahale.metrics.MetricRegistry;
import com.google.common.base.Optional;
import com.google.inject.Inject;
import com.hubspot.singularity.SingularityUserSettings;
import com.hubspot.singularity.config.SingularityConfiguration;
import com.hubspot.singularity.data.transcoders.Transcoder;
public class UserManager extends CuratorManager {
private final Transcoder<SingularityUserSettings> settingsTranscoder;
private static final String USER_ROOT = "/users";
private static final String SETTINGS_ROOT = USER_ROOT + "/settings";
@Inject
public UserManager(CuratorFramework curator, SingularityConfiguration configuration, MetricRegistry metricRegistry,
Transcoder<SingularityUserSettings> settingsTranscoder) {
super(curator, configuration, metricRegistry);
this.settingsTranscoder = settingsTranscoder;
}
private String getUserSettingsPath(String id) {
return ZKPaths.makePath(SETTINGS_ROOT, id);
}
public void updateUserSettings(String id, SingularityUserSettings userSettings) {
save(getUserSettingsPath(id), userSettings, settingsTranscoder);
}
public Optional<SingularityUserSettings> getUserSettings(String id) {
return getData(getUserSettingsPath(id), settingsTranscoder);
}
public void deleteUserSettings(String id) {
delete(getUserSettingsPath(id));
}
}
|
Reorder UserSettings ZK methods more sensibly
|
Reorder UserSettings ZK methods more sensibly
|
Java
|
apache-2.0
|
andrhamm/Singularity,HubSpot/Singularity,andrhamm/Singularity,hs-jenkins-bot/Singularity,HubSpot/Singularity,HubSpot/Singularity,hs-jenkins-bot/Singularity,HubSpot/Singularity,andrhamm/Singularity,andrhamm/Singularity,andrhamm/Singularity,HubSpot/Singularity,hs-jenkins-bot/Singularity,hs-jenkins-bot/Singularity,hs-jenkins-bot/Singularity
|
java
|
## Code Before:
package com.hubspot.singularity.data;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.utils.ZKPaths;
import com.codahale.metrics.MetricRegistry;
import com.google.common.base.Optional;
import com.google.inject.Inject;
import com.hubspot.singularity.SingularityUserSettings;
import com.hubspot.singularity.config.SingularityConfiguration;
import com.hubspot.singularity.data.transcoders.Transcoder;
public class UserManager extends CuratorManager {
private final Transcoder<SingularityUserSettings> settingsTranscoder;
private static final String USER_ROOT = "/users";
private static final String SETTINGS_ROOT = USER_ROOT + "/settings";
@Inject
public UserManager(CuratorFramework curator, SingularityConfiguration configuration, MetricRegistry metricRegistry,
Transcoder<SingularityUserSettings> settingsTranscoder) {
super(curator, configuration, metricRegistry);
this.settingsTranscoder = settingsTranscoder;
}
private String getUserSettingsPath(String id) {
return ZKPaths.makePath(SETTINGS_ROOT, id);
}
public void deleteUserSettings(String id) {
delete(getUserSettingsPath(id));
}
public Optional<SingularityUserSettings> getUserSettings(String id) {
return getData(getUserSettingsPath(id), settingsTranscoder);
}
public void updateUserSettings(String id, SingularityUserSettings userSettings) {
save(getUserSettingsPath(id), userSettings, settingsTranscoder);
}
}
## Instruction:
Reorder UserSettings ZK methods more sensibly
## Code After:
package com.hubspot.singularity.data;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.utils.ZKPaths;
import com.codahale.metrics.MetricRegistry;
import com.google.common.base.Optional;
import com.google.inject.Inject;
import com.hubspot.singularity.SingularityUserSettings;
import com.hubspot.singularity.config.SingularityConfiguration;
import com.hubspot.singularity.data.transcoders.Transcoder;
public class UserManager extends CuratorManager {
private final Transcoder<SingularityUserSettings> settingsTranscoder;
private static final String USER_ROOT = "/users";
private static final String SETTINGS_ROOT = USER_ROOT + "/settings";
@Inject
public UserManager(CuratorFramework curator, SingularityConfiguration configuration, MetricRegistry metricRegistry,
Transcoder<SingularityUserSettings> settingsTranscoder) {
super(curator, configuration, metricRegistry);
this.settingsTranscoder = settingsTranscoder;
}
private String getUserSettingsPath(String id) {
return ZKPaths.makePath(SETTINGS_ROOT, id);
}
public void updateUserSettings(String id, SingularityUserSettings userSettings) {
save(getUserSettingsPath(id), userSettings, settingsTranscoder);
}
public Optional<SingularityUserSettings> getUserSettings(String id) {
return getData(getUserSettingsPath(id), settingsTranscoder);
}
public void deleteUserSettings(String id) {
delete(getUserSettingsPath(id));
}
}
|
6ca03dc3d818bd53756551d7079379d15f393f88
|
src/integration-test/groovy/geb/CustomUrlGebReportingSpec.groovy
|
src/integration-test/groovy/geb/CustomUrlGebReportingSpec.groovy
|
package geb
import de.iteratec.osm.util.OsmTestLogin
import geb.pages.de.iteratec.osm.LoginPage
import geb.spock.GebReportingSpec
import grails.plugin.springsecurity.SpringSecurityService
import grails.util.Holders
/**
* Sets the baseUrl for the test browser configured in the OpenSpeedMonitor-config.yml
*/
class CustomUrlGebReportingSpec extends GebReportingSpec implements OsmTestLogin{
SpringSecurityService springSecurityService
def setup(){
String customBaseUrl = Holders.applicationContext.getBean("grailsApplication")?.config?.grails?.de?.iteratec?.osm?.test?.geb?.baseUrl
if(customBaseUrl){
println "Set custom base url: $customBaseUrl"
browser.setBaseUrl(customBaseUrl)
}
}
protected void doLogin() {
to LoginPage
username << configuredUsername
password << configuredPassword
submitButton.click()
}
protected void doLogout() {
go "/logout/index"
}
}
|
package geb
import de.iteratec.osm.util.OsmTestLogin
import geb.pages.de.iteratec.osm.LoginPage
import geb.spock.GebReportingSpec
import grails.buildtestdata.TestDataBuilder
import grails.plugin.springsecurity.SpringSecurityService
import grails.util.Holders
/**
* Sets the baseUrl for the test browser configured in the OpenSpeedMonitor-config.yml
*/
class CustomUrlGebReportingSpec extends GebReportingSpec implements OsmTestLogin, TestDataBuilder {
SpringSecurityService springSecurityService
def setup(){
String customBaseUrl = Holders.applicationContext.getBean("grailsApplication")?.config?.grails?.de?.iteratec?.osm?.test?.geb?.baseUrl
if(customBaseUrl){
println "Set custom base url: $customBaseUrl"
browser.setBaseUrl(customBaseUrl)
}
}
protected void doLogin() {
to LoginPage
username << configuredUsername
password << configuredPassword
submitButton.click()
}
protected void doLogout() {
go "/logout/index"
}
}
|
Add TestDataBuilder trait to geb tests
|
[IT-1681] Add TestDataBuilder trait to geb tests
http://longwa.github.io/build-test-data/index#integration-tests
|
Groovy
|
apache-2.0
|
iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor
|
groovy
|
## Code Before:
package geb
import de.iteratec.osm.util.OsmTestLogin
import geb.pages.de.iteratec.osm.LoginPage
import geb.spock.GebReportingSpec
import grails.plugin.springsecurity.SpringSecurityService
import grails.util.Holders
/**
* Sets the baseUrl for the test browser configured in the OpenSpeedMonitor-config.yml
*/
class CustomUrlGebReportingSpec extends GebReportingSpec implements OsmTestLogin{
SpringSecurityService springSecurityService
def setup(){
String customBaseUrl = Holders.applicationContext.getBean("grailsApplication")?.config?.grails?.de?.iteratec?.osm?.test?.geb?.baseUrl
if(customBaseUrl){
println "Set custom base url: $customBaseUrl"
browser.setBaseUrl(customBaseUrl)
}
}
protected void doLogin() {
to LoginPage
username << configuredUsername
password << configuredPassword
submitButton.click()
}
protected void doLogout() {
go "/logout/index"
}
}
## Instruction:
[IT-1681] Add TestDataBuilder trait to geb tests
http://longwa.github.io/build-test-data/index#integration-tests
## Code After:
package geb
import de.iteratec.osm.util.OsmTestLogin
import geb.pages.de.iteratec.osm.LoginPage
import geb.spock.GebReportingSpec
import grails.buildtestdata.TestDataBuilder
import grails.plugin.springsecurity.SpringSecurityService
import grails.util.Holders
/**
* Sets the baseUrl for the test browser configured in the OpenSpeedMonitor-config.yml
*/
class CustomUrlGebReportingSpec extends GebReportingSpec implements OsmTestLogin, TestDataBuilder {
SpringSecurityService springSecurityService
def setup(){
String customBaseUrl = Holders.applicationContext.getBean("grailsApplication")?.config?.grails?.de?.iteratec?.osm?.test?.geb?.baseUrl
if(customBaseUrl){
println "Set custom base url: $customBaseUrl"
browser.setBaseUrl(customBaseUrl)
}
}
protected void doLogin() {
to LoginPage
username << configuredUsername
password << configuredPassword
submitButton.click()
}
protected void doLogout() {
go "/logout/index"
}
}
|
168c9b47763e30982a47c4c1fed683f31788d098
|
src/ipfs-access-controller.js
|
src/ipfs-access-controller.js
|
'use strict'
const AccessController = require('./access-controller')
const { DAGNode } = require('ipld-dag-pb')
class IPFSAccessController extends AccessController {
constructor (ipfs) {
super()
this._ipfs = ipfs
}
async load (address) {
// Transform '/ipfs/QmPFtHi3cmfZerxtH9ySLdzpg1yFhocYDZgEZywdUXHxFU'
// to 'QmPFtHi3cmfZerxtH9ySLdzpg1yFhocYDZgEZywdUXHxFU'
if (address.indexOf('/ipfs') === 0)
address = address.split('/')[2]
try {
const dag = await this._ipfs.object.get(address)
const obj = JSON.parse(dag.toJSON().data)
this._access = obj
} catch (e) {
console.log("ACCESS ERROR:", e)
}
}
async save (onlyHash) {
let hash
try {
const access = JSON.stringify(this._access, null, 2)
let dag
if (onlyHash) {
dag = await new Promise(resolve => {
DAGNode.create(Buffer.from(access), (err, n) => { resolve(n) })
})
} else {
dag = await this._ipfs.object.put(new Buffer(access))
}
hash = dag.toJSON().multihash.toString()
} catch (e) {
console.log("ACCESS ERROR:", e)
}
return hash
}
}
module.exports = IPFSAccessController
|
'use strict'
const AccessController = require('./access-controller')
const { DAGNode } = require('ipld-dag-pb')
class IPFSAccessController extends AccessController {
constructor (ipfs) {
super()
this._ipfs = ipfs
}
async load (address) {
// Transform '/ipfs/QmPFtHi3cmfZerxtH9ySLdzpg1yFhocYDZgEZywdUXHxFU'
// to 'QmPFtHi3cmfZerxtH9ySLdzpg1yFhocYDZgEZywdUXHxFU'
if (address.indexOf('/ipfs') === 0)
address = address.split('/')[2]
try {
const dag = await this._ipfs.object.get(address)
const obj = JSON.parse(dag.toJSON().data)
this._access = obj
} catch (e) {
console.log("ACCESS ERROR:", e)
}
}
async save (onlyHash) {
let hash
try {
const access = JSON.stringify(this._access, null, 2)
let dag
if (onlyHash) {
dag = await new Promise(resolve => {
DAGNode.create(Buffer.from(access), (err, n) => {
if (err) {
throw err
}
resolve(n)
})
})
} else {
dag = await this._ipfs.object.put(new Buffer(access))
}
hash = dag.toJSON().multihash.toString()
} catch (e) {
console.log("ACCESS ERROR:", e)
}
return hash
}
}
module.exports = IPFSAccessController
|
Throw error returned from DAGNode.create in access controller
|
Throw error returned from DAGNode.create in access controller
|
JavaScript
|
mit
|
haadcode/orbit-db,orbitdb/orbit-db,orbitdb/orbit-db,haadcode/orbit-db
|
javascript
|
## Code Before:
'use strict'
const AccessController = require('./access-controller')
const { DAGNode } = require('ipld-dag-pb')
class IPFSAccessController extends AccessController {
constructor (ipfs) {
super()
this._ipfs = ipfs
}
async load (address) {
// Transform '/ipfs/QmPFtHi3cmfZerxtH9ySLdzpg1yFhocYDZgEZywdUXHxFU'
// to 'QmPFtHi3cmfZerxtH9ySLdzpg1yFhocYDZgEZywdUXHxFU'
if (address.indexOf('/ipfs') === 0)
address = address.split('/')[2]
try {
const dag = await this._ipfs.object.get(address)
const obj = JSON.parse(dag.toJSON().data)
this._access = obj
} catch (e) {
console.log("ACCESS ERROR:", e)
}
}
async save (onlyHash) {
let hash
try {
const access = JSON.stringify(this._access, null, 2)
let dag
if (onlyHash) {
dag = await new Promise(resolve => {
DAGNode.create(Buffer.from(access), (err, n) => { resolve(n) })
})
} else {
dag = await this._ipfs.object.put(new Buffer(access))
}
hash = dag.toJSON().multihash.toString()
} catch (e) {
console.log("ACCESS ERROR:", e)
}
return hash
}
}
module.exports = IPFSAccessController
## Instruction:
Throw error returned from DAGNode.create in access controller
## Code After:
'use strict'
const AccessController = require('./access-controller')
const { DAGNode } = require('ipld-dag-pb')
class IPFSAccessController extends AccessController {
constructor (ipfs) {
super()
this._ipfs = ipfs
}
async load (address) {
// Transform '/ipfs/QmPFtHi3cmfZerxtH9ySLdzpg1yFhocYDZgEZywdUXHxFU'
// to 'QmPFtHi3cmfZerxtH9ySLdzpg1yFhocYDZgEZywdUXHxFU'
if (address.indexOf('/ipfs') === 0)
address = address.split('/')[2]
try {
const dag = await this._ipfs.object.get(address)
const obj = JSON.parse(dag.toJSON().data)
this._access = obj
} catch (e) {
console.log("ACCESS ERROR:", e)
}
}
async save (onlyHash) {
let hash
try {
const access = JSON.stringify(this._access, null, 2)
let dag
if (onlyHash) {
dag = await new Promise(resolve => {
DAGNode.create(Buffer.from(access), (err, n) => {
if (err) {
throw err
}
resolve(n)
})
})
} else {
dag = await this._ipfs.object.put(new Buffer(access))
}
hash = dag.toJSON().multihash.toString()
} catch (e) {
console.log("ACCESS ERROR:", e)
}
return hash
}
}
module.exports = IPFSAccessController
|
1f5aba85ef9cc049d0de0f6ff9ed8df296cc02a2
|
app/login/login.config.js
|
app/login/login.config.js
|
/**
* Created by Caleb on 9/25/2014.
*/
(function () {
angular.module('fc.login').config([
'$stateProvider',
'$urlRouterProvider',
routeConfig
]);
function routeConfig($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider.state('login', {
url: '/?returnUrl',
views: {
'': {
templateUrl: 'login/login.tpl.html'
},
'top-bar': {
templateUrl: 'common/header.tpl.html'
}
}
});
}
})();
|
/**
* Created by kelvin on 3/12/2014.
*/
(function () {
angular.module('fc.login').config([
'$stateProvider',
'$urlRouterProvider',
routeConfig
]).config([
"authSvcProvider",
svcConfig
]);
function routeConfig($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider.state('login', {
url: '/?returnUrl',
views: {
'': {
templateUrl: 'login/login.tpl.html'
},
'top-bar': {
templateUrl: 'common/header.tpl.html'
}
}
});
}
function svcConfig(loginSvcProvider){
loginSvcProvider.loginUrl = "api/login";
};
})();
|
Add a login svc and url
|
Add a login svc and url
|
JavaScript
|
mit
|
kelvinlogic/home,kelvinlogic/home
|
javascript
|
## Code Before:
/**
* Created by Caleb on 9/25/2014.
*/
(function () {
angular.module('fc.login').config([
'$stateProvider',
'$urlRouterProvider',
routeConfig
]);
function routeConfig($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider.state('login', {
url: '/?returnUrl',
views: {
'': {
templateUrl: 'login/login.tpl.html'
},
'top-bar': {
templateUrl: 'common/header.tpl.html'
}
}
});
}
})();
## Instruction:
Add a login svc and url
## Code After:
/**
* Created by kelvin on 3/12/2014.
*/
(function () {
angular.module('fc.login').config([
'$stateProvider',
'$urlRouterProvider',
routeConfig
]).config([
"authSvcProvider",
svcConfig
]);
function routeConfig($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/');
$stateProvider.state('login', {
url: '/?returnUrl',
views: {
'': {
templateUrl: 'login/login.tpl.html'
},
'top-bar': {
templateUrl: 'common/header.tpl.html'
}
}
});
}
function svcConfig(loginSvcProvider){
loginSvcProvider.loginUrl = "api/login";
};
})();
|
175c8b8a535696cdcd4da523c7da60be40eb9584
|
.travis.yml
|
.travis.yml
|
language: go
sudo: false
matrix:
include:
- go: "1.9.x"
- go: "1.10.x"
- go: "1.11.x"
env: {GO111MODULE: "off"}
- go: "1.11.x"
env: {GO111MODULE: "on"}
- go: "1.12.x"
env: {GO111MODULE: "off"}
- go: "1.12.x"
env: {GO111MODULE: "on"}
- go: "1.13.x"
env: {GO111MODULE: "off"}
- go: "1.13.x"
env: {GO111MODULE: "on"}
- go: "1.14.x"
env: {GO111MODULE: "off"}
- go: "1.14.x"
env: {GO111MODULE: "on"}
- go: "tip"
env: {GO111MODULE: "off"}
- go: "tip"
env: {GO111MODULE: "on"}
install: |
if test -z "$(go env GOMOD)"; then
go get -d -t ./... &&
ver=$(sed -n '/^require/s/.*[ -]//p' go.mod) &&
(
cd "$(go env GOPATH)/src/golang.org/x/tools" &&
git checkout "$ver"
)
fi
script:
- go test -race ./...
|
language: go
sudo: false
matrix:
include:
- go: "1.11.x"
env: {GO111MODULE: "off"}
- go: "1.11.x"
env: {GO111MODULE: "on"}
- go: "1.12.x"
env: {GO111MODULE: "off"}
- go: "1.12.x"
env: {GO111MODULE: "on"}
- go: "1.13.x"
env: {GO111MODULE: "off"}
- go: "1.13.x"
env: {GO111MODULE: "on"}
- go: "1.14.x"
env: {GO111MODULE: "off"}
- go: "1.14.x"
env: {GO111MODULE: "on"}
- go: "tip"
env: {GO111MODULE: "off"}
- go: "tip"
env: {GO111MODULE: "on"}
install: |
if test -z "$(go env GOMOD)"; then
go get -d -t ./... &&
ver=$(sed -n '/^require/s/.*[ -]//p' go.mod) &&
(
cd "$(go env GOPATH)/src/golang.org/x/tools" &&
git checkout "$ver"
)
fi
script:
- go test -race ./...
|
Drop support for Go 1.10 and Go 1.9
|
Drop support for Go 1.10 and Go 1.9
The golang.org/x/tools package seems to have dropped support for
these old Gos, so we will be supporting only Go 1.11 and higher.
Signed-off-by: Eric Chlebek <[email protected]>
|
YAML
|
mit
|
kisielk/errcheck
|
yaml
|
## Code Before:
language: go
sudo: false
matrix:
include:
- go: "1.9.x"
- go: "1.10.x"
- go: "1.11.x"
env: {GO111MODULE: "off"}
- go: "1.11.x"
env: {GO111MODULE: "on"}
- go: "1.12.x"
env: {GO111MODULE: "off"}
- go: "1.12.x"
env: {GO111MODULE: "on"}
- go: "1.13.x"
env: {GO111MODULE: "off"}
- go: "1.13.x"
env: {GO111MODULE: "on"}
- go: "1.14.x"
env: {GO111MODULE: "off"}
- go: "1.14.x"
env: {GO111MODULE: "on"}
- go: "tip"
env: {GO111MODULE: "off"}
- go: "tip"
env: {GO111MODULE: "on"}
install: |
if test -z "$(go env GOMOD)"; then
go get -d -t ./... &&
ver=$(sed -n '/^require/s/.*[ -]//p' go.mod) &&
(
cd "$(go env GOPATH)/src/golang.org/x/tools" &&
git checkout "$ver"
)
fi
script:
- go test -race ./...
## Instruction:
Drop support for Go 1.10 and Go 1.9
The golang.org/x/tools package seems to have dropped support for
these old Gos, so we will be supporting only Go 1.11 and higher.
Signed-off-by: Eric Chlebek <[email protected]>
## Code After:
language: go
sudo: false
matrix:
include:
- go: "1.11.x"
env: {GO111MODULE: "off"}
- go: "1.11.x"
env: {GO111MODULE: "on"}
- go: "1.12.x"
env: {GO111MODULE: "off"}
- go: "1.12.x"
env: {GO111MODULE: "on"}
- go: "1.13.x"
env: {GO111MODULE: "off"}
- go: "1.13.x"
env: {GO111MODULE: "on"}
- go: "1.14.x"
env: {GO111MODULE: "off"}
- go: "1.14.x"
env: {GO111MODULE: "on"}
- go: "tip"
env: {GO111MODULE: "off"}
- go: "tip"
env: {GO111MODULE: "on"}
install: |
if test -z "$(go env GOMOD)"; then
go get -d -t ./... &&
ver=$(sed -n '/^require/s/.*[ -]//p' go.mod) &&
(
cd "$(go env GOPATH)/src/golang.org/x/tools" &&
git checkout "$ver"
)
fi
script:
- go test -race ./...
|
fd6694614614976e1be32ce7eb9fd7453490b747
|
src/Port.php
|
src/Port.php
|
<?php
/**
* This file is part of the League.url library
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/thephpleague/url/
* @version 4.0.0
* @package League.url
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace League\Url;
use InvalidArgumentException;
use League\Url\Interfaces\Component;
/**
* A class to manipulate URL Port component
*
* @package League.url
* @since 1.0.0
*/
class Port extends AbstractComponent implements Component
{
/**
* {@inheritdoc}
*/
protected function validate($data)
{
$data = filter_var($data, FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
if (! $data) {
throw new InvalidArgumentException('The submitted port is invalid');
}
return $data;
}
/**
* {@inheritdoc}
*/
public function getUriComponent()
{
$data = $this->__toString();
if (empty($data)) {
return $data;
}
return ':'.$data;
}
}
|
<?php
/**
* This file is part of the League.url library
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/thephpleague/url/
* @version 4.0.0
* @package League.url
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace League\Url;
use InvalidArgumentException;
use League\Url\Interfaces\Component;
/**
* A class to manipulate URL Port component
*
* @package League.url
* @since 1.0.0
*/
class Port extends AbstractComponent implements Component
{
/**
* {@inheritdoc}
*/
protected function validate($data)
{
if (! ctype_digit($data) || $data < 1) {
throw new InvalidArgumentException('The submitted port is invalid');
}
return $data;
}
/**
* {@inheritdoc}
*/
public function getUriComponent()
{
$data = $this->__toString();
if (empty($data)) {
return $data;
}
return ':'.$data;
}
}
|
Use ctype_digit to validate port
|
Use ctype_digit to validate port
|
PHP
|
mit
|
KorvinSzanto/uri,localheinz/url,thephpleague/uri-parser,thephpleague/uri-manipulations,concrete5/url,mleko/url,localheinz/uri,thephpleague/uri-schemes,mkly/url
|
php
|
## Code Before:
<?php
/**
* This file is part of the League.url library
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/thephpleague/url/
* @version 4.0.0
* @package League.url
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace League\Url;
use InvalidArgumentException;
use League\Url\Interfaces\Component;
/**
* A class to manipulate URL Port component
*
* @package League.url
* @since 1.0.0
*/
class Port extends AbstractComponent implements Component
{
/**
* {@inheritdoc}
*/
protected function validate($data)
{
$data = filter_var($data, FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]);
if (! $data) {
throw new InvalidArgumentException('The submitted port is invalid');
}
return $data;
}
/**
* {@inheritdoc}
*/
public function getUriComponent()
{
$data = $this->__toString();
if (empty($data)) {
return $data;
}
return ':'.$data;
}
}
## Instruction:
Use ctype_digit to validate port
## Code After:
<?php
/**
* This file is part of the League.url library
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/thephpleague/url/
* @version 4.0.0
* @package League.url
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace League\Url;
use InvalidArgumentException;
use League\Url\Interfaces\Component;
/**
* A class to manipulate URL Port component
*
* @package League.url
* @since 1.0.0
*/
class Port extends AbstractComponent implements Component
{
/**
* {@inheritdoc}
*/
protected function validate($data)
{
if (! ctype_digit($data) || $data < 1) {
throw new InvalidArgumentException('The submitted port is invalid');
}
return $data;
}
/**
* {@inheritdoc}
*/
public function getUriComponent()
{
$data = $this->__toString();
if (empty($data)) {
return $data;
}
return ':'.$data;
}
}
|
b577ee7425dac7327c6b2fa6d15b3469bc44bf44
|
.travis.yml
|
.travis.yml
|
language: c
sudo: false
os:
- linux
- osx
notifications:
email: false
env:
global:
- SETUP_XVFB=True
- CONDA_CHANNELS="glueviz"
- CONDA_DEPENDENCIES="glue-core pytest mock requests pydicom gdcm nomkl"
matrix:
- PYTHON_VERSION=2.7
- PYTHON_VERSION=3.5
- PYTHON_VERSION=2.7 CONDA_CHANNELS="glueviz glueviz/label/dev"
- PYTHON_VERSION=3.5 CONDA_CHANNELS="glueviz glueviz/label/dev"
install:
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
script:
- py.test glue_medical
|
language: c
sudo: false
os:
- linux
- osx
notifications:
email: false
env:
global:
- SETUP_XVFB=True
- CONDA_CHANNELS="glueviz"
- CONDA_DEPENDENCIES="glue-core pytest mock requests pydicom gdcm nomkl"
matrix:
- PYTHON_VERSION=2.7
- PYTHON_VERSION=3.5
- PYTHON_VERSION=2.7 CONDA_CHANNELS="glueviz glueviz/label/dev"
- PYTHON_VERSION=3.5 CONDA_CHANNELS="glueviz glueviz/label/dev"
install:
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
# The gdcm conda package does not work well on MacOS X with Python 3.x.
# Unfortunately there isn't much we can do about it.
# https://github.com/conda-forge/gdcm-feedstock/issues/8
- if [[ $PYTHON_VERSION == 3.* && $TRAVIS_OS_NAME == osx ]]; then conda remove gdcm; fi
script:
- py.test glue_medical
|
Uninstall gdcm on MacOS X with Python 3.x
|
Uninstall gdcm on MacOS X with Python 3.x
|
YAML
|
bsd-3-clause
|
glue-viz/glue-medical
|
yaml
|
## Code Before:
language: c
sudo: false
os:
- linux
- osx
notifications:
email: false
env:
global:
- SETUP_XVFB=True
- CONDA_CHANNELS="glueviz"
- CONDA_DEPENDENCIES="glue-core pytest mock requests pydicom gdcm nomkl"
matrix:
- PYTHON_VERSION=2.7
- PYTHON_VERSION=3.5
- PYTHON_VERSION=2.7 CONDA_CHANNELS="glueviz glueviz/label/dev"
- PYTHON_VERSION=3.5 CONDA_CHANNELS="glueviz glueviz/label/dev"
install:
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
script:
- py.test glue_medical
## Instruction:
Uninstall gdcm on MacOS X with Python 3.x
## Code After:
language: c
sudo: false
os:
- linux
- osx
notifications:
email: false
env:
global:
- SETUP_XVFB=True
- CONDA_CHANNELS="glueviz"
- CONDA_DEPENDENCIES="glue-core pytest mock requests pydicom gdcm nomkl"
matrix:
- PYTHON_VERSION=2.7
- PYTHON_VERSION=3.5
- PYTHON_VERSION=2.7 CONDA_CHANNELS="glueviz glueviz/label/dev"
- PYTHON_VERSION=3.5 CONDA_CHANNELS="glueviz glueviz/label/dev"
install:
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
# The gdcm conda package does not work well on MacOS X with Python 3.x.
# Unfortunately there isn't much we can do about it.
# https://github.com/conda-forge/gdcm-feedstock/issues/8
- if [[ $PYTHON_VERSION == 3.* && $TRAVIS_OS_NAME == osx ]]; then conda remove gdcm; fi
script:
- py.test glue_medical
|
91e5b46ad966ca77fc8077e62fe6460c9c908188
|
decoder_example_test.go
|
decoder_example_test.go
|
// The original error message returned by stdlib changed with go1.8.
// We only test the latest release.
//
//+build go1.8 forcego1.8
package jsonptrerror_test
import (
"fmt"
"strings"
"github.com/dolmen-go/jsonptrerror"
)
func ExampleDecoder() {
decoder := jsonptrerror.NewDecoder(strings.NewReader(
`{"key": "x", "value": 5}`,
))
var out struct {
Key string `json:"key"`
Value bool `json:"value"`
}
err := decoder.Decode(&out)
fmt.Println(err)
if err, ok := err.(*jsonptrerror.UnmarshalTypeError); ok {
fmt.Println("Original error:", err.UnmarshalTypeError.Error())
fmt.Println("Error location:", err.Pointer)
}
// Output:
// /value: cannot unmarshal number into Go value of type bool
// Original error: json: cannot unmarshal number into Go struct field .value of type bool
// Error location: /value
}
|
// The original error message returned by stdlib changed with go1.8.
// We only test the latest release.
//
//+build go1.8 forcego1.8
package jsonptrerror_test
import (
"fmt"
"strings"
"github.com/dolmen-go/jsonptrerror"
)
func ExampleDecoder() {
decoder := jsonptrerror.NewDecoder(strings.NewReader(
`{"key": "x", "value": 5}`,
))
var out struct {
Key string `json:"key"`
Value bool `json:"value"`
}
err := decoder.Decode(&out)
fmt.Println(err)
if err, ok := err.(*jsonptrerror.UnmarshalTypeError); ok {
//fmt.Println("Original error:", err.UnmarshalTypeError.Error())
fmt.Println("Error location:", err.Pointer)
}
// Output:
// /value: cannot unmarshal number into Go value of type bool
// Error location: /value
}
|
Fix Example to not show the original error (which is go version dependent)
|
Fix Example to not show the original error (which is go version dependent)
|
Go
|
apache-2.0
|
dolmen-go/jsonptrerror
|
go
|
## Code Before:
// The original error message returned by stdlib changed with go1.8.
// We only test the latest release.
//
//+build go1.8 forcego1.8
package jsonptrerror_test
import (
"fmt"
"strings"
"github.com/dolmen-go/jsonptrerror"
)
func ExampleDecoder() {
decoder := jsonptrerror.NewDecoder(strings.NewReader(
`{"key": "x", "value": 5}`,
))
var out struct {
Key string `json:"key"`
Value bool `json:"value"`
}
err := decoder.Decode(&out)
fmt.Println(err)
if err, ok := err.(*jsonptrerror.UnmarshalTypeError); ok {
fmt.Println("Original error:", err.UnmarshalTypeError.Error())
fmt.Println("Error location:", err.Pointer)
}
// Output:
// /value: cannot unmarshal number into Go value of type bool
// Original error: json: cannot unmarshal number into Go struct field .value of type bool
// Error location: /value
}
## Instruction:
Fix Example to not show the original error (which is go version dependent)
## Code After:
// The original error message returned by stdlib changed with go1.8.
// We only test the latest release.
//
//+build go1.8 forcego1.8
package jsonptrerror_test
import (
"fmt"
"strings"
"github.com/dolmen-go/jsonptrerror"
)
func ExampleDecoder() {
decoder := jsonptrerror.NewDecoder(strings.NewReader(
`{"key": "x", "value": 5}`,
))
var out struct {
Key string `json:"key"`
Value bool `json:"value"`
}
err := decoder.Decode(&out)
fmt.Println(err)
if err, ok := err.(*jsonptrerror.UnmarshalTypeError); ok {
//fmt.Println("Original error:", err.UnmarshalTypeError.Error())
fmt.Println("Error location:", err.Pointer)
}
// Output:
// /value: cannot unmarshal number into Go value of type bool
// Error location: /value
}
|
bb0bb221c6c296a80bc4b2a0c7de77ccefcfbf4c
|
windows/new-dev-system.cmd
|
windows/new-dev-system.cmd
|
@echo off
:: install chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco feature enable -n allowGlobalConfirmation
:: general apps
choco upgrade chocolatey 7zip 7zip.commandline putty filezilla adobereader slack javaruntime
choco upgrade autoruns sdelete procexp procmon
choco upgrade curl wget wput zip unzip optipng
:: dev apps
choco upgrade postgresql-9.3 pgadmin3
choco upgrade tortoisesvn git gitkraken
choco upgrade atom visualstudiocode
choco upgrade visualstudio2012professional -packageParameters "/Features:'OfficeTools'"
choco upgrade ankhsvn wixtoolset ilspy depends
choco upgrade dotnet4.6 dotnet4.5.2 dotnet4.5.1 dotnet4.5 dotnet3.5
|
@echo off
:: install chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco feature enable -n allowGlobalConfirmation
:: general apps
choco upgrade chocolatey
choco upgrade 7zip 7zip.commandline putty filezilla adobereader slack javaruntime gimp paint.net
choco upgrade autoruns sdelete procexp procmon
choco upgrade curl wget wput zip unzip optipng
choco upgrade inconsolata
:: dev apps
choco upgrade postgresql-9.3 pgadmin3
choco upgrade tortoisesvn git gitkraken
choco upgrade atom visualstudiocode
choco upgrade visualstudio2012professional -packageParameters "/Features:'OfficeTools'"
choco upgrade ankhsvn wixtoolset ilspy depends
choco upgrade dotnet4.6 dotnet4.5.2 dotnet4.5.1 dotnet4.5 dotnet3.5
|
Add gimp, paint.net and inconsolata
|
Add gimp, paint.net and inconsolata
|
Batchfile
|
unlicense
|
garethflowers/configs
|
batchfile
|
## Code Before:
@echo off
:: install chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco feature enable -n allowGlobalConfirmation
:: general apps
choco upgrade chocolatey 7zip 7zip.commandline putty filezilla adobereader slack javaruntime
choco upgrade autoruns sdelete procexp procmon
choco upgrade curl wget wput zip unzip optipng
:: dev apps
choco upgrade postgresql-9.3 pgadmin3
choco upgrade tortoisesvn git gitkraken
choco upgrade atom visualstudiocode
choco upgrade visualstudio2012professional -packageParameters "/Features:'OfficeTools'"
choco upgrade ankhsvn wixtoolset ilspy depends
choco upgrade dotnet4.6 dotnet4.5.2 dotnet4.5.1 dotnet4.5 dotnet3.5
## Instruction:
Add gimp, paint.net and inconsolata
## Code After:
@echo off
:: install chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco feature enable -n allowGlobalConfirmation
:: general apps
choco upgrade chocolatey
choco upgrade 7zip 7zip.commandline putty filezilla adobereader slack javaruntime gimp paint.net
choco upgrade autoruns sdelete procexp procmon
choco upgrade curl wget wput zip unzip optipng
choco upgrade inconsolata
:: dev apps
choco upgrade postgresql-9.3 pgadmin3
choco upgrade tortoisesvn git gitkraken
choco upgrade atom visualstudiocode
choco upgrade visualstudio2012professional -packageParameters "/Features:'OfficeTools'"
choco upgrade ankhsvn wixtoolset ilspy depends
choco upgrade dotnet4.6 dotnet4.5.2 dotnet4.5.1 dotnet4.5 dotnet3.5
|
6dff5c9d3db1aa355600eb8dfa1854357aed5005
|
cmake/DownloadGoogleBenchmark.cmake
|
cmake/DownloadGoogleBenchmark.cmake
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
PROJECT(googlebenchmark-download NONE)
INCLUDE(ExternalProject)
ExternalProject_Add(googlebenchmark
URL https://github.com/google/benchmark/archive/v1.2.0.zip
URL_HASH SHA256=cc463b28cb3701a35c0855fbcefb75b29068443f1952b64dd5f4f669272e95ea
SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark"
BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
PROJECT(googlebenchmark-download NONE)
INCLUDE(ExternalProject)
ExternalProject_Add(googlebenchmark
URL https://github.com/google/benchmark/archive/v1.5.0.zip
URL_HASH SHA256=2d22dd3758afee43842bb504af1a8385cccb3ee1f164824e4837c1c1b04d92a0
SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark"
BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
|
Update Google Benchmark in CMake builds to 1.5.0
|
Update Google Benchmark in CMake builds to 1.5.0
|
CMake
|
mit
|
Maratyszcza/FXdiv,Maratyszcza/FXdiv
|
cmake
|
## Code Before:
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
PROJECT(googlebenchmark-download NONE)
INCLUDE(ExternalProject)
ExternalProject_Add(googlebenchmark
URL https://github.com/google/benchmark/archive/v1.2.0.zip
URL_HASH SHA256=cc463b28cb3701a35c0855fbcefb75b29068443f1952b64dd5f4f669272e95ea
SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark"
BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
## Instruction:
Update Google Benchmark in CMake builds to 1.5.0
## Code After:
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
PROJECT(googlebenchmark-download NONE)
INCLUDE(ExternalProject)
ExternalProject_Add(googlebenchmark
URL https://github.com/google/benchmark/archive/v1.5.0.zip
URL_HASH SHA256=2d22dd3758afee43842bb504af1a8385cccb3ee1f164824e4837c1c1b04d92a0
SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark"
BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
|
db7d57b14d5e32c0b51150c806d57c3129fbb2e1
|
app/views/legislation/processes/index.html.erb
|
app/views/legislation/processes/index.html.erb
|
<% provide :title do %>
<%= t("layouts.header.collaborative_legislation") %> - <%= t("legislation.processes.index.filters.#{@current_filter}") %>
<% end %>
<div class="legislation-hero no-margin-top brand-heading">
<div class="row">
<div class="small-12 medium-12 column padding">
<h4>
<%= t('.hightlighted_processes') %>
</h4>
</div>
</div>
</div>
<div class="row">
<div class="legislation-categories small-12 medium-3 column">
<%= render 'shared/filter_subnav', i18n_namespace: "legislation.processes.index" %>
</div>
<div id="legislation" class="legislation-list small-12 medium-9 column">
<div id="legislation-list">
<% if @processes.any? %>
<%= render @processes %>
<%= paginate @processes %>
<% else %>
<%= t(".no_#{@current_filter}_processes") %>
<% end %>
</div>
</div>
</div>
|
<% provide :title do %>
<%= t("layouts.header.collaborative_legislation") %> - <%= t("legislation.processes.index.filters.#{@current_filter}") %>
<% end %>
<div class="row">
<div class="legislation-categories small-12 medium-3 column">
<%= render 'shared/filter_subnav', i18n_namespace: "legislation.processes.index" %>
</div>
<div id="legislation" class="legislation-list small-12 medium-9 column">
<div id="legislation-list">
<% if @processes.any? %>
<%= render @processes %>
<%= paginate @processes %>
<% else %>
<%= t(".no_#{@current_filter}_processes") %>
<% end %>
</div>
</div>
</div>
|
Remove processes hero in the index
|
Remove processes hero in the index
|
HTML+ERB
|
agpl-3.0
|
deivid-rodriguez/participacion,votedevin/consul,AyuntamientoMadrid/consul,AyuntamientoMadrid/consul,AjuntamentdeCastello/consul,artofhuman/consul,AyuntamientoMadrid/participacion,lalibertad/consul,artofhuman/consul,AyuntamientoPuertoReal/decidePuertoReal,deivid-rodriguez/participacion,artofhuman/consul,consul/consul,lalibertad/consul,usabi/consul_san_borondon,AjuntamentdeCastello/consul,lalibertad/consul,consul/consul,AyuntamientoPuertoReal/decidePuertoReal,votedevin/consul,amiedes/consul,lalibertad/consul,AyuntamientoMadrid/participacion,consul/consul,AyuntamientoMadrid/participacion,amiedes/consul,CDJ11/CDJ,CDJ11/CDJ,AyuntamientoMadrid/consul,consul/consul,CDJ11/CDJ,deivid-rodriguez/participacion,amiedes/consul,usabi/consul_san_borondon,votedevin/consul,AjuntamentdeCastello/consul,AjuntamentdeCastello/consul,deivid-rodriguez/participacion,AyuntamientoPuertoReal/decidePuertoReal,AyuntamientoMadrid/consul,usabi/consul_san_borondon,AyuntamientoMadrid/participacion,CDJ11/CDJ,consul/consul,usabi/consul_san_borondon
|
html+erb
|
## Code Before:
<% provide :title do %>
<%= t("layouts.header.collaborative_legislation") %> - <%= t("legislation.processes.index.filters.#{@current_filter}") %>
<% end %>
<div class="legislation-hero no-margin-top brand-heading">
<div class="row">
<div class="small-12 medium-12 column padding">
<h4>
<%= t('.hightlighted_processes') %>
</h4>
</div>
</div>
</div>
<div class="row">
<div class="legislation-categories small-12 medium-3 column">
<%= render 'shared/filter_subnav', i18n_namespace: "legislation.processes.index" %>
</div>
<div id="legislation" class="legislation-list small-12 medium-9 column">
<div id="legislation-list">
<% if @processes.any? %>
<%= render @processes %>
<%= paginate @processes %>
<% else %>
<%= t(".no_#{@current_filter}_processes") %>
<% end %>
</div>
</div>
</div>
## Instruction:
Remove processes hero in the index
## Code After:
<% provide :title do %>
<%= t("layouts.header.collaborative_legislation") %> - <%= t("legislation.processes.index.filters.#{@current_filter}") %>
<% end %>
<div class="row">
<div class="legislation-categories small-12 medium-3 column">
<%= render 'shared/filter_subnav', i18n_namespace: "legislation.processes.index" %>
</div>
<div id="legislation" class="legislation-list small-12 medium-9 column">
<div id="legislation-list">
<% if @processes.any? %>
<%= render @processes %>
<%= paginate @processes %>
<% else %>
<%= t(".no_#{@current_filter}_processes") %>
<% end %>
</div>
</div>
</div>
|
9dcec45168ee35a11af66ee76a3752cceb764da3
|
docs/concepts/viewports.md
|
docs/concepts/viewports.md
|
> Each [Enabled Element](enabled-elements.md) has a **Viewport** which describes how the [Image](image.md) should be rendered.
The viewport parameters for an enabled element can be obtained via the [getViewport()](../api.md#getviewport) function and set using the [setViewport()](../api.md#setviewport) function. The available properties for the Viewport can be found in the [Viewport object definition](../api.md#viewport) in the API documentation.
|
> Each [Enabled Element](enabled-elements.md) has a **Viewport** which describes how the [Image](image.md) should be rendered.
The viewport parameters for an enabled element can be obtained via the [getViewport()](../api.md#getviewport) function and set using the [setViewport()](../api.md#setviewport) function. The available properties for the Viewport can be found in the [Viewport object definition](../api.md#viewport) in the API documentation.
<p data-height="500"
data-theme-id="dark"
data-slug-hash="wmvbLO"
data-default-tab="result"
data-user="swederik"
data-embed-version="2"
data-pen-title="CornerstoneJS - Viewport Example"
data-preview="true"
class="codepen">
See the Pen <a href="https://codepen.io/swederik/pen/wmvbLO/">CornerstoneJS - Viewport Example</a> by Erik Ziegler (<a href="https://codepen.io/swederik">@swederik</a>) on <a href="https://codepen.io">CodePen</a>.
</p>
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
|
Add embedded Viewport demo CodePen to docs
|
Add embedded Viewport demo CodePen to docs
|
Markdown
|
mit
|
cornerstonejs/cornerstone,chafey/cornerstone,cornerstonejs/cornerstone,chafey/cornerstone,cornerstonejs/cornerstone,cornerstonejs/cornerstone
|
markdown
|
## Code Before:
> Each [Enabled Element](enabled-elements.md) has a **Viewport** which describes how the [Image](image.md) should be rendered.
The viewport parameters for an enabled element can be obtained via the [getViewport()](../api.md#getviewport) function and set using the [setViewport()](../api.md#setviewport) function. The available properties for the Viewport can be found in the [Viewport object definition](../api.md#viewport) in the API documentation.
## Instruction:
Add embedded Viewport demo CodePen to docs
## Code After:
> Each [Enabled Element](enabled-elements.md) has a **Viewport** which describes how the [Image](image.md) should be rendered.
The viewport parameters for an enabled element can be obtained via the [getViewport()](../api.md#getviewport) function and set using the [setViewport()](../api.md#setviewport) function. The available properties for the Viewport can be found in the [Viewport object definition](../api.md#viewport) in the API documentation.
<p data-height="500"
data-theme-id="dark"
data-slug-hash="wmvbLO"
data-default-tab="result"
data-user="swederik"
data-embed-version="2"
data-pen-title="CornerstoneJS - Viewport Example"
data-preview="true"
class="codepen">
See the Pen <a href="https://codepen.io/swederik/pen/wmvbLO/">CornerstoneJS - Viewport Example</a> by Erik Ziegler (<a href="https://codepen.io/swederik">@swederik</a>) on <a href="https://codepen.io">CodePen</a>.
</p>
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
|
8da0ca3fc2fb8fc6b45102741e3beefb92f8c7cd
|
index.php
|
index.php
|
<?php
include_once 'models/dependencies.php';
include_once 'header.php';
if ( isset( $_GET[ 'resource' ] ) ) {
$resource = $_GET[ 'resource' ];
}
else {
$resource = '';
}
$resource = basename( $resource );
$filename = 'controllers/' . $resource . '.php';
if ( !file_exists( $filename ) ) {
$resource = 'dashboard';
$filename = 'controllers/' . $resource . '.php';
}
include_once $filename;
$controllername = ucfirst( $resource ) . 'Controller';
$controller = new $controllername();
try {
$controller->dispatch( $_GET, $_POST, $_FILES, $_SERVER[ 'REQUEST_METHOD' ] );
}
catch ( NotImplemented $e ) {
die( 'An attempt was made to call a not implemented function: ' . $e->getFunctionName() );
}
catch ( RedirectException $e ) {
$url = $e->getURL();
header( 'Location: ' . $url );
}
catch ( HTTPErrorException $e ) {
header( $e->header );
}
?>
|
<?php
include_once 'models/dependencies.php';
include_once 'header.php';
if ( isset( $_GET[ 'resource' ] ) ) {
$resource = $_GET[ 'resource' ];
}
else {
$resource = '';
}
$resource = basename( $resource );
$filename = 'controllers/' . $resource . '.php';
if ( !file_exists( $filename ) ) {
$resource = 'dashboard';
$filename = 'controllers/' . $resource . '.php';
}
include_once $filename;
$controllername = ucfirst( $resource ) . 'Controller';
$controller = new $controllername();
try {
$controller->dispatch( $_GET, $_POST, $_FILES, $_SERVER[ 'REQUEST_METHOD' ] );
}
catch ( NotImplemented $e ) {
die( 'An attempt was made to call a not implemented function: ' . $e->getFunctionName() );
}
catch ( RedirectException $e ) {
global $config;
$url = $e->getURL();
header( 'Location: ' . $config[ 'base' ] . $url );
}
catch ( HTTPErrorException $e ) {
header( $e->header );
}
?>
|
Fix HTTP redirects to be absolute
|
Fix HTTP redirects to be absolute
|
PHP
|
mit
|
VitSalis/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes
|
php
|
## Code Before:
<?php
include_once 'models/dependencies.php';
include_once 'header.php';
if ( isset( $_GET[ 'resource' ] ) ) {
$resource = $_GET[ 'resource' ];
}
else {
$resource = '';
}
$resource = basename( $resource );
$filename = 'controllers/' . $resource . '.php';
if ( !file_exists( $filename ) ) {
$resource = 'dashboard';
$filename = 'controllers/' . $resource . '.php';
}
include_once $filename;
$controllername = ucfirst( $resource ) . 'Controller';
$controller = new $controllername();
try {
$controller->dispatch( $_GET, $_POST, $_FILES, $_SERVER[ 'REQUEST_METHOD' ] );
}
catch ( NotImplemented $e ) {
die( 'An attempt was made to call a not implemented function: ' . $e->getFunctionName() );
}
catch ( RedirectException $e ) {
$url = $e->getURL();
header( 'Location: ' . $url );
}
catch ( HTTPErrorException $e ) {
header( $e->header );
}
?>
## Instruction:
Fix HTTP redirects to be absolute
## Code After:
<?php
include_once 'models/dependencies.php';
include_once 'header.php';
if ( isset( $_GET[ 'resource' ] ) ) {
$resource = $_GET[ 'resource' ];
}
else {
$resource = '';
}
$resource = basename( $resource );
$filename = 'controllers/' . $resource . '.php';
if ( !file_exists( $filename ) ) {
$resource = 'dashboard';
$filename = 'controllers/' . $resource . '.php';
}
include_once $filename;
$controllername = ucfirst( $resource ) . 'Controller';
$controller = new $controllername();
try {
$controller->dispatch( $_GET, $_POST, $_FILES, $_SERVER[ 'REQUEST_METHOD' ] );
}
catch ( NotImplemented $e ) {
die( 'An attempt was made to call a not implemented function: ' . $e->getFunctionName() );
}
catch ( RedirectException $e ) {
global $config;
$url = $e->getURL();
header( 'Location: ' . $config[ 'base' ] . $url );
}
catch ( HTTPErrorException $e ) {
header( $e->header );
}
?>
|
61ff5f2ec20c9a6994bbe9fa7f7cf6d1ee35f76d
|
README.md
|
README.md
|
Run `bin/setup`
This will:
- Install the gem dependencies
- Install the pod dependencies
- Create `Secrets.h`. **You must include the necessary contents.**
## Testing ##
Run `bin/test`
This will run the tests from the command line, and pipe the result through
[XCPretty][].
[XCPretty]: https://github.com/supermarin/xcpretty
|
Run `bin/setup`
This will:
- Install the gem dependencies
- Install the pod dependencies
- Create `Secrets.h`. `TRForecastAPIKey` is the only one required for the
application to run. You can get a key from https://developer.forecast.io. You
should include all keys for production builds.
## Testing ##
Run `bin/test`
This will run the tests from the command line, and pipe the result through
[XCPretty][].
[XCPretty]: https://github.com/supermarin/xcpretty
|
Document Forecast API key setup
|
Document Forecast API key setup
|
Markdown
|
mit
|
lufeifan531/Tropos,faimin/Tropos,ashfurrow/Tropos,lufeifan531/Tropos,faimin/Tropos,kevinnguy/Tropos,lufeifan531/Tropos,kevinnguy/Tropos,Ezimetzhan/Tropos,iOSTestApps/Tropos,hanpanpan200/Tropos,red3/Tropos,Ezimetzhan/Tropos,coty/Tropos,coty/Tropos,andreamazz/Tropos,andreamazz/Tropos,tkafka/Tropos,iOSTestApps/Tropos,Ezimetzhan/Tropos,faimin/Tropos,thoughtbot/Tropos,ashfurrow/Tropos,red3/Tropos,kevinnguy/Tropos,tkafka/Tropos,red3/Tropos,tkafka/Tropos,hanpanpan200/Tropos,hanpanpan200/Tropos,coty/Tropos,andreamazz/Tropos,thoughtbot/Tropos,thoughtbot/Tropos
|
markdown
|
## Code Before:
Run `bin/setup`
This will:
- Install the gem dependencies
- Install the pod dependencies
- Create `Secrets.h`. **You must include the necessary contents.**
## Testing ##
Run `bin/test`
This will run the tests from the command line, and pipe the result through
[XCPretty][].
[XCPretty]: https://github.com/supermarin/xcpretty
## Instruction:
Document Forecast API key setup
## Code After:
Run `bin/setup`
This will:
- Install the gem dependencies
- Install the pod dependencies
- Create `Secrets.h`. `TRForecastAPIKey` is the only one required for the
application to run. You can get a key from https://developer.forecast.io. You
should include all keys for production builds.
## Testing ##
Run `bin/test`
This will run the tests from the command line, and pipe the result through
[XCPretty][].
[XCPretty]: https://github.com/supermarin/xcpretty
|
c9ff724f69c314036a9854e4bb84a3cde25d7e02
|
src/CMakeLists.txt
|
src/CMakeLists.txt
|
set(MAIN_SOURCES
main
board
game
pawn
)
set(SOURCES)
foreach (source ${MAIN_SOURCES})
LIST(APPEND SOURCES ${source}.cpp)
add_library(${source}_cxx_obj OBJECT ${source}.cpp)
endforeach()
set(ADDITIONAL_LIBRARIES)
include_directories(${${PROJECT}_SOURCE_DIR}/src)
include_directories(${${PROJECT}_SOURCE_DIR}/)
add_executable(${PROJECT} ${SOURCES})
set_target_properties(${PROJECT} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
target_link_libraries(${PROJECT} ${ADDITIONAL_LIBRARIES})
|
set(MAIN_SOURCES
main
)
set(CORE_SOURCES
board
game
pawn
)
set(UI_SOURCES
console
)
set(SOURCES)
foreach (source ${MAIN_SOURCES})
LIST(APPEND SOURCES ${source}.cpp)
add_library(${source}_cxx_obj OBJECT ${source}.cpp)
endforeach()
foreach (source ${CORE_SOURCES})
LIST(APPEND SOURCES ${source}.cpp)
add_library(${source}_cxx_obj OBJECT ${source}.cpp)
endforeach()
foreach (source ${UI_SOURCES})
LIST(APPEND SOURCES UI/${source}.cpp)
add_library(${source}_cxx_obj OBJECT UI/${source}.cpp)
endforeach()
set(ADDITIONAL_LIBRARIES)
include_directories(${${PROJECT}_SOURCE_DIR}/src)
include_directories(${${PROJECT}_SOURCE_DIR}/)
add_executable(${PROJECT} ${SOURCES})
set_target_properties(${PROJECT} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
target_link_libraries(${PROJECT} ${ADDITIONAL_LIBRARIES})
|
Fix cmake config for source files.
|
Fix cmake config for source files.
|
Text
|
mit
|
sfod/quoridor
|
text
|
## Code Before:
set(MAIN_SOURCES
main
board
game
pawn
)
set(SOURCES)
foreach (source ${MAIN_SOURCES})
LIST(APPEND SOURCES ${source}.cpp)
add_library(${source}_cxx_obj OBJECT ${source}.cpp)
endforeach()
set(ADDITIONAL_LIBRARIES)
include_directories(${${PROJECT}_SOURCE_DIR}/src)
include_directories(${${PROJECT}_SOURCE_DIR}/)
add_executable(${PROJECT} ${SOURCES})
set_target_properties(${PROJECT} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
target_link_libraries(${PROJECT} ${ADDITIONAL_LIBRARIES})
## Instruction:
Fix cmake config for source files.
## Code After:
set(MAIN_SOURCES
main
)
set(CORE_SOURCES
board
game
pawn
)
set(UI_SOURCES
console
)
set(SOURCES)
foreach (source ${MAIN_SOURCES})
LIST(APPEND SOURCES ${source}.cpp)
add_library(${source}_cxx_obj OBJECT ${source}.cpp)
endforeach()
foreach (source ${CORE_SOURCES})
LIST(APPEND SOURCES ${source}.cpp)
add_library(${source}_cxx_obj OBJECT ${source}.cpp)
endforeach()
foreach (source ${UI_SOURCES})
LIST(APPEND SOURCES UI/${source}.cpp)
add_library(${source}_cxx_obj OBJECT UI/${source}.cpp)
endforeach()
set(ADDITIONAL_LIBRARIES)
include_directories(${${PROJECT}_SOURCE_DIR}/src)
include_directories(${${PROJECT}_SOURCE_DIR}/)
add_executable(${PROJECT} ${SOURCES})
set_target_properties(${PROJECT} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
target_link_libraries(${PROJECT} ${ADDITIONAL_LIBRARIES})
|
edc3a902a64c364168df6c10ebb825bd9e65a974
|
basin/urls.py
|
basin/urls.py
|
from django.conf.urls import patterns, include, url
from django.contrib import admin
from basin.routers import api_router
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'basin.views.index'),
url(r'^display/', 'basin.views.display'),
url(r'^api/', include(api_router.urls)),
url(r'^admin/', include(admin.site.urls)),
)
|
from django.conf.urls import patterns, include, url
from django.contrib import admin
from basin.routers import api_router
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'basin.views.display'),
url(r'^backbone/', 'basin.views.index'),
url(r'^api/', include(api_router.urls)),
url(r'^admin/', include(admin.site.urls)),
)
|
Move static mockup to root
|
Move static mockup to root
|
Python
|
mit
|
Pringley/basinweb,Pringley/basinweb
|
python
|
## Code Before:
from django.conf.urls import patterns, include, url
from django.contrib import admin
from basin.routers import api_router
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'basin.views.index'),
url(r'^display/', 'basin.views.display'),
url(r'^api/', include(api_router.urls)),
url(r'^admin/', include(admin.site.urls)),
)
## Instruction:
Move static mockup to root
## Code After:
from django.conf.urls import patterns, include, url
from django.contrib import admin
from basin.routers import api_router
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'basin.views.display'),
url(r'^backbone/', 'basin.views.index'),
url(r'^api/', include(api_router.urls)),
url(r'^admin/', include(admin.site.urls)),
)
|
2e64e971858a89db46eaf1550ccee0b67b9ea4dc
|
app.json
|
app.json
|
{
"expo": {
"name": "Desert Walk",
"description": "Solitaire card game.",
"slug": "desert-walk",
"privacy": "public",
"sdkVersion": "36.0.0",
"version": "1.0.6",
"orientation": "landscape",
"primaryColor": "#464",
"icon": "./assets/app-icon.png",
"splash": {
"image": "./assets/splash-screen.png",
"hideExponentText": false
},
"assetBundlePatterns": ["assets/**/*"],
"githubUrl": "https://github.com/janaagaard75/desert-walk",
"platforms": ["android", "ios"],
"ios": {
"bundleIdentifier": "com.janaagaard.desertwalk",
"supportsTablet": true,
"usesIcloudStorage": false,
"usesNonExemptEncryption": false
},
"android": {
"package": "com.janaagaard.desertwalk",
"versionCode": 4
}
}
}
|
{
"expo": {
"name": "Desert Walk",
"description": "Solitaire card game.",
"slug": "desert-walk",
"privacy": "public",
"sdkVersion": "36.0.0",
"version": "1.0.6",
"orientation": "landscape",
"primaryColor": "#464",
"icon": "./assets/app-icon.png",
"splash": {
"image": "./assets/splash-screen.png",
"hideExponentText": false
},
"assetBundlePatterns": ["assets/**/*"],
"githubUrl": "https://github.com/janaagaard75/desert-walk",
"platforms": ["android", "ios"],
"ios": {
"buildNumber": 5,
"bundleIdentifier": "com.janaagaard.desertwalk",
"supportsTablet": true,
"usesIcloudStorage": false,
"usesNonExemptEncryption": false
},
"android": {
"package": "com.janaagaard.desertwalk",
"versionCode": 5
}
}
}
|
Add buildNumber and increment versionCode
|
Add buildNumber and increment versionCode
|
JSON
|
mit
|
janaagaard75/desert-walk,janaagaard75/desert-walk
|
json
|
## Code Before:
{
"expo": {
"name": "Desert Walk",
"description": "Solitaire card game.",
"slug": "desert-walk",
"privacy": "public",
"sdkVersion": "36.0.0",
"version": "1.0.6",
"orientation": "landscape",
"primaryColor": "#464",
"icon": "./assets/app-icon.png",
"splash": {
"image": "./assets/splash-screen.png",
"hideExponentText": false
},
"assetBundlePatterns": ["assets/**/*"],
"githubUrl": "https://github.com/janaagaard75/desert-walk",
"platforms": ["android", "ios"],
"ios": {
"bundleIdentifier": "com.janaagaard.desertwalk",
"supportsTablet": true,
"usesIcloudStorage": false,
"usesNonExemptEncryption": false
},
"android": {
"package": "com.janaagaard.desertwalk",
"versionCode": 4
}
}
}
## Instruction:
Add buildNumber and increment versionCode
## Code After:
{
"expo": {
"name": "Desert Walk",
"description": "Solitaire card game.",
"slug": "desert-walk",
"privacy": "public",
"sdkVersion": "36.0.0",
"version": "1.0.6",
"orientation": "landscape",
"primaryColor": "#464",
"icon": "./assets/app-icon.png",
"splash": {
"image": "./assets/splash-screen.png",
"hideExponentText": false
},
"assetBundlePatterns": ["assets/**/*"],
"githubUrl": "https://github.com/janaagaard75/desert-walk",
"platforms": ["android", "ios"],
"ios": {
"buildNumber": 5,
"bundleIdentifier": "com.janaagaard.desertwalk",
"supportsTablet": true,
"usesIcloudStorage": false,
"usesNonExemptEncryption": false
},
"android": {
"package": "com.janaagaard.desertwalk",
"versionCode": 5
}
}
}
|
67e6320011c1256497662d91d04109a730d9954f
|
Casks/font-league-gothic.rb
|
Casks/font-league-gothic.rb
|
class FontLeagueGothic < Cask
url 'http://files.theleagueofmoveabletype.com/downloads/theleagueof-league-gothic-64c3ede.zip'
homepage 'https://www.theleagueofmoveabletype.com/league-gothic'
version '1.001'
sha1 '06b3c3d133ee74fe1a0a4ce5760aa50e78783d58'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedItalic.otf'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedRegular.otf'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-Italic.otf'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-Regular.otf'
end
|
class FontLeagueGothic < Cask
url 'http://files.theleagueofmoveabletype.com/downloads/theleagueof-league-gothic-64c3ede.zip'
homepage 'https://www.theleagueofmoveabletype.com/league-gothic'
version '1.001'
sha256 '2ba5f583d44e4880597812be5d0a81b616c01b4af3d2a1e39ae50c0df9d27c59'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedItalic.otf'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedRegular.otf'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-Italic.otf'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-Regular.otf'
end
|
Update League Gothic to sha256 checksums
|
Update League Gothic to sha256 checksums
|
Ruby
|
bsd-2-clause
|
scw/homebrew-fonts,kkung/homebrew-fonts,bkudria/homebrew-fonts,victorpopkov/homebrew-fonts,rstacruz/homebrew-fonts,kostasdizas/homebrew-fonts,herblover/homebrew-fonts,guerrero/homebrew-fonts,alerque/homebrew-fonts,psibre/homebrew-fonts,zorosteven/homebrew-fonts,alerque/homebrew-fonts,elmariofredo/homebrew-fonts,andrewsardone/homebrew-fonts,ahbeng/homebrew-fonts,guerrero/homebrew-fonts,psibre/homebrew-fonts,joeyhoer/homebrew-fonts,kkung/homebrew-fonts,elmariofredo/homebrew-fonts,rstacruz/homebrew-fonts,RJHsiao/homebrew-fonts,sscotth/homebrew-fonts,ahbeng/homebrew-fonts,mtakayuki/homebrew-fonts,mtakayuki/homebrew-fonts,sscotth/homebrew-fonts,scw/homebrew-fonts,andrewsardone/homebrew-fonts,bkudria/homebrew-fonts,herblover/homebrew-fonts,RJHsiao/homebrew-fonts,unasuke/homebrew-fonts,caskroom/homebrew-fonts,kostasdizas/homebrew-fonts,joeyhoer/homebrew-fonts,caskroom/homebrew-fonts,victorpopkov/homebrew-fonts,zorosteven/homebrew-fonts
|
ruby
|
## Code Before:
class FontLeagueGothic < Cask
url 'http://files.theleagueofmoveabletype.com/downloads/theleagueof-league-gothic-64c3ede.zip'
homepage 'https://www.theleagueofmoveabletype.com/league-gothic'
version '1.001'
sha1 '06b3c3d133ee74fe1a0a4ce5760aa50e78783d58'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedItalic.otf'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedRegular.otf'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-Italic.otf'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-Regular.otf'
end
## Instruction:
Update League Gothic to sha256 checksums
## Code After:
class FontLeagueGothic < Cask
url 'http://files.theleagueofmoveabletype.com/downloads/theleagueof-league-gothic-64c3ede.zip'
homepage 'https://www.theleagueofmoveabletype.com/league-gothic'
version '1.001'
sha256 '2ba5f583d44e4880597812be5d0a81b616c01b4af3d2a1e39ae50c0df9d27c59'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedItalic.otf'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedRegular.otf'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-Italic.otf'
font 'theleagueof-league-gothic-64c3ede/LeagueGothic-Regular.otf'
end
|
c78aebb5b07c7e1c6f50b2c460658b8202306fbf
|
remoting/jingle_glue/ssl_adapter.cc
|
remoting/jingle_glue/ssl_adapter.cc
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/jingle_glue/ssl_adapter.h"
#if defined(OS_WIN)
#include "third_party/libjingle/source/talk/base/ssladapter.h"
#else
#include "remoting/jingle_glue/ssl_socket_adapter.h"
#endif
namespace remoting {
talk_base::SSLAdapter* CreateSSLAdapter(talk_base::AsyncSocket* socket) {
talk_base::SSLAdapter* ssl_adapter =
#if defined(OS_WIN)
talk_base::SSLAdapter::Create(socket);
#else
remoting::SSLSocketAdapter::Create(socket);
#endif
DCHECK(ssl_adapter);
return ssl_adapter;
}
} // namespace remoting
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/jingle_glue/ssl_adapter.h"
#if defined(OS_WIN)
#include "third_party/libjingle/source/talk/base/ssladapter.h"
#else
#include "remoting/jingle_glue/ssl_socket_adapter.h"
#endif
namespace remoting {
talk_base::SSLAdapter* CreateSSLAdapter(talk_base::AsyncSocket* socket) {
talk_base::SSLAdapter* ssl_adapter =
remoting::SSLSocketAdapter::Create(socket);
DCHECK(ssl_adapter);
return ssl_adapter;
}
} // namespace remoting
|
Use NSS for SSL encryption of XMPP connection on Windows.
|
Use NSS for SSL encryption of XMPP connection on Windows.
Review URL: http://codereview.chromium.org/10169012
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@133247 0039d316-1c4b-4281-b951-d872f2087c98
|
C++
|
bsd-3-clause
|
pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,M4sse/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,dednal/chromium.src,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,ltilve/chromium,Chilledheart/chromium,timopulkkinen/BubbleFish,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,ltilve/chromium,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,robclark/chromium,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,littlstar/chromium.src,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,axinging/chromium-crosswalk,patrickm/chromium.src,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,keishi/chromium,Jonekee/chromium.src,anirudhSK/chromium,chuan9/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,axinging/chromium-crosswalk,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,Chilledheart/chromium,M4sse/chromium.src,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,hujiajie/pa-chromium,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,Chilledheart/chromium,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,dushu1203/chromium.src,timopulkkinen/BubbleFish,Jonekee/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,Chilledheart/chromium,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,robclark/chromium,keishi/chromium,nacl-webkit/chrome_deps,anirudhSK/chromium,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,keishi/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,krieger-od/nwjs_chromium.src,littlstar/chromium.src,patrickm/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,anirudhSK/chromium,dushu1203/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,zcbenz/cefode-chromium,patrickm/chromium.src,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,jaruba/chromium.src,nacl-webkit/chrome_deps,jaruba/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,robclark/chromium,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,krieger-od/nwjs_chromium.src,ltilve/chromium,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,keishi/chromium,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,keishi/chromium,keishi/chromium,hgl888/chromium-crosswalk-efl,robclark/chromium,hgl888/chromium-crosswalk,robclark/chromium,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,dednal/chromium.src,dednal/chromium.src,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,littlstar/chromium.src,krieger-od/nwjs_chromium.src,ltilve/chromium,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,M4sse/chromium.src,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,keishi/chromium,robclark/chromium,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,Chilledheart/chromium,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,littlstar/chromium.src,jaruba/chromium.src,Fireblend/chromium-crosswalk,dushu1203/chromium.src,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,dednal/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,markYoungH/chromium.src,keishi/chromium,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,markYoungH/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,dushu1203/chromium.src,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,anirudhSK/chromium,Just-D/chromium-1,ondra-novak/chromium.src,timopulkkinen/BubbleFish,robclark/chromium,patrickm/chromium.src,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,robclark/chromium,keishi/chromium,patrickm/chromium.src,dednal/chromium.src,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,anirudhSK/chromium,axinging/chromium-crosswalk,ltilve/chromium,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,dushu1203/chromium.src,dednal/chromium.src,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,robclark/chromium,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,robclark/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,Just-D/chromium-1,Chilledheart/chromium,jaruba/chromium.src,Just-D/chromium-1,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,ChromiumWebApps/chromium,Just-D/chromium-1,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,ChromiumWebApps/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,anirudhSK/chromium,ChromiumWebApps/chromium,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,keishi/chromium,Jonekee/chromium.src,hujiajie/pa-chromium,hujiajie/pa-chromium,nacl-webkit/chrome_deps,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,ltilve/chromium,Just-D/chromium-1,jaruba/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,dednal/chromium.src,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src
|
c++
|
## Code Before:
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/jingle_glue/ssl_adapter.h"
#if defined(OS_WIN)
#include "third_party/libjingle/source/talk/base/ssladapter.h"
#else
#include "remoting/jingle_glue/ssl_socket_adapter.h"
#endif
namespace remoting {
talk_base::SSLAdapter* CreateSSLAdapter(talk_base::AsyncSocket* socket) {
talk_base::SSLAdapter* ssl_adapter =
#if defined(OS_WIN)
talk_base::SSLAdapter::Create(socket);
#else
remoting::SSLSocketAdapter::Create(socket);
#endif
DCHECK(ssl_adapter);
return ssl_adapter;
}
} // namespace remoting
## Instruction:
Use NSS for SSL encryption of XMPP connection on Windows.
Review URL: http://codereview.chromium.org/10169012
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@133247 0039d316-1c4b-4281-b951-d872f2087c98
## Code After:
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/jingle_glue/ssl_adapter.h"
#if defined(OS_WIN)
#include "third_party/libjingle/source/talk/base/ssladapter.h"
#else
#include "remoting/jingle_glue/ssl_socket_adapter.h"
#endif
namespace remoting {
talk_base::SSLAdapter* CreateSSLAdapter(talk_base::AsyncSocket* socket) {
talk_base::SSLAdapter* ssl_adapter =
remoting::SSLSocketAdapter::Create(socket);
DCHECK(ssl_adapter);
return ssl_adapter;
}
} // namespace remoting
|
c8a22c6fd1c0e971a8e7ba05b699ad6e37bc6a79
|
.appveyor.yml
|
.appveyor.yml
|
environment:
matrix:
- PYTHON: "C:\\Python36-x64"
- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python35-x64"
- PYTHON: "C:\\Python35"
- PYTHON: "C:\\Python34-x64"
- PYTHON: "C:\\Python34"
platform:
- x64
- x86
matrix:
fast_finish: true
exclude:
- PYTHON: "C:\\Python36-x64"
platform: x86
- PYTHON: "C:\\Python35-x64"
platform: x86
- PYTHON: "C:\\Python34-x64"
platform: x86
build: off
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "python -m pip install --upgrade setuptools pip"
- "python -m pip install pytest coverage pytest-cov coveralls[yaml] x86cpu numpy cython"
test_script:
- "py.test -v --cov=compilertools --cov-report=term-missing"
after_test:
- "coveralls"
|
environment:
matrix:
- PYTHON: "C:\\Python37-x64"
- PYTHON: "C:\\Python37"
- PYTHON: "C:\\Python36-x64"
- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python35-x64"
- PYTHON: "C:\\Python35"
- PYTHON: "C:\\Python34-x64"
- PYTHON: "C:\\Python34"
platform:
- x64
- x86
matrix:
fast_finish: true
exclude:
- PYTHON: "C:\\Python37-x64"
platform: x86
- PYTHON: "C:\\Python36-x64"
platform: x86
- PYTHON: "C:\\Python35-x64"
platform: x86
- PYTHON: "C:\\Python34-x64"
platform: x86
build: off
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "python -m pip install --upgrade setuptools pip wheel"
- "python -m pip install pytest coverage pytest-cov coveralls[yaml] x86cpu numpy cython"
test_script:
- "py.test -v --cov=compilertools --cov-report=term-missing"
after_test:
- "coveralls"
|
Add Python 3.7 to CI
|
Add Python 3.7 to CI
|
YAML
|
bsd-2-clause
|
JGoutin/compilertools
|
yaml
|
## Code Before:
environment:
matrix:
- PYTHON: "C:\\Python36-x64"
- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python35-x64"
- PYTHON: "C:\\Python35"
- PYTHON: "C:\\Python34-x64"
- PYTHON: "C:\\Python34"
platform:
- x64
- x86
matrix:
fast_finish: true
exclude:
- PYTHON: "C:\\Python36-x64"
platform: x86
- PYTHON: "C:\\Python35-x64"
platform: x86
- PYTHON: "C:\\Python34-x64"
platform: x86
build: off
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "python -m pip install --upgrade setuptools pip"
- "python -m pip install pytest coverage pytest-cov coveralls[yaml] x86cpu numpy cython"
test_script:
- "py.test -v --cov=compilertools --cov-report=term-missing"
after_test:
- "coveralls"
## Instruction:
Add Python 3.7 to CI
## Code After:
environment:
matrix:
- PYTHON: "C:\\Python37-x64"
- PYTHON: "C:\\Python37"
- PYTHON: "C:\\Python36-x64"
- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python35-x64"
- PYTHON: "C:\\Python35"
- PYTHON: "C:\\Python34-x64"
- PYTHON: "C:\\Python34"
platform:
- x64
- x86
matrix:
fast_finish: true
exclude:
- PYTHON: "C:\\Python37-x64"
platform: x86
- PYTHON: "C:\\Python36-x64"
platform: x86
- PYTHON: "C:\\Python35-x64"
platform: x86
- PYTHON: "C:\\Python34-x64"
platform: x86
build: off
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "python -m pip install --upgrade setuptools pip wheel"
- "python -m pip install pytest coverage pytest-cov coveralls[yaml] x86cpu numpy cython"
test_script:
- "py.test -v --cov=compilertools --cov-report=term-missing"
after_test:
- "coveralls"
|
8052577164ba144263c7f45e4c823ba396f19d65
|
badgekit_webhooks/views.py
|
badgekit_webhooks/views.py
|
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.http import require_POST
import json
def hello(request):
return HttpResponse("Hello, world. Badges!!!")
@require_POST
def badge_issued_hook(request):
try:
data = json.loads(request.body)
except ValueError:
return HttpResponseBadRequest("Bad JSON")
return HttpResponse("Hello, world. Badges!!!")
|
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST
import json
def hello(request):
return HttpResponse("Hello, world. Badges!!!")
@require_POST
@csrf_exempt
def badge_issued_hook(request):
try:
data = json.loads(request.body)
except ValueError:
return HttpResponseBadRequest("Bad JSON")
return HttpResponse("Hello, world. Badges!!!")
|
Make webhook exempt from CSRF protection
|
Make webhook exempt from CSRF protection
Soon, we will add JWT verification, to replace it.
|
Python
|
mit
|
tgs/django-badgekit-webhooks
|
python
|
## Code Before:
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.http import require_POST
import json
def hello(request):
return HttpResponse("Hello, world. Badges!!!")
@require_POST
def badge_issued_hook(request):
try:
data = json.loads(request.body)
except ValueError:
return HttpResponseBadRequest("Bad JSON")
return HttpResponse("Hello, world. Badges!!!")
## Instruction:
Make webhook exempt from CSRF protection
Soon, we will add JWT verification, to replace it.
## Code After:
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST
import json
def hello(request):
return HttpResponse("Hello, world. Badges!!!")
@require_POST
@csrf_exempt
def badge_issued_hook(request):
try:
data = json.loads(request.body)
except ValueError:
return HttpResponseBadRequest("Bad JSON")
return HttpResponse("Hello, world. Badges!!!")
|
4143f3d960b820bc2bfee675ede1ab4284f286f6
|
lib/vagrant-mirror.rb
|
lib/vagrant-mirror.rb
|
require 'vagrant'
require 'vagrant-mirror/errors'
require 'vagrant-mirror/version'
require 'vagrant-mirror/config'
# Require the sync tasks
require 'vagrant-mirror/sync/base'
require 'vagrant-mirror/sync/changes'
require 'vagrant-mirror/sync/all'
# Require all the listeners for now, for specs
require 'vagrant-mirror/listener/guest'
require 'vagrant-mirror/listener/host'
require 'vagrant-mirror/listener/tcp'
# Require the connection
require 'vagrant-mirror/connection/sftp'
# Require the middlewares
require 'vagrant-mirror/middleware/base'
require 'vagrant-mirror/middleware/guestinstall'
require 'vagrant-mirror/middleware/sync'
require 'vagrant-mirror/middleware/mirror'
# Require the command
require 'vagrant-mirror/command'
# Register the config
Vagrant.config_keys.register(:mirror) { Vagrant::Mirror::Config }
# Register the command
Vagrant.commands.register(:mirror) { Vagrant::Mirror::Command }
# Add the sync middleware to the start stack
Vagrant.actions[:start].use Vagrant::Mirror::Middleware::Sync
# Add the mirror middleware to the standard stacks
Vagrant.actions[:start].insert Vagrant::VM::Provision, Vagrant::Mirror::Middleware::Mirror
|
require 'vagrant'
require 'vagrant-mirror/errors'
require 'vagrant-mirror/version'
require 'vagrant-mirror/config'
# Require the sync tasks
require 'vagrant-mirror/sync/base'
require 'vagrant-mirror/sync/changes'
require 'vagrant-mirror/sync/all'
# Require all the listeners for now, for specs
require 'vagrant-mirror/listener/guest'
require 'vagrant-mirror/listener/host'
require 'vagrant-mirror/listener/tcp'
# Require the connection
require 'vagrant-mirror/connection/sftp'
# Require the middlewares
require 'vagrant-mirror/middleware/base'
require 'vagrant-mirror/middleware/guestinstall'
require 'vagrant-mirror/middleware/sync'
require 'vagrant-mirror/middleware/mirror'
# Require the command
require 'vagrant-mirror/command'
# Register the config
Vagrant.config_keys.register(:mirror) { Vagrant::Mirror::Config }
# Register the command
Vagrant.commands.register(:mirror) { Vagrant::Mirror::Command }
# Add the sync middleware to the start stack
Vagrant.actions[:start].use Vagrant::Mirror::Middleware::Sync
# Add the mirror middleware to the standard stacks
Vagrant.actions[:start].insert Vagrant::Action::VM::Provision, Vagrant::Mirror::Middleware::Mirror
# Abort on unhandled exceptions in any thread
Thread.abort_on_exception = true
|
Fix syntax errors, abort on any thread exception
|
Fix syntax errors, abort on any thread exception
|
Ruby
|
mit
|
ingenerator/vagrant-mirror
|
ruby
|
## Code Before:
require 'vagrant'
require 'vagrant-mirror/errors'
require 'vagrant-mirror/version'
require 'vagrant-mirror/config'
# Require the sync tasks
require 'vagrant-mirror/sync/base'
require 'vagrant-mirror/sync/changes'
require 'vagrant-mirror/sync/all'
# Require all the listeners for now, for specs
require 'vagrant-mirror/listener/guest'
require 'vagrant-mirror/listener/host'
require 'vagrant-mirror/listener/tcp'
# Require the connection
require 'vagrant-mirror/connection/sftp'
# Require the middlewares
require 'vagrant-mirror/middleware/base'
require 'vagrant-mirror/middleware/guestinstall'
require 'vagrant-mirror/middleware/sync'
require 'vagrant-mirror/middleware/mirror'
# Require the command
require 'vagrant-mirror/command'
# Register the config
Vagrant.config_keys.register(:mirror) { Vagrant::Mirror::Config }
# Register the command
Vagrant.commands.register(:mirror) { Vagrant::Mirror::Command }
# Add the sync middleware to the start stack
Vagrant.actions[:start].use Vagrant::Mirror::Middleware::Sync
# Add the mirror middleware to the standard stacks
Vagrant.actions[:start].insert Vagrant::VM::Provision, Vagrant::Mirror::Middleware::Mirror
## Instruction:
Fix syntax errors, abort on any thread exception
## Code After:
require 'vagrant'
require 'vagrant-mirror/errors'
require 'vagrant-mirror/version'
require 'vagrant-mirror/config'
# Require the sync tasks
require 'vagrant-mirror/sync/base'
require 'vagrant-mirror/sync/changes'
require 'vagrant-mirror/sync/all'
# Require all the listeners for now, for specs
require 'vagrant-mirror/listener/guest'
require 'vagrant-mirror/listener/host'
require 'vagrant-mirror/listener/tcp'
# Require the connection
require 'vagrant-mirror/connection/sftp'
# Require the middlewares
require 'vagrant-mirror/middleware/base'
require 'vagrant-mirror/middleware/guestinstall'
require 'vagrant-mirror/middleware/sync'
require 'vagrant-mirror/middleware/mirror'
# Require the command
require 'vagrant-mirror/command'
# Register the config
Vagrant.config_keys.register(:mirror) { Vagrant::Mirror::Config }
# Register the command
Vagrant.commands.register(:mirror) { Vagrant::Mirror::Command }
# Add the sync middleware to the start stack
Vagrant.actions[:start].use Vagrant::Mirror::Middleware::Sync
# Add the mirror middleware to the standard stacks
Vagrant.actions[:start].insert Vagrant::Action::VM::Provision, Vagrant::Mirror::Middleware::Mirror
# Abort on unhandled exceptions in any thread
Thread.abort_on_exception = true
|
0813ec68a2d4dc53ab2a9f3f53b447edf78efa7a
|
lib/ahn/start.sh
|
lib/ahn/start.sh
|
printf "Exporting env vars...\n"
source /usr/src/app/lib/ahn/.env
export $(cut -d= -f1 /usr/src/app/lib/ahn/.env)
printf "Done.\n"
printf "Installing gems...\n"
cd /usr/src/app && bundle install
printf "Done.\n"
printf "Starting ahn...\n"
ahn start /usr/src/app
printf "Done.\n"
|
printf "Exporting env vars...\n"
source /usr/src/app/lib/ahn/.env
export $(cut -d= -f1 /usr/src/app/lib/ahn/.env)
printf "Done.\n"
printf "Starting ahn...\n"
ahn start /usr/src/app
printf "Done.\n"
|
Remove redundant `bundle install` (now in Dockerfile's ONBUILD for Adhearsion)
|
Remove redundant `bundle install` (now in Dockerfile's ONBUILD for Adhearsion)
|
Shell
|
apache-2.0
|
Coaxial/moshimoshi,Coaxial/moshimoshi,Coaxial/moshimoshi
|
shell
|
## Code Before:
printf "Exporting env vars...\n"
source /usr/src/app/lib/ahn/.env
export $(cut -d= -f1 /usr/src/app/lib/ahn/.env)
printf "Done.\n"
printf "Installing gems...\n"
cd /usr/src/app && bundle install
printf "Done.\n"
printf "Starting ahn...\n"
ahn start /usr/src/app
printf "Done.\n"
## Instruction:
Remove redundant `bundle install` (now in Dockerfile's ONBUILD for Adhearsion)
## Code After:
printf "Exporting env vars...\n"
source /usr/src/app/lib/ahn/.env
export $(cut -d= -f1 /usr/src/app/lib/ahn/.env)
printf "Done.\n"
printf "Starting ahn...\n"
ahn start /usr/src/app
printf "Done.\n"
|
0a295d3c8247bbe8d9aa62e120e633009173692d
|
Resources/doc/PairStorage/pairstorage.rst
|
Resources/doc/PairStorage/pairstorage.rst
|
===========
PairStorage
===========
|
PairStorage
===========
PairStorage is internal service used to store run-time key-value parameters in ElasticSearch document for internal usage.
Initial configuration
---------------------
Before using PairStorage, it's Document, along with all other ConnectionsBundle documents, must be registered in ElasticSearch manager, i.e.:
.. code-block:: yaml
ongr_elasticsearch:
connections:
default:
...
managers:
default:
connection: default
mappings:
- ONGRConnectionsBundle
..
Usage
-----
To use PairStorage, just get ``ongr_connections.pair_storage`` service from container:
.. code-block:: php
/** @var PairStorage $pairStorage */
$pairStorage = $this->getContainer()->get('ongr_connections.pair_storage');
..
|
Add PairStorage short description, initial configuration
|
Add PairStorage short description, initial configuration
|
reStructuredText
|
mit
|
asev/ConnectionsBundle,ongr-io/ConnectionsBundle,GrandLTU/ConnectionsBundle
|
restructuredtext
|
## Code Before:
===========
PairStorage
===========
## Instruction:
Add PairStorage short description, initial configuration
## Code After:
PairStorage
===========
PairStorage is internal service used to store run-time key-value parameters in ElasticSearch document for internal usage.
Initial configuration
---------------------
Before using PairStorage, it's Document, along with all other ConnectionsBundle documents, must be registered in ElasticSearch manager, i.e.:
.. code-block:: yaml
ongr_elasticsearch:
connections:
default:
...
managers:
default:
connection: default
mappings:
- ONGRConnectionsBundle
..
Usage
-----
To use PairStorage, just get ``ongr_connections.pair_storage`` service from container:
.. code-block:: php
/** @var PairStorage $pairStorage */
$pairStorage = $this->getContainer()->get('ongr_connections.pair_storage');
..
|
3fcb9a52176ce415cfca3269852594c200c13a35
|
packages/i3/i3blocks-hs-contrib.yaml
|
packages/i3/i3blocks-hs-contrib.yaml
|
homepage: https://github.com/panavtec/i3blocks-hs-contrib#readme
changelog-type: markdown
hash: 120cbc0e578275da9aa1543bdeaf17afe3a798e8bf6a731b83ec65fc34ecd86c
test-bench-deps: {}
maintainer: |-
Christian Panadero <[email protected]>,
Carlos Morera <[email protected]>
synopsis: Base i3blocks written in haskell
changelog: |
## Changes in 0.1.0
Initial version
basic-deps:
lens-aeson: <1.1
base: ! '>=4.3 && <5'
time: <1.9
text: <1.3
turtle: <1.6
wreq: <0.5
lens: <4.2
attoparsec: <0.14
transformers: <0.6
aeson: <1.5
all-versions:
- 1.0.0
author: |-
Christian Panadero <[email protected]>,
Carlos Morera <[email protected]>
latest: 1.0.0
description-type: haddock
description: ! '@i3blocks-hs-contrib@ defines a set of blocks for your i3 bar'
license-name: MIT
|
homepage: https://github.com/panavtec/i3blocks-hs-contrib#readme
changelog-type: markdown
hash: a23b2a9d36d8406b467ea5cb59ff5fe169acfee0142c730671a03cb1f04f0c8c
test-bench-deps: {}
maintainer: |-
Christian Panadero <[email protected]>,
Carlos Morera <[email protected]>
synopsis: Base i3blocks written in haskell
changelog: |
## Changes in 0.1.0
Initial version
basic-deps:
http-client: <0.7
base: '>=4.3 && <5'
time: <1.9
text: <1.3
turtle: <1.6
http-client-tls: <0.4
attoparsec: <0.14
transformers: <0.6
aeson: <1.5
all-versions:
- 1.0.0
- 2.0.0
author: |-
Christian Panadero <[email protected]>,
Carlos Morera <[email protected]>
latest: 2.0.0
description-type: haddock
description: '@i3blocks-hs-contrib@ defines a set of blocks for your i3 bar'
license-name: MIT
|
Update from Hackage at 2020-04-10T16:16:07Z
|
Update from Hackage at 2020-04-10T16:16:07Z
|
YAML
|
mit
|
commercialhaskell/all-cabal-metadata
|
yaml
|
## Code Before:
homepage: https://github.com/panavtec/i3blocks-hs-contrib#readme
changelog-type: markdown
hash: 120cbc0e578275da9aa1543bdeaf17afe3a798e8bf6a731b83ec65fc34ecd86c
test-bench-deps: {}
maintainer: |-
Christian Panadero <[email protected]>,
Carlos Morera <[email protected]>
synopsis: Base i3blocks written in haskell
changelog: |
## Changes in 0.1.0
Initial version
basic-deps:
lens-aeson: <1.1
base: ! '>=4.3 && <5'
time: <1.9
text: <1.3
turtle: <1.6
wreq: <0.5
lens: <4.2
attoparsec: <0.14
transformers: <0.6
aeson: <1.5
all-versions:
- 1.0.0
author: |-
Christian Panadero <[email protected]>,
Carlos Morera <[email protected]>
latest: 1.0.0
description-type: haddock
description: ! '@i3blocks-hs-contrib@ defines a set of blocks for your i3 bar'
license-name: MIT
## Instruction:
Update from Hackage at 2020-04-10T16:16:07Z
## Code After:
homepage: https://github.com/panavtec/i3blocks-hs-contrib#readme
changelog-type: markdown
hash: a23b2a9d36d8406b467ea5cb59ff5fe169acfee0142c730671a03cb1f04f0c8c
test-bench-deps: {}
maintainer: |-
Christian Panadero <[email protected]>,
Carlos Morera <[email protected]>
synopsis: Base i3blocks written in haskell
changelog: |
## Changes in 0.1.0
Initial version
basic-deps:
http-client: <0.7
base: '>=4.3 && <5'
time: <1.9
text: <1.3
turtle: <1.6
http-client-tls: <0.4
attoparsec: <0.14
transformers: <0.6
aeson: <1.5
all-versions:
- 1.0.0
- 2.0.0
author: |-
Christian Panadero <[email protected]>,
Carlos Morera <[email protected]>
latest: 2.0.0
description-type: haddock
description: '@i3blocks-hs-contrib@ defines a set of blocks for your i3 bar'
license-name: MIT
|
9560054591eb8927edb42304b881701196f260cd
|
spec/spec_helper.rb
|
spec/spec_helper.rb
|
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/its'
require 'coveralls'
Coveralls.wear!
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
RSpec.configure do |config|
config.include ApplicationHelper
config.include CoursesHelper
config.include LoginHelpers
config.use_transactional_fixtures = true
config.infer_base_class_for_anonymous_controllers = false
config.order = "random"
config.expect_with :rspec do |c|
c.syntax = :expect
end
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.strategy = :deletion
end
config.around(:each) do |example|
DatabaseCleaner.cleaning do
example.run
end
end
end
|
require 'simplecov'
require 'coveralls'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
SimpleCov.start 'rails' do
add_group "Presenters", "app/presenters"
add_group "Policies", "app/policies"
end
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/its'
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
RSpec.configure do |config|
config.include ApplicationHelper
config.include CoursesHelper
config.include LoginHelpers
config.use_transactional_fixtures = true
config.infer_base_class_for_anonymous_controllers = false
config.order = "random"
config.expect_with :rspec do |c|
c.syntax = :expect
end
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.strategy = :deletion
end
config.around(:each) do |example|
DatabaseCleaner.cleaning do
example.run
end
end
end
|
Configure tests to format coverage results locally
|
Configure tests to format coverage results locally
This should keep coveralls working, but also emit the output in
coverage/index.html so that you can see the effect of your change when
writing it.
Also use the rails profile so results are neatly grouped.
|
Ruby
|
mit
|
despo/planner,matyikriszta/planner,matyikriszta/planner,margOnline/planner,laszpio/planner,laszpio/planner,despo/planner,laszpio/planner,boddhisattva/planner,codebar/planner,margOnline/planner,despo/planner,laszpio/planner,matyikriszta/planner,boddhisattva/planner,dondonz/planner,spike01/planner,spike01/planner,codebar/planner,dondonz/planner,boddhisattva/planner,spike01/planner,margOnline/planner,spike01/planner,dondonz/planner,codebar/planner,codebar/planner,despo/planner
|
ruby
|
## Code Before:
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/its'
require 'coveralls'
Coveralls.wear!
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
RSpec.configure do |config|
config.include ApplicationHelper
config.include CoursesHelper
config.include LoginHelpers
config.use_transactional_fixtures = true
config.infer_base_class_for_anonymous_controllers = false
config.order = "random"
config.expect_with :rspec do |c|
c.syntax = :expect
end
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.strategy = :deletion
end
config.around(:each) do |example|
DatabaseCleaner.cleaning do
example.run
end
end
end
## Instruction:
Configure tests to format coverage results locally
This should keep coveralls working, but also emit the output in
coverage/index.html so that you can see the effect of your change when
writing it.
Also use the rails profile so results are neatly grouped.
## Code After:
require 'simplecov'
require 'coveralls'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
SimpleCov.start 'rails' do
add_group "Presenters", "app/presenters"
add_group "Policies", "app/policies"
end
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/its'
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
RSpec.configure do |config|
config.include ApplicationHelper
config.include CoursesHelper
config.include LoginHelpers
config.use_transactional_fixtures = true
config.infer_base_class_for_anonymous_controllers = false
config.order = "random"
config.expect_with :rspec do |c|
c.syntax = :expect
end
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.strategy = :deletion
end
config.around(:each) do |example|
DatabaseCleaner.cleaning do
example.run
end
end
end
|
dfa67685ba284fc652661591d78c5cda846680df
|
test-src/test_readline_flash.as
|
test-src/test_readline_flash.as
|
package {
import stdio.flash.Sprite
import stdio.process
import stdio.Interactive
[SWF(width=0, height=0)]
public class test_readline_flash extends Sprite implements Interactive {
public function main(): void {
process.prompt = "What’s your name? "
process.gets(function (name: String): void {
process.puts("Hello, " + name + "!")
process.prompt = "Favorite color? "
process.gets(function (color: String): void {
process.puts("I like " + color + " too!")
process.exit()
})
})
}
}
}
|
package {
import stdio.colorize
import stdio.flash.Sprite
import stdio.process
import stdio.Interactive
[SWF(width=0, height=0)]
public class test_readline_flash extends Sprite implements Interactive {
public function main(): void {
process.prompt = "What’s your name? "
process.gets(function (name: String): void {
process.puts("Hello, " + name + "!")
process.prompt = "What’s your favorite color? "
process.gets(function (color: String): void {
color = color.toLowerCase()
process.puts(
"I like " + colorize(
"%{bold}%{" + color + "}" + color + "%{none}"
) + " too!"
)
process.exit()
})
})
}
}
}
|
Use `colorize` in readline test.
|
Use `colorize` in readline test.
|
ActionScript
|
mit
|
dbrock/stdio.as,dbrock/stdio.as,dbrock/stdio.as
|
actionscript
|
## Code Before:
package {
import stdio.flash.Sprite
import stdio.process
import stdio.Interactive
[SWF(width=0, height=0)]
public class test_readline_flash extends Sprite implements Interactive {
public function main(): void {
process.prompt = "What’s your name? "
process.gets(function (name: String): void {
process.puts("Hello, " + name + "!")
process.prompt = "Favorite color? "
process.gets(function (color: String): void {
process.puts("I like " + color + " too!")
process.exit()
})
})
}
}
}
## Instruction:
Use `colorize` in readline test.
## Code After:
package {
import stdio.colorize
import stdio.flash.Sprite
import stdio.process
import stdio.Interactive
[SWF(width=0, height=0)]
public class test_readline_flash extends Sprite implements Interactive {
public function main(): void {
process.prompt = "What’s your name? "
process.gets(function (name: String): void {
process.puts("Hello, " + name + "!")
process.prompt = "What’s your favorite color? "
process.gets(function (color: String): void {
color = color.toLowerCase()
process.puts(
"I like " + colorize(
"%{bold}%{" + color + "}" + color + "%{none}"
) + " too!"
)
process.exit()
})
})
}
}
}
|
f96617f9178bb828cc8841b8ec4c18fdbf2cceb3
|
.travis.yml
|
.travis.yml
|
sudo: false
filter_secrets: false
dist: xenial
addons:
apt:
packages:
- inkscape
language: python
python:
- 2.7
before_install:
- pip install --upgrade setuptools
- pip install nose coverage
- pip install -r requirements.txt
- pip install -e .[tests,sphinx,images,svgsupport,aafiguresupport,mathsupport,rawhtmlsupport]
script:
- nosetests -i regulartest -i sphinxtest
|
sudo: false
filter_secrets: false
dist: xenial
addons:
apt:
packages:
- inkscape
- texlive-latex-base
- dvipng
language: python
python:
- 2.7
before_install:
- pip install --upgrade setuptools
- pip install nose coverage
- pip install -r requirements.txt
- pip install -e .[tests,sphinx,images,svgsupport,aafiguresupport,mathsupport,rawhtmlsupport]
script:
- nosetests -i regulartest -i sphinxtest
|
Add Latex and dvipng to Travis
|
Add Latex and dvipng to Travis
These are needed for Sphinx imgmath extension.
|
YAML
|
mit
|
rst2pdf/rst2pdf,rst2pdf/rst2pdf
|
yaml
|
## Code Before:
sudo: false
filter_secrets: false
dist: xenial
addons:
apt:
packages:
- inkscape
language: python
python:
- 2.7
before_install:
- pip install --upgrade setuptools
- pip install nose coverage
- pip install -r requirements.txt
- pip install -e .[tests,sphinx,images,svgsupport,aafiguresupport,mathsupport,rawhtmlsupport]
script:
- nosetests -i regulartest -i sphinxtest
## Instruction:
Add Latex and dvipng to Travis
These are needed for Sphinx imgmath extension.
## Code After:
sudo: false
filter_secrets: false
dist: xenial
addons:
apt:
packages:
- inkscape
- texlive-latex-base
- dvipng
language: python
python:
- 2.7
before_install:
- pip install --upgrade setuptools
- pip install nose coverage
- pip install -r requirements.txt
- pip install -e .[tests,sphinx,images,svgsupport,aafiguresupport,mathsupport,rawhtmlsupport]
script:
- nosetests -i regulartest -i sphinxtest
|
2ccca7dca1b4c6bbdcc5bf3faf408c6f14d388bf
|
gulpfile.js
|
gulpfile.js
|
var gulp = require('gulp')
, gutil = require('gulp-util')
, help = require('gulp-help')
, path = require('path')
, packageJson = require(path.resolve(__dirname, 'package.json'))
, noop = function(){}
help(gulp, { aliases: ['h'] })
gulp.task('version', 'Prints the version number.', [], function() {
console.log(packageJson.version)
}, {
aliases: ['v']
})
gulp.task('init', 'Initializes the project.', function() {
})
gulp.task('migrate', 'Run pending migrations.', function() {
})
gulp.task('migrate:undo', 'Undo the last migration.', function() {
})
gulp.task('migration:create', 'Creates a new migration.', function() {
})
|
var gulp = require('gulp')
, path = require('path')
, fs = require('fs')
, helpers = require(path.resolve(__dirname, 'lib', 'helpers'))
require('gulp-help')(gulp, { aliases: ['h'] })
fs
.readdirSync(path.resolve(__dirname, 'lib', 'tasks'))
.filter(function(file) { return file.indexOf('.') !== 0 })
.map(function(file) {
return require(path.resolve(__dirname, 'lib', 'tasks', file))
})
.forEach(function(tasks) {
Object.keys(tasks).forEach(function(taskName) {
helpers.addTask(gulp, taskName, tasks[taskName])
helpers.addHelp(gulp, taskName, tasks[taskName])
})
})
|
Load the tasks from lib/tasks
|
Load the tasks from lib/tasks
|
JavaScript
|
mit
|
my-archives/cli,martinLE/cli,cogpie/cli,itslenny/cli,sequelize/cli,ataube/cli,martinLE/cli,Americas/cli,timrourke/cli,brad-decker/cli,sequelize/cli,Americas/cli,skv-headless/cli,jteplitz602/cli,xpepermint/cli,brad-decker/cli,brad-decker/cli,martinLE/cli,Americas/cli,sequelize/cli,fundon/cli,cusspvz/sequelize-cli
|
javascript
|
## Code Before:
var gulp = require('gulp')
, gutil = require('gulp-util')
, help = require('gulp-help')
, path = require('path')
, packageJson = require(path.resolve(__dirname, 'package.json'))
, noop = function(){}
help(gulp, { aliases: ['h'] })
gulp.task('version', 'Prints the version number.', [], function() {
console.log(packageJson.version)
}, {
aliases: ['v']
})
gulp.task('init', 'Initializes the project.', function() {
})
gulp.task('migrate', 'Run pending migrations.', function() {
})
gulp.task('migrate:undo', 'Undo the last migration.', function() {
})
gulp.task('migration:create', 'Creates a new migration.', function() {
})
## Instruction:
Load the tasks from lib/tasks
## Code After:
var gulp = require('gulp')
, path = require('path')
, fs = require('fs')
, helpers = require(path.resolve(__dirname, 'lib', 'helpers'))
require('gulp-help')(gulp, { aliases: ['h'] })
fs
.readdirSync(path.resolve(__dirname, 'lib', 'tasks'))
.filter(function(file) { return file.indexOf('.') !== 0 })
.map(function(file) {
return require(path.resolve(__dirname, 'lib', 'tasks', file))
})
.forEach(function(tasks) {
Object.keys(tasks).forEach(function(taskName) {
helpers.addTask(gulp, taskName, tasks[taskName])
helpers.addHelp(gulp, taskName, tasks[taskName])
})
})
|
2cee2a3c89528c8c98f7ad33122910bee7a9b735
|
src/dashboard/src/templates/installer/storagesetup.html
|
src/dashboard/src/templates/installer/storagesetup.html
|
{% extends "layout.html" %}
{% block title %}Welcome{% endblock %}
{% block h1 %}Welcome{% endblock %}
{% block page_id %}welcome{% endblock %}
{% block extra_css %}
<style type="text/css">
.submit {
margin-bottom: 1em;
}
</style>
{% endblock %}
{% block content %}
<div class="row">
<div class="span9 offset2">
<img src="{{ STATIC_URL }}images/logo_welcome.gif" style="margin-bottom: 20px;" />
<form action="#" method="POST">
<div id="storage" class="well">
<p>Dashboard UUID: {{ dashboard_uuid }}</p>
{{ storage_form.as_p }}
<p>Would you like to used the default transfer source and AIP storage locations?</p>
</div>
<input class="submit" type="submit" name="use_default" value="Use default transfer source & AIP storage locations" />
<input class="submit" type="submit" name="configure" value="Register this pipeline & set up transfer source and AIP storage locations" onclick="window.open($('#id_storage_service_url').val());" />
</form>
</div>
</div>
{% endblock %}
|
{% extends "layout.html" %}
{% block title %}Welcome{% endblock %}
{% block h1 %}Welcome{% endblock %}
{% block page_id %}welcome{% endblock %}
{% block extra_css %}
<style type="text/css">
.submit {
margin-bottom: 1em;
}
</style>
{% endblock %}
{% block content %}
<div class="row">
<div class="span9 offset2">
<img src="{{ STATIC_URL }}images/logo_welcome.gif" style="margin-bottom: 20px;" />
<form action="#" method="POST">
<div id="storage" class="well">
<p>Dashboard UUID: {{ dashboard_uuid }}</p>
{{ storage_form.as_p }}
<p>Would you like to used the default transfer source and AIP storage locations?</p>
</div>
<input class="submit" type="submit" name="use_default" value="Register with the storage service & use default configuration." />
<input class="submit" type="submit" name="configure" value="Register with the storage service & set up custom configuration." onclick="window.open($('#id_storage_service_url').val());" />
</form>
</div>
</div>
{% endblock %}
|
Update storage service setup text
|
Installer: Update storage service setup text
|
HTML
|
agpl-3.0
|
artefactual/archivematica,artefactual/archivematica,artefactual/archivematica,sevein/archivematica,sevein/archivematica,artefactual/archivematica,sevein/archivematica,sevein/archivematica
|
html
|
## Code Before:
{% extends "layout.html" %}
{% block title %}Welcome{% endblock %}
{% block h1 %}Welcome{% endblock %}
{% block page_id %}welcome{% endblock %}
{% block extra_css %}
<style type="text/css">
.submit {
margin-bottom: 1em;
}
</style>
{% endblock %}
{% block content %}
<div class="row">
<div class="span9 offset2">
<img src="{{ STATIC_URL }}images/logo_welcome.gif" style="margin-bottom: 20px;" />
<form action="#" method="POST">
<div id="storage" class="well">
<p>Dashboard UUID: {{ dashboard_uuid }}</p>
{{ storage_form.as_p }}
<p>Would you like to used the default transfer source and AIP storage locations?</p>
</div>
<input class="submit" type="submit" name="use_default" value="Use default transfer source & AIP storage locations" />
<input class="submit" type="submit" name="configure" value="Register this pipeline & set up transfer source and AIP storage locations" onclick="window.open($('#id_storage_service_url').val());" />
</form>
</div>
</div>
{% endblock %}
## Instruction:
Installer: Update storage service setup text
## Code After:
{% extends "layout.html" %}
{% block title %}Welcome{% endblock %}
{% block h1 %}Welcome{% endblock %}
{% block page_id %}welcome{% endblock %}
{% block extra_css %}
<style type="text/css">
.submit {
margin-bottom: 1em;
}
</style>
{% endblock %}
{% block content %}
<div class="row">
<div class="span9 offset2">
<img src="{{ STATIC_URL }}images/logo_welcome.gif" style="margin-bottom: 20px;" />
<form action="#" method="POST">
<div id="storage" class="well">
<p>Dashboard UUID: {{ dashboard_uuid }}</p>
{{ storage_form.as_p }}
<p>Would you like to used the default transfer source and AIP storage locations?</p>
</div>
<input class="submit" type="submit" name="use_default" value="Register with the storage service & use default configuration." />
<input class="submit" type="submit" name="configure" value="Register with the storage service & set up custom configuration." onclick="window.open($('#id_storage_service_url').val());" />
</form>
</div>
</div>
{% endblock %}
|
6834c0ae00128e76eac8650f037f914ceba90836
|
roles/desktop/tasks/grub.yml
|
roles/desktop/tasks/grub.yml
|
---
- name: grub - show menu
lineinfile:
path: /etc/default/grub
regexp: '^#?GRUB_TIMEOUT_STYLE\s*='
line: 'GRUB_TIMEOUT_STYLE=menu'
become: true
- name: grub - set timeout
lineinfile:
path: /etc/default/grub
regexp: '^#?GRUB_TIMEOUT\s*='
line: 'GRUB_TIMEOUT=3'
become: true
- name: grub - disable splash screen
lineinfile:
path: /etc/default/grub
regexp: '^#?GRUB_CMDLINE_LINUX_DEFAULT\s*='
line: 'GRUB_CMDLINE_LINUX_DEFAULT=""'
become: true
- name: grub - run update-grub
command: update-grub
become: true
|
---
- name: grub - show menu
lineinfile:
path: /etc/default/grub
regexp: '^#?GRUB_TIMEOUT_STYLE\s*='
line: 'GRUB_TIMEOUT_STYLE=menu'
become: true
- name: grub - set timeout
lineinfile:
path: /etc/default/grub
regexp: '^#?GRUB_TIMEOUT\s*='
line: 'GRUB_TIMEOUT=3'
become: true
# Suport 2-finger scroll on thinkpads;
# https://askubuntu.com/a/971893
- name: grub - disable splash screen
lineinfile:
path: /etc/default/grub
line: 'GRUB_CMDLINE_LINUX_DEFAULT="psmouse.synaptics_intertouch=0"'
regexp: '^#?GRUB_CMDLINE_LINUX_DEFAULT\s*='
become: true
- name: grub - run update-grub
command: update-grub
become: true
|
Fix scrolling behaviour on touchpads
|
Fix scrolling behaviour on touchpads
|
YAML
|
mit
|
andornaut/ansible-workstation
|
yaml
|
## Code Before:
---
- name: grub - show menu
lineinfile:
path: /etc/default/grub
regexp: '^#?GRUB_TIMEOUT_STYLE\s*='
line: 'GRUB_TIMEOUT_STYLE=menu'
become: true
- name: grub - set timeout
lineinfile:
path: /etc/default/grub
regexp: '^#?GRUB_TIMEOUT\s*='
line: 'GRUB_TIMEOUT=3'
become: true
- name: grub - disable splash screen
lineinfile:
path: /etc/default/grub
regexp: '^#?GRUB_CMDLINE_LINUX_DEFAULT\s*='
line: 'GRUB_CMDLINE_LINUX_DEFAULT=""'
become: true
- name: grub - run update-grub
command: update-grub
become: true
## Instruction:
Fix scrolling behaviour on touchpads
## Code After:
---
- name: grub - show menu
lineinfile:
path: /etc/default/grub
regexp: '^#?GRUB_TIMEOUT_STYLE\s*='
line: 'GRUB_TIMEOUT_STYLE=menu'
become: true
- name: grub - set timeout
lineinfile:
path: /etc/default/grub
regexp: '^#?GRUB_TIMEOUT\s*='
line: 'GRUB_TIMEOUT=3'
become: true
# Suport 2-finger scroll on thinkpads;
# https://askubuntu.com/a/971893
- name: grub - disable splash screen
lineinfile:
path: /etc/default/grub
line: 'GRUB_CMDLINE_LINUX_DEFAULT="psmouse.synaptics_intertouch=0"'
regexp: '^#?GRUB_CMDLINE_LINUX_DEFAULT\s*='
become: true
- name: grub - run update-grub
command: update-grub
become: true
|
dba4a31d4e7441b3224667183394bdcc53a93dab
|
Casks/fontprep.rb
|
Casks/fontprep.rb
|
class Fontprep < Cask
version :latest
sha256 :no_check
url 'http://fontprep.com/download'
homepage 'http://fontprep.com'
license :unknown
app 'FontPrep.app'
end
|
class Fontprep < Cask
version '3.1.1'
sha256 '769d64b78d1a8db42dcb02beff6f929670448f77259388c9d01692374be2ec46'
url "https://github.com/briangonzalez/fontprep/releases/download/v3.1.1/FontPrep_#{version}.zip"
homepage 'http://fontprep.com'
license :gpl
app 'FontPrep.app'
end
|
Update Fontprep URL, version, license
|
Update Fontprep URL, version, license
URL has changed to Github, requiring to specify version.
|
Ruby
|
bsd-2-clause
|
fwiesel/homebrew-cask,johndbritton/homebrew-cask,nysthee/homebrew-cask,mariusbutuc/homebrew-cask,mishari/homebrew-cask,nathansgreen/homebrew-cask,supriyantomaftuh/homebrew-cask,sebcode/homebrew-cask,CameronGarrett/homebrew-cask,feniix/homebrew-cask,mrmachine/homebrew-cask,vitorgalvao/homebrew-cask,thomanq/homebrew-cask,klane/homebrew-cask,ponychicken/homebrew-customcask,djakarta-trap/homebrew-myCask,zerrot/homebrew-cask,timsutton/homebrew-cask,giannitm/homebrew-cask,githubutilities/homebrew-cask,scottsuch/homebrew-cask,tdsmith/homebrew-cask,hovancik/homebrew-cask,englishm/homebrew-cask,jppelteret/homebrew-cask,mazehall/homebrew-cask,lalyos/homebrew-cask,inz/homebrew-cask,jayshao/homebrew-cask,ianyh/homebrew-cask,JacopKane/homebrew-cask,MoOx/homebrew-cask,puffdad/homebrew-cask,chrisRidgers/homebrew-cask,kevyau/homebrew-cask,sjackman/homebrew-cask,lucasmezencio/homebrew-cask,tangestani/homebrew-cask,cliffcotino/homebrew-cask,wickles/homebrew-cask,mjgardner/homebrew-cask,codeurge/homebrew-cask,vigosan/homebrew-cask,muan/homebrew-cask,cohei/homebrew-cask,zhuzihhhh/homebrew-cask,otzy007/homebrew-cask,gilesdring/homebrew-cask,afdnlw/homebrew-cask,kuno/homebrew-cask,ponychicken/homebrew-customcask,paulombcosta/homebrew-cask,bosr/homebrew-cask,cedwardsmedia/homebrew-cask,malford/homebrew-cask,mahori/homebrew-cask,hellosky806/homebrew-cask,mathbunnyru/homebrew-cask,ldong/homebrew-cask,genewoo/homebrew-cask,faun/homebrew-cask,AndreTheHunter/homebrew-cask,phpwutz/homebrew-cask,yurikoles/homebrew-cask,greg5green/homebrew-cask,mindriot101/homebrew-cask,miccal/homebrew-cask,julionc/homebrew-cask,troyxmccall/homebrew-cask,zmwangx/homebrew-cask,malford/homebrew-cask,elnappo/homebrew-cask,casidiablo/homebrew-cask,caskroom/homebrew-cask,maxnordlund/homebrew-cask,dlovitch/homebrew-cask,adrianchia/homebrew-cask,coeligena/homebrew-customized,andrewdisley/homebrew-cask,JacopKane/homebrew-cask,Ketouem/homebrew-cask,FredLackeyOfficial/homebrew-cask,kuno/homebrew-cask,slnovak/homebrew-cask,winkelsdorf/homebrew-cask,moonboots/homebrew-cask,MatzFan/homebrew-cask,pinut/homebrew-cask,gustavoavellar/homebrew-cask,MircoT/homebrew-cask,nickpellant/homebrew-cask,tedski/homebrew-cask,pacav69/homebrew-cask,AndreTheHunter/homebrew-cask,guerrero/homebrew-cask,xiongchiamiov/homebrew-cask,tranc99/homebrew-cask,johnjelinek/homebrew-cask,jconley/homebrew-cask,cclauss/homebrew-cask,vigosan/homebrew-cask,Bombenleger/homebrew-cask,royalwang/homebrew-cask,lukeadams/homebrew-cask,fharbe/homebrew-cask,scribblemaniac/homebrew-cask,wolflee/homebrew-cask,jasmas/homebrew-cask,Fedalto/homebrew-cask,mingzhi22/homebrew-cask,mathbunnyru/homebrew-cask,winkelsdorf/homebrew-cask,scottsuch/homebrew-cask,adrianchia/homebrew-cask,kryhear/homebrew-cask,dwihn0r/homebrew-cask,ctrevino/homebrew-cask,leonmachadowilcox/homebrew-cask,wolflee/homebrew-cask,hellosky806/homebrew-cask,fazo96/homebrew-cask,wizonesolutions/homebrew-cask,a1russell/homebrew-cask,ericbn/homebrew-cask,kievechua/homebrew-cask,6uclz1/homebrew-cask,fanquake/homebrew-cask,BenjaminHCCarr/homebrew-cask,vitorgalvao/homebrew-cask,otaran/homebrew-cask,franklouwers/homebrew-cask,Philosoft/homebrew-cask,afdnlw/homebrew-cask,mokagio/homebrew-cask,shorshe/homebrew-cask,victorpopkov/homebrew-cask,mhubig/homebrew-cask,m3nu/homebrew-cask,troyxmccall/homebrew-cask,dcondrey/homebrew-cask,cobyism/homebrew-cask,robbiethegeek/homebrew-cask,kkdd/homebrew-cask,ingorichter/homebrew-cask,howie/homebrew-cask,xalep/homebrew-cask,kirikiriyamama/homebrew-cask,skyyuan/homebrew-cask,astorije/homebrew-cask,amatos/homebrew-cask,claui/homebrew-cask,gerrypower/homebrew-cask,carlmod/homebrew-cask,spruceb/homebrew-cask,cprecioso/homebrew-cask,deiga/homebrew-cask,underyx/homebrew-cask,mikem/homebrew-cask,flaviocamilo/homebrew-cask,jangalinski/homebrew-cask,stephenwade/homebrew-cask,lvicentesanchez/homebrew-cask,pgr0ss/homebrew-cask,zeusdeux/homebrew-cask,mahori/homebrew-cask,colindean/homebrew-cask,joaoponceleao/homebrew-cask,alebcay/homebrew-cask,rickychilcott/homebrew-cask,gyndav/homebrew-cask,hakamadare/homebrew-cask,kamilboratynski/homebrew-cask,danielbayley/homebrew-cask,mchlrmrz/homebrew-cask,hovancik/homebrew-cask,MisumiRize/homebrew-cask,bsiddiqui/homebrew-cask,dieterdemeyer/homebrew-cask,haha1903/homebrew-cask,hristozov/homebrew-cask,mwilmer/homebrew-cask,sgnh/homebrew-cask,syscrusher/homebrew-cask,artdevjs/homebrew-cask,rogeriopradoj/homebrew-cask,deanmorin/homebrew-cask,xtian/homebrew-cask,feigaochn/homebrew-cask,Gasol/homebrew-cask,CameronGarrett/homebrew-cask,fharbe/homebrew-cask,mathbunnyru/homebrew-cask,lieuwex/homebrew-cask,kolomiichenko/homebrew-cask,gerrymiller/homebrew-cask,mfpierre/homebrew-cask,toonetown/homebrew-cask,epardee/homebrew-cask,tjnycum/homebrew-cask,reitermarkus/homebrew-cask,blainesch/homebrew-cask,jiashuw/homebrew-cask,sscotth/homebrew-cask,mkozjak/homebrew-cask,mjgardner/homebrew-cask,0xadada/homebrew-cask,nathansgreen/homebrew-cask,13k/homebrew-cask,gguillotte/homebrew-cask,victorpopkov/homebrew-cask,wayou/homebrew-cask,shanonvl/homebrew-cask,devmynd/homebrew-cask,alebcay/homebrew-cask,alexg0/homebrew-cask,opsdev-ws/homebrew-cask,helloIAmPau/homebrew-cask,yutarody/homebrew-cask,opsdev-ws/homebrew-cask,rhendric/homebrew-cask,jawshooah/homebrew-cask,optikfluffel/homebrew-cask,Saklad5/homebrew-cask,shoichiaizawa/homebrew-cask,tjnycum/homebrew-cask,jen20/homebrew-cask,gerrymiller/homebrew-cask,skatsuta/homebrew-cask,petmoo/homebrew-cask,moogar0880/homebrew-cask,AdamCmiel/homebrew-cask,a1russell/homebrew-cask,psibre/homebrew-cask,lauantai/homebrew-cask,sscotth/homebrew-cask,kirikiriyamama/homebrew-cask,mattrobenolt/homebrew-cask,Gasol/homebrew-cask,mindriot101/homebrew-cask,alebcay/homebrew-cask,sanyer/homebrew-cask,Ketouem/homebrew-cask,squid314/homebrew-cask,genewoo/homebrew-cask,qnm/homebrew-cask,rubenerd/homebrew-cask,diogodamiani/homebrew-cask,0rax/homebrew-cask,kievechua/homebrew-cask,nrlquaker/homebrew-cask,doits/homebrew-cask,slack4u/homebrew-cask,riyad/homebrew-cask,hvisage/homebrew-cask,nelsonjchen/homebrew-cask,Ephemera/homebrew-cask,koenrh/homebrew-cask,aki77/homebrew-cask,jbeagley52/homebrew-cask,jbeagley52/homebrew-cask,mauricerkelly/homebrew-cask,joschi/homebrew-cask,astorije/homebrew-cask,vmrob/homebrew-cask,ksato9700/homebrew-cask,xyb/homebrew-cask,vmrob/homebrew-cask,chrisfinazzo/homebrew-cask,kevyau/homebrew-cask,gabrielizaias/homebrew-cask,ajbw/homebrew-cask,nshemonsky/homebrew-cask,wuman/homebrew-cask,kteru/homebrew-cask,Labutin/homebrew-cask,royalwang/homebrew-cask,rogeriopradoj/homebrew-cask,cprecioso/homebrew-cask,katoquro/homebrew-cask,lcasey001/homebrew-cask,kronicd/homebrew-cask,bric3/homebrew-cask,blogabe/homebrew-cask,gmkey/homebrew-cask,shanonvl/homebrew-cask,timsutton/homebrew-cask,xtian/homebrew-cask,retrography/homebrew-cask,exherb/homebrew-cask,lantrix/homebrew-cask,shonjir/homebrew-cask,phpwutz/homebrew-cask,barravi/homebrew-cask,nivanchikov/homebrew-cask,illusionfield/homebrew-cask,shishi/homebrew-cask,hakamadare/homebrew-cask,iamso/homebrew-cask,SentinelWarren/homebrew-cask,exherb/homebrew-cask,buo/homebrew-cask,csmith-palantir/homebrew-cask,sparrc/homebrew-cask,samnung/homebrew-cask,rcuza/homebrew-cask,chadcatlett/caskroom-homebrew-cask,dcondrey/homebrew-cask,gwaldo/homebrew-cask,mkozjak/homebrew-cask,uetchy/homebrew-cask,kingthorin/homebrew-cask,paulbreslin/homebrew-cask,frapposelli/homebrew-cask,wickles/homebrew-cask,johndbritton/homebrew-cask,theoriginalgri/homebrew-cask,elyscape/homebrew-cask,howie/homebrew-cask,hristozov/homebrew-cask,rkJun/homebrew-cask,robertgzr/homebrew-cask,morsdyce/homebrew-cask,syscrusher/homebrew-cask,valepert/homebrew-cask,jspahrsummers/homebrew-cask,Amorymeltzer/homebrew-cask,jeroenseegers/homebrew-cask,janlugt/homebrew-cask,d/homebrew-cask,nathancahill/homebrew-cask,RogerThiede/homebrew-cask,epardee/homebrew-cask,morganestes/homebrew-cask,jaredsampson/homebrew-cask,wayou/homebrew-cask,Whoaa512/homebrew-cask,neverfox/homebrew-cask,athrunsun/homebrew-cask,sachin21/homebrew-cask,kTitan/homebrew-cask,nathanielvarona/homebrew-cask,shoichiaizawa/homebrew-cask,FinalDes/homebrew-cask,JosephViolago/homebrew-cask,JosephViolago/homebrew-cask,ianyh/homebrew-cask,wuman/homebrew-cask,codeurge/homebrew-cask,dustinblackman/homebrew-cask,fly19890211/homebrew-cask,yutarody/homebrew-cask,muan/homebrew-cask,bcaceiro/homebrew-cask,ohammersmith/homebrew-cask,hyuna917/homebrew-cask,goxberry/homebrew-cask,ldong/homebrew-cask,taherio/homebrew-cask,zchee/homebrew-cask,gustavoavellar/homebrew-cask,epmatsw/homebrew-cask,mattrobenolt/homebrew-cask,danielgomezrico/homebrew-cask,mgryszko/homebrew-cask,imgarylai/homebrew-cask,atsuyim/homebrew-cask,renard/homebrew-cask,tan9/homebrew-cask,Bombenleger/homebrew-cask,elyscape/homebrew-cask,bkono/homebrew-cask,pacav69/homebrew-cask,ohammersmith/homebrew-cask,christer155/homebrew-cask,uetchy/homebrew-cask,jmeridth/homebrew-cask,supriyantomaftuh/homebrew-cask,rajiv/homebrew-cask,adelinofaria/homebrew-cask,dwkns/homebrew-cask,unasuke/homebrew-cask,linc01n/homebrew-cask,Ephemera/homebrew-cask,renard/homebrew-cask,jedahan/homebrew-cask,christophermanning/homebrew-cask,puffdad/homebrew-cask,brianshumate/homebrew-cask,segiddins/homebrew-cask,miku/homebrew-cask,perfide/homebrew-cask,JosephViolago/homebrew-cask,michelegera/homebrew-cask,crmne/homebrew-cask,xight/homebrew-cask,lumaxis/homebrew-cask,chino/homebrew-cask,chrisfinazzo/homebrew-cask,kingthorin/homebrew-cask,mwilmer/homebrew-cask,giannitm/homebrew-cask,samdoran/homebrew-cask,lvicentesanchez/homebrew-cask,FranklinChen/homebrew-cask,sjackman/homebrew-cask,tangestani/homebrew-cask,wastrachan/homebrew-cask,inta/homebrew-cask,singingwolfboy/homebrew-cask,ahvigil/homebrew-cask,sysbot/homebrew-cask,miguelfrde/homebrew-cask,moogar0880/homebrew-cask,tjt263/homebrew-cask,colindunn/homebrew-cask,RickWong/homebrew-cask,doits/homebrew-cask,boecko/homebrew-cask,dictcp/homebrew-cask,miguelfrde/homebrew-cask,kostasdizas/homebrew-cask,shonjir/homebrew-cask,chrisfinazzo/homebrew-cask,rogeriopradoj/homebrew-cask,stonehippo/homebrew-cask,paour/homebrew-cask,bendoerr/homebrew-cask,sgnh/homebrew-cask,dunn/homebrew-cask,psibre/homebrew-cask,deiga/homebrew-cask,akiomik/homebrew-cask,andyli/homebrew-cask,deizel/homebrew-cask,mingzhi22/homebrew-cask,lolgear/homebrew-cask,markthetech/homebrew-cask,jacobdam/homebrew-cask,Hywan/homebrew-cask,lcasey001/homebrew-cask,afh/homebrew-cask,jrwesolo/homebrew-cask,schneidmaster/homebrew-cask,Keloran/homebrew-cask,jtriley/homebrew-cask,napaxton/homebrew-cask,esebastian/homebrew-cask,jiashuw/homebrew-cask,a1russell/homebrew-cask,ddm/homebrew-cask,seanorama/homebrew-cask,zchee/homebrew-cask,xakraz/homebrew-cask,vuquoctuan/homebrew-cask,wmorin/homebrew-cask,drostron/homebrew-cask,tyage/homebrew-cask,scribblemaniac/homebrew-cask,wesen/homebrew-cask,klane/homebrew-cask,wesen/homebrew-cask,tmoreira2020/homebrew,usami-k/homebrew-cask,FredLackeyOfficial/homebrew-cask,FinalDes/homebrew-cask,johan/homebrew-cask,aktau/homebrew-cask,blainesch/homebrew-cask,mAAdhaTTah/homebrew-cask,nightscape/homebrew-cask,daften/homebrew-cask,mwean/homebrew-cask,0rax/homebrew-cask,pkq/homebrew-cask,csmith-palantir/homebrew-cask,skatsuta/homebrew-cask,rkJun/homebrew-cask,AdamCmiel/homebrew-cask,ksato9700/homebrew-cask,anbotero/homebrew-cask,3van/homebrew-cask,johnjelinek/homebrew-cask,BahtiyarB/homebrew-cask,shonjir/homebrew-cask,perfide/homebrew-cask,Ngrd/homebrew-cask,huanzhang/homebrew-cask,paulbreslin/homebrew-cask,Philosoft/homebrew-cask,napaxton/homebrew-cask,sebcode/homebrew-cask,seanorama/homebrew-cask,tedbundyjr/homebrew-cask,esebastian/homebrew-cask,dvdoliveira/homebrew-cask,j13k/homebrew-cask,arronmabrey/homebrew-cask,BahtiyarB/homebrew-cask,aguynamedryan/homebrew-cask,moonboots/homebrew-cask,askl56/homebrew-cask,jgarber623/homebrew-cask,fkrone/homebrew-cask,djmonta/homebrew-cask,yurrriq/homebrew-cask,iAmGhost/homebrew-cask,aki77/homebrew-cask,kingthorin/homebrew-cask,flaviocamilo/homebrew-cask,stevehedrick/homebrew-cask,faun/homebrew-cask,gord1anknot/homebrew-cask,iAmGhost/homebrew-cask,xcezx/homebrew-cask,wKovacs64/homebrew-cask,MerelyAPseudonym/homebrew-cask,markhuber/homebrew-cask,n0ts/homebrew-cask,MicTech/homebrew-cask,moimikey/homebrew-cask,af/homebrew-cask,kongslund/homebrew-cask,feigaochn/homebrew-cask,daften/homebrew-cask,jellyfishcoder/homebrew-cask,paour/homebrew-cask,ch3n2k/homebrew-cask,sachin21/homebrew-cask,Fedalto/homebrew-cask,taherio/homebrew-cask,wickedsp1d3r/homebrew-cask,singingwolfboy/homebrew-cask,onlynone/homebrew-cask,andyshinn/homebrew-cask,JoelLarson/homebrew-cask,wmorin/homebrew-cask,norio-nomura/homebrew-cask,gibsjose/homebrew-cask,FranklinChen/homebrew-cask,renaudguerin/homebrew-cask,dieterdemeyer/homebrew-cask,Nitecon/homebrew-cask,fanquake/homebrew-cask,bdhess/homebrew-cask,d/homebrew-cask,coeligena/homebrew-customized,rubenerd/homebrew-cask,vin047/homebrew-cask,rajiv/homebrew-cask,bchatard/homebrew-cask,dwkns/homebrew-cask,kei-yamazaki/homebrew-cask,bgandon/homebrew-cask,greg5green/homebrew-cask,gyndav/homebrew-cask,afh/homebrew-cask,RickWong/homebrew-cask,sohtsuka/homebrew-cask,inta/homebrew-cask,lieuwex/homebrew-cask,johnste/homebrew-cask,stigkj/homebrew-caskroom-cask,gwaldo/homebrew-cask,guylabs/homebrew-cask,okket/homebrew-cask,stigkj/homebrew-caskroom-cask,gurghet/homebrew-cask,bcomnes/homebrew-cask,cblecker/homebrew-cask,reitermarkus/homebrew-cask,thii/homebrew-cask,Labutin/homebrew-cask,mauricerkelly/homebrew-cask,jonathanwiesel/homebrew-cask,tarwich/homebrew-cask,yurikoles/homebrew-cask,xalep/homebrew-cask,mhubig/homebrew-cask,buo/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,stonehippo/homebrew-cask,sscotth/homebrew-cask,michelegera/homebrew-cask,claui/homebrew-cask,aktau/homebrew-cask,squid314/homebrew-cask,antogg/homebrew-cask,seanzxx/homebrew-cask,cblecker/homebrew-cask,mariusbutuc/homebrew-cask,rcuza/homebrew-cask,SamiHiltunen/homebrew-cask,arronmabrey/homebrew-cask,joshka/homebrew-cask,3van/homebrew-cask,m3nu/homebrew-cask,samdoran/homebrew-cask,djmonta/homebrew-cask,robertgzr/homebrew-cask,gyugyu/homebrew-cask,santoshsahoo/homebrew-cask,antogg/homebrew-cask,arranubels/homebrew-cask,blogabe/homebrew-cask,lukasbestle/homebrew-cask,jangalinski/homebrew-cask,zhuzihhhh/homebrew-cask,dwihn0r/homebrew-cask,optikfluffel/homebrew-cask,miccal/homebrew-cask,reelsense/homebrew-cask,jellyfishcoder/homebrew-cask,timsutton/homebrew-cask,MatzFan/homebrew-cask,cohei/homebrew-cask,elnappo/homebrew-cask,morsdyce/homebrew-cask,stevenmaguire/homebrew-cask,ahundt/homebrew-cask,adelinofaria/homebrew-cask,sysbot/homebrew-cask,neil-ca-moore/homebrew-cask,crzrcn/homebrew-cask,asins/homebrew-cask,My2ndAngelic/homebrew-cask,wKovacs64/homebrew-cask,farmerchris/homebrew-cask,helloIAmPau/homebrew-cask,MichaelPei/homebrew-cask,illusionfield/homebrew-cask,pablote/homebrew-cask,Ibuprofen/homebrew-cask,jacobdam/homebrew-cask,jedahan/homebrew-cask,AnastasiaSulyagina/homebrew-cask,coneman/homebrew-cask,lukeadams/homebrew-cask,scottsuch/homebrew-cask,colindunn/homebrew-cask,coneman/homebrew-cask,deiga/homebrew-cask,wizonesolutions/homebrew-cask,Nitecon/homebrew-cask,albertico/homebrew-cask,dspeckhard/homebrew-cask,yutarody/homebrew-cask,zorosteven/homebrew-cask,BenjaminHCCarr/homebrew-cask,athrunsun/homebrew-cask,carlmod/homebrew-cask,rickychilcott/homebrew-cask,6uclz1/homebrew-cask,miccal/homebrew-cask,y00rb/homebrew-cask,jasmas/homebrew-cask,KosherBacon/homebrew-cask,diogodamiani/homebrew-cask,lolgear/homebrew-cask,adriweb/homebrew-cask,bosr/homebrew-cask,joaoponceleao/homebrew-cask,delphinus35/homebrew-cask,joschi/homebrew-cask,hyuna917/homebrew-cask,shorshe/homebrew-cask,chuanxd/homebrew-cask,asbachb/homebrew-cask,deanmorin/homebrew-cask,wmorin/homebrew-cask,yuhki50/homebrew-cask,nathanielvarona/homebrew-cask,jrwesolo/homebrew-cask,esebastian/homebrew-cask,onlynone/homebrew-cask,chuanxd/homebrew-cask,malob/homebrew-cask,larseggert/homebrew-cask,tdsmith/homebrew-cask,kiliankoe/homebrew-cask,ebraminio/homebrew-cask,zerrot/homebrew-cask,remko/homebrew-cask,mazehall/homebrew-cask,adriweb/homebrew-cask,ayohrling/homebrew-cask,lifepillar/homebrew-cask,LaurentFough/homebrew-cask,thehunmonkgroup/homebrew-cask,nickpellant/homebrew-cask,jayshao/homebrew-cask,stonehippo/homebrew-cask,andersonba/homebrew-cask,decrement/homebrew-cask,neverfox/homebrew-cask,mfpierre/homebrew-cask,malob/homebrew-cask,corbt/homebrew-cask,jmeridth/homebrew-cask,bendoerr/homebrew-cask,mjgardner/homebrew-cask,dvdoliveira/homebrew-cask,malob/homebrew-cask,ebraminio/homebrew-cask,jeroenseegers/homebrew-cask,ch3n2k/homebrew-cask,katoquro/homebrew-cask,kesara/homebrew-cask,mrmachine/homebrew-cask,colindean/homebrew-cask,kryhear/homebrew-cask,Amorymeltzer/homebrew-cask,cfillion/homebrew-cask,julienlavergne/homebrew-cask,akiomik/homebrew-cask,pkq/homebrew-cask,lifepillar/homebrew-cask,jalaziz/homebrew-cask,sosedoff/homebrew-cask,alexg0/homebrew-cask,MerelyAPseudonym/homebrew-cask,jawshooah/homebrew-cask,forevergenin/homebrew-cask,nshemonsky/homebrew-cask,samshadwell/homebrew-cask,xiongchiamiov/homebrew-cask,af/homebrew-cask,mlocher/homebrew-cask,joshka/homebrew-cask,nrlquaker/homebrew-cask,kesara/homebrew-cask,lumaxis/homebrew-cask,m3nu/homebrew-cask,jpmat296/homebrew-cask,arranubels/homebrew-cask,tan9/homebrew-cask,Amorymeltzer/homebrew-cask,xyb/homebrew-cask,moimikey/homebrew-cask,jgarber623/homebrew-cask,jeroenj/homebrew-cask,sanyer/homebrew-cask,kamilboratynski/homebrew-cask,albertico/homebrew-cask,mlocher/homebrew-cask,scw/homebrew-cask,claui/homebrew-cask,kkdd/homebrew-cask,a-x-/homebrew-cask,stevehedrick/homebrew-cask,chadcatlett/caskroom-homebrew-cask,kassi/homebrew-cask,diguage/homebrew-cask,christophermanning/homebrew-cask,dustinblackman/homebrew-cask,dlovitch/homebrew-cask,franklouwers/homebrew-cask,tmoreira2020/homebrew,BenjaminHCCarr/homebrew-cask,thomanq/homebrew-cask,kolomiichenko/homebrew-cask,delphinus35/homebrew-cask,ptb/homebrew-cask,ayohrling/homebrew-cask,gabrielizaias/homebrew-cask,sanchezm/homebrew-cask,andrewschleifer/homebrew-cask,neverfox/homebrew-cask,kei-yamazaki/homebrew-cask,ahvigil/homebrew-cask,Whoaa512/homebrew-cask,ericbn/homebrew-cask,jonathanwiesel/homebrew-cask,josa42/homebrew-cask,frapposelli/homebrew-cask,feniix/homebrew-cask,ftiff/homebrew-cask,n8henrie/homebrew-cask,Ephemera/homebrew-cask,elseym/homebrew-cask,hanxue/caskroom,alexg0/homebrew-cask,jeanregisser/homebrew-cask,gguillotte/homebrew-cask,gyndav/homebrew-cask,garborg/homebrew-cask,JikkuJose/homebrew-cask,aguynamedryan/homebrew-cask,lalyos/homebrew-cask,leipert/homebrew-cask,kassi/homebrew-cask,tjt263/homebrew-cask,xight/homebrew-cask,wickedsp1d3r/homebrew-cask,yurikoles/homebrew-cask,tarwich/homebrew-cask,williamboman/homebrew-cask,segiddins/homebrew-cask,ptb/homebrew-cask,zorosteven/homebrew-cask,ksylvan/homebrew-cask,jhowtan/homebrew-cask,santoshsahoo/homebrew-cask,neil-ca-moore/homebrew-cask,pablote/homebrew-cask,Dremora/homebrew-cask,jeanregisser/homebrew-cask,patresi/homebrew-cask,christer155/homebrew-cask,asins/homebrew-cask,LaurentFough/homebrew-cask,andrewdisley/homebrew-cask,fazo96/homebrew-cask,n0ts/homebrew-cask,dezon/homebrew-cask,singingwolfboy/homebrew-cask,stephenwade/homebrew-cask,nicolas-brousse/homebrew-cask,caskroom/homebrew-cask,mgryszko/homebrew-cask,bcomnes/homebrew-cask,pgr0ss/homebrew-cask,jgarber623/homebrew-cask,mattfelsen/homebrew-cask,RogerThiede/homebrew-cask,AnastasiaSulyagina/homebrew-cask,gibsjose/homebrew-cask,dspeckhard/homebrew-cask,thii/homebrew-cask,prime8/homebrew-cask,jpmat296/homebrew-cask,qbmiller/homebrew-cask,freeslugs/homebrew-cask,MicTech/homebrew-cask,0xadada/homebrew-cask,haha1903/homebrew-cask,atsuyim/homebrew-cask,Saklad5/homebrew-cask,ftiff/homebrew-cask,samshadwell/homebrew-cask,iamso/homebrew-cask,decrement/homebrew-cask,josa42/homebrew-cask,ericbn/homebrew-cask,MoOx/homebrew-cask,reelsense/homebrew-cask,rhendric/homebrew-cask,dezon/homebrew-cask,ninjahoahong/homebrew-cask,stephenwade/homebrew-cask,ksylvan/homebrew-cask,djakarta-trap/homebrew-myCask,kpearson/homebrew-cask,fkrone/homebrew-cask,flada-auxv/homebrew-cask,SentinelWarren/homebrew-cask,guerrero/homebrew-cask,antogg/homebrew-cask,axodys/homebrew-cask,julionc/homebrew-cask,julionc/homebrew-cask,artdevjs/homebrew-cask,nivanchikov/homebrew-cask,jpodlech/homebrew-cask,askl56/homebrew-cask,mwek/homebrew-cask,drostron/homebrew-cask,retbrown/homebrew-cask,jacobbednarz/homebrew-cask,pinut/homebrew-cask,slnovak/homebrew-cask,stevenmaguire/homebrew-cask,remko/homebrew-cask,valepert/homebrew-cask,jacobbednarz/homebrew-cask,theoriginalgri/homebrew-cask,jeroenj/homebrew-cask,sanchezm/homebrew-cask,schneidmaster/homebrew-cask,tjnycum/homebrew-cask,slack4u/homebrew-cask,tsparber/homebrew-cask,Cottser/homebrew-cask,morganestes/homebrew-cask,bkono/homebrew-cask,shishi/homebrew-cask,kteru/homebrew-cask,bcaceiro/homebrew-cask,zmwangx/homebrew-cask,ywfwj2008/homebrew-cask,lantrix/homebrew-cask,nightscape/homebrew-cask,y00rb/homebrew-cask,mwek/homebrew-cask,bdhess/homebrew-cask,huanzhang/homebrew-cask,mAAdhaTTah/homebrew-cask,hvisage/homebrew-cask,nelsonjchen/homebrew-cask,winkelsdorf/homebrew-cask,farmerchris/homebrew-cask,jalaziz/homebrew-cask,ahundt/homebrew-cask,miku/homebrew-cask,hackhandslabs/homebrew-cask,mattrobenolt/homebrew-cask,mjdescy/homebrew-cask,riyad/homebrew-cask,samnung/homebrew-cask,andrewdisley/homebrew-cask,uetchy/homebrew-cask,13k/homebrew-cask,paour/homebrew-cask,tsparber/homebrew-cask,robbiethegeek/homebrew-cask,elseym/homebrew-cask,wastrachan/homebrew-cask,seanzxx/homebrew-cask,catap/homebrew-cask,koenrh/homebrew-cask,otaran/homebrew-cask,gerrypower/homebrew-cask,bchatard/homebrew-cask,L2G/homebrew-cask,enriclluelles/homebrew-cask,nathanielvarona/homebrew-cask,coeligena/homebrew-customized,scw/homebrew-cask,chrisRidgers/homebrew-cask,flada-auxv/homebrew-cask,optikfluffel/homebrew-cask,leonmachadowilcox/homebrew-cask,larseggert/homebrew-cask,JoelLarson/homebrew-cask,kpearson/homebrew-cask,mikem/homebrew-cask,n8henrie/homebrew-cask,sparrc/homebrew-cask,rajiv/homebrew-cask,andyli/homebrew-cask,ajbw/homebrew-cask,jhowtan/homebrew-cask,qbmiller/homebrew-cask,shoichiaizawa/homebrew-cask,catap/homebrew-cask,vuquoctuan/homebrew-cask,linc01n/homebrew-cask,amatos/homebrew-cask,nathancahill/homebrew-cask,pkq/homebrew-cask,danielbayley/homebrew-cask,dunn/homebrew-cask,nrlquaker/homebrew-cask,nicolas-brousse/homebrew-cask,thehunmonkgroup/homebrew-cask,prime8/homebrew-cask,kongslund/homebrew-cask,jamesmlees/homebrew-cask,maxnordlund/homebrew-cask,cfillion/homebrew-cask,gmkey/homebrew-cask,tedbundyjr/homebrew-cask,xyb/homebrew-cask,scribblemaniac/homebrew-cask,crmne/homebrew-cask,mishari/homebrew-cask,markthetech/homebrew-cask,SamiHiltunen/homebrew-cask,axodys/homebrew-cask,joshka/homebrew-cask,renaudguerin/homebrew-cask,boydj/homebrew-cask,ingorichter/homebrew-cask,vin047/homebrew-cask,asbachb/homebrew-cask,julienlavergne/homebrew-cask,jen20/homebrew-cask,mahori/homebrew-cask,joschi/homebrew-cask,sohtsuka/homebrew-cask,zeusdeux/homebrew-cask,fly19890211/homebrew-cask,j13k/homebrew-cask,RJHsiao/homebrew-cask,ky0615/homebrew-cask-1,tranc99/homebrew-cask,yurrriq/homebrew-cask,garborg/homebrew-cask,hackhandslabs/homebrew-cask,andersonba/homebrew-cask,tedski/homebrew-cask,Ibuprofen/homebrew-cask,xakraz/homebrew-cask,otzy007/homebrew-cask,ky0615/homebrew-cask-1,josa42/homebrew-cask,guylabs/homebrew-cask,bric3/homebrew-cask,a-x-/homebrew-cask,williamboman/homebrew-cask,jppelteret/homebrew-cask,unasuke/homebrew-cask,petmoo/homebrew-cask,corbt/homebrew-cask,Dremora/homebrew-cask,dictcp/homebrew-cask,Ngrd/homebrew-cask,joaocc/homebrew-cask,cobyism/homebrew-cask,cedwardsmedia/homebrew-cask,adrianchia/homebrew-cask,andrewschleifer/homebrew-cask,johntrandall/homebrew-cask,lauantai/homebrew-cask,ctrevino/homebrew-cask,bric3/homebrew-cask,epmatsw/homebrew-cask,tangestani/homebrew-cask,jamesmlees/homebrew-cask,skyyuan/homebrew-cask,casidiablo/homebrew-cask,gilesdring/homebrew-cask,danielgomezrico/homebrew-cask,ywfwj2008/homebrew-cask,JikkuJose/homebrew-cask,johnste/homebrew-cask,yumitsu/homebrew-cask,kesara/homebrew-cask,sanyer/homebrew-cask,johan/homebrew-cask,leipert/homebrew-cask,deizel/homebrew-cask,reitermarkus/homebrew-cask,sosedoff/homebrew-cask,xcezx/homebrew-cask,toonetown/homebrew-cask,janlugt/homebrew-cask,mjdescy/homebrew-cask,underyx/homebrew-cask,gord1anknot/homebrew-cask,gurghet/homebrew-cask,MisumiRize/homebrew-cask,ddm/homebrew-cask,bgandon/homebrew-cask,xight/homebrew-cask,jaredsampson/homebrew-cask,mwean/homebrew-cask,freeslugs/homebrew-cask,MircoT/homebrew-cask,imgarylai/homebrew-cask,brianshumate/homebrew-cask,mattfelsen/homebrew-cask,retbrown/homebrew-cask,jconley/homebrew-cask,tolbkni/homebrew-cask,ninjahoahong/homebrew-cask,yuhki50/homebrew-cask,cblecker/homebrew-cask,patresi/homebrew-cask,devmynd/homebrew-cask,gyugyu/homebrew-cask,johntrandall/homebrew-cask,goxberry/homebrew-cask,kiliankoe/homebrew-cask,bsiddiqui/homebrew-cask,mokagio/homebrew-cask,fwiesel/homebrew-cask,paulombcosta/homebrew-cask,jpodlech/homebrew-cask,barravi/homebrew-cask,markhuber/homebrew-cask,Cottser/homebrew-cask,githubutilities/homebrew-cask,englishm/homebrew-cask,spruceb/homebrew-cask,nysthee/homebrew-cask,moimikey/homebrew-cask,okket/homebrew-cask,alloy/homebrew-cask,donbobka/homebrew-cask,hanxue/caskroom,tolbkni/homebrew-cask,imgarylai/homebrew-cask,My2ndAngelic/homebrew-cask,jspahrsummers/homebrew-cask,tyage/homebrew-cask,hanxue/caskroom,KosherBacon/homebrew-cask,mchlrmrz/homebrew-cask,kTitan/homebrew-cask,Keloran/homebrew-cask,boydj/homebrew-cask,L2G/homebrew-cask,crzrcn/homebrew-cask,lucasmezencio/homebrew-cask,donbobka/homebrew-cask,jalaziz/homebrew-cask,kronicd/homebrew-cask,jtriley/homebrew-cask,JacopKane/homebrew-cask,MichaelPei/homebrew-cask,norio-nomura/homebrew-cask,usami-k/homebrew-cask,sirodoht/homebrew-cask,anbotero/homebrew-cask,boecko/homebrew-cask,cobyism/homebrew-cask,qnm/homebrew-cask,RJHsiao/homebrew-cask,diguage/homebrew-cask,kostasdizas/homebrew-cask,lukasbestle/homebrew-cask,enriclluelles/homebrew-cask,alloy/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,cliffcotino/homebrew-cask,mchlrmrz/homebrew-cask,chino/homebrew-cask,dictcp/homebrew-cask,Hywan/homebrew-cask,danielbayley/homebrew-cask,inz/homebrew-cask,sirodoht/homebrew-cask,forevergenin/homebrew-cask,yumitsu/homebrew-cask,retrography/homebrew-cask,joaocc/homebrew-cask,cclauss/homebrew-cask,blogabe/homebrew-cask,andyshinn/homebrew-cask
|
ruby
|
## Code Before:
class Fontprep < Cask
version :latest
sha256 :no_check
url 'http://fontprep.com/download'
homepage 'http://fontprep.com'
license :unknown
app 'FontPrep.app'
end
## Instruction:
Update Fontprep URL, version, license
URL has changed to Github, requiring to specify version.
## Code After:
class Fontprep < Cask
version '3.1.1'
sha256 '769d64b78d1a8db42dcb02beff6f929670448f77259388c9d01692374be2ec46'
url "https://github.com/briangonzalez/fontprep/releases/download/v3.1.1/FontPrep_#{version}.zip"
homepage 'http://fontprep.com'
license :gpl
app 'FontPrep.app'
end
|
c2f6e37ee7051e824bbb6639d18dfca31a037c53
|
javascript/javascript-dom-web-snippets.md
|
javascript/javascript-dom-web-snippets.md
|
Using jQuery:
```js
jQuery(document).ready(function ($) {
// DOM from initial markup is ready.
});
```
Using native DOM API:
```js
document.addEventListener('DOMContentLoaded', function () {
// DOM from initial markup is ready.
});
```
## Element Selection
var elmts = document.querySelectorAll("<selector>");
|
Using jQuery:
```js
jQuery(document).ready(function ($) {
// DOM from initial markup is ready.
});
```
Using native DOM API:
```js
document.addEventListener('DOMContentLoaded', function () {
// DOM from initial markup is ready.
});
```
## Element Selection
var elmts = document.querySelectorAll("<selector>");
## Media Query
See https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia,
https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList,
https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Testing_media_queries,
https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries,
and https://developer.mozilla.org/en-US/docs/Web/CSS/@media
for more info.
**Browser Compatibility**
* Chrome: 9
* Edge: Yes
* Firefox: 6.0
* IE: 10
* Opera: 12.1
* Safari: 5.1
```js
let mql = window.matchMedia('(min-width: 992px)');
let onMatchChange = (evt) => {
if (evt.matches) {
// ....
}
else {
// ...
}
};
mql.addListener(onMatchChange);
// Run once on document load:
// Note: The following will work as long as only `matches` and/or `media`
// are used from the first parameter of the handler.
onMatchChange(mql);
```
|
Add a Media Query Section
|
Add a Media Query Section
|
Markdown
|
mit
|
dhurlburtusa/shortcuts,dhurlburtusa/shortcuts
|
markdown
|
## Code Before:
Using jQuery:
```js
jQuery(document).ready(function ($) {
// DOM from initial markup is ready.
});
```
Using native DOM API:
```js
document.addEventListener('DOMContentLoaded', function () {
// DOM from initial markup is ready.
});
```
## Element Selection
var elmts = document.querySelectorAll("<selector>");
## Instruction:
Add a Media Query Section
## Code After:
Using jQuery:
```js
jQuery(document).ready(function ($) {
// DOM from initial markup is ready.
});
```
Using native DOM API:
```js
document.addEventListener('DOMContentLoaded', function () {
// DOM from initial markup is ready.
});
```
## Element Selection
var elmts = document.querySelectorAll("<selector>");
## Media Query
See https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia,
https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList,
https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Testing_media_queries,
https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries,
and https://developer.mozilla.org/en-US/docs/Web/CSS/@media
for more info.
**Browser Compatibility**
* Chrome: 9
* Edge: Yes
* Firefox: 6.0
* IE: 10
* Opera: 12.1
* Safari: 5.1
```js
let mql = window.matchMedia('(min-width: 992px)');
let onMatchChange = (evt) => {
if (evt.matches) {
// ....
}
else {
// ...
}
};
mql.addListener(onMatchChange);
// Run once on document load:
// Note: The following will work as long as only `matches` and/or `media`
// are used from the first parameter of the handler.
onMatchChange(mql);
```
|
ad1dc9ddeff73b6182b9419f6deaaba8e2e12fda
|
modules/Base/ActionBar/theme/default.tpl
|
modules/Base/ActionBar/theme/default.tpl
|
<div id="Base_ActionBar" align="center">
<table class="ActionBar">
<tbody>
<tr>
<td valign="top">
<div id="panel">
{foreach item=i from=$icons}
{$i.open}
<div class="btn btn-default" helpID="{$i.helpID}">
<i class="fa fa-{$i.icon} fa-3x"></i>
<span>{$i.label}</span>
</div>
{$i.close}
{/foreach}
{foreach item=i from=$launcher}
{$i.open}
<div class="btn btn-default pull-right">
<div class="div_icon"><img src="{$i.icon}" alt="" align="middle" border="0" width="32" height="32"></div>
<span>{$i.label}</span>
</div>
{$i.close}
{/foreach}
</div>
</td>
</tr>
</tbody>
</table>
</div>
|
<div class="pull-left">
{foreach item=i from=$icons}
{$i.open}
<div class="btn btn-default" helpID="{$i.helpID}">
<i class="fa fa-{$i.icon} fa-3x"></i>
<div>{$i.label}</div>
</div>
{$i.close}
{/foreach}
</div>
<div class="pull-right">
{foreach item=i from=$launcher}
{$i.open}
<div class="btn btn-default">
<div class="div_icon"><img src="{$i.icon}" alt="" align="middle" border="0" width="32" height="32"></div>
<div>{$i.label}</div>
</div>
{$i.close}
{/foreach}
</div>
|
Fix action bar button distance
|
Fix action bar button distance
|
Smarty
|
mit
|
georgehristov/EPESI,georgehristov/EPESI
|
smarty
|
## Code Before:
<div id="Base_ActionBar" align="center">
<table class="ActionBar">
<tbody>
<tr>
<td valign="top">
<div id="panel">
{foreach item=i from=$icons}
{$i.open}
<div class="btn btn-default" helpID="{$i.helpID}">
<i class="fa fa-{$i.icon} fa-3x"></i>
<span>{$i.label}</span>
</div>
{$i.close}
{/foreach}
{foreach item=i from=$launcher}
{$i.open}
<div class="btn btn-default pull-right">
<div class="div_icon"><img src="{$i.icon}" alt="" align="middle" border="0" width="32" height="32"></div>
<span>{$i.label}</span>
</div>
{$i.close}
{/foreach}
</div>
</td>
</tr>
</tbody>
</table>
</div>
## Instruction:
Fix action bar button distance
## Code After:
<div class="pull-left">
{foreach item=i from=$icons}
{$i.open}
<div class="btn btn-default" helpID="{$i.helpID}">
<i class="fa fa-{$i.icon} fa-3x"></i>
<div>{$i.label}</div>
</div>
{$i.close}
{/foreach}
</div>
<div class="pull-right">
{foreach item=i from=$launcher}
{$i.open}
<div class="btn btn-default">
<div class="div_icon"><img src="{$i.icon}" alt="" align="middle" border="0" width="32" height="32"></div>
<div>{$i.label}</div>
</div>
{$i.close}
{/foreach}
</div>
|
479bdcae788dcfa92ec3cf699b2878190ba390fe
|
.travis.yml
|
.travis.yml
|
if: tag IS present OR type = pull_request OR (branch = master AND type = push) # we only CI the master, tags and PRs
language: python
# Main test jobs: The lowest and highest current Python versions.
python:
- 3.6
- 3.9
# List additional test configurations individually, instead of using
# matrix expansion, to prevent an exponential growth of test jobs.
matrix:
include:
# Python versions that are EOL, but we still support.
# PY2.7 here should bring out any PY3.5 incompatibilities as well.
- python: 2.7
arch: amd64
# pydot itself should be architecture-independent. Still, some
# limited testing on other architectures to catch corner cases.
- python: 2.7
arch: ppc64le
- python: 3.9
arch: ppc64le
addons:
apt:
packages:
- graphviz
install:
- pip install -U pip setuptools
- python setup.py sdist
- pip install dist/pydot-*.tar.gz
- pip install -r requirements.txt
script:
- cd test/
- python pydot_unittest.py
# after_success:
# - coveralls
|
if: tag IS present OR type = pull_request OR (branch = master AND type = push) # we only CI the master, tags and PRs
language: python
# Main test jobs: The lowest and highest current Python versions.
python:
- 3.6
- 3.9
# List additional test configurations individually, instead of using
# matrix expansion, to prevent an exponential growth of test jobs.
matrix:
include:
# Python versions that are EOL, but we still support.
# PY2.7 here should bring out any PY3.5 incompatibilities as well.
- python: 2.7
arch: amd64
# pydot itself should be architecture-independent. Still, some
# limited testing on other architectures to catch corner cases.
- python: 2.7
arch: ppc64le
- python: 3.9
arch: ppc64le
# Additional job to run linters that only need to run once.
- name: black
language: python
python: 3.6
arch: amd64
addons:
apt:
packages: []
install:
- pip install -e .[dev]
script:
- black --check --diff .
addons:
apt:
packages:
- graphviz
install:
- pip install -U pip setuptools
- python setup.py sdist
- pip install dist/pydot-*.tar.gz
- pip install -r requirements.txt
script:
- cd test/
- python pydot_unittest.py
|
Switch to code formatter Black: Travis integration
|
Switch to code formatter Black: Travis integration
This adds a new job for running `black` to our Travis CI continuous
integration configuration. See the previous commits for more details on
Black.
If `black` finds a problem with the formatting, its job will be marked
as "Failed". A diff of the required changes can be found on Travis CI
by clicking on job `black` and scrolling down the Job log. You may also
run `black` on your local machine to let it make the corrections for
you.
The new job is added to the default stage (`test`), meaning it will run
alongside the regular test suite jobs. `black` is kept separate from
the test suite, because it only needs to run once, not on multiple
Python versions and architectures.
A failure reported by `black` will not stop the test suite jobs from
running, but will result in the build as a whole to be marked "Failed"
in the end, even if the other jobs all passed.
Using a separate Travis CI "stage" (named `lint`) was attempted, but
considered inadequate:
- Running stage `lint` *after* stage `test` meant long waiting for
what was actually the fastest job.
- Running stage `lint` *before* stage `test` meant a minor formatting
issue could prevent the test suite from running at all.
- Defining stage `lint` as an `allowed_failure` meant its outcome
would become irrelevant for the outcome of the build as a whole,
i.e. the build would pass even if `lint` had failed.
|
YAML
|
mit
|
pydot/pydot,erocarrera/pydot
|
yaml
|
## Code Before:
if: tag IS present OR type = pull_request OR (branch = master AND type = push) # we only CI the master, tags and PRs
language: python
# Main test jobs: The lowest and highest current Python versions.
python:
- 3.6
- 3.9
# List additional test configurations individually, instead of using
# matrix expansion, to prevent an exponential growth of test jobs.
matrix:
include:
# Python versions that are EOL, but we still support.
# PY2.7 here should bring out any PY3.5 incompatibilities as well.
- python: 2.7
arch: amd64
# pydot itself should be architecture-independent. Still, some
# limited testing on other architectures to catch corner cases.
- python: 2.7
arch: ppc64le
- python: 3.9
arch: ppc64le
addons:
apt:
packages:
- graphviz
install:
- pip install -U pip setuptools
- python setup.py sdist
- pip install dist/pydot-*.tar.gz
- pip install -r requirements.txt
script:
- cd test/
- python pydot_unittest.py
# after_success:
# - coveralls
## Instruction:
Switch to code formatter Black: Travis integration
This adds a new job for running `black` to our Travis CI continuous
integration configuration. See the previous commits for more details on
Black.
If `black` finds a problem with the formatting, its job will be marked
as "Failed". A diff of the required changes can be found on Travis CI
by clicking on job `black` and scrolling down the Job log. You may also
run `black` on your local machine to let it make the corrections for
you.
The new job is added to the default stage (`test`), meaning it will run
alongside the regular test suite jobs. `black` is kept separate from
the test suite, because it only needs to run once, not on multiple
Python versions and architectures.
A failure reported by `black` will not stop the test suite jobs from
running, but will result in the build as a whole to be marked "Failed"
in the end, even if the other jobs all passed.
Using a separate Travis CI "stage" (named `lint`) was attempted, but
considered inadequate:
- Running stage `lint` *after* stage `test` meant long waiting for
what was actually the fastest job.
- Running stage `lint` *before* stage `test` meant a minor formatting
issue could prevent the test suite from running at all.
- Defining stage `lint` as an `allowed_failure` meant its outcome
would become irrelevant for the outcome of the build as a whole,
i.e. the build would pass even if `lint` had failed.
## Code After:
if: tag IS present OR type = pull_request OR (branch = master AND type = push) # we only CI the master, tags and PRs
language: python
# Main test jobs: The lowest and highest current Python versions.
python:
- 3.6
- 3.9
# List additional test configurations individually, instead of using
# matrix expansion, to prevent an exponential growth of test jobs.
matrix:
include:
# Python versions that are EOL, but we still support.
# PY2.7 here should bring out any PY3.5 incompatibilities as well.
- python: 2.7
arch: amd64
# pydot itself should be architecture-independent. Still, some
# limited testing on other architectures to catch corner cases.
- python: 2.7
arch: ppc64le
- python: 3.9
arch: ppc64le
# Additional job to run linters that only need to run once.
- name: black
language: python
python: 3.6
arch: amd64
addons:
apt:
packages: []
install:
- pip install -e .[dev]
script:
- black --check --diff .
addons:
apt:
packages:
- graphviz
install:
- pip install -U pip setuptools
- python setup.py sdist
- pip install dist/pydot-*.tar.gz
- pip install -r requirements.txt
script:
- cd test/
- python pydot_unittest.py
|
ac3651c7baa94fd938cda2f95ae8378296fa72f2
|
README.markdown
|
README.markdown
|
[See Readme in master branch](http://github.com/sokolovstas/SublimeWebInspector)
|
[See Readme in master branch](http://github.com/sokolovstas/SublimeWebInspector/tree/master)
|
Update readme to point to master
|
Update readme to point to master
|
Markdown
|
mit
|
sokolovstas/SublimeWebInspector,sokolovstas/SublimeWebInspector,sokolovstas/SublimeWebInspector
|
markdown
|
## Code Before:
[See Readme in master branch](http://github.com/sokolovstas/SublimeWebInspector)
## Instruction:
Update readme to point to master
## Code After:
[See Readme in master branch](http://github.com/sokolovstas/SublimeWebInspector/tree/master)
|
c83d6727a467229e173edd2bb2efee6ccb391086
|
examples/6lbr/test/run.sh
|
examples/6lbr/test/run.sh
|
CONTIKIDIR="/home/test/git/contiki"
CALLDIR=$(dirname $(readlink -f $0))
while getopts ":c" opt; do
case $opt in
c)
pushd ${CONTIKIDIR}/tools/cooja
ant clean
ant jar
cd apps/serial2pty
ant clean
ant jar
cd ../radiologger-headless
ant clean
ant jar
popd
;;
esac
done
sudo rm -rf ${CALLDIR}/*.pyc
sudo pkill -9 radvd
sudo pkill -9 ping
sudo pkill -9 java
sudo pkill -9 tcpdump
sudo pkill -9 nc
sudo pkill -9 udpserver
sudo pkill cetic_6lbr_rpl_root
sudo pkill cetic_6lbr_router
sudo pkill cetic_6lbr_smart_bridge
sudo pkill cetic_6lbr_transparent_bridge
sudo ip link set br0 down
sudo brctl delbr br0
sudo rm -f ${CALLDIR}/COOJA.*log
sudo rm -f ${CALLDIR}/radiolog-*.pcap
sudo ${CALLDIR}/top.py
sudo chown -R test:test report/
|
CONTIKIDIR="/home/test/git/contiki"
CALLDIR=$(dirname $(readlink -f $0))
while getopts ":c" opt; do
case $opt in
c)
pushd ${CONTIKIDIR}/tools/cooja
ant clean
ant jar
cd apps/serial2pty
ant clean
ant jar
cd ../radiologger-headless
ant clean
ant jar
popd
;;
esac
done
sudo rm -rf ${CALLDIR}/*.pyc
sudo pkill -9 radvd
sudo pkill -9 ping
sudo pkill -9 java
sudo pkill -9 tcpdump
sudo pkill -9 nc
sudo pkill -9 udpserver
sudo pkill cetic_6lbr_rpl_root
sudo pkill cetic_6lbr_router
sudo pkill cetic_6lbr_smart_bridge
sudo pkill cetic_6lbr_transparent_bridge
sudo ip link set br0 down
sudo brctl delbr br0
sudo rm -f ${CALLDIR}/COOJA.*log
sudo rm -f ${CALLDIR}/radiolog-*.pcap
sudo ${CALLDIR}/top.py > >(tee ${CALLDIR}/console_out.log) 2> >(tee ${CALLDIR}/console_err.log >&2)
reportdir=$(find ${CALLDIR}/report -maxdepth 1 -type d | sort | tail -n 1)
sudo mv ${CALLDIR}/console_out.log $reportdir
sudo mv ${CALLDIR}/console_err.log $reportdir
sudo chown -R test:test report/
|
Duplicate stdout and stderr with tee outside of python
|
Duplicate stdout and stderr with tee outside of python
|
Shell
|
bsd-3-clause
|
bluerover/6lbr,bluerover/6lbr,bluerover/6lbr,bluerover/6lbr,bluerover/6lbr,bluerover/6lbr,bluerover/6lbr
|
shell
|
## Code Before:
CONTIKIDIR="/home/test/git/contiki"
CALLDIR=$(dirname $(readlink -f $0))
while getopts ":c" opt; do
case $opt in
c)
pushd ${CONTIKIDIR}/tools/cooja
ant clean
ant jar
cd apps/serial2pty
ant clean
ant jar
cd ../radiologger-headless
ant clean
ant jar
popd
;;
esac
done
sudo rm -rf ${CALLDIR}/*.pyc
sudo pkill -9 radvd
sudo pkill -9 ping
sudo pkill -9 java
sudo pkill -9 tcpdump
sudo pkill -9 nc
sudo pkill -9 udpserver
sudo pkill cetic_6lbr_rpl_root
sudo pkill cetic_6lbr_router
sudo pkill cetic_6lbr_smart_bridge
sudo pkill cetic_6lbr_transparent_bridge
sudo ip link set br0 down
sudo brctl delbr br0
sudo rm -f ${CALLDIR}/COOJA.*log
sudo rm -f ${CALLDIR}/radiolog-*.pcap
sudo ${CALLDIR}/top.py
sudo chown -R test:test report/
## Instruction:
Duplicate stdout and stderr with tee outside of python
## Code After:
CONTIKIDIR="/home/test/git/contiki"
CALLDIR=$(dirname $(readlink -f $0))
while getopts ":c" opt; do
case $opt in
c)
pushd ${CONTIKIDIR}/tools/cooja
ant clean
ant jar
cd apps/serial2pty
ant clean
ant jar
cd ../radiologger-headless
ant clean
ant jar
popd
;;
esac
done
sudo rm -rf ${CALLDIR}/*.pyc
sudo pkill -9 radvd
sudo pkill -9 ping
sudo pkill -9 java
sudo pkill -9 tcpdump
sudo pkill -9 nc
sudo pkill -9 udpserver
sudo pkill cetic_6lbr_rpl_root
sudo pkill cetic_6lbr_router
sudo pkill cetic_6lbr_smart_bridge
sudo pkill cetic_6lbr_transparent_bridge
sudo ip link set br0 down
sudo brctl delbr br0
sudo rm -f ${CALLDIR}/COOJA.*log
sudo rm -f ${CALLDIR}/radiolog-*.pcap
sudo ${CALLDIR}/top.py > >(tee ${CALLDIR}/console_out.log) 2> >(tee ${CALLDIR}/console_err.log >&2)
reportdir=$(find ${CALLDIR}/report -maxdepth 1 -type d | sort | tail -n 1)
sudo mv ${CALLDIR}/console_out.log $reportdir
sudo mv ${CALLDIR}/console_err.log $reportdir
sudo chown -R test:test report/
|
f51dfee5ea051d80effb9387bdbdcb4c7593eeb2
|
articles/_posts/2013-07-03-css-viewport-units.md
|
articles/_posts/2013-07-03-css-viewport-units.md
|
---
title: 'CSS Viewport Units: vw, vh, vmin and vmax'
authors:
- chris-mills
layout: article
---
|
---
title: 'CSS Viewport Units: `vw`, `vh`, `vmin` and `vmax`'
authors:
- chris-mills
intro: 'CSS viewport units allow us to size lengths on web pages relative to the viewport size, which has some interesting applications for responsive design. In this article we’ll explore the fundamentals of this topic.'
layout: article
---
|
Add intro for article “CSS Viewport Units: `vw`, `vh`, `vmin` and `vmax`”
|
Add intro for article “CSS Viewport Units: `vw`, `vh`, `vmin` and `vmax`”
Ref. #19.
|
Markdown
|
apache-2.0
|
andreasbovens/devopera,initaldk/devopera,simevidas/devopera,kenarai/devopera,andreasbovens/devopera,initaldk/devopera,Mtmotahar/devopera,shwetank/devopera,cvan/devopera,erikmaarten/devopera,SelenIT/devopera,michaelstewart/devopera,Jasenpan1987/devopera,shwetank/devopera,michaelstewart/devopera,paulirish/devopera,simevidas/devopera,operasoftware/devopera,payeldillip/devopera,simevidas/devopera,Mtmotahar/devopera,Jasenpan1987/devopera,payeldillip/devopera,paulirish/devopera,andreasbovens/devopera,operasoftware/devopera,erikmaarten/devopera,shwetank/devopera,Jasenpan1987/devopera,simevidas/devopera,payeldillip/devopera,initaldk/devopera,kenarai/devopera,initaldk/devopera,erikmaarten/devopera,kenarai/devopera,SelenIT/devopera,michaelstewart/devopera,michaelstewart/devopera,cvan/devopera,erikmaarten/devopera,Jasenpan1987/devopera,payeldillip/devopera,paulirish/devopera,operasoftware/devopera,operasoftware/devopera,Mtmotahar/devopera,paulirish/devopera,cvan/devopera,SelenIT/devopera,kenarai/devopera,cvan/devopera,Mtmotahar/devopera,SelenIT/devopera
|
markdown
|
## Code Before:
---
title: 'CSS Viewport Units: vw, vh, vmin and vmax'
authors:
- chris-mills
layout: article
---
## Instruction:
Add intro for article “CSS Viewport Units: `vw`, `vh`, `vmin` and `vmax`”
Ref. #19.
## Code After:
---
title: 'CSS Viewport Units: `vw`, `vh`, `vmin` and `vmax`'
authors:
- chris-mills
intro: 'CSS viewport units allow us to size lengths on web pages relative to the viewport size, which has some interesting applications for responsive design. In this article we’ll explore the fundamentals of this topic.'
layout: article
---
|
b40b03dcc00003de806cdc03e8c365e33095fb6f
|
links/bash/vim.bash
|
links/bash/vim.bash
|
v_funcs() {
$PAGER ~/.bash/vim.bash
}
v() {
vim "$@"
}
vv() {
vim +'edit $MYVIMRC' "$@"
}
vq() {
if (($# > 0)); then
vim -q <("$@" 2>&1)
else
printf '%s\n' 'Usage: vq cmd' '' 'Use {cmd} output as quickfix list'
fi
}
vf() {
if (($# > 0)); then
vim $("$@")
else
printf '%s\n' 'Usage: vf cmd' '' 'Use {cmd} output as filenames' \
'Brittle: {cmd} output will be word-split'
fi
}
vc() {
if (($# > 0)); then
( cd "$1" && shift && vim "$@" )
else
printf '%s\n' 'Usage: vc dir [args]' '' 'Execute vim in {dir}'
fi
}
vs() {
vim "$@" -S
}
# Start vim with its last cursor position
lvim() {
vim +'normal '"'"'0' "$@"
}
|
v_funcs() {
$PAGER ~/.bash/vim.bash
}
v() {
vim "$@"
}
vv() {
vim +'edit $MYVIMRC' "$@"
}
vq() {
if (($# > 0)); then
vim -q <("$@" 2>&1)
else
printf '%s\n' 'Usage: vq cmd' '' 'Use {cmd} output as quickfix list'
fi
}
vf() {
if (($# > 0)); then
vim $("$@")
else
printf '%s\n' 'Usage: vf cmd' '' 'Use {cmd} output as filenames' \
'Brittle: {cmd} output will be word-split'
fi
}
vc() {
if (($# > 0)); then
( cd "$1" && shift && vim "$@" )
else
printf '%s\n' 'Usage: vc dir [args]' '' 'Execute vim in {dir}'
fi
}
vs() {
if (($# > 0)); then
local session="$1"
shift
vim "$@" -S "$session"
else
vim -S
fi
}
# Start vim with its last cursor position
lvim() {
vim +'normal '"'"'0' "$@"
}
|
Fix vs to allow session as first parameter
|
Fix vs to allow session as first parameter
|
Shell
|
mit
|
benknoble/Dotfiles,benknoble/Dotfiles,benknoble/Dotfiles,benknoble/Dotfiles,benknoble/Dotfiles
|
shell
|
## Code Before:
v_funcs() {
$PAGER ~/.bash/vim.bash
}
v() {
vim "$@"
}
vv() {
vim +'edit $MYVIMRC' "$@"
}
vq() {
if (($# > 0)); then
vim -q <("$@" 2>&1)
else
printf '%s\n' 'Usage: vq cmd' '' 'Use {cmd} output as quickfix list'
fi
}
vf() {
if (($# > 0)); then
vim $("$@")
else
printf '%s\n' 'Usage: vf cmd' '' 'Use {cmd} output as filenames' \
'Brittle: {cmd} output will be word-split'
fi
}
vc() {
if (($# > 0)); then
( cd "$1" && shift && vim "$@" )
else
printf '%s\n' 'Usage: vc dir [args]' '' 'Execute vim in {dir}'
fi
}
vs() {
vim "$@" -S
}
# Start vim with its last cursor position
lvim() {
vim +'normal '"'"'0' "$@"
}
## Instruction:
Fix vs to allow session as first parameter
## Code After:
v_funcs() {
$PAGER ~/.bash/vim.bash
}
v() {
vim "$@"
}
vv() {
vim +'edit $MYVIMRC' "$@"
}
vq() {
if (($# > 0)); then
vim -q <("$@" 2>&1)
else
printf '%s\n' 'Usage: vq cmd' '' 'Use {cmd} output as quickfix list'
fi
}
vf() {
if (($# > 0)); then
vim $("$@")
else
printf '%s\n' 'Usage: vf cmd' '' 'Use {cmd} output as filenames' \
'Brittle: {cmd} output will be word-split'
fi
}
vc() {
if (($# > 0)); then
( cd "$1" && shift && vim "$@" )
else
printf '%s\n' 'Usage: vc dir [args]' '' 'Execute vim in {dir}'
fi
}
vs() {
if (($# > 0)); then
local session="$1"
shift
vim "$@" -S "$session"
else
vim -S
fi
}
# Start vim with its last cursor position
lvim() {
vim +'normal '"'"'0' "$@"
}
|
7c3b1bece37e80dcefa767ad6f3933d725570e6a
|
pom.xml
|
pom.xml
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.ripe.maven-utils</groupId>
<artifactId>ripe-parent-pom</artifactId>
<version>1.16</version>
</parent>
<groupId>net.ripe.commons</groupId>
<artifactId>commons-ip-math-parent</artifactId>
<version>1.8-SNAPSHOT</version>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<scm>
<connection>scm:svn:https://svn.ripe.net/svn/ba/commons-ip-math/trunk</connection>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>commons-ip-math</module>
<module>commons-ip-math-gwt</module>
</modules>
</project>
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.ripe.maven-utils</groupId>
<artifactId>ripe-parent-pom</artifactId>
<version>1.16</version>
</parent>
<groupId>net.ripe.commons</groupId>
<artifactId>commons-ip-math-parent</artifactId>
<version>1.8-SNAPSHOT</version>
<packaging>pom</packaging>
<name>RIPE NCC Commons - IP Math</name>
<scm>
<connection>scm:git:ssh://[email protected]/commons/commons-ip-math</connection>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>commons-ip-math</module>
<module>commons-ip-math-gwt</module>
</modules>
</project>
|
Update name and scm url.
|
Update name and scm url.
|
XML
|
mit
|
jgonian/commons-ip-math,kkuegler/commons-ip-math
|
xml
|
## Code Before:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.ripe.maven-utils</groupId>
<artifactId>ripe-parent-pom</artifactId>
<version>1.16</version>
</parent>
<groupId>net.ripe.commons</groupId>
<artifactId>commons-ip-math-parent</artifactId>
<version>1.8-SNAPSHOT</version>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<scm>
<connection>scm:svn:https://svn.ripe.net/svn/ba/commons-ip-math/trunk</connection>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>commons-ip-math</module>
<module>commons-ip-math-gwt</module>
</modules>
</project>
## Instruction:
Update name and scm url.
## Code After:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.ripe.maven-utils</groupId>
<artifactId>ripe-parent-pom</artifactId>
<version>1.16</version>
</parent>
<groupId>net.ripe.commons</groupId>
<artifactId>commons-ip-math-parent</artifactId>
<version>1.8-SNAPSHOT</version>
<packaging>pom</packaging>
<name>RIPE NCC Commons - IP Math</name>
<scm>
<connection>scm:git:ssh://[email protected]/commons/commons-ip-math</connection>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>commons-ip-math</module>
<module>commons-ip-math-gwt</module>
</modules>
</project>
|
5d4bcaaef6b2d571ff6929beaffcbe2f320d74ad
|
migrate.py
|
migrate.py
|
from api import db, migration
import os
migration.create_schema_version()
migrations = migration.get_filenames("migrations")
versions = [f.split('__')[0] for f in migrations]
applied = migration.get_schema_version()
print migrations
print applied
if migration.verify_applied_migrations(versions, applied):
migration.apply_migrations(migrations, applied)
print "Migration success!"
else:
print "Migration failed."
|
from api import db, migration
from os import getcwd
from os.path import join
migration.create_schema_version()
migrations = migration.get_filenames(join(getcwd(), 'migrations'))
versions = [f.split('__')[0] for f in migrations]
applied = migration.get_schema_version()
print migrations
print applied
if migration.verify_applied_migrations(versions, applied):
migration.apply_migrations(migrations, applied)
print "Migration success!"
else:
print "Migration failed."
|
Refactor relative path to absolute for more reliability
|
Refactor relative path to absolute for more reliability
|
Python
|
mit
|
diogolundberg/db-migration
|
python
|
## Code Before:
from api import db, migration
import os
migration.create_schema_version()
migrations = migration.get_filenames("migrations")
versions = [f.split('__')[0] for f in migrations]
applied = migration.get_schema_version()
print migrations
print applied
if migration.verify_applied_migrations(versions, applied):
migration.apply_migrations(migrations, applied)
print "Migration success!"
else:
print "Migration failed."
## Instruction:
Refactor relative path to absolute for more reliability
## Code After:
from api import db, migration
from os import getcwd
from os.path import join
migration.create_schema_version()
migrations = migration.get_filenames(join(getcwd(), 'migrations'))
versions = [f.split('__')[0] for f in migrations]
applied = migration.get_schema_version()
print migrations
print applied
if migration.verify_applied_migrations(versions, applied):
migration.apply_migrations(migrations, applied)
print "Migration success!"
else:
print "Migration failed."
|
d079f75dd2472de1e248239349ae0e277788b319
|
.travis.yml
|
.travis.yml
|
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
matrix:
include:
- { php: 5.4, env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' }
before_script:
# Install librabbitmq-c
- sh tests/bin/install_rabbitmq-c.sh v0.6.0
# Install the AMQP dependency (using the alpha release for PHP 7 support)
- echo "$HOME/rabbitmq-c" | pecl install amqp-1.7.0alpha2
- composer install $COMPOSER_FLAGS
script:
- vendor/bin/phpunit
|
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
matrix:
include:
- { php: 5.4, env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' }
before_script:
# Install librabbitmq-c
- sh tests/bin/install_rabbitmq-c.sh v0.6.0
# Install the AMQP dependency (using the alpha release for PHP 7 support)
- echo "$HOME/rabbitmq-c" | pecl install amqp-1.7.0alpha2
# Install Composer dependencies
- composer update $COMPOSER_FLAGS
script:
- vendor/bin/phpunit
|
Use update rather than install
|
Use update rather than install
|
YAML
|
mit
|
tompedals/radish,tompedals/radish
|
yaml
|
## Code Before:
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
matrix:
include:
- { php: 5.4, env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' }
before_script:
# Install librabbitmq-c
- sh tests/bin/install_rabbitmq-c.sh v0.6.0
# Install the AMQP dependency (using the alpha release for PHP 7 support)
- echo "$HOME/rabbitmq-c" | pecl install amqp-1.7.0alpha2
- composer install $COMPOSER_FLAGS
script:
- vendor/bin/phpunit
## Instruction:
Use update rather than install
## Code After:
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
matrix:
include:
- { php: 5.4, env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' }
before_script:
# Install librabbitmq-c
- sh tests/bin/install_rabbitmq-c.sh v0.6.0
# Install the AMQP dependency (using the alpha release for PHP 7 support)
- echo "$HOME/rabbitmq-c" | pecl install amqp-1.7.0alpha2
# Install Composer dependencies
- composer update $COMPOSER_FLAGS
script:
- vendor/bin/phpunit
|
7e7f14c70d6ec66df6763845478fbcccd63c3f95
|
provisioning/inventory/group_vars/local.yml
|
provisioning/inventory/group_vars/local.yml
|
environment_name: local
front_hostname: cocorico.cc
front_web_public_host: "{{ front_hostname }}.test"
hostname: "{{ front_hostname }}-{{ environment_name }}"
is_development_environment: yes
http_protocol_prefix: http
mongodb_database_name: "{{ project_name }}"
franceconnect_cliend_id: 10e0a74c752107f712b890e6183b03b179146eb682189c3158370cb8f3fe7068
franceconnect_client_secret: 9ecc4856675778548fae7c3042b07df78a5134f3ab9ae09b91543965b24f04a3
franceconnect_url: https://fcp.integ01.dev-franceconnect.fr
home_web_admin_email: "admin@{{ front_hostname }}"
home_web_admin_password: admin
home_web_admin_name: Admin
home_web_upload_dir: upload
home_db_saved_pages:
- connexion
- accueil
- aide
- politique-de-confidentialite
- manifeste
|
environment_name: local
front_hostname: cocorico.cc
front_web_public_host: "{{ front_hostname }}.test"
hostname: "{{ front_hostname }}-{{ environment_name }}"
is_development_environment: yes
http_protocol_prefix: http
mongodb_database_name: "{{ project_name }}"
franceconnect_cliend_id: 10e0a74c752107f712b890e6183b03b179146eb682189c3158370cb8f3fe7068
franceconnect_client_secret: 9ecc4856675778548fae7c3042b07df78a5134f3ab9ae09b91543965b24f04a3
franceconnect_url: https://fcp.integ01.dev-franceconnect.fr
home_web_admin_email: "admin@{{ front_hostname }}"
home_web_admin_password: admin
home_web_admin_name: Admin
home_web_upload_dir: upload
home_db_saved_pages:
- connexion
- accueil
- aide
- politique-de-confidentialite
- manifeste
- astuce-etape-debat
|
Add the 'astuce-etape-debat' to the saved pages.
|
Add the 'astuce-etape-debat' to the saved pages.
|
YAML
|
mit
|
promethe42/cocorico,promethe42/cocorico,promethe42/cocorico,promethe42/cocorico,promethe42/cocorico
|
yaml
|
## Code Before:
environment_name: local
front_hostname: cocorico.cc
front_web_public_host: "{{ front_hostname }}.test"
hostname: "{{ front_hostname }}-{{ environment_name }}"
is_development_environment: yes
http_protocol_prefix: http
mongodb_database_name: "{{ project_name }}"
franceconnect_cliend_id: 10e0a74c752107f712b890e6183b03b179146eb682189c3158370cb8f3fe7068
franceconnect_client_secret: 9ecc4856675778548fae7c3042b07df78a5134f3ab9ae09b91543965b24f04a3
franceconnect_url: https://fcp.integ01.dev-franceconnect.fr
home_web_admin_email: "admin@{{ front_hostname }}"
home_web_admin_password: admin
home_web_admin_name: Admin
home_web_upload_dir: upload
home_db_saved_pages:
- connexion
- accueil
- aide
- politique-de-confidentialite
- manifeste
## Instruction:
Add the 'astuce-etape-debat' to the saved pages.
## Code After:
environment_name: local
front_hostname: cocorico.cc
front_web_public_host: "{{ front_hostname }}.test"
hostname: "{{ front_hostname }}-{{ environment_name }}"
is_development_environment: yes
http_protocol_prefix: http
mongodb_database_name: "{{ project_name }}"
franceconnect_cliend_id: 10e0a74c752107f712b890e6183b03b179146eb682189c3158370cb8f3fe7068
franceconnect_client_secret: 9ecc4856675778548fae7c3042b07df78a5134f3ab9ae09b91543965b24f04a3
franceconnect_url: https://fcp.integ01.dev-franceconnect.fr
home_web_admin_email: "admin@{{ front_hostname }}"
home_web_admin_password: admin
home_web_admin_name: Admin
home_web_upload_dir: upload
home_db_saved_pages:
- connexion
- accueil
- aide
- politique-de-confidentialite
- manifeste
- astuce-etape-debat
|
1b7e1e9b7da9f76e1116d18adf1d2f5116208b10
|
app/presenters/announcements_presenter.rb
|
app/presenters/announcements_presenter.rb
|
class AnnouncementsPresenter
attr_reader :slug
def initialize(slug)
@slug = slug
end
def items
announcements.map do |announcenment|
{
link: {
text: announcenment["title"],
path: announcenment["link"],
},
metadata: {
public_timestamp: Date.parse(announcenment["public_timestamp"]).strftime("%d %B %Y"),
content_store_document_type: announcenment["content_store_document_type"].humanize,
},
}
end
end
def links
{
email_signup: "/email-signup?link=/government/people/#{slug}",
subscribe_to_feed: "https://www.gov.uk/government/people/#{slug}.atom",
link_to_news_and_communications: "/search/news-and-communications?people=#{slug}",
}
end
private
def announcements
@announcements ||= Services.cached_search(
count: 10,
order: "-public_timestamp",
filter_people: slug,
reject_content_purpose_supergroup: "other",
fields: %w[title link content_store_document_type public_timestamp],
)["results"]
end
end
|
class AnnouncementsPresenter
attr_reader :slug
def initialize(slug)
@slug = slug
end
def items
announcements.map do |announcenment|
{
link: {
text: announcenment["title"],
path: announcenment["link"],
},
metadata: {
public_timestamp: Date.parse(announcenment["public_timestamp"]).strftime("%d %B %Y"),
content_store_document_type: announcenment["content_store_document_type"].humanize,
},
}
end
end
def links
{
email_signup: "/email-signup?link=/government/people/#{slug}",
subscribe_to_feed: "https://www.gov.uk/government/people/#{slug}.atom",
link_to_news_and_communications: "/search/news-and-communications?people=#{slug}",
}
end
private
def announcements
@announcements ||= Services.cached_search(
count: 10,
order: "-public_timestamp",
filter_people: slug_without_locale,
reject_content_purpose_supergroup: "other",
fields: %w[title link content_store_document_type public_timestamp],
)["results"]
end
def slug_without_locale
slug.split(".").first
end
end
|
Support showing announcements for all locales
|
Support showing announcements for all locales
Search API only supports documents written in English so we should
remove the locale from the slug when querying for documents.
|
Ruby
|
mit
|
alphagov/collections,alphagov/collections,alphagov/collections,alphagov/collections
|
ruby
|
## Code Before:
class AnnouncementsPresenter
attr_reader :slug
def initialize(slug)
@slug = slug
end
def items
announcements.map do |announcenment|
{
link: {
text: announcenment["title"],
path: announcenment["link"],
},
metadata: {
public_timestamp: Date.parse(announcenment["public_timestamp"]).strftime("%d %B %Y"),
content_store_document_type: announcenment["content_store_document_type"].humanize,
},
}
end
end
def links
{
email_signup: "/email-signup?link=/government/people/#{slug}",
subscribe_to_feed: "https://www.gov.uk/government/people/#{slug}.atom",
link_to_news_and_communications: "/search/news-and-communications?people=#{slug}",
}
end
private
def announcements
@announcements ||= Services.cached_search(
count: 10,
order: "-public_timestamp",
filter_people: slug,
reject_content_purpose_supergroup: "other",
fields: %w[title link content_store_document_type public_timestamp],
)["results"]
end
end
## Instruction:
Support showing announcements for all locales
Search API only supports documents written in English so we should
remove the locale from the slug when querying for documents.
## Code After:
class AnnouncementsPresenter
attr_reader :slug
def initialize(slug)
@slug = slug
end
def items
announcements.map do |announcenment|
{
link: {
text: announcenment["title"],
path: announcenment["link"],
},
metadata: {
public_timestamp: Date.parse(announcenment["public_timestamp"]).strftime("%d %B %Y"),
content_store_document_type: announcenment["content_store_document_type"].humanize,
},
}
end
end
def links
{
email_signup: "/email-signup?link=/government/people/#{slug}",
subscribe_to_feed: "https://www.gov.uk/government/people/#{slug}.atom",
link_to_news_and_communications: "/search/news-and-communications?people=#{slug}",
}
end
private
def announcements
@announcements ||= Services.cached_search(
count: 10,
order: "-public_timestamp",
filter_people: slug_without_locale,
reject_content_purpose_supergroup: "other",
fields: %w[title link content_store_document_type public_timestamp],
)["results"]
end
def slug_without_locale
slug.split(".").first
end
end
|
6cc81443207e67581b6a31a1e637dffecdaa9c3a
|
app/admin/node_type.rb
|
app/admin/node_type.rb
|
ActiveAdmin.register NodeType do
filter :category, :as => :select, :collection => proc { Category.all.inject([]){|memo,r| memo << [r.name, r.id]; memo} }
filter :identifier
filter :osm_key
filter :osm_value
filter :alt_osm_key
filter :alt_osm_value
filter :created_at
filter :updated_at
controller do
def update
region = resource
region.update_attributes(params[:node_type])
super
end
end
index do
column :id
column :icon do |node_type|
image_tag("/icons/#{node_type.icon}")
end
column :name
column :category
column :osm_key do |node_type|
link_to node_type.osm_key, "http://wiki.openstreetmap.org/wiki/Key:#{node_type.osm_key}", :target => '_blank'
end
column :osm_value do |node_type|
link_to node_type.osm_value, "http://wiki.openstreetmap.org/wiki/Tag:#{node_type.osm_key}%3D#{node_type.osm_value}", :target => '_blank'
end
default_actions
end
end
|
ActiveAdmin.register NodeType do
filter :category, :as => :select, :collection => proc { Category.all.inject([]){|memo,r| memo << [r.name, r.id]; memo} }
filter :identifier
filter :osm_key
filter :osm_value
filter :alt_osm_key
filter :alt_osm_value
filter :created_at
filter :updated_at
controller do
def update
region = resource
region.update_attributes(params[:node_type])
super
end
end
index do
column :id
column :icon do |node_type|
image_tag("/icons/#{node_type.icon}")
end
column :name, :sortable => false
column :category, :sortable => false
column :osm_key, :sortable => :osm_key do |node_type|
link_to node_type.osm_key, "http://wiki.openstreetmap.org/wiki/Key:#{node_type.osm_key}", :target => '_blank'
end
column :osm_value, :sortable => :osm_value do |node_type|
link_to node_type.osm_value, "http://wiki.openstreetmap.org/wiki/Tag:#{node_type.osm_key}%3D#{node_type.osm_value}", :target => '_blank'
end
default_actions
end
end
|
Make node types not sortable for category names.
|
Make node types not sortable for category names.
|
Ruby
|
agpl-3.0
|
sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap
|
ruby
|
## Code Before:
ActiveAdmin.register NodeType do
filter :category, :as => :select, :collection => proc { Category.all.inject([]){|memo,r| memo << [r.name, r.id]; memo} }
filter :identifier
filter :osm_key
filter :osm_value
filter :alt_osm_key
filter :alt_osm_value
filter :created_at
filter :updated_at
controller do
def update
region = resource
region.update_attributes(params[:node_type])
super
end
end
index do
column :id
column :icon do |node_type|
image_tag("/icons/#{node_type.icon}")
end
column :name
column :category
column :osm_key do |node_type|
link_to node_type.osm_key, "http://wiki.openstreetmap.org/wiki/Key:#{node_type.osm_key}", :target => '_blank'
end
column :osm_value do |node_type|
link_to node_type.osm_value, "http://wiki.openstreetmap.org/wiki/Tag:#{node_type.osm_key}%3D#{node_type.osm_value}", :target => '_blank'
end
default_actions
end
end
## Instruction:
Make node types not sortable for category names.
## Code After:
ActiveAdmin.register NodeType do
filter :category, :as => :select, :collection => proc { Category.all.inject([]){|memo,r| memo << [r.name, r.id]; memo} }
filter :identifier
filter :osm_key
filter :osm_value
filter :alt_osm_key
filter :alt_osm_value
filter :created_at
filter :updated_at
controller do
def update
region = resource
region.update_attributes(params[:node_type])
super
end
end
index do
column :id
column :icon do |node_type|
image_tag("/icons/#{node_type.icon}")
end
column :name, :sortable => false
column :category, :sortable => false
column :osm_key, :sortable => :osm_key do |node_type|
link_to node_type.osm_key, "http://wiki.openstreetmap.org/wiki/Key:#{node_type.osm_key}", :target => '_blank'
end
column :osm_value, :sortable => :osm_value do |node_type|
link_to node_type.osm_value, "http://wiki.openstreetmap.org/wiki/Tag:#{node_type.osm_key}%3D#{node_type.osm_value}", :target => '_blank'
end
default_actions
end
end
|
0886801afca31ed7b4602c8231658e21781e2d6d
|
README.md
|
README.md
|
SelectScript Compiler and REPL implemented in Clojure and the SandhillSkipperVM
|
SelectScript Compiler and REPL implemented in Clojure and the SandhillSkipperVM
## Editor Integration
There is syntax highlighting support for several editors available:
| Atom | [github.com/ESS-OVGU/language-selectscript](https://github.com/ESS-OVGU/language-selectscript) |
|-------|------------------------------------------------------------------------------------------------|
| Emacs | [github.com/fin-ger/select-script-mode](https://github.com/fin-ger/select-script-mode) |
|
Add supported editors to readme.
|
Add supported editors to readme.
|
Markdown
|
epl-1.0
|
ESS-OVGU/SelectScriptC
|
markdown
|
## Code Before:
SelectScript Compiler and REPL implemented in Clojure and the SandhillSkipperVM
## Instruction:
Add supported editors to readme.
## Code After:
SelectScript Compiler and REPL implemented in Clojure and the SandhillSkipperVM
## Editor Integration
There is syntax highlighting support for several editors available:
| Atom | [github.com/ESS-OVGU/language-selectscript](https://github.com/ESS-OVGU/language-selectscript) |
|-------|------------------------------------------------------------------------------------------------|
| Emacs | [github.com/fin-ger/select-script-mode](https://github.com/fin-ger/select-script-mode) |
|
9496821bdda5defa93aa3ae2ea476b662fb729b5
|
src/commands.h
|
src/commands.h
|
struct LacoState;
typedef void (*LacoHandler)(struct LacoState* laco, const char** arguments);
struct LacoCommand {
const char** matches;
LacoHandler handler;
};
void laco_dispatch(const struct LacoCommand* commands,
struct LacoState* laco, const char* command_keyword,
const char** arguments);
/**
* Gets passed ever line to see if it matches one of the REPL command. If it
* does, that command will be executed.
*/
void laco_handle_command(struct LacoState* laco, char* line);
#endif /* LACO_COMMANDS_H */
|
struct LacoState;
typedef void (*LacoHandler)(struct LacoState* laco, const char** arguments);
struct LacoCommand {
const char** matches;
LacoHandler handler;
};
/**
* Goes through each instance from the list of commands and see if there is
* a match with for command_keyword. When there is a match, the defined
* handler inside the LacoCommand gets called -- passing in LacoState and
* the arguments. The list of commands expects the last entry of the array
* to be `{ NULL, NULL }` for ease of iteration.
*/
void laco_dispatch(const struct LacoCommand* commands,
struct LacoState* laco, const char* command_keyword,
const char** arguments);
/**
* Gets passed ever line to see if it matches one of the REPL command. If it
* does, that command will be executed.
*/
void laco_handle_command(struct LacoState* laco, char* line);
#endif /* LACO_COMMANDS_H */
|
Add documentation for the laco_dispatch function
|
Add documentation for the laco_dispatch function
|
C
|
bsd-2-clause
|
sourrust/laco
|
c
|
## Code Before:
struct LacoState;
typedef void (*LacoHandler)(struct LacoState* laco, const char** arguments);
struct LacoCommand {
const char** matches;
LacoHandler handler;
};
void laco_dispatch(const struct LacoCommand* commands,
struct LacoState* laco, const char* command_keyword,
const char** arguments);
/**
* Gets passed ever line to see if it matches one of the REPL command. If it
* does, that command will be executed.
*/
void laco_handle_command(struct LacoState* laco, char* line);
#endif /* LACO_COMMANDS_H */
## Instruction:
Add documentation for the laco_dispatch function
## Code After:
struct LacoState;
typedef void (*LacoHandler)(struct LacoState* laco, const char** arguments);
struct LacoCommand {
const char** matches;
LacoHandler handler;
};
/**
* Goes through each instance from the list of commands and see if there is
* a match with for command_keyword. When there is a match, the defined
* handler inside the LacoCommand gets called -- passing in LacoState and
* the arguments. The list of commands expects the last entry of the array
* to be `{ NULL, NULL }` for ease of iteration.
*/
void laco_dispatch(const struct LacoCommand* commands,
struct LacoState* laco, const char* command_keyword,
const char** arguments);
/**
* Gets passed ever line to see if it matches one of the REPL command. If it
* does, that command will be executed.
*/
void laco_handle_command(struct LacoState* laco, char* line);
#endif /* LACO_COMMANDS_H */
|
9cfa074c7e8c59f8e7d85632f8ba9e535ec403e9
|
application/views/recipes/single.php
|
application/views/recipes/single.php
|
<h1><?php echo $recipe->name; ?></h1>
<div class="row recipe-quick-facts">
<div class="col-md-4">
<h4>Servings</h4>
<?php echo $recipe->servings; ?>
</div>
<div class="col-md-4">
<h4>Prep Time</h4>
<?php echo display_time($recipe->time_prep); ?>
</div>
<div class="col-md-4">
<h4>Cook Time</h4>
<?php echo display_time($recipe->time_cook); ?>
</div>
</div>
<div class="recipe-ingredients">
<h2>Ingredients</h2>
<ul id="ingredients" class="list-group">
<?php
foreach ($ingredients as $single_ingredient) {
$data = array(
'ingredient' => $single_ingredient
);
$this->load->view('recipes/_ingredient', $data);
}
?>
</ul>
</div><!-- /.recipe-ingredients -->
<div class="recipe-steps">
<h2>Steps</h2>
<ul id="steps" class="list-group">
<?php
foreach ($steps as $single_step) {
$data = array(
'step' => $single_step
);
$this->load->view('recipes/_step', $data);
}
?>
</ul>
</div><!-- /.recipe-steps -->
|
<h1><?php echo $recipe->name; ?></h1>
<div class="row recipe-quick-facts">
<div class="col-md-4">
<h4>Servings</h4>
<?php echo $recipe->servings; ?>
</div>
<div class="col-md-4">
<h4>Prep Time</h4>
<?php echo display_time($recipe->time_prep); ?>
</div>
<div class="col-md-4">
<h4>Cook Time</h4>
<?php echo display_time($recipe->time_cook); ?>
</div>
</div>
<div class="recipe-ingredients">
<h2>Ingredients</h2>
<ul id="ingredients" class="list-group">
<?php
foreach ($ingredients as $single_ingredient) {
$data = array(
'ingredient' => $single_ingredient
);
$this->load->view('recipes/_ingredient', $data);
}
?>
</ul>
<?php $this->load->view('recipes/_add_ingredient'); ?>
</div><!-- /.recipe-ingredients -->
<div class="recipe-steps">
<h2>Steps</h2>
<ul id="steps" class="list-group">
<?php
foreach ($steps as $single_step) {
$data = array(
'step' => $single_step
);
$this->load->view('recipes/_step', $data);
}
?>
</ul>
</div><!-- /.recipe-steps -->
|
Add button appears but not aligned
|
Add button appears but not aligned
|
PHP
|
mit
|
jimmythongtran/recipe_tracker,jimmythongtran/recipe_tracker,jimmythongtran/recipe_tracker
|
php
|
## Code Before:
<h1><?php echo $recipe->name; ?></h1>
<div class="row recipe-quick-facts">
<div class="col-md-4">
<h4>Servings</h4>
<?php echo $recipe->servings; ?>
</div>
<div class="col-md-4">
<h4>Prep Time</h4>
<?php echo display_time($recipe->time_prep); ?>
</div>
<div class="col-md-4">
<h4>Cook Time</h4>
<?php echo display_time($recipe->time_cook); ?>
</div>
</div>
<div class="recipe-ingredients">
<h2>Ingredients</h2>
<ul id="ingredients" class="list-group">
<?php
foreach ($ingredients as $single_ingredient) {
$data = array(
'ingredient' => $single_ingredient
);
$this->load->view('recipes/_ingredient', $data);
}
?>
</ul>
</div><!-- /.recipe-ingredients -->
<div class="recipe-steps">
<h2>Steps</h2>
<ul id="steps" class="list-group">
<?php
foreach ($steps as $single_step) {
$data = array(
'step' => $single_step
);
$this->load->view('recipes/_step', $data);
}
?>
</ul>
</div><!-- /.recipe-steps -->
## Instruction:
Add button appears but not aligned
## Code After:
<h1><?php echo $recipe->name; ?></h1>
<div class="row recipe-quick-facts">
<div class="col-md-4">
<h4>Servings</h4>
<?php echo $recipe->servings; ?>
</div>
<div class="col-md-4">
<h4>Prep Time</h4>
<?php echo display_time($recipe->time_prep); ?>
</div>
<div class="col-md-4">
<h4>Cook Time</h4>
<?php echo display_time($recipe->time_cook); ?>
</div>
</div>
<div class="recipe-ingredients">
<h2>Ingredients</h2>
<ul id="ingredients" class="list-group">
<?php
foreach ($ingredients as $single_ingredient) {
$data = array(
'ingredient' => $single_ingredient
);
$this->load->view('recipes/_ingredient', $data);
}
?>
</ul>
<?php $this->load->view('recipes/_add_ingredient'); ?>
</div><!-- /.recipe-ingredients -->
<div class="recipe-steps">
<h2>Steps</h2>
<ul id="steps" class="list-group">
<?php
foreach ($steps as $single_step) {
$data = array(
'step' => $single_step
);
$this->load->view('recipes/_step', $data);
}
?>
</ul>
</div><!-- /.recipe-steps -->
|
dc45b5a9be6dbfa805ed1777390e36baab00fbdf
|
app/views/paragraph_widget/show.html.erb
|
app/views/paragraph_widget/show.html.erb
|
<div class="row">
<div class="col-12">
<div class="cover-bg-blue">
<div class="col-3">
<%= scrivito_image_tag widget,:image , class:'image-responsive center-block'%>
<%= scrivito_tag :h1, widget, :headline, data: {newlines: false}, class:'center-block cover-text-white' %>
<div style="margin-top:15px;padding-bottom:15px;">
<%= scrivito_tag :p, widget, :text, class:'center-block cover-text-white'%>
</div>
</div>
</div>
</div>
</div>
|
<div class="row">
<div class="col-12">
<div class="cover-bg-blue">
<div class="col-3">
<%= scrivito_image_tag widget,:image , class:'image-responsive center-block'%>
<%= scrivito_tag :h1, widget, :headline, data: {newlines: false}, class:'center-block cover-text-white' %>
<div style="padding-bottom:15px;">
<%= scrivito_tag :p, widget, :text, class:'center-block cover-text-white'%>
</div>
</div>
</div>
</div>
</div>
|
Add correction to the padding
|
Add correction to the padding
|
HTML+ERB
|
mit
|
yasslab/coderdojo.jp,coderdojo-japan/coderdojo.jp,yasslab/coderdojo.jp,yasslab/coderdojo.jp,coderdojo-japan/coderdojo.jp,coderdojo-japan/coderdojo.jp,coderdojo-japan/coderdojo.jp
|
html+erb
|
## Code Before:
<div class="row">
<div class="col-12">
<div class="cover-bg-blue">
<div class="col-3">
<%= scrivito_image_tag widget,:image , class:'image-responsive center-block'%>
<%= scrivito_tag :h1, widget, :headline, data: {newlines: false}, class:'center-block cover-text-white' %>
<div style="margin-top:15px;padding-bottom:15px;">
<%= scrivito_tag :p, widget, :text, class:'center-block cover-text-white'%>
</div>
</div>
</div>
</div>
</div>
## Instruction:
Add correction to the padding
## Code After:
<div class="row">
<div class="col-12">
<div class="cover-bg-blue">
<div class="col-3">
<%= scrivito_image_tag widget,:image , class:'image-responsive center-block'%>
<%= scrivito_tag :h1, widget, :headline, data: {newlines: false}, class:'center-block cover-text-white' %>
<div style="padding-bottom:15px;">
<%= scrivito_tag :p, widget, :text, class:'center-block cover-text-white'%>
</div>
</div>
</div>
</div>
</div>
|
dbbd29a1cdfcd3f11a968c0aeb38bd54ef7014e3
|
gfusion/tests/test_main.py
|
gfusion/tests/test_main.py
|
"""Tests for main.py"""
from ..main import _solve_weight_vector
import numpy as np
from nose.tools import assert_raises, assert_equal, assert_true
def test_solve_weight_vector():
# smoke test
n_nodes = 4
n_communities = 2
n_similarities = 3
delta = 0.3
similarities = np.random.random((n_similarities,
n_nodes * (n_nodes-1)/2)) * 10
grouping_matrix = np.random.random((n_nodes, n_communities))
weight = _solve_weight_vector(similarities, grouping_matrix, delta)
assert_equal(weight.ndim, 2)
assert_equal(weight.shape[1], n_similarities)
assert_true(np.all(weight >= 0))
# check raises
assert_raises(ValueError,
_solve_weight_vector, similarities, grouping_matrix, -1)
similarities_invalid = similarities.copy()
similarities_invalid[0, 3] = -4.
assert_raises(ValueError,
_solve_weight_vector, similarities_invalid,
grouping_matrix, delta)
|
"""Tests for main.py"""
from ..main import _solve_weight_vector
import numpy as np
from numpy.testing import assert_array_almost_equal
from nose.tools import assert_raises, assert_equal, assert_true
def test_solve_weight_vector():
# smoke test
n_nodes = 4
n_communities = 2
n_similarities = 3
delta = 0.3
similarities = np.random.random((n_similarities,
n_nodes * (n_nodes-1)/2)) * 10
grouping_matrix = np.random.random((n_nodes, n_communities))
weight = _solve_weight_vector(similarities, grouping_matrix, delta)
assert_equal(weight.ndim, 2)
assert_equal(weight.shape[1], n_similarities)
assert_true(np.all(weight >= 0))
# check raises
assert_raises(ValueError,
_solve_weight_vector, similarities, grouping_matrix, -1)
similarities_invalid = similarities.copy()
similarities_invalid[0, 3] = -4.
assert_raises(ValueError,
_solve_weight_vector, similarities_invalid,
grouping_matrix, delta)
# if I have two similarities, and one is null + the grouping matrix is all
# to all, and delta is 0 (no regularization), then I expect that the weight
# vector is [1, 0]
similarities = np.vstack((1000*np.ones((1, 6)),
np.zeros((1, 6))
))
grouping_matrix = np.ones((4, 4))
delta = 1
assert_array_almost_equal(np.atleast_2d([1., 0.]),
_solve_weight_vector(similarities,
grouping_matrix,
delta))
|
Add a more semantic test
|
Add a more semantic test
|
Python
|
mit
|
mvdoc/gfusion
|
python
|
## Code Before:
"""Tests for main.py"""
from ..main import _solve_weight_vector
import numpy as np
from nose.tools import assert_raises, assert_equal, assert_true
def test_solve_weight_vector():
# smoke test
n_nodes = 4
n_communities = 2
n_similarities = 3
delta = 0.3
similarities = np.random.random((n_similarities,
n_nodes * (n_nodes-1)/2)) * 10
grouping_matrix = np.random.random((n_nodes, n_communities))
weight = _solve_weight_vector(similarities, grouping_matrix, delta)
assert_equal(weight.ndim, 2)
assert_equal(weight.shape[1], n_similarities)
assert_true(np.all(weight >= 0))
# check raises
assert_raises(ValueError,
_solve_weight_vector, similarities, grouping_matrix, -1)
similarities_invalid = similarities.copy()
similarities_invalid[0, 3] = -4.
assert_raises(ValueError,
_solve_weight_vector, similarities_invalid,
grouping_matrix, delta)
## Instruction:
Add a more semantic test
## Code After:
"""Tests for main.py"""
from ..main import _solve_weight_vector
import numpy as np
from numpy.testing import assert_array_almost_equal
from nose.tools import assert_raises, assert_equal, assert_true
def test_solve_weight_vector():
# smoke test
n_nodes = 4
n_communities = 2
n_similarities = 3
delta = 0.3
similarities = np.random.random((n_similarities,
n_nodes * (n_nodes-1)/2)) * 10
grouping_matrix = np.random.random((n_nodes, n_communities))
weight = _solve_weight_vector(similarities, grouping_matrix, delta)
assert_equal(weight.ndim, 2)
assert_equal(weight.shape[1], n_similarities)
assert_true(np.all(weight >= 0))
# check raises
assert_raises(ValueError,
_solve_weight_vector, similarities, grouping_matrix, -1)
similarities_invalid = similarities.copy()
similarities_invalid[0, 3] = -4.
assert_raises(ValueError,
_solve_weight_vector, similarities_invalid,
grouping_matrix, delta)
# if I have two similarities, and one is null + the grouping matrix is all
# to all, and delta is 0 (no regularization), then I expect that the weight
# vector is [1, 0]
similarities = np.vstack((1000*np.ones((1, 6)),
np.zeros((1, 6))
))
grouping_matrix = np.ones((4, 4))
delta = 1
assert_array_almost_equal(np.atleast_2d([1., 0.]),
_solve_weight_vector(similarities,
grouping_matrix,
delta))
|
866d2022f7981593db7bf811192da7d2c0a36ff0
|
client/js/middleware/api.js
|
client/js/middleware/api.js
|
import api from "../libs/api";
import { DONE } from "../constants/wrapper";
const API = store => next => action => {
function request(method, url, params, body, headers){
const state = store.getState();
const promise = api.execRequest(method, url, state.settings.apiUrl, state.jwt, state.settings.csrfToken, params, body, headers);
if(promise){
promise.then(
(response) => {
store.dispatch({
type: action.type + DONE,
payload: response.body,
original: action,
response
}); // Dispatch the new data
},
(error) => {
store.dispatch({
type: action.type + DONE,
payload: {},
original: action,
error
}); // Dispatch the new error
}
);
}
};
if(action.method){
request(action.method, action.url, action.params, action.body, action.headers);
}
// call the next middleWare
next(action);
};
export { API as default };
|
import api from "../libs/api";
import { DONE } from "../constants/wrapper";
const API = store => next => action => {
function request(method, url, params, body, headers){
const state = store.getState();
const updatedParams = {
oauth_consumer_key: state.settings.oauthConsumerKey, // Add consumer key to requests so we can figure out which lti app requests are originating from
...params
};
const promise = api.execRequest(method, url, state.settings.apiUrl, state.jwt, state.settings.csrfToken, updatedParams, body, headers);
if(promise){
promise.then(
(response) => {
store.dispatch({
type: action.type + DONE,
payload: response.body,
original: action,
response
}); // Dispatch the new data
},
(error) => {
store.dispatch({
type: action.type + DONE,
payload: {},
original: action,
error
}); // Dispatch the new error
}
);
}
};
if(action.method){
request(action.method, action.url, action.params, action.body, action.headers);
}
// call the next middleWare
next(action);
};
export { API as default };
|
Add lti key to all requests
|
Add lti key to all requests
|
JavaScript
|
mit
|
atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app,atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/adhesion
|
javascript
|
## Code Before:
import api from "../libs/api";
import { DONE } from "../constants/wrapper";
const API = store => next => action => {
function request(method, url, params, body, headers){
const state = store.getState();
const promise = api.execRequest(method, url, state.settings.apiUrl, state.jwt, state.settings.csrfToken, params, body, headers);
if(promise){
promise.then(
(response) => {
store.dispatch({
type: action.type + DONE,
payload: response.body,
original: action,
response
}); // Dispatch the new data
},
(error) => {
store.dispatch({
type: action.type + DONE,
payload: {},
original: action,
error
}); // Dispatch the new error
}
);
}
};
if(action.method){
request(action.method, action.url, action.params, action.body, action.headers);
}
// call the next middleWare
next(action);
};
export { API as default };
## Instruction:
Add lti key to all requests
## Code After:
import api from "../libs/api";
import { DONE } from "../constants/wrapper";
const API = store => next => action => {
function request(method, url, params, body, headers){
const state = store.getState();
const updatedParams = {
oauth_consumer_key: state.settings.oauthConsumerKey, // Add consumer key to requests so we can figure out which lti app requests are originating from
...params
};
const promise = api.execRequest(method, url, state.settings.apiUrl, state.jwt, state.settings.csrfToken, updatedParams, body, headers);
if(promise){
promise.then(
(response) => {
store.dispatch({
type: action.type + DONE,
payload: response.body,
original: action,
response
}); // Dispatch the new data
},
(error) => {
store.dispatch({
type: action.type + DONE,
payload: {},
original: action,
error
}); // Dispatch the new error
}
);
}
};
if(action.method){
request(action.method, action.url, action.params, action.body, action.headers);
}
// call the next middleWare
next(action);
};
export { API as default };
|
0f41a31a5c73d121535c983efdcbf788bf8ee680
|
hubblestack_nova/netstat-ssh.yaml
|
hubblestack_nova/netstat-ssh.yaml
|
netstat:
ssh4:
address: 0.0.0.0:22
ssh6:
address: :::22
|
netstat:
ssh:
address:
- '*:22'
|
Use globbing in example netstat file
|
Use globbing in example netstat file
|
YAML
|
apache-2.0
|
HubbleStack/Nova,SaltyCharles/Nova,avb76/Nova
|
yaml
|
## Code Before:
netstat:
ssh4:
address: 0.0.0.0:22
ssh6:
address: :::22
## Instruction:
Use globbing in example netstat file
## Code After:
netstat:
ssh:
address:
- '*:22'
|
682cd14b7895bb836c24d511eee4821a67857aed
|
src/app/hospitals/hospital-detail.html
|
src/app/hospitals/hospital-detail.html
|
<div page-wrapper>
<h1 class="page-header">{{hospital.name}}</h1>
<div group-recruitment-graph group="hospital"></div>
<h2>Patients by Cohort</h2>
<div patients-by-group-table group="hospital" group-type="COHORT"></div>
</div>
|
<div page-wrapper>
<h1 class="page-header">{{hospital.name}} <small>{{hospital.code}}</small></h1>
<div group-recruitment-graph group="hospital"></div>
<h2>Patients by Cohort</h2>
<div patients-by-group-table group="hospital" group-type="COHORT"></div>
</div>
|
Add hospital code to heading
|
Add hospital code to heading
|
HTML
|
agpl-3.0
|
renalreg/radar-client,renalreg/radar-client,renalreg/radar-client
|
html
|
## Code Before:
<div page-wrapper>
<h1 class="page-header">{{hospital.name}}</h1>
<div group-recruitment-graph group="hospital"></div>
<h2>Patients by Cohort</h2>
<div patients-by-group-table group="hospital" group-type="COHORT"></div>
</div>
## Instruction:
Add hospital code to heading
## Code After:
<div page-wrapper>
<h1 class="page-header">{{hospital.name}} <small>{{hospital.code}}</small></h1>
<div group-recruitment-graph group="hospital"></div>
<h2>Patients by Cohort</h2>
<div patients-by-group-table group="hospital" group-type="COHORT"></div>
</div>
|
3e0feb41e9b34f95bd3d3fbd468ee77e5c778075
|
spec/models/vote_spec.rb
|
spec/models/vote_spec.rb
|
require 'rails_helper'
RSpec.describe Vote, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end
|
require 'rails_helper'
RSpec.describe Vote, type: :model do
describe 'Vote#place_vote' do
it 'creates a new Vote if user has not voted' do
Vote.create(vote: true, ip: '127.0.0.1')
expect{Vote.place_vote(true, '127.0.0.2')}.to change{Vote.count}.by(1)
end
it 'does not create a new Vote if user has voted' do
Vote.create(vote: true, ip: '127.0.0.1')
expect{Vote.place_vote(true, '127.0.0.1')}.to change{Vote.count}.by(0)
end
end
describe 'Vote#already_voted?' do
it 'returns true if IP has already voted' do
Vote.create(vote: true, ip: '127.0.0.1')
expect(Vote.already_voted?('127.0.0.1')).to be true
end
it 'returns false if IP has not voted' do
Vote.create(vote: true, ip: '127.0.0.1')
expect(Vote.already_voted?('127.0.0.2')).to be false
end
end
describe 'Vote#clear_votes' do
it 'deletes all votes' do
Vote.create(vote: false, ip: '127.0.0.1')
Vote.clear_votes
expect(Vote.count).to eq(0)
end
end
end
|
Add tests for Vote model
|
Add tests for Vote model
|
Ruby
|
mit
|
its-swats/PictureIt,its-swats/PictureIt,its-swats/PictureIt
|
ruby
|
## Code Before:
require 'rails_helper'
RSpec.describe Vote, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end
## Instruction:
Add tests for Vote model
## Code After:
require 'rails_helper'
RSpec.describe Vote, type: :model do
describe 'Vote#place_vote' do
it 'creates a new Vote if user has not voted' do
Vote.create(vote: true, ip: '127.0.0.1')
expect{Vote.place_vote(true, '127.0.0.2')}.to change{Vote.count}.by(1)
end
it 'does not create a new Vote if user has voted' do
Vote.create(vote: true, ip: '127.0.0.1')
expect{Vote.place_vote(true, '127.0.0.1')}.to change{Vote.count}.by(0)
end
end
describe 'Vote#already_voted?' do
it 'returns true if IP has already voted' do
Vote.create(vote: true, ip: '127.0.0.1')
expect(Vote.already_voted?('127.0.0.1')).to be true
end
it 'returns false if IP has not voted' do
Vote.create(vote: true, ip: '127.0.0.1')
expect(Vote.already_voted?('127.0.0.2')).to be false
end
end
describe 'Vote#clear_votes' do
it 'deletes all votes' do
Vote.create(vote: false, ip: '127.0.0.1')
Vote.clear_votes
expect(Vote.count).to eq(0)
end
end
end
|
d2e118b5d9f8a167d6fc368d3b7a6fe6dd84f7c3
|
Resources/doc/cookbook/custom-properties.md
|
Resources/doc/cookbook/custom-properties.md
|
Since FOSElasticaBundle 3.1.0, we now dispatch an event for each transformation of an
object into an Elastica document which allows you to set custom properties on the Elastica
document for indexing.
Set up an event listener or subscriber for
`FOS\ElasticaBundle\Event\TransformEvent::POST_TRANSFORM` to be able to inject your own
parameters.
```php
class CustomPropertyListener implements EventSubscriberInterface
{
private $anotherService;
// ...
public function addCustomProperty(TransformEvent $event)
{
$document = $event->getDocument();
$custom = $this->anotherService->calculateCustom($event->getObject());
$document->set('custom', $custom);
}
public static function getSubscribedEvents()
{
return array(
TransformEvent::POST_TRANSFORM => 'addCustomProperty',
);
}
}
```
|
Since FOSElasticaBundle 3.1.0, we now dispatch an event for each transformation of an
object into an Elastica document which allows you to set custom properties on the Elastica
document for indexing.
Set up an event listener or subscriber for
`FOS\ElasticaBundle\Event\TransformEvent::POST_TRANSFORM` to be able to inject your own
parameters.
```php
class CustomPropertyListener implements EventSubscriberInterface
{
private $anotherService;
// ...
public function addCustomProperty(TransformEvent $event)
{
$document = $event->getDocument();
$custom = $this->anotherService->calculateCustom($event->getObject());
$document->set('custom', $custom);
}
public static function getSubscribedEvents()
{
return array(
TransformEvent::POST_TRANSFORM => 'addCustomProperty',
);
}
}
```
Service definition:
```yml
acme.listener.custom_property:
class: AcmeBundle\EventListener\CustomPropertyListener
tags:
- { name: kernel.event_subscriber }
```
|
Improve UX: added yaml service definition
|
Improve UX: added yaml service definition
|
Markdown
|
mit
|
fazland/FazlandElasticaBundle,alekitto/FazlandElasticaBundle,alekitto/FazlandElasticaBundle,ramuss/FazlandElasticaBundle,fazland/FazlandElasticaBundle,ramuss/FazlandElasticaBundle
|
markdown
|
## Code Before:
Since FOSElasticaBundle 3.1.0, we now dispatch an event for each transformation of an
object into an Elastica document which allows you to set custom properties on the Elastica
document for indexing.
Set up an event listener or subscriber for
`FOS\ElasticaBundle\Event\TransformEvent::POST_TRANSFORM` to be able to inject your own
parameters.
```php
class CustomPropertyListener implements EventSubscriberInterface
{
private $anotherService;
// ...
public function addCustomProperty(TransformEvent $event)
{
$document = $event->getDocument();
$custom = $this->anotherService->calculateCustom($event->getObject());
$document->set('custom', $custom);
}
public static function getSubscribedEvents()
{
return array(
TransformEvent::POST_TRANSFORM => 'addCustomProperty',
);
}
}
```
## Instruction:
Improve UX: added yaml service definition
## Code After:
Since FOSElasticaBundle 3.1.0, we now dispatch an event for each transformation of an
object into an Elastica document which allows you to set custom properties on the Elastica
document for indexing.
Set up an event listener or subscriber for
`FOS\ElasticaBundle\Event\TransformEvent::POST_TRANSFORM` to be able to inject your own
parameters.
```php
class CustomPropertyListener implements EventSubscriberInterface
{
private $anotherService;
// ...
public function addCustomProperty(TransformEvent $event)
{
$document = $event->getDocument();
$custom = $this->anotherService->calculateCustom($event->getObject());
$document->set('custom', $custom);
}
public static function getSubscribedEvents()
{
return array(
TransformEvent::POST_TRANSFORM => 'addCustomProperty',
);
}
}
```
Service definition:
```yml
acme.listener.custom_property:
class: AcmeBundle\EventListener\CustomPropertyListener
tags:
- { name: kernel.event_subscriber }
```
|
881f118cf8cc03dfe662f525856f221670248306
|
lib/client/client.js
|
lib/client/client.js
|
/* global BoundDocument:false - from dispatch:bound-document */
Configuration.subscription = Meteor.subscribe('__entity_configuration');
/**
* Get the configuration object for an entity, extended with all inherited values.
*
* @param {String} type The type of entity, e.g., 'user'
* @param {String} id The entity ID (Currently no support for ObjectId)
* @param {Options} options Additional options
* @param {Boolean} options.inherit Set to false to retrieve configuration for this entity without going through
* inheritance
* @param {Boolean} options.bind Set to true to return a bound document which will automatically update the database
* when modified
* @param {Function} callback A callback function that receives error, config. If options.bind == true,
* non-object properties within it will set into the database using the dispatch:bound-document package
*/
Configuration.getForEntity = Meteor.wrapAsync(function(type, id, options, callback) {
if (typeof options === 'function') {
callback = options;
options = null;
}
options = options || {};
Meteor.call('dispatch:configuration/getForEntity', type, id, _.omit(options, 'bind'), function (error, configDoc) {
if (error || !configDoc) {
callback(error, configDoc);
return;
}
if (options.bind === true) configDoc = new BoundDocument(Configuration.Collection, configDoc);
callback(null, configDoc.config);
});
});
|
/* global BoundDocument:false - from dispatch:bound-document */
Configuration.subscription = Meteor.subscribe('__entity_configuration');
/**
* Get the configuration object for an entity, extended with all inherited values.
*
* @param {String} type The type of entity, e.g., 'user'
* @param {String} id The entity ID (Currently no support for ObjectId)
* @param {Options} options Additional options
* @param {Boolean} options.inherit Set to false to retrieve configuration for this entity without going through
* inheritance
* @param {Boolean} options.bind Set to true to return a bound document which will automatically update the database
* when modified
* @param {Function} callback A callback function that receives error, config. If options.bind == true,
* non-object properties within it will set into the database using the dispatch:bound-document package
*/
Configuration.getForEntity = Meteor.wrapAsync(function(type, id, options, callback) {
if (typeof options === 'function') {
callback = options;
options = null;
}
options = options || {};
Meteor.call('dispatch:configuration/getForEntity', type, id, _.omit(options, 'bind'), function (error, configDoc) {
if (error || !configDoc) {
if(typeof callback === 'function') callback(error, configDoc);
return;
}
if (options.bind === true) configDoc = new BoundDocument(Configuration.Collection, configDoc);
if(typeof callback === 'function') callback(null, configDoc.config);
});
});
|
Support no callback in getForEntity
|
Support no callback in getForEntity
|
JavaScript
|
mit
|
DispatchMe/meteor-configuration,DispatchMe/meteor-configuration
|
javascript
|
## Code Before:
/* global BoundDocument:false - from dispatch:bound-document */
Configuration.subscription = Meteor.subscribe('__entity_configuration');
/**
* Get the configuration object for an entity, extended with all inherited values.
*
* @param {String} type The type of entity, e.g., 'user'
* @param {String} id The entity ID (Currently no support for ObjectId)
* @param {Options} options Additional options
* @param {Boolean} options.inherit Set to false to retrieve configuration for this entity without going through
* inheritance
* @param {Boolean} options.bind Set to true to return a bound document which will automatically update the database
* when modified
* @param {Function} callback A callback function that receives error, config. If options.bind == true,
* non-object properties within it will set into the database using the dispatch:bound-document package
*/
Configuration.getForEntity = Meteor.wrapAsync(function(type, id, options, callback) {
if (typeof options === 'function') {
callback = options;
options = null;
}
options = options || {};
Meteor.call('dispatch:configuration/getForEntity', type, id, _.omit(options, 'bind'), function (error, configDoc) {
if (error || !configDoc) {
callback(error, configDoc);
return;
}
if (options.bind === true) configDoc = new BoundDocument(Configuration.Collection, configDoc);
callback(null, configDoc.config);
});
});
## Instruction:
Support no callback in getForEntity
## Code After:
/* global BoundDocument:false - from dispatch:bound-document */
Configuration.subscription = Meteor.subscribe('__entity_configuration');
/**
* Get the configuration object for an entity, extended with all inherited values.
*
* @param {String} type The type of entity, e.g., 'user'
* @param {String} id The entity ID (Currently no support for ObjectId)
* @param {Options} options Additional options
* @param {Boolean} options.inherit Set to false to retrieve configuration for this entity without going through
* inheritance
* @param {Boolean} options.bind Set to true to return a bound document which will automatically update the database
* when modified
* @param {Function} callback A callback function that receives error, config. If options.bind == true,
* non-object properties within it will set into the database using the dispatch:bound-document package
*/
Configuration.getForEntity = Meteor.wrapAsync(function(type, id, options, callback) {
if (typeof options === 'function') {
callback = options;
options = null;
}
options = options || {};
Meteor.call('dispatch:configuration/getForEntity', type, id, _.omit(options, 'bind'), function (error, configDoc) {
if (error || !configDoc) {
if(typeof callback === 'function') callback(error, configDoc);
return;
}
if (options.bind === true) configDoc = new BoundDocument(Configuration.Collection, configDoc);
if(typeof callback === 'function') callback(null, configDoc.config);
});
});
|
b65059812a2b366550c6622608410a5f22aebded
|
protobuf/src/misc.rs
|
protobuf/src/misc.rs
|
use std::mem;
use std::slice;
/// Slice from `vec[vec.len()..vec.capacity()]`
pub unsafe fn remaining_capacity_as_slice_mut<A>(vec: &mut Vec<A>) -> &mut [A] {
slice::from_raw_parts_mut(
vec.as_mut_slice().as_mut_ptr().offset(vec.len() as isize),
vec.capacity() - vec.len(),
)
}
pub unsafe fn remove_lifetime_mut<A: ?Sized>(a: &mut A) -> &'static mut A {
mem::transmute(a)
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_remaining_capacity_as_slice_mut() {
let mut v = Vec::with_capacity(5);
v.push(10);
v.push(11);
v.push(12);
unsafe {
{
let s = remaining_capacity_as_slice_mut(&mut v);
assert_eq!(2, s.len());
s[0] = 13;
s[1] = 14;
}
v.set_len(5);
}
assert_eq!(vec![10, 11, 12, 13, 14], v);
}
}
|
use std::mem;
/// Slice from `vec[vec.len()..vec.capacity()]`
pub unsafe fn remaining_capacity_as_slice_mut<A>(vec: &mut Vec<A>) -> &mut [A] {
let range = vec.len()..vec.capacity();
vec.get_unchecked_mut(range)
}
pub unsafe fn remove_lifetime_mut<A: ?Sized>(a: &mut A) -> &'static mut A {
mem::transmute(a)
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_remaining_capacity_as_slice_mut() {
let mut v = Vec::with_capacity(5);
v.push(10);
v.push(11);
v.push(12);
unsafe {
{
let s = remaining_capacity_as_slice_mut(&mut v);
assert_eq!(2, s.len());
s[0] = 13;
s[1] = 14;
}
v.set_len(5);
}
assert_eq!(vec![10, 11, 12, 13, 14], v);
}
}
|
Simplify internal function a bit
|
Simplify internal function a bit
|
Rust
|
mit
|
stepancheg/rust-protobuf,stepancheg/rust-protobuf,stepancheg/rust-protobuf
|
rust
|
## Code Before:
use std::mem;
use std::slice;
/// Slice from `vec[vec.len()..vec.capacity()]`
pub unsafe fn remaining_capacity_as_slice_mut<A>(vec: &mut Vec<A>) -> &mut [A] {
slice::from_raw_parts_mut(
vec.as_mut_slice().as_mut_ptr().offset(vec.len() as isize),
vec.capacity() - vec.len(),
)
}
pub unsafe fn remove_lifetime_mut<A: ?Sized>(a: &mut A) -> &'static mut A {
mem::transmute(a)
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_remaining_capacity_as_slice_mut() {
let mut v = Vec::with_capacity(5);
v.push(10);
v.push(11);
v.push(12);
unsafe {
{
let s = remaining_capacity_as_slice_mut(&mut v);
assert_eq!(2, s.len());
s[0] = 13;
s[1] = 14;
}
v.set_len(5);
}
assert_eq!(vec![10, 11, 12, 13, 14], v);
}
}
## Instruction:
Simplify internal function a bit
## Code After:
use std::mem;
/// Slice from `vec[vec.len()..vec.capacity()]`
pub unsafe fn remaining_capacity_as_slice_mut<A>(vec: &mut Vec<A>) -> &mut [A] {
let range = vec.len()..vec.capacity();
vec.get_unchecked_mut(range)
}
pub unsafe fn remove_lifetime_mut<A: ?Sized>(a: &mut A) -> &'static mut A {
mem::transmute(a)
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn test_remaining_capacity_as_slice_mut() {
let mut v = Vec::with_capacity(5);
v.push(10);
v.push(11);
v.push(12);
unsafe {
{
let s = remaining_capacity_as_slice_mut(&mut v);
assert_eq!(2, s.len());
s[0] = 13;
s[1] = 14;
}
v.set_len(5);
}
assert_eq!(vec![10, 11, 12, 13, 14], v);
}
}
|
24f4ca7df4508fe0dd42ba58d96018a76a61c427
|
src/Data/Void.purs
|
src/Data/Void.purs
|
module Data.Void (Void, absurd) where
import Data.Show (class Show)
-- | An uninhabited data type. In other words, one can never create
-- | a runtime value of type `Void` becaue no such value exists.
-- |
-- | `Void` is useful to eliminate the possibility of a value being created.
-- | For example, a value of type `Either Void Boolean` can never have
-- | a Left value created in PureScript.
-- |
-- | This should not be confused with the keyword `void` that commonly appears in
-- | C-family languages, such as Java:
-- | ```
-- | public class Foo {
-- | void doSomething() { System.out.println("hello world!"); }
-- | }
-- | ```
-- |
-- | In PureScript, one often uses `Unit` to achieve similar effects as
-- | the lowercased `void` above.
newtype Void = Void Void
instance showVoid :: Show Void where
show = absurd
-- | Eliminator for the `Void` type.
-- | Useful for stating that some code branch is impossible because you've
-- | "acquired" a value of type `Void` (which you can't).
-- |
-- | ```purescript
-- | rightOnly :: forall t . Either Void t -> t
-- | rightOnly (Left v) = absurd v
-- | rightOnly (Right t) = t
-- | ```
absurd :: forall a. Void -> a
absurd a = spin a
where
spin (Void b) = spin b
|
module Data.Void (Void, absurd) where
import Data.Show (class Show)
-- | An uninhabited data type. In other words, one can never create
-- | a runtime value of type `Void` becaue no such value exists.
-- |
-- | `Void` is useful to eliminate the possibility of a value being created.
-- | For example, a value of type `Either Void Boolean` can never have
-- | a Left value created in PureScript.
-- |
-- | This should not be confused with the keyword `void` that commonly appears in
-- | C-family languages, such as Java:
-- | ```
-- | public class Foo {
-- | void doSomething() { System.out.println("hello world!"); }
-- | }
-- | ```
-- |
-- | In PureScript, one often uses `Unit` to achieve similar effects as
-- | the `void` of C-family languages above.
newtype Void = Void Void
instance showVoid :: Show Void where
show = absurd
-- | Eliminator for the `Void` type.
-- | Useful for stating that some code branch is impossible because you've
-- | "acquired" a value of type `Void` (which you can't).
-- |
-- | ```purescript
-- | rightOnly :: forall t . Either Void t -> t
-- | rightOnly (Left v) = absurd v
-- | rightOnly (Right t) = t
-- | ```
absurd :: forall a. Void -> a
absurd a = spin a
where
spin (Void b) = spin b
|
Use 'void of C-family languages' rendering
|
Use 'void of C-family languages' rendering
|
PureScript
|
bsd-3-clause
|
purescript/purescript-prelude
|
purescript
|
## Code Before:
module Data.Void (Void, absurd) where
import Data.Show (class Show)
-- | An uninhabited data type. In other words, one can never create
-- | a runtime value of type `Void` becaue no such value exists.
-- |
-- | `Void` is useful to eliminate the possibility of a value being created.
-- | For example, a value of type `Either Void Boolean` can never have
-- | a Left value created in PureScript.
-- |
-- | This should not be confused with the keyword `void` that commonly appears in
-- | C-family languages, such as Java:
-- | ```
-- | public class Foo {
-- | void doSomething() { System.out.println("hello world!"); }
-- | }
-- | ```
-- |
-- | In PureScript, one often uses `Unit` to achieve similar effects as
-- | the lowercased `void` above.
newtype Void = Void Void
instance showVoid :: Show Void where
show = absurd
-- | Eliminator for the `Void` type.
-- | Useful for stating that some code branch is impossible because you've
-- | "acquired" a value of type `Void` (which you can't).
-- |
-- | ```purescript
-- | rightOnly :: forall t . Either Void t -> t
-- | rightOnly (Left v) = absurd v
-- | rightOnly (Right t) = t
-- | ```
absurd :: forall a. Void -> a
absurd a = spin a
where
spin (Void b) = spin b
## Instruction:
Use 'void of C-family languages' rendering
## Code After:
module Data.Void (Void, absurd) where
import Data.Show (class Show)
-- | An uninhabited data type. In other words, one can never create
-- | a runtime value of type `Void` becaue no such value exists.
-- |
-- | `Void` is useful to eliminate the possibility of a value being created.
-- | For example, a value of type `Either Void Boolean` can never have
-- | a Left value created in PureScript.
-- |
-- | This should not be confused with the keyword `void` that commonly appears in
-- | C-family languages, such as Java:
-- | ```
-- | public class Foo {
-- | void doSomething() { System.out.println("hello world!"); }
-- | }
-- | ```
-- |
-- | In PureScript, one often uses `Unit` to achieve similar effects as
-- | the `void` of C-family languages above.
newtype Void = Void Void
instance showVoid :: Show Void where
show = absurd
-- | Eliminator for the `Void` type.
-- | Useful for stating that some code branch is impossible because you've
-- | "acquired" a value of type `Void` (which you can't).
-- |
-- | ```purescript
-- | rightOnly :: forall t . Either Void t -> t
-- | rightOnly (Left v) = absurd v
-- | rightOnly (Right t) = t
-- | ```
absurd :: forall a. Void -> a
absurd a = spin a
where
spin (Void b) = spin b
|
e83cd83d66153b1df13d98f278602ef7bfcc8212
|
Handler/Snippet.hs
|
Handler/Snippet.hs
|
module Handler.Snippet where
import Import
import Widget
import Model.Snippet.Api (getSnippet, updateSnippet)
import Network.Wai (lazyRequestBody)
getSnippetR :: Text -> Handler Html
getSnippetR snippetId = do
snippet <- liftIO $ getSnippet snippetId Nothing
mUserId <- maybeAuthId
mApiUser <- maybeApiUser mUserId
let lang = toLanguage $ snippetLanguage snippet
defaultLayout $ do
$(combineScripts 'StaticR [lib_ace_ace_js])
setTitle $ "glot.io"
$(widgetFile "snippet")
putSnippetR :: Text -> Handler Value
putSnippetR snippetId = do
req <- reqWaiRequest <$> getRequest
body <- liftIO $ lazyRequestBody req
mUserId <- maybeAuthId
mAuthToken <- maybeAuthToken mUserId
_ <- liftIO $ updateSnippet snippetId body mAuthToken
return $ object []
maybeAuthToken :: Maybe UserId -> Handler (Maybe Text)
maybeAuthToken Nothing = return Nothing
maybeAuthToken (Just userId) = do
Entity _ apiUser <- runDB $ getBy404 $ UniqueApiUser userId
return $ Just $ apiUserToken apiUser
maybeApiUser :: Maybe UserId -> Handler (Maybe ApiUser)
maybeApiUser Nothing = return Nothing
maybeApiUser (Just userId) = do
Entity _ apiUser <- runDB $ getBy404 $ UniqueApiUser userId
return $ Just apiUser
isSnippetOwner :: Maybe ApiUser -> Snippet -> Bool
isSnippetOwner Nothing _ = False
isSnippetOwner (Just apiUser) snippet =
apiUserSnippetsId apiUser == snippetOwner snippet
|
module Handler.Snippet where
import Import
import Widget
import Model.Snippet.Api (getSnippet, updateSnippet)
import Network.Wai (lazyRequestBody)
getSnippetR :: Text -> Handler Html
getSnippetR snippetId = do
mUserId <- maybeAuthId
mApiUser <- maybeApiUser mUserId
snippet <- liftIO $ getSnippet snippetId $ apiUserToken <$> mApiUser
let lang = toLanguage $ snippetLanguage snippet
defaultLayout $ do
$(combineScripts 'StaticR [lib_ace_ace_js])
setTitle $ "glot.io"
$(widgetFile "snippet")
putSnippetR :: Text -> Handler Value
putSnippetR snippetId = do
req <- reqWaiRequest <$> getRequest
body <- liftIO $ lazyRequestBody req
mUserId <- maybeAuthId
mAuthToken <- maybeAuthToken mUserId
_ <- liftIO $ updateSnippet snippetId body mAuthToken
return $ object []
maybeAuthToken :: Maybe UserId -> Handler (Maybe Text)
maybeAuthToken Nothing = return Nothing
maybeAuthToken (Just userId) = do
Entity _ apiUser <- runDB $ getBy404 $ UniqueApiUser userId
return $ Just $ apiUserToken apiUser
maybeApiUser :: Maybe UserId -> Handler (Maybe ApiUser)
maybeApiUser Nothing = return Nothing
maybeApiUser (Just userId) = do
Entity _ apiUser <- runDB $ getBy404 $ UniqueApiUser userId
return $ Just apiUser
isSnippetOwner :: Maybe ApiUser -> Snippet -> Bool
isSnippetOwner Nothing _ = False
isSnippetOwner (Just apiUser) snippet =
apiUserSnippetsId apiUser == snippetOwner snippet
|
Send token with get requests
|
Send token with get requests
|
Haskell
|
mit
|
prasmussen/glot-www,vinnymac/glot-www,prasmussen/glot-www
|
haskell
|
## Code Before:
module Handler.Snippet where
import Import
import Widget
import Model.Snippet.Api (getSnippet, updateSnippet)
import Network.Wai (lazyRequestBody)
getSnippetR :: Text -> Handler Html
getSnippetR snippetId = do
snippet <- liftIO $ getSnippet snippetId Nothing
mUserId <- maybeAuthId
mApiUser <- maybeApiUser mUserId
let lang = toLanguage $ snippetLanguage snippet
defaultLayout $ do
$(combineScripts 'StaticR [lib_ace_ace_js])
setTitle $ "glot.io"
$(widgetFile "snippet")
putSnippetR :: Text -> Handler Value
putSnippetR snippetId = do
req <- reqWaiRequest <$> getRequest
body <- liftIO $ lazyRequestBody req
mUserId <- maybeAuthId
mAuthToken <- maybeAuthToken mUserId
_ <- liftIO $ updateSnippet snippetId body mAuthToken
return $ object []
maybeAuthToken :: Maybe UserId -> Handler (Maybe Text)
maybeAuthToken Nothing = return Nothing
maybeAuthToken (Just userId) = do
Entity _ apiUser <- runDB $ getBy404 $ UniqueApiUser userId
return $ Just $ apiUserToken apiUser
maybeApiUser :: Maybe UserId -> Handler (Maybe ApiUser)
maybeApiUser Nothing = return Nothing
maybeApiUser (Just userId) = do
Entity _ apiUser <- runDB $ getBy404 $ UniqueApiUser userId
return $ Just apiUser
isSnippetOwner :: Maybe ApiUser -> Snippet -> Bool
isSnippetOwner Nothing _ = False
isSnippetOwner (Just apiUser) snippet =
apiUserSnippetsId apiUser == snippetOwner snippet
## Instruction:
Send token with get requests
## Code After:
module Handler.Snippet where
import Import
import Widget
import Model.Snippet.Api (getSnippet, updateSnippet)
import Network.Wai (lazyRequestBody)
getSnippetR :: Text -> Handler Html
getSnippetR snippetId = do
mUserId <- maybeAuthId
mApiUser <- maybeApiUser mUserId
snippet <- liftIO $ getSnippet snippetId $ apiUserToken <$> mApiUser
let lang = toLanguage $ snippetLanguage snippet
defaultLayout $ do
$(combineScripts 'StaticR [lib_ace_ace_js])
setTitle $ "glot.io"
$(widgetFile "snippet")
putSnippetR :: Text -> Handler Value
putSnippetR snippetId = do
req <- reqWaiRequest <$> getRequest
body <- liftIO $ lazyRequestBody req
mUserId <- maybeAuthId
mAuthToken <- maybeAuthToken mUserId
_ <- liftIO $ updateSnippet snippetId body mAuthToken
return $ object []
maybeAuthToken :: Maybe UserId -> Handler (Maybe Text)
maybeAuthToken Nothing = return Nothing
maybeAuthToken (Just userId) = do
Entity _ apiUser <- runDB $ getBy404 $ UniqueApiUser userId
return $ Just $ apiUserToken apiUser
maybeApiUser :: Maybe UserId -> Handler (Maybe ApiUser)
maybeApiUser Nothing = return Nothing
maybeApiUser (Just userId) = do
Entity _ apiUser <- runDB $ getBy404 $ UniqueApiUser userId
return $ Just apiUser
isSnippetOwner :: Maybe ApiUser -> Snippet -> Bool
isSnippetOwner Nothing _ = False
isSnippetOwner (Just apiUser) snippet =
apiUserSnippetsId apiUser == snippetOwner snippet
|
bc48dd6e6b28406874cb3c3fda6c91cc90c77bb7
|
examples/users.py
|
examples/users.py
|
from pyolite import Pyolite
# initial olite object
admin_repository = 'gitolite-admin/'
olite = Pyolite(admin_repository=admin_repository)
bob = olite.users.create(name='bob', key='my-awesome-key')
alice = olite.users.create(name='alice', key_path='~/.ssh/id_rsa.pub')
|
from pyolite import Pyolite
# initial olite object
admin_repository = 'gitolite-admin/'
olite = Pyolite(admin_repository=admin_repository)
# create user object
vlad = olite.users.create(name='vlad', key_path='/home/wok/.ssh/id_rsa.pub')
# get user by name
vlad = olite.users.get(name='vlad')
# get_or_create django style
vlad = olite.users.get_or_create(name='vlad')
# check if user is admin or not
print vlad.is_admin
|
Introduce a complete user operations example
|
Introduce a complete user operations example
|
Python
|
bsd-2-clause
|
shawkinsl/pyolite,PressLabs/pyolite
|
python
|
## Code Before:
from pyolite import Pyolite
# initial olite object
admin_repository = 'gitolite-admin/'
olite = Pyolite(admin_repository=admin_repository)
bob = olite.users.create(name='bob', key='my-awesome-key')
alice = olite.users.create(name='alice', key_path='~/.ssh/id_rsa.pub')
## Instruction:
Introduce a complete user operations example
## Code After:
from pyolite import Pyolite
# initial olite object
admin_repository = 'gitolite-admin/'
olite = Pyolite(admin_repository=admin_repository)
# create user object
vlad = olite.users.create(name='vlad', key_path='/home/wok/.ssh/id_rsa.pub')
# get user by name
vlad = olite.users.get(name='vlad')
# get_or_create django style
vlad = olite.users.get_or_create(name='vlad')
# check if user is admin or not
print vlad.is_admin
|
d0867dd8094d253e270ab1a57f3285246a20dd46
|
src/test/pegtl/file_cstream.cpp
|
src/test/pegtl/file_cstream.cpp
|
// Copyright (c) 2016-2017 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
#include <clocale>
#include <cstdio>
#include "test.hpp"
namespace tao
{
namespace TAOCPP_PEGTL_NAMESPACE
{
struct file_content : seq< TAOCPP_PEGTL_STRING( "dummy content" ), eol, discard >
{
};
struct file_grammar : seq< rep_min_max< 11, 11, file_content >, eof >
{
};
void unit_test()
{
const char* const filename = "src/test/pegtl/file_data.txt";
#if defined( _MSC_VER )
std::FILE* stream;
::fopen_s( &stream, filename, "rb" );
#else
std::FILE* stream = std::fopen( filename, "rb" );
#endif
TAOCPP_PEGTL_TEST_ASSERT( stream != nullptr );
TAOCPP_PEGTL_TEST_ASSERT( parse< file_grammar >( cstream_input<>( stream, 16, filename ) ) );
std::fclose( stream );
}
} // namespace TAOCPP_PEGTL_NAMESPACE
} // namespace tao
#include "main.hpp"
|
// Copyright (c) 2016-2017 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
#include <clocale>
#include <cstdio>
#include "test.hpp"
namespace tao
{
namespace TAOCPP_PEGTL_NAMESPACE
{
struct file_content : seq< TAOCPP_PEGTL_STRING( "dummy content" ), eol, discard >
{
};
struct file_grammar : seq< rep_min_max< 11, 11, file_content >, eof >
{
};
void unit_test()
{
const char* const filename = "src/test/pegtl/file_data.txt";
#if defined( _MSC_VER )
std::FILE* stream;
::fopen_s( &stream, filename, "rb" ); // NOLINT
#else
std::FILE* stream = std::fopen( filename, "rb" ); // NOLINT
#endif
TAOCPP_PEGTL_TEST_ASSERT( stream != nullptr );
TAOCPP_PEGTL_TEST_ASSERT( parse< file_grammar >( cstream_input<>( stream, 16, filename ) ) );
std::fclose( stream );
}
} // namespace TAOCPP_PEGTL_NAMESPACE
} // namespace tao
#include "main.hpp"
|
Mark lines as NOLINT for clang-tidy
|
Mark lines as NOLINT for clang-tidy
|
C++
|
mit
|
ColinH/PEGTL,ColinH/PEGTL
|
c++
|
## Code Before:
// Copyright (c) 2016-2017 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
#include <clocale>
#include <cstdio>
#include "test.hpp"
namespace tao
{
namespace TAOCPP_PEGTL_NAMESPACE
{
struct file_content : seq< TAOCPP_PEGTL_STRING( "dummy content" ), eol, discard >
{
};
struct file_grammar : seq< rep_min_max< 11, 11, file_content >, eof >
{
};
void unit_test()
{
const char* const filename = "src/test/pegtl/file_data.txt";
#if defined( _MSC_VER )
std::FILE* stream;
::fopen_s( &stream, filename, "rb" );
#else
std::FILE* stream = std::fopen( filename, "rb" );
#endif
TAOCPP_PEGTL_TEST_ASSERT( stream != nullptr );
TAOCPP_PEGTL_TEST_ASSERT( parse< file_grammar >( cstream_input<>( stream, 16, filename ) ) );
std::fclose( stream );
}
} // namespace TAOCPP_PEGTL_NAMESPACE
} // namespace tao
#include "main.hpp"
## Instruction:
Mark lines as NOLINT for clang-tidy
## Code After:
// Copyright (c) 2016-2017 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
#include <clocale>
#include <cstdio>
#include "test.hpp"
namespace tao
{
namespace TAOCPP_PEGTL_NAMESPACE
{
struct file_content : seq< TAOCPP_PEGTL_STRING( "dummy content" ), eol, discard >
{
};
struct file_grammar : seq< rep_min_max< 11, 11, file_content >, eof >
{
};
void unit_test()
{
const char* const filename = "src/test/pegtl/file_data.txt";
#if defined( _MSC_VER )
std::FILE* stream;
::fopen_s( &stream, filename, "rb" ); // NOLINT
#else
std::FILE* stream = std::fopen( filename, "rb" ); // NOLINT
#endif
TAOCPP_PEGTL_TEST_ASSERT( stream != nullptr );
TAOCPP_PEGTL_TEST_ASSERT( parse< file_grammar >( cstream_input<>( stream, 16, filename ) ) );
std::fclose( stream );
}
} // namespace TAOCPP_PEGTL_NAMESPACE
} // namespace tao
#include "main.hpp"
|
bd5ac74d2aaed956a1db4db2482076470d8c150f
|
google-oauth-userid/app.py
|
google-oauth-userid/app.py
|
from gevent.wsgi import WSGIServer
from flask import Flask, redirect, url_for
from flask_dance.contrib.google import make_google_blueprint, google
from werkzeug.contrib.fixers import ProxyFix
import os
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
app.secret_key = os.urandom(64)
blueprint = make_google_blueprint(
client_id=os.environ.get('GOOGLE_CLIENT_ID', ''),
client_secret=os.environ.get('GOOGLE_CLIENT_SECRET', ''),
scope=['profile']
)
app.register_blueprint(blueprint, url_prefix='/login')
@app.route('/')
def index():
if not google.authorized:
return redirect(url_for('google.login'))
resp = google.get('/oauth2/v2/userinfo')
assert resp.ok, resp.text
return '<h2>Your Google OAuth ID is: {}</h2>'.format(resp.json()["id"])
if __name__ == "__main__":
http_server = WSGIServer(('0.0.0.0', 8080), app)
print('serving on {}:{}'.format('0.0.0.0', 8080))
http_server.serve_forever()
|
from gevent.wsgi import WSGIServer
from flask import Flask, redirect, url_for
from flask_dance.contrib.google import make_google_blueprint, google
from werkzeug.contrib.fixers import ProxyFix
import os
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
app.secret_key = os.urandom(64)
blueprint = make_google_blueprint(
client_id=os.environ.get('GOOGLE_CLIENT_ID', ''),
client_secret=os.environ.get('GOOGLE_CLIENT_SECRET', ''),
scope=['https://www.googleapis.com/auth/userinfo.profile']
)
app.register_blueprint(blueprint, url_prefix='/login')
@app.route('/')
def index():
if not google.authorized:
return redirect(url_for('google.login'))
resp = google.get('/oauth2/v2/userinfo')
assert resp.ok, resp.text
return '<h2>Your Google OAuth ID is: {}</h2>'.format(resp.json()["id"])
if __name__ == "__main__":
http_server = WSGIServer(('0.0.0.0', 8080), app)
print('serving on {}:{}'.format('0.0.0.0', 8080))
http_server.serve_forever()
|
Update scope to use changed profile
|
Update scope to use changed profile
|
Python
|
mit
|
openshift-cs/OpenShift-Troubleshooting-Templates,openshift-cs/OpenShift-Troubleshooting-Templates
|
python
|
## Code Before:
from gevent.wsgi import WSGIServer
from flask import Flask, redirect, url_for
from flask_dance.contrib.google import make_google_blueprint, google
from werkzeug.contrib.fixers import ProxyFix
import os
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
app.secret_key = os.urandom(64)
blueprint = make_google_blueprint(
client_id=os.environ.get('GOOGLE_CLIENT_ID', ''),
client_secret=os.environ.get('GOOGLE_CLIENT_SECRET', ''),
scope=['profile']
)
app.register_blueprint(blueprint, url_prefix='/login')
@app.route('/')
def index():
if not google.authorized:
return redirect(url_for('google.login'))
resp = google.get('/oauth2/v2/userinfo')
assert resp.ok, resp.text
return '<h2>Your Google OAuth ID is: {}</h2>'.format(resp.json()["id"])
if __name__ == "__main__":
http_server = WSGIServer(('0.0.0.0', 8080), app)
print('serving on {}:{}'.format('0.0.0.0', 8080))
http_server.serve_forever()
## Instruction:
Update scope to use changed profile
## Code After:
from gevent.wsgi import WSGIServer
from flask import Flask, redirect, url_for
from flask_dance.contrib.google import make_google_blueprint, google
from werkzeug.contrib.fixers import ProxyFix
import os
app = Flask(__name__)
app.wsgi_app = ProxyFix(app.wsgi_app)
app.secret_key = os.urandom(64)
blueprint = make_google_blueprint(
client_id=os.environ.get('GOOGLE_CLIENT_ID', ''),
client_secret=os.environ.get('GOOGLE_CLIENT_SECRET', ''),
scope=['https://www.googleapis.com/auth/userinfo.profile']
)
app.register_blueprint(blueprint, url_prefix='/login')
@app.route('/')
def index():
if not google.authorized:
return redirect(url_for('google.login'))
resp = google.get('/oauth2/v2/userinfo')
assert resp.ok, resp.text
return '<h2>Your Google OAuth ID is: {}</h2>'.format(resp.json()["id"])
if __name__ == "__main__":
http_server = WSGIServer(('0.0.0.0', 8080), app)
print('serving on {}:{}'.format('0.0.0.0', 8080))
http_server.serve_forever()
|
0b1c7e608e16385a17aafd5cc2a03da1f12a585e
|
server_config/update_dev.sh
|
server_config/update_dev.sh
|
log="/tmp/update_dev.log"
date >> $log
# Update NMIS repo
cd /home/ubuntu/srv/nmis
git pull >> $log
# Update NMIS data and run csv2json if needed
cd /home/ubuntu/srv/nmis_ui_data_2ef92c15
git_result=`git pull | grep "^Already up-to-date." | wc -l`
echo $git_result >> $log
if [ $git_result -eq 0 ]; then
python csv2json.py >> $log
fi
echo "--------------------------------------------------" >> $log
|
log="/tmp/update_dev.log"
date >> $log
# Update NMIS repo
cd /home/ubuntu/srv/nmis
git pull >> $log
# Update NMIS data and run csv2json if needed
csv2json=`ps aux | grep "python csv2json.py" | wc -l`
if [ $csv2json -eq 1 ]; then
cd /home/ubuntu/srv/nmis_ui_data_2ef92c15
git_result=`git pull | grep "^Already up-to-date." | wc -l`
echo $git_result >> $log
if [ $git_result -eq 0 ]; then
python csv2json.py >> $log
# Remove old LGAs folder
rm /home/ubuntu/srv/nmis/static/lgas
# Move new LGAs folder to NMIS folder
mv lgas /home/ubuntu/srv/nmis/static
fi
fi
echo "--------------------------------------------------" >> $log
|
Check if csv2json is running before updating
|
Check if csv2json is running before updating
|
Shell
|
mit
|
SEL-Columbia/nmis,SEL-Columbia/nmis,SEL-Columbia/nmis,SEL-Columbia/nmis,SEL-Columbia/nmis,SEL-Columbia/nmis
|
shell
|
## Code Before:
log="/tmp/update_dev.log"
date >> $log
# Update NMIS repo
cd /home/ubuntu/srv/nmis
git pull >> $log
# Update NMIS data and run csv2json if needed
cd /home/ubuntu/srv/nmis_ui_data_2ef92c15
git_result=`git pull | grep "^Already up-to-date." | wc -l`
echo $git_result >> $log
if [ $git_result -eq 0 ]; then
python csv2json.py >> $log
fi
echo "--------------------------------------------------" >> $log
## Instruction:
Check if csv2json is running before updating
## Code After:
log="/tmp/update_dev.log"
date >> $log
# Update NMIS repo
cd /home/ubuntu/srv/nmis
git pull >> $log
# Update NMIS data and run csv2json if needed
csv2json=`ps aux | grep "python csv2json.py" | wc -l`
if [ $csv2json -eq 1 ]; then
cd /home/ubuntu/srv/nmis_ui_data_2ef92c15
git_result=`git pull | grep "^Already up-to-date." | wc -l`
echo $git_result >> $log
if [ $git_result -eq 0 ]; then
python csv2json.py >> $log
# Remove old LGAs folder
rm /home/ubuntu/srv/nmis/static/lgas
# Move new LGAs folder to NMIS folder
mv lgas /home/ubuntu/srv/nmis/static
fi
fi
echo "--------------------------------------------------" >> $log
|
e087422b47a9e1836366df4b6701d3154943d9b0
|
src/support/path-utils.ts
|
src/support/path-utils.ts
|
/**
* @license
* Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/
import {relative} from 'path';
export const ensureLeadingDot = (path: string): string =>
(path.startsWith('../') || path.startsWith('./')) ? path : './' + path;
export const forwardSlashesOnlyPlease = (path: string): string =>
path.replace(/\\/g, '/');
export const getBasePath = (href: string): string =>
href.replace(/[^\/]+$/, '');
export const noLeadingSlash = (href: string): string => href.replace(/^\//, '');
export const relativePath = (from: string, to: string): string => {
from = forwardSlashesOnlyPlease(from);
to = forwardSlashesOnlyPlease(to);
if (!from.endsWith('/')) {
from = from.replace(/[^/]*$/, '');
}
return ensureLeadingDot(relative(from, to));
};
|
/**
* @license
* Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/
import {relative} from 'path';
export const ensureLeadingDot = (path: string): string =>
(path.startsWith('../') || path.startsWith('./')) ? path : './' + path;
export const forwardSlashesOnlyPlease = (path: string): string =>
path.replace(/\\/g, '/');
export const getBasePath = (href: string): string =>
href.replace(/[^\/]+$/, '');
export const noLeadingSlash = (href: string): string => href.replace(/^\//, '');
export const relativePath = (from: string, to: string): string => {
from = getBasePath(forwardSlashesOnlyPlease(from));
to = forwardSlashesOnlyPlease(to);
return ensureLeadingDot(relative(from, to));
};
|
Use the getBasePath function instead of duplicate regexp.
|
Use the getBasePath function instead of duplicate regexp.
|
TypeScript
|
bsd-3-clause
|
Polymer/koa-node-resolve
|
typescript
|
## Code Before:
/**
* @license
* Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/
import {relative} from 'path';
export const ensureLeadingDot = (path: string): string =>
(path.startsWith('../') || path.startsWith('./')) ? path : './' + path;
export const forwardSlashesOnlyPlease = (path: string): string =>
path.replace(/\\/g, '/');
export const getBasePath = (href: string): string =>
href.replace(/[^\/]+$/, '');
export const noLeadingSlash = (href: string): string => href.replace(/^\//, '');
export const relativePath = (from: string, to: string): string => {
from = forwardSlashesOnlyPlease(from);
to = forwardSlashesOnlyPlease(to);
if (!from.endsWith('/')) {
from = from.replace(/[^/]*$/, '');
}
return ensureLeadingDot(relative(from, to));
};
## Instruction:
Use the getBasePath function instead of duplicate regexp.
## Code After:
/**
* @license
* Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/
import {relative} from 'path';
export const ensureLeadingDot = (path: string): string =>
(path.startsWith('../') || path.startsWith('./')) ? path : './' + path;
export const forwardSlashesOnlyPlease = (path: string): string =>
path.replace(/\\/g, '/');
export const getBasePath = (href: string): string =>
href.replace(/[^\/]+$/, '');
export const noLeadingSlash = (href: string): string => href.replace(/^\//, '');
export const relativePath = (from: string, to: string): string => {
from = getBasePath(forwardSlashesOnlyPlease(from));
to = forwardSlashesOnlyPlease(to);
return ensureLeadingDot(relative(from, to));
};
|
4d092d38d37a19caf68e7bd4d9ffcc963b6ded38
|
core/lib/macros-auto-insert.el
|
core/lib/macros-auto-insert.el
|
;;; macros-auto-insert.el
;; for ../core-auto-insert.el
;;;###autoload
(defmacro add-template! (regexp-or-major-mode uuid yas-mode &optional project-only)
`(define-auto-insert ,regexp-or-major-mode
(lambda ()
(unless (or (and ,project-only (not (narf/project-p)))
(not (or (eq major-mode ,yas-mode)
(symbol-value ,yas-mode))))
(insert ,uuid)
(yas-expand-from-trigger-key)
(if (string-equal ,uuid (s-trim (buffer-string)))
(erase-buffer)
(evil-insert-state 1))))))
(provide 'macros-auto-insert)
;;; macros-auto-insert.el ends here
|
;;; macros-auto-insert.el
;; for ../core-auto-insert.el
;;;###autoload
(defmacro add-template! (regexp-or-major-mode uuid yas-mode &optional project-only)
`(define-auto-insert ,regexp-or-major-mode
(lambda ()
(unless (or (and ,project-only (not (narf/project-p)))
(not (or (eq major-mode ,yas-mode)
(and (boundp ,yas-mode)
(symbol-value ,yas-mode)))))
(insert ,uuid)
(yas-expand-from-trigger-key)
(if (string-equal ,uuid (s-trim (buffer-string)))
(erase-buffer)
(evil-insert-state 1))))))
(provide 'macros-auto-insert)
;;; macros-auto-insert.el ends here
|
Fix error checking minor-mode for file templates
|
Fix error checking minor-mode for file templates
|
Emacs Lisp
|
mit
|
hlissner/.emacs.d,UndeadKernel/emacs_doom,aminb/.emacs.d,hlissner/.emacs.d,UndeadKernel/emacs_doom,UndeadKernel/emacs_doom,hlissner/doom-emacs,keoko/.emacs.d,keoko/.emacs.d,hlissner/doom-emacs,hlissner/.emacs.d,hlissner/.emacs.d,hlissner/.emacs.d,hlissner/doom-emacs,hlissner/doom-emacs,aminb/.emacs.d,hlissner/.emacs.d,keoko/.emacs.d,UndeadKernel/emacs_doom,hlissner/.emacs.d,aminb/.emacs.d,aminb/.emacs.d,keoko/.emacs.d,keoko/.emacs.d,UndeadKernel/emacs_doom,UndeadKernel/emacs_doom,hlissner/doom-emacs,hlissner/doom-emacs,keoko/.emacs.d,aminb/.emacs.d,hlissner/.emacs.d,aminb/.emacs.d,aminb/.emacs.d,hlissner/doom-emacs,aminb/.emacs.d,keoko/.emacs.d,keoko/.emacs.d,UndeadKernel/emacs_doom
|
emacs-lisp
|
## Code Before:
;;; macros-auto-insert.el
;; for ../core-auto-insert.el
;;;###autoload
(defmacro add-template! (regexp-or-major-mode uuid yas-mode &optional project-only)
`(define-auto-insert ,regexp-or-major-mode
(lambda ()
(unless (or (and ,project-only (not (narf/project-p)))
(not (or (eq major-mode ,yas-mode)
(symbol-value ,yas-mode))))
(insert ,uuid)
(yas-expand-from-trigger-key)
(if (string-equal ,uuid (s-trim (buffer-string)))
(erase-buffer)
(evil-insert-state 1))))))
(provide 'macros-auto-insert)
;;; macros-auto-insert.el ends here
## Instruction:
Fix error checking minor-mode for file templates
## Code After:
;;; macros-auto-insert.el
;; for ../core-auto-insert.el
;;;###autoload
(defmacro add-template! (regexp-or-major-mode uuid yas-mode &optional project-only)
`(define-auto-insert ,regexp-or-major-mode
(lambda ()
(unless (or (and ,project-only (not (narf/project-p)))
(not (or (eq major-mode ,yas-mode)
(and (boundp ,yas-mode)
(symbol-value ,yas-mode)))))
(insert ,uuid)
(yas-expand-from-trigger-key)
(if (string-equal ,uuid (s-trim (buffer-string)))
(erase-buffer)
(evil-insert-state 1))))))
(provide 'macros-auto-insert)
;;; macros-auto-insert.el ends here
|
a7991b2d4c8ca35ed421af62f47e558fce0f8fff
|
themes/_global/js/autoClose.js
|
themes/_global/js/autoClose.js
|
$(document).ready(function() {
current_url = window.location.href
if (current_url.match("&closewin=true")) {
window.close();
}
});
|
$(document).ready(function() {
if (location.search.match("&closewin=true")) {
if (window.opener) {
var msgDiv = $("div.messages");
var msg = msgDiv.children("p").text();
var status = msgDiv.hasClass("success") ?
'success' : 'unknown';
var url = $(".tool.link")[0].href;
window.opener.postMessage({"wallabag-status": status,
"wallabag-msg": msg,
"wallabag-url": url }, "*");
}
window.close();
}
});
|
Send postMessage to opener before autoclose
|
Send postMessage to opener before autoclose
|
JavaScript
|
mit
|
mubassirhayat/wallabag,kwangkim/wallabag,ekospinach/wallabag,kwangkim/wallabag,wangjun/wallabag,kwangkim/wallabag,antoniosejas/wallabag,antoniosejas/wallabag,modos189/wallabag,ekospinach/wallabag,mubassirhayat/wallabag,wangjun/wallabag,harikt/wallabag,modos189/wallabag,wangjun/wallabag,harikt/wallabag,ekospinach/wallabag,mubassirhayat/wallabag,harikt/wallabag,antoniosejas/wallabag,modos189/wallabag
|
javascript
|
## Code Before:
$(document).ready(function() {
current_url = window.location.href
if (current_url.match("&closewin=true")) {
window.close();
}
});
## Instruction:
Send postMessage to opener before autoclose
## Code After:
$(document).ready(function() {
if (location.search.match("&closewin=true")) {
if (window.opener) {
var msgDiv = $("div.messages");
var msg = msgDiv.children("p").text();
var status = msgDiv.hasClass("success") ?
'success' : 'unknown';
var url = $(".tool.link")[0].href;
window.opener.postMessage({"wallabag-status": status,
"wallabag-msg": msg,
"wallabag-url": url }, "*");
}
window.close();
}
});
|
4f41ffe1d16bec010e33d80af5585d4a4a9ccdce
|
kolibri/core/assets/src/views/buttons-and-links/KExternalLink.vue
|
kolibri/core/assets/src/views/buttons-and-links/KExternalLink.vue
|
<template>
<!-- no extra whitespace inside link -->
<a
:class="buttonClasses"
:href="href"
:download="download"
dir="auto"
>
{{ text }}
</a>
</template>
<script>
import { validator } from './appearances.js';
import buttonClassesMixin from './buttonClassesMixin.js';
/**
* KExternalLink creates a styled external link
*/
export default {
name: 'KExternalLink',
mixins: [buttonClassesMixin],
props: {
/**
* Link text
*/
text: {
type: String,
required: true,
},
/**
* URL string
*/
href: {
type: String,
required: true,
},
/**
* Link appearance: 'raised-button', 'flat-button', or 'basic-link'
*/
appearance: {
type: String,
default: 'basic-link',
validator,
},
/**
* For 'raised-button' and 'flat-button' appearances: show as primary or secondary style
*/
primary: {
type: Boolean,
default: false,
},
/**
* Specifies that the file is meant to be downloaded, not displayed in a separate tab.
*/
download: {
type: String,
required: false,
},
},
};
</script>
<style lang="scss" scoped>
@import './buttons';
</style>
|
<template>
<!-- no extra whitespace inside link -->
<a
:class="buttonClasses"
:href="href"
:download="download"
:target="download ? '_self' : '_blank'"
dir="auto"
>
{{ text }}
</a>
</template>
<script>
import { validator } from './appearances.js';
import buttonClassesMixin from './buttonClassesMixin.js';
/**
* KExternalLink creates a styled external link
*/
export default {
name: 'KExternalLink',
mixins: [buttonClassesMixin],
props: {
/**
* Link text
*/
text: {
type: String,
required: true,
},
/**
* URL string
*/
href: {
type: String,
required: true,
},
/**
* Link appearance: 'raised-button', 'flat-button', or 'basic-link'
*/
appearance: {
type: String,
default: 'basic-link',
validator,
},
/**
* For 'raised-button' and 'flat-button' appearances: show as primary or secondary style
*/
primary: {
type: Boolean,
default: false,
},
/**
* Specifies that the file is meant to be downloaded, not displayed in a separate tab.
*/
download: {
type: String,
required: false,
},
},
};
</script>
<style lang="scss" scoped>
@import './buttons';
</style>
|
Update external link component to open external links in new tabs by default.
|
Update external link component to open external links in new tabs by default.
|
Vue
|
mit
|
indirectlylit/kolibri,indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,lyw07/kolibri,mrpau/kolibri,learningequality/kolibri,learningequality/kolibri,lyw07/kolibri,learningequality/kolibri,mrpau/kolibri,mrpau/kolibri,lyw07/kolibri,mrpau/kolibri,lyw07/kolibri
|
vue
|
## Code Before:
<template>
<!-- no extra whitespace inside link -->
<a
:class="buttonClasses"
:href="href"
:download="download"
dir="auto"
>
{{ text }}
</a>
</template>
<script>
import { validator } from './appearances.js';
import buttonClassesMixin from './buttonClassesMixin.js';
/**
* KExternalLink creates a styled external link
*/
export default {
name: 'KExternalLink',
mixins: [buttonClassesMixin],
props: {
/**
* Link text
*/
text: {
type: String,
required: true,
},
/**
* URL string
*/
href: {
type: String,
required: true,
},
/**
* Link appearance: 'raised-button', 'flat-button', or 'basic-link'
*/
appearance: {
type: String,
default: 'basic-link',
validator,
},
/**
* For 'raised-button' and 'flat-button' appearances: show as primary or secondary style
*/
primary: {
type: Boolean,
default: false,
},
/**
* Specifies that the file is meant to be downloaded, not displayed in a separate tab.
*/
download: {
type: String,
required: false,
},
},
};
</script>
<style lang="scss" scoped>
@import './buttons';
</style>
## Instruction:
Update external link component to open external links in new tabs by default.
## Code After:
<template>
<!-- no extra whitespace inside link -->
<a
:class="buttonClasses"
:href="href"
:download="download"
:target="download ? '_self' : '_blank'"
dir="auto"
>
{{ text }}
</a>
</template>
<script>
import { validator } from './appearances.js';
import buttonClassesMixin from './buttonClassesMixin.js';
/**
* KExternalLink creates a styled external link
*/
export default {
name: 'KExternalLink',
mixins: [buttonClassesMixin],
props: {
/**
* Link text
*/
text: {
type: String,
required: true,
},
/**
* URL string
*/
href: {
type: String,
required: true,
},
/**
* Link appearance: 'raised-button', 'flat-button', or 'basic-link'
*/
appearance: {
type: String,
default: 'basic-link',
validator,
},
/**
* For 'raised-button' and 'flat-button' appearances: show as primary or secondary style
*/
primary: {
type: Boolean,
default: false,
},
/**
* Specifies that the file is meant to be downloaded, not displayed in a separate tab.
*/
download: {
type: String,
required: false,
},
},
};
</script>
<style lang="scss" scoped>
@import './buttons';
</style>
|
486dd260952f5cfafe050eb094084e27f2034a23
|
Casks/elasticwolf.rb
|
Casks/elasticwolf.rb
|
cask 'elasticwolf' do
version '5.1.6'
sha256 '32eccff8e2cff1187fbf4b8c614e61056ae9c371ebdba3174e021b413b973542'
url "https://s3-us-gov-west-1.amazonaws.com/elasticwolf/ElasticWolf-osx-#{version}.zip"
name 'AWS ElasticWolf Client Console'
homepage 'https://aws.amazon.com/developertools/9313598265692691'
license :gratis
app 'ElasticWolf.app'
end
|
cask 'elasticwolf' do
version '5.1.6'
sha256 '32eccff8e2cff1187fbf4b8c614e61056ae9c371ebdba3174e021b413b973542'
# amazonaws.com/elasticwolf was verified as official when first introduced to the cask
url "https://s3-us-gov-west-1.amazonaws.com/elasticwolf/ElasticWolf-osx-#{version}.zip"
name 'AWS ElasticWolf Client Console'
homepage 'https://aws.amazon.com/developertools/9313598265692691'
license :gratis
app 'ElasticWolf.app'
end
|
Fix `url` stanza comment for AWS ElasticWolf Client Console.
|
Fix `url` stanza comment for AWS ElasticWolf Client Console.
|
Ruby
|
bsd-2-clause
|
antogg/homebrew-cask,shorshe/homebrew-cask,lifepillar/homebrew-cask,mchlrmrz/homebrew-cask,jiashuw/homebrew-cask,deanmorin/homebrew-cask,squid314/homebrew-cask,caskroom/homebrew-cask,dcondrey/homebrew-cask,yutarody/homebrew-cask,jellyfishcoder/homebrew-cask,singingwolfboy/homebrew-cask,sebcode/homebrew-cask,troyxmccall/homebrew-cask,johndbritton/homebrew-cask,hyuna917/homebrew-cask,slack4u/homebrew-cask,m3nu/homebrew-cask,jbeagley52/homebrew-cask,daften/homebrew-cask,xyb/homebrew-cask,slack4u/homebrew-cask,chadcatlett/caskroom-homebrew-cask,deiga/homebrew-cask,xight/homebrew-cask,klane/homebrew-cask,dcondrey/homebrew-cask,miccal/homebrew-cask,dictcp/homebrew-cask,scribblemaniac/homebrew-cask,guerrero/homebrew-cask,Ngrd/homebrew-cask,mchlrmrz/homebrew-cask,cobyism/homebrew-cask,tedski/homebrew-cask,scribblemaniac/homebrew-cask,usami-k/homebrew-cask,inta/homebrew-cask,optikfluffel/homebrew-cask,hristozov/homebrew-cask,maxnordlund/homebrew-cask,ianyh/homebrew-cask,haha1903/homebrew-cask,uetchy/homebrew-cask,skatsuta/homebrew-cask,malford/homebrew-cask,stephenwade/homebrew-cask,reelsense/homebrew-cask,lantrix/homebrew-cask,yumitsu/homebrew-cask,SentinelWarren/homebrew-cask,hakamadare/homebrew-cask,usami-k/homebrew-cask,kassi/homebrew-cask,yuhki50/homebrew-cask,boecko/homebrew-cask,flaviocamilo/homebrew-cask,ksylvan/homebrew-cask,hanxue/caskroom,dvdoliveira/homebrew-cask,ptb/homebrew-cask,a1russell/homebrew-cask,julionc/homebrew-cask,troyxmccall/homebrew-cask,optikfluffel/homebrew-cask,Cottser/homebrew-cask,m3nu/homebrew-cask,imgarylai/homebrew-cask,jangalinski/homebrew-cask,thehunmonkgroup/homebrew-cask,cfillion/homebrew-cask,mahori/homebrew-cask,mhubig/homebrew-cask,mishari/homebrew-cask,esebastian/homebrew-cask,singingwolfboy/homebrew-cask,inta/homebrew-cask,tyage/homebrew-cask,daften/homebrew-cask,johnjelinek/homebrew-cask,amatos/homebrew-cask,ianyh/homebrew-cask,My2ndAngelic/homebrew-cask,cprecioso/homebrew-cask,athrunsun/homebrew-cask,JosephViolago/homebrew-cask,malob/homebrew-cask,coeligena/homebrew-customized,doits/homebrew-cask,pkq/homebrew-cask,FredLackeyOfficial/homebrew-cask,colindean/homebrew-cask,morganestes/homebrew-cask,timsutton/homebrew-cask,sosedoff/homebrew-cask,hanxue/caskroom,jmeridth/homebrew-cask,rogeriopradoj/homebrew-cask,scottsuch/homebrew-cask,gyndav/homebrew-cask,shoichiaizawa/homebrew-cask,y00rb/homebrew-cask,sscotth/homebrew-cask,nshemonsky/homebrew-cask,vin047/homebrew-cask,cliffcotino/homebrew-cask,lukasbestle/homebrew-cask,sjackman/homebrew-cask,mattrobenolt/homebrew-cask,dvdoliveira/homebrew-cask,caskroom/homebrew-cask,JikkuJose/homebrew-cask,mathbunnyru/homebrew-cask,hanxue/caskroom,stephenwade/homebrew-cask,esebastian/homebrew-cask,jbeagley52/homebrew-cask,haha1903/homebrew-cask,ebraminio/homebrew-cask,moimikey/homebrew-cask,moogar0880/homebrew-cask,cblecker/homebrew-cask,devmynd/homebrew-cask,stephenwade/homebrew-cask,mattrobenolt/homebrew-cask,jellyfishcoder/homebrew-cask,adrianchia/homebrew-cask,phpwutz/homebrew-cask,joschi/homebrew-cask,cfillion/homebrew-cask,xyb/homebrew-cask,athrunsun/homebrew-cask,joshka/homebrew-cask,lumaxis/homebrew-cask,seanzxx/homebrew-cask,pacav69/homebrew-cask,nrlquaker/homebrew-cask,hovancik/homebrew-cask,gyndav/homebrew-cask,sanchezm/homebrew-cask,miccal/homebrew-cask,xyb/homebrew-cask,a1russell/homebrew-cask,scottsuch/homebrew-cask,winkelsdorf/homebrew-cask,samnung/homebrew-cask,Ephemera/homebrew-cask,flaviocamilo/homebrew-cask,wmorin/homebrew-cask,xtian/homebrew-cask,bric3/homebrew-cask,andyli/homebrew-cask,mwean/homebrew-cask,moogar0880/homebrew-cask,andrewdisley/homebrew-cask,KosherBacon/homebrew-cask,thii/homebrew-cask,giannitm/homebrew-cask,blogabe/homebrew-cask,colindean/homebrew-cask,claui/homebrew-cask,KosherBacon/homebrew-cask,jgarber623/homebrew-cask,aguynamedryan/homebrew-cask,MichaelPei/homebrew-cask,gmkey/homebrew-cask,ericbn/homebrew-cask,joschi/homebrew-cask,mahori/homebrew-cask,johnjelinek/homebrew-cask,wmorin/homebrew-cask,perfide/homebrew-cask,MircoT/homebrew-cask,decrement/homebrew-cask,a1russell/homebrew-cask,gilesdring/homebrew-cask,cprecioso/homebrew-cask,michelegera/homebrew-cask,nathanielvarona/homebrew-cask,larseggert/homebrew-cask,paour/homebrew-cask,reitermarkus/homebrew-cask,lumaxis/homebrew-cask,muan/homebrew-cask,lukasbestle/homebrew-cask,julionc/homebrew-cask,psibre/homebrew-cask,samnung/homebrew-cask,jconley/homebrew-cask,mikem/homebrew-cask,yurikoles/homebrew-cask,jaredsampson/homebrew-cask,hyuna917/homebrew-cask,ebraminio/homebrew-cask,deanmorin/homebrew-cask,exherb/homebrew-cask,neverfox/homebrew-cask,scribblemaniac/homebrew-cask,koenrh/homebrew-cask,Ketouem/homebrew-cask,victorpopkov/homebrew-cask,toonetown/homebrew-cask,asins/homebrew-cask,neverfox/homebrew-cask,thii/homebrew-cask,jconley/homebrew-cask,seanzxx/homebrew-cask,winkelsdorf/homebrew-cask,chuanxd/homebrew-cask,klane/homebrew-cask,diogodamiani/homebrew-cask,maxnordlund/homebrew-cask,josa42/homebrew-cask,malford/homebrew-cask,nathancahill/homebrew-cask,shonjir/homebrew-cask,skatsuta/homebrew-cask,vitorgalvao/homebrew-cask,jpmat296/homebrew-cask,coeligena/homebrew-customized,JosephViolago/homebrew-cask,toonetown/homebrew-cask,rogeriopradoj/homebrew-cask,vitorgalvao/homebrew-cask,BenjaminHCCarr/homebrew-cask,nathanielvarona/homebrew-cask,uetchy/homebrew-cask,hellosky806/homebrew-cask,Ketouem/homebrew-cask,claui/homebrew-cask,wickles/homebrew-cask,Keloran/homebrew-cask,tjt263/homebrew-cask,stonehippo/homebrew-cask,cblecker/homebrew-cask,tangestani/homebrew-cask,FredLackeyOfficial/homebrew-cask,mlocher/homebrew-cask,kamilboratynski/homebrew-cask,chrisfinazzo/homebrew-cask,psibre/homebrew-cask,tjnycum/homebrew-cask,franklouwers/homebrew-cask,schneidmaster/homebrew-cask,aguynamedryan/homebrew-cask,kpearson/homebrew-cask,0xadada/homebrew-cask,tangestani/homebrew-cask,rajiv/homebrew-cask,vin047/homebrew-cask,ksylvan/homebrew-cask,mauricerkelly/homebrew-cask,colindunn/homebrew-cask,lucasmezencio/homebrew-cask,mrmachine/homebrew-cask,stonehippo/homebrew-cask,andrewdisley/homebrew-cask,janlugt/homebrew-cask,xtian/homebrew-cask,deiga/homebrew-cask,n0ts/homebrew-cask,mahori/homebrew-cask,rajiv/homebrew-cask,koenrh/homebrew-cask,jawshooah/homebrew-cask,tedski/homebrew-cask,diogodamiani/homebrew-cask,syscrusher/homebrew-cask,JikkuJose/homebrew-cask,johndbritton/homebrew-cask,sanyer/homebrew-cask,cobyism/homebrew-cask,pkq/homebrew-cask,asins/homebrew-cask,sjackman/homebrew-cask,jedahan/homebrew-cask,kTitan/homebrew-cask,mjgardner/homebrew-cask,artdevjs/homebrew-cask,Cottser/homebrew-cask,exherb/homebrew-cask,singingwolfboy/homebrew-cask,mikem/homebrew-cask,forevergenin/homebrew-cask,reitermarkus/homebrew-cask,Amorymeltzer/homebrew-cask,kamilboratynski/homebrew-cask,hellosky806/homebrew-cask,wastrachan/homebrew-cask,sanyer/homebrew-cask,joshka/homebrew-cask,rajiv/homebrew-cask,My2ndAngelic/homebrew-cask,Ephemera/homebrew-cask,thehunmonkgroup/homebrew-cask,alexg0/homebrew-cask,leipert/homebrew-cask,giannitm/homebrew-cask,franklouwers/homebrew-cask,jasmas/homebrew-cask,jeroenj/homebrew-cask,lantrix/homebrew-cask,mazehall/homebrew-cask,jangalinski/homebrew-cask,imgarylai/homebrew-cask,tyage/homebrew-cask,ninjahoahong/homebrew-cask,claui/homebrew-cask,bosr/homebrew-cask,dictcp/homebrew-cask,adrianchia/homebrew-cask,doits/homebrew-cask,ptb/homebrew-cask,antogg/homebrew-cask,sosedoff/homebrew-cask,michelegera/homebrew-cask,joshka/homebrew-cask,yuhki50/homebrew-cask,jacobbednarz/homebrew-cask,MichaelPei/homebrew-cask,optikfluffel/homebrew-cask,wickles/homebrew-cask,kesara/homebrew-cask,moimikey/homebrew-cask,larseggert/homebrew-cask,wKovacs64/homebrew-cask,vigosan/homebrew-cask,13k/homebrew-cask,mathbunnyru/homebrew-cask,jalaziz/homebrew-cask,kkdd/homebrew-cask,jedahan/homebrew-cask,ericbn/homebrew-cask,amatos/homebrew-cask,samdoran/homebrew-cask,kesara/homebrew-cask,squid314/homebrew-cask,devmynd/homebrew-cask,goxberry/homebrew-cask,riyad/homebrew-cask,mrmachine/homebrew-cask,pacav69/homebrew-cask,gyndav/homebrew-cask,elyscape/homebrew-cask,josa42/homebrew-cask,mlocher/homebrew-cask,miccal/homebrew-cask,cliffcotino/homebrew-cask,mjgardner/homebrew-cask,paour/homebrew-cask,josa42/homebrew-cask,gabrielizaias/homebrew-cask,inz/homebrew-cask,Keloran/homebrew-cask,julionc/homebrew-cask,phpwutz/homebrew-cask,esebastian/homebrew-cask,sgnh/homebrew-cask,sanchezm/homebrew-cask,gmkey/homebrew-cask,13k/homebrew-cask,scottsuch/homebrew-cask,jeroenj/homebrew-cask,wickedsp1d3r/homebrew-cask,JacopKane/homebrew-cask,kingthorin/homebrew-cask,leipert/homebrew-cask,nshemonsky/homebrew-cask,okket/homebrew-cask,RJHsiao/homebrew-cask,danielbayley/homebrew-cask,ericbn/homebrew-cask,winkelsdorf/homebrew-cask,shoichiaizawa/homebrew-cask,reitermarkus/homebrew-cask,kesara/homebrew-cask,goxberry/homebrew-cask,andyli/homebrew-cask,chrisfinazzo/homebrew-cask,kassi/homebrew-cask,gabrielizaias/homebrew-cask,opsdev-ws/homebrew-cask,nathanielvarona/homebrew-cask,danielbayley/homebrew-cask,schneidmaster/homebrew-cask,xcezx/homebrew-cask,kpearson/homebrew-cask,malob/homebrew-cask,xcezx/homebrew-cask,forevergenin/homebrew-cask,kronicd/homebrew-cask,riyad/homebrew-cask,shorshe/homebrew-cask,y00rb/homebrew-cask,blainesch/homebrew-cask,jpmat296/homebrew-cask,hakamadare/homebrew-cask,okket/homebrew-cask,ninjahoahong/homebrew-cask,sgnh/homebrew-cask,Amorymeltzer/homebrew-cask,mchlrmrz/homebrew-cask,Ephemera/homebrew-cask,sohtsuka/homebrew-cask,hovancik/homebrew-cask,Saklad5/homebrew-cask,jgarber623/homebrew-cask,robertgzr/homebrew-cask,markthetech/homebrew-cask,tangestani/homebrew-cask,tjt263/homebrew-cask,lifepillar/homebrew-cask,kTitan/homebrew-cask,danielbayley/homebrew-cask,AnastasiaSulyagina/homebrew-cask,jacobbednarz/homebrew-cask,mattrobenolt/homebrew-cask,0rax/homebrew-cask,onlynone/homebrew-cask,samdoran/homebrew-cask,shonjir/homebrew-cask,tjnycum/homebrew-cask,patresi/homebrew-cask,antogg/homebrew-cask,gerrypower/homebrew-cask,mazehall/homebrew-cask,bosr/homebrew-cask,kingthorin/homebrew-cask,moimikey/homebrew-cask,0rax/homebrew-cask,perfide/homebrew-cask,nathancahill/homebrew-cask,coeligena/homebrew-customized,nrlquaker/homebrew-cask,rogeriopradoj/homebrew-cask,xight/homebrew-cask,gerrypower/homebrew-cask,bdhess/homebrew-cask,Saklad5/homebrew-cask,stonehippo/homebrew-cask,Labutin/homebrew-cask,lucasmezencio/homebrew-cask,yumitsu/homebrew-cask,JacopKane/homebrew-cask,wmorin/homebrew-cask,wickedsp1d3r/homebrew-cask,FinalDes/homebrew-cask,opsdev-ws/homebrew-cask,alexg0/homebrew-cask,boecko/homebrew-cask,jaredsampson/homebrew-cask,mathbunnyru/homebrew-cask,arronmabrey/homebrew-cask,arronmabrey/homebrew-cask,vigosan/homebrew-cask,kingthorin/homebrew-cask,sscotth/homebrew-cask,jalaziz/homebrew-cask,chrisfinazzo/homebrew-cask,bdhess/homebrew-cask,andrewdisley/homebrew-cask,colindunn/homebrew-cask,robertgzr/homebrew-cask,sebcode/homebrew-cask,chadcatlett/caskroom-homebrew-cask,sscotth/homebrew-cask,cobyism/homebrew-cask,adrianchia/homebrew-cask,jasmas/homebrew-cask,victorpopkov/homebrew-cask,wastrachan/homebrew-cask,yutarody/homebrew-cask,MoOx/homebrew-cask,bric3/homebrew-cask,FinalDes/homebrew-cask,uetchy/homebrew-cask,pkq/homebrew-cask,puffdad/homebrew-cask,kongslund/homebrew-cask,renaudguerin/homebrew-cask,sohtsuka/homebrew-cask,mauricerkelly/homebrew-cask,timsutton/homebrew-cask,Ngrd/homebrew-cask,yurikoles/homebrew-cask,mjgardner/homebrew-cask,dictcp/homebrew-cask,yutarody/homebrew-cask,alebcay/homebrew-cask,kkdd/homebrew-cask,gilesdring/homebrew-cask,Labutin/homebrew-cask,patresi/homebrew-cask,shonjir/homebrew-cask,blainesch/homebrew-cask,markthetech/homebrew-cask,diguage/homebrew-cask,alebcay/homebrew-cask,neverfox/homebrew-cask,m3nu/homebrew-cask,puffdad/homebrew-cask,sanyer/homebrew-cask,jiashuw/homebrew-cask,jmeridth/homebrew-cask,blogabe/homebrew-cask,shoichiaizawa/homebrew-cask,n0ts/homebrew-cask,reelsense/homebrew-cask,MoOx/homebrew-cask,wKovacs64/homebrew-cask,JosephViolago/homebrew-cask,Amorymeltzer/homebrew-cask,diguage/homebrew-cask,yurikoles/homebrew-cask,mwean/homebrew-cask,BenjaminHCCarr/homebrew-cask,artdevjs/homebrew-cask,morganestes/homebrew-cask,kronicd/homebrew-cask,RJHsiao/homebrew-cask,mhubig/homebrew-cask,malob/homebrew-cask,xight/homebrew-cask,inz/homebrew-cask,joschi/homebrew-cask,nrlquaker/homebrew-cask,chuanxd/homebrew-cask,SentinelWarren/homebrew-cask,mishari/homebrew-cask,muan/homebrew-cask,elyscape/homebrew-cask,deiga/homebrew-cask,jgarber623/homebrew-cask,jawshooah/homebrew-cask,paour/homebrew-cask,syscrusher/homebrew-cask,AnastasiaSulyagina/homebrew-cask,decrement/homebrew-cask,cblecker/homebrew-cask,JacopKane/homebrew-cask,blogabe/homebrew-cask,tjnycum/homebrew-cask,alebcay/homebrew-cask,MircoT/homebrew-cask,renaudguerin/homebrew-cask,bric3/homebrew-cask,0xadada/homebrew-cask,BenjaminHCCarr/homebrew-cask,timsutton/homebrew-cask,imgarylai/homebrew-cask,jalaziz/homebrew-cask,alexg0/homebrew-cask,guerrero/homebrew-cask,onlynone/homebrew-cask,hristozov/homebrew-cask,janlugt/homebrew-cask,kongslund/homebrew-cask
|
ruby
|
## Code Before:
cask 'elasticwolf' do
version '5.1.6'
sha256 '32eccff8e2cff1187fbf4b8c614e61056ae9c371ebdba3174e021b413b973542'
url "https://s3-us-gov-west-1.amazonaws.com/elasticwolf/ElasticWolf-osx-#{version}.zip"
name 'AWS ElasticWolf Client Console'
homepage 'https://aws.amazon.com/developertools/9313598265692691'
license :gratis
app 'ElasticWolf.app'
end
## Instruction:
Fix `url` stanza comment for AWS ElasticWolf Client Console.
## Code After:
cask 'elasticwolf' do
version '5.1.6'
sha256 '32eccff8e2cff1187fbf4b8c614e61056ae9c371ebdba3174e021b413b973542'
# amazonaws.com/elasticwolf was verified as official when first introduced to the cask
url "https://s3-us-gov-west-1.amazonaws.com/elasticwolf/ElasticWolf-osx-#{version}.zip"
name 'AWS ElasticWolf Client Console'
homepage 'https://aws.amazon.com/developertools/9313598265692691'
license :gratis
app 'ElasticWolf.app'
end
|
32e70ee06be67cb9058b2da7dc1a714272c6a07a
|
pyQuantuccia/setup.py
|
pyQuantuccia/setup.py
|
import setuptools
qu_ext = setuptools.Extension(
'quantuccia',
include_dirs=['src/Quantuccia'],
sources=['src/pyQuantuccia.cpp']
)
setuptools.setup(
name='pyQuantuccia',
author='Jack Grahl',
author_email='[email protected]',
version='0.1.0',
packages=['pyQuantuccia'],
ext_modules=[qu_ext]
)
|
import setuptools
qu_ext = setuptools.Extension(
'quantuccia',
include_dirs=['src/Quantuccia'],
sources=['src/pyQuantuccia.cpp']
)
setuptools.setup(
name='pyQuantuccia',
author='Jack Grahl',
author_email='[email protected]',
version='0.1.0',
packages=['pyQuantuccia'],
test_suite='tests',
ext_modules=[qu_ext]
)
|
Add the location of tests.
|
Add the location of tests.
|
Python
|
bsd-3-clause
|
jwg4/pyQuantuccia,jwg4/pyQuantuccia
|
python
|
## Code Before:
import setuptools
qu_ext = setuptools.Extension(
'quantuccia',
include_dirs=['src/Quantuccia'],
sources=['src/pyQuantuccia.cpp']
)
setuptools.setup(
name='pyQuantuccia',
author='Jack Grahl',
author_email='[email protected]',
version='0.1.0',
packages=['pyQuantuccia'],
ext_modules=[qu_ext]
)
## Instruction:
Add the location of tests.
## Code After:
import setuptools
qu_ext = setuptools.Extension(
'quantuccia',
include_dirs=['src/Quantuccia'],
sources=['src/pyQuantuccia.cpp']
)
setuptools.setup(
name='pyQuantuccia',
author='Jack Grahl',
author_email='[email protected]',
version='0.1.0',
packages=['pyQuantuccia'],
test_suite='tests',
ext_modules=[qu_ext]
)
|
b58438703854f88432ec01b51bb79ce7ba6515dc
|
setup.py
|
setup.py
|
from setuptools import setup, Extension
setup(
name='javelin',
version='0.1.0',
description='',
url='https://github.com/rosswhitfield/javelin',
author='Ross Whitfield',
author_email='[email protected]',
license='MIT',
packages=['javelin'],
ext_modules=[Extension('javelin.fourier_cython', ['javelin/fourier_cython.pyx'],
extra_compile_args=['-fopenmp'], extra_link_args=['-fopenmp'])]
)
|
from setuptools import setup, Extension, distutils
if distutils.ccompiler.get_default_compiler() == 'msvc':
extra_compile_args = ['/openmp']
extra_link_args = None
else:
extra_compile_args = ['-fopenmp']
extra_link_args = ['-fopenmp']
setup(
name='javelin',
version='0.1.0',
description='',
url='https://github.com/rosswhitfield/javelin',
author='Ross Whitfield',
author_email='[email protected]',
license='MIT',
packages=['javelin'],
ext_modules=[Extension('javelin.fourier_cython', ['javelin/fourier_cython.pyx'],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args)]
)
|
Fix openmp flags for windows
|
Fix openmp flags for windows
|
Python
|
mit
|
rosswhitfield/javelin
|
python
|
## Code Before:
from setuptools import setup, Extension
setup(
name='javelin',
version='0.1.0',
description='',
url='https://github.com/rosswhitfield/javelin',
author='Ross Whitfield',
author_email='[email protected]',
license='MIT',
packages=['javelin'],
ext_modules=[Extension('javelin.fourier_cython', ['javelin/fourier_cython.pyx'],
extra_compile_args=['-fopenmp'], extra_link_args=['-fopenmp'])]
)
## Instruction:
Fix openmp flags for windows
## Code After:
from setuptools import setup, Extension, distutils
if distutils.ccompiler.get_default_compiler() == 'msvc':
extra_compile_args = ['/openmp']
extra_link_args = None
else:
extra_compile_args = ['-fopenmp']
extra_link_args = ['-fopenmp']
setup(
name='javelin',
version='0.1.0',
description='',
url='https://github.com/rosswhitfield/javelin',
author='Ross Whitfield',
author_email='[email protected]',
license='MIT',
packages=['javelin'],
ext_modules=[Extension('javelin.fourier_cython', ['javelin/fourier_cython.pyx'],
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args)]
)
|
bc92cf0b64ddfc54a87d4edf2ec6cfaad67c198d
|
examples/html-kitchen-sink/jest.config.js
|
examples/html-kitchen-sink/jest.config.js
|
const config = require('../../jest.config');
module.exports = {
...config,
roots: [__dirname],
transform: {
...config.transform,
'.*\\.(html)$': '<rootDir>/node_modules/jest-raw-loader',
},
moduleFileExtensions: [...config.moduleFileExtensions, 'html'],
};
|
const config = require('../../jest.config');
module.exports = {
...config,
roots: [__dirname],
transform: {
...config.transform,
'.*\\.(html)$': '<rootDir>/node_modules/jest-raw-loader',
'^.+\\.mdx?$': '@storybook/addon-docs/jest-transform-mdx',
},
moduleFileExtensions: [...config.moduleFileExtensions, 'html'],
};
|
Add MDX snapshotting to HTML example (failed)
|
Add MDX snapshotting to HTML example (failed)
|
JavaScript
|
mit
|
kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook
|
javascript
|
## Code Before:
const config = require('../../jest.config');
module.exports = {
...config,
roots: [__dirname],
transform: {
...config.transform,
'.*\\.(html)$': '<rootDir>/node_modules/jest-raw-loader',
},
moduleFileExtensions: [...config.moduleFileExtensions, 'html'],
};
## Instruction:
Add MDX snapshotting to HTML example (failed)
## Code After:
const config = require('../../jest.config');
module.exports = {
...config,
roots: [__dirname],
transform: {
...config.transform,
'.*\\.(html)$': '<rootDir>/node_modules/jest-raw-loader',
'^.+\\.mdx?$': '@storybook/addon-docs/jest-transform-mdx',
},
moduleFileExtensions: [...config.moduleFileExtensions, 'html'],
};
|
f22e0e50430301cd3ae91732bbe8ad26e1b6cfd8
|
src/index.html
|
src/index.html
|
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ng2-dinos</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Kim Maida @ Auth0">
<meta name="keywords" content="Angular 2, dinosaurs, single page application, javascript">
<meta name="description" content="Learn about some popular as well as obscure dinosaurs!">
<base href="/">
<!-- External stylesheets -->
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
</head>
<body>
<app-root></app-root>
</body>
</html>
|
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ng2-dinos</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Kim Maida @ Auth0">
<meta name="description" content="Learn about some popular as well as obscure dinosaurs!">
<base href="/">
<!-- External stylesheets -->
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
</head>
<body>
<app-root></app-root>
</body>
</html>
|
Remove keywords meta tag (not widely used anymore)
|
Remove keywords meta tag (not widely used anymore)
|
HTML
|
mit
|
kmaida/ng2-dinos,auth0-blog/ng2-dinos,auth0-blog/ng2-dinos,auth0-blog/ng2-dinos,kmaida/ng2-dinos,kmaida/ng2-dinos
|
html
|
## Code Before:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ng2-dinos</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Kim Maida @ Auth0">
<meta name="keywords" content="Angular 2, dinosaurs, single page application, javascript">
<meta name="description" content="Learn about some popular as well as obscure dinosaurs!">
<base href="/">
<!-- External stylesheets -->
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
</head>
<body>
<app-root></app-root>
</body>
</html>
## Instruction:
Remove keywords meta tag (not widely used anymore)
## Code After:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ng2-dinos</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Kim Maida @ Auth0">
<meta name="description" content="Learn about some popular as well as obscure dinosaurs!">
<base href="/">
<!-- External stylesheets -->
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
</head>
<body>
<app-root></app-root>
</body>
</html>
|
0b7587f452126612460dd6262d331234814c6d72
|
src/helper/paramHandler/paramHandler.coffee
|
src/helper/paramHandler/paramHandler.coffee
|
class ParamHandler
all: (callback) ->
process = 'src/server --port 8000 --env development'
match = process.match /--[a-zA-Z]* ([a-zA-Z0-9]*)/g
payload = {}
match.map (found) ->
parse = found.match(/--([a-zA-Z]*)\s/)
payload[parse[1]] = found.replace parse[0], ''
callback payload
return
module.exports = new ParamHandler
|
class ParamHandler
constructor: (@payload = {}) ->
getArguments: (process, callback) ->
match = process.argv.join(' ').match /--[a-zA-Z]* ([a-zA-Z0-9]*)/g
match.map (found) =>
parse = found.match(/--([a-zA-Z]*)\s/)
@payload[parse[1]] = found.replace parse[0], ''
callback @payload
module.exports = new ParamHandler
|
Handle with Process-Arguments and tidy
|
Handle with Process-Arguments and tidy
|
CoffeeScript
|
mit
|
sm0k1nggnu/entertain.io
|
coffeescript
|
## Code Before:
class ParamHandler
all: (callback) ->
process = 'src/server --port 8000 --env development'
match = process.match /--[a-zA-Z]* ([a-zA-Z0-9]*)/g
payload = {}
match.map (found) ->
parse = found.match(/--([a-zA-Z]*)\s/)
payload[parse[1]] = found.replace parse[0], ''
callback payload
return
module.exports = new ParamHandler
## Instruction:
Handle with Process-Arguments and tidy
## Code After:
class ParamHandler
constructor: (@payload = {}) ->
getArguments: (process, callback) ->
match = process.argv.join(' ').match /--[a-zA-Z]* ([a-zA-Z0-9]*)/g
match.map (found) =>
parse = found.match(/--([a-zA-Z]*)\s/)
@payload[parse[1]] = found.replace parse[0], ''
callback @payload
module.exports = new ParamHandler
|
f1d41a6ef2306305a91f28cd950bdf6ae10329f9
|
app/src/main/res/values/styles.xml
|
app/src/main/res/values/styles.xml
|
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
</resources>
|
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
<style name="MFP_BaseTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#222222</item>
<item name="colorPrimaryDark">#222222</item>
<item name="mfp_toolbar_theme">@style/MFP_BaseToolbarTheme</item>
</style>
<style name="MFP_BaseToolbarTheme" parent="@style/ThemeOverlay.AppCompat.Dark">
<item name="android:textColorPrimary">#FFFFFF</item>
<item name="colorControlNormal">#FFFFFF</item>
</style>
</resources>
|
Change theme of file picker to be more in line with the app
|
Change theme of file picker to be more in line with the app
|
XML
|
mit
|
artemnikitin/tts-test-app
|
xml
|
## Code Before:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
</resources>
## Instruction:
Change theme of file picker to be more in line with the app
## Code After:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
<style name="MFP_BaseTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#222222</item>
<item name="colorPrimaryDark">#222222</item>
<item name="mfp_toolbar_theme">@style/MFP_BaseToolbarTheme</item>
</style>
<style name="MFP_BaseToolbarTheme" parent="@style/ThemeOverlay.AppCompat.Dark">
<item name="android:textColorPrimary">#FFFFFF</item>
<item name="colorControlNormal">#FFFFFF</item>
</style>
</resources>
|
104439141f7ba80965aa7bd389f3d4ed6310b0d8
|
.travis.yml
|
.travis.yml
|
language: python
# Python version to run tests with.
python:
- "2.7"
env:
- CRAM_SHELL=sh
- CRAM_SHELL=bash
- CRAM_SHELL=zsh
install:
- "pip install -r requirements.txt --use-mirrors"
script: "cram -v --shell=$CRAM_SHELL tests"
|
language: python
# Python version to run tests with.
python:
- "2.7"
env:
- CRAM_SHELL=sh
- CRAM_SHELL=bash
- CRAM_SHELL=zsh
install:
- "pip install -r requirements.txt --use-mirrors"
before_script:
- "sudo apt-get install zsh"
script: "cram -v --shell=$CRAM_SHELL tests"
|
Fix to install zsh on Travis
|
Fix to install zsh on Travis
|
YAML
|
mit
|
uu59/rbl,uu59/rbl
|
yaml
|
## Code Before:
language: python
# Python version to run tests with.
python:
- "2.7"
env:
- CRAM_SHELL=sh
- CRAM_SHELL=bash
- CRAM_SHELL=zsh
install:
- "pip install -r requirements.txt --use-mirrors"
script: "cram -v --shell=$CRAM_SHELL tests"
## Instruction:
Fix to install zsh on Travis
## Code After:
language: python
# Python version to run tests with.
python:
- "2.7"
env:
- CRAM_SHELL=sh
- CRAM_SHELL=bash
- CRAM_SHELL=zsh
install:
- "pip install -r requirements.txt --use-mirrors"
before_script:
- "sudo apt-get install zsh"
script: "cram -v --shell=$CRAM_SHELL tests"
|
342df8f8edbd9081770be4aa18da05f86f925855
|
TEST3/test3.rb
|
TEST3/test3.rb
|
def process(document)
result = []
file = document
columns = []
File.readlines(file).each do |line|
records = line.split(' ')
year = records[6]
p year
end
end
process("T08 (1).1")
|
require 'date'
def process(document)
result = []
file = document
columns = []
File.readlines(file).each do |line|
records = line.split(' ')
year = records[6]
columns << year
end
p columns
end
process("T08 (1).1")
class Record
# Looking at the people.csv file,
# what attributes should a Person object have?
attr_reader :table_number, :sub_table, :record_number, :day_of_week, :day_of_month, :month, :year, :total_deaths, :wounded
def initialize(args = {})
@table_number = args[:table_number]
@sub_table = args[:sub_table]
@record_number = args[:record_number]
@day_of_week = args[:day_of_week]
@day_of_month = args[:day_of_month]
@month = args[:month]
@year = args[:year]
@total_deaths = args[:total_deaths]
@wounded = args[:wounded]
end
end
|
Create Record class with file columns as attributes
|
Create Record class with file columns as attributes
|
Ruby
|
mit
|
Tooconfident/TicketFrontier-Test
|
ruby
|
## Code Before:
def process(document)
result = []
file = document
columns = []
File.readlines(file).each do |line|
records = line.split(' ')
year = records[6]
p year
end
end
process("T08 (1).1")
## Instruction:
Create Record class with file columns as attributes
## Code After:
require 'date'
def process(document)
result = []
file = document
columns = []
File.readlines(file).each do |line|
records = line.split(' ')
year = records[6]
columns << year
end
p columns
end
process("T08 (1).1")
class Record
# Looking at the people.csv file,
# what attributes should a Person object have?
attr_reader :table_number, :sub_table, :record_number, :day_of_week, :day_of_month, :month, :year, :total_deaths, :wounded
def initialize(args = {})
@table_number = args[:table_number]
@sub_table = args[:sub_table]
@record_number = args[:record_number]
@day_of_week = args[:day_of_week]
@day_of_month = args[:day_of_month]
@month = args[:month]
@year = args[:year]
@total_deaths = args[:total_deaths]
@wounded = args[:wounded]
end
end
|
dbe17debb4611d9346a024793a732fc0d30de6ff
|
.deploy/docker/entrypoint.sh
|
.deploy/docker/entrypoint.sh
|
chown -R www-data:www-data -R $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload $FIREFLY_PATH/storage/logs $FIREFLY_PATH/storage/cache
chmod -R 775 $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload $FIREFLY_PATH/storage/upload $FIREFLY_PATH/storage/logs $FIREFLY_PATH/storage/cache
# remove any lingering files that may break upgrades:
rm -f $FIREFLY_PATH/storage/logs/laravel.log
cat .env.docker | envsubst > .env && cat .env
composer dump-autoload
php artisan optimize
php artisan package:discover
php artisan firefly:instructions install
exec apache2-foreground
|
chown -R www-data:www-data -R $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload $FIREFLY_PATH/storage/logs $FIREFLY_PATH/storage/cache
chmod -R 775 $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload $FIREFLY_PATH/storage/upload $FIREFLY_PATH/storage/logs $FIREFLY_PATH/storage/cache
# remove any lingering files that may break upgrades:
rm -f $FIREFLY_PATH/storage/logs/laravel.log
cat .env.docker | envsubst > .env && cat .env
composer dump-autoload
php artisan package:discover
php artisan firefly:instructions install
exec apache2-foreground
|
Remove the 'php artisan optimize' line from .deploy/docker/entroypoint.sh because the command was removed in artisan 5.6
|
Remove the 'php artisan optimize' line from .deploy/docker/entroypoint.sh because the command was removed in artisan 5.6
|
Shell
|
agpl-3.0
|
JC5/firefly-iii,firefly-iii/firefly-iii,firefly-iii/firefly-iii,JC5/firefly-iii,firefly-iii/firefly-iii,firefly-iii/firefly-iii
|
shell
|
## Code Before:
chown -R www-data:www-data -R $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload $FIREFLY_PATH/storage/logs $FIREFLY_PATH/storage/cache
chmod -R 775 $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload $FIREFLY_PATH/storage/upload $FIREFLY_PATH/storage/logs $FIREFLY_PATH/storage/cache
# remove any lingering files that may break upgrades:
rm -f $FIREFLY_PATH/storage/logs/laravel.log
cat .env.docker | envsubst > .env && cat .env
composer dump-autoload
php artisan optimize
php artisan package:discover
php artisan firefly:instructions install
exec apache2-foreground
## Instruction:
Remove the 'php artisan optimize' line from .deploy/docker/entroypoint.sh because the command was removed in artisan 5.6
## Code After:
chown -R www-data:www-data -R $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload $FIREFLY_PATH/storage/logs $FIREFLY_PATH/storage/cache
chmod -R 775 $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload $FIREFLY_PATH/storage/upload $FIREFLY_PATH/storage/logs $FIREFLY_PATH/storage/cache
# remove any lingering files that may break upgrades:
rm -f $FIREFLY_PATH/storage/logs/laravel.log
cat .env.docker | envsubst > .env && cat .env
composer dump-autoload
php artisan package:discover
php artisan firefly:instructions install
exec apache2-foreground
|
7dc819661c67dc5ff9611dc6b516c3d9cc445a6a
|
.github/PULL_REQUEST_TEMPLATE.md
|
.github/PULL_REQUEST_TEMPLATE.md
|
Please:
- [ ] Make your pull request atomic, fixing one issue at a time unless there are multiple relevant issues that would not make sense in isolation. For the latter case, please try to make atomic commits so we can easily review code for each issue.
- [ ] When you address our comments, please add additional commit(s) for the new changes so we can see just the new diff (instead of the whole PR's diff).
- [ ] Provide a test case & update the documentation under `site/docs/`
- [ ] Make lint and test pass. (Run `yarn lint` and `yarn test`. If your change affects Vega outputs of some examples, please run `yarn build:example EXAMPLE_NAME` to re-compile a specific example or `yarn build:examples` to re-compile all examples.)
- [ ] Make sure you have rebased onto the `master` branch.
- [ ] Provide a concise title so that we can just copy it to our release note.
- Use imperative mood and present tense.
- Mention relevant issues. (e.g., `#1`)
- [ ] Make a pass over the whole changeset as if you're a reviewer yourself. This will help us focus on catching issues that you might not notice yourself. (If you're still working on your PR, you can add "[WIP]" prefix to the PR's title. When the PR is ready, you can then remove the "[WIP]" prefix and add a comment to notify us.)
Pro-Tip: https://medium.com/@greenberg/writing-pull-requests-your-coworkers-might-enjoy-reading-9d0307e93da3 is a nice article about writing a nice pull request.
|
Please:
- [ ] Make your pull request atomic, fixing one issue at a time unless there are multiple relevant issues that would not make sense in isolation. For the latter case, please make atomic commits so we can easily review each issue.
- Please add new commit(s) when addressing comments, so we can see easily the new changeset (instead of the whole changeset).
- [ ] Provide a test case & update the documentation under `site/docs/`
- [ ] Make lint and test pass. (Run `yarn lint` and `yarn test`. If your change affects Vega outputs of some examples, run `yarn build:example EXAMPLE_NAME` to re-compile a specific example or `yarn build:examples` to re-compile all examples.)
- [ ] Rebase onto the latest `master` branch.
- [ ] Provide a concise title that we can copy to our release note.
- Use imperative mood and present tense.
- Mention relevant issues. (e.g., `#1`)
- [ ] Make a pass over the whole changeset as if you're a reviewer yourself. This will help us focus on catching issues that you might not notice yourself. (If you're still working on your PR, you can add "[WIP]" prefix to the PR's title. When the PR is ready, you can then remove "[WIP]" and add a comment to notify us.)
Pro-Tip: https://medium.com/@greenberg/writing-pull-requests-your-coworkers-might-enjoy-reading-9d0307e93da3 is a nice article about writing a nice pull request.
|
Make PR template a bit more concise.
|
Make PR template a bit more concise.
|
Markdown
|
bsd-3-clause
|
uwdata/vega-lite,uwdata/vega-lite,vega/vega-lite,uwdata/vega-lite,vega/vega-lite,vega/vega-lite,uwdata/vega-lite,uwdata/vega-lite,vega/vega-lite,vega/vega-lite
|
markdown
|
## Code Before:
Please:
- [ ] Make your pull request atomic, fixing one issue at a time unless there are multiple relevant issues that would not make sense in isolation. For the latter case, please try to make atomic commits so we can easily review code for each issue.
- [ ] When you address our comments, please add additional commit(s) for the new changes so we can see just the new diff (instead of the whole PR's diff).
- [ ] Provide a test case & update the documentation under `site/docs/`
- [ ] Make lint and test pass. (Run `yarn lint` and `yarn test`. If your change affects Vega outputs of some examples, please run `yarn build:example EXAMPLE_NAME` to re-compile a specific example or `yarn build:examples` to re-compile all examples.)
- [ ] Make sure you have rebased onto the `master` branch.
- [ ] Provide a concise title so that we can just copy it to our release note.
- Use imperative mood and present tense.
- Mention relevant issues. (e.g., `#1`)
- [ ] Make a pass over the whole changeset as if you're a reviewer yourself. This will help us focus on catching issues that you might not notice yourself. (If you're still working on your PR, you can add "[WIP]" prefix to the PR's title. When the PR is ready, you can then remove the "[WIP]" prefix and add a comment to notify us.)
Pro-Tip: https://medium.com/@greenberg/writing-pull-requests-your-coworkers-might-enjoy-reading-9d0307e93da3 is a nice article about writing a nice pull request.
## Instruction:
Make PR template a bit more concise.
## Code After:
Please:
- [ ] Make your pull request atomic, fixing one issue at a time unless there are multiple relevant issues that would not make sense in isolation. For the latter case, please make atomic commits so we can easily review each issue.
- Please add new commit(s) when addressing comments, so we can see easily the new changeset (instead of the whole changeset).
- [ ] Provide a test case & update the documentation under `site/docs/`
- [ ] Make lint and test pass. (Run `yarn lint` and `yarn test`. If your change affects Vega outputs of some examples, run `yarn build:example EXAMPLE_NAME` to re-compile a specific example or `yarn build:examples` to re-compile all examples.)
- [ ] Rebase onto the latest `master` branch.
- [ ] Provide a concise title that we can copy to our release note.
- Use imperative mood and present tense.
- Mention relevant issues. (e.g., `#1`)
- [ ] Make a pass over the whole changeset as if you're a reviewer yourself. This will help us focus on catching issues that you might not notice yourself. (If you're still working on your PR, you can add "[WIP]" prefix to the PR's title. When the PR is ready, you can then remove "[WIP]" and add a comment to notify us.)
Pro-Tip: https://medium.com/@greenberg/writing-pull-requests-your-coworkers-might-enjoy-reading-9d0307e93da3 is a nice article about writing a nice pull request.
|
44d51438a3fbfb50fbf02248d64745b07e00ed31
|
lib/sandthorn_driver_sequel/aggregate_access.rb
|
lib/sandthorn_driver_sequel/aggregate_access.rb
|
module SandthornDriverSequel
class AggregateAccess < Access
def find_or_register(aggregate_id, aggregate_type)
if aggregate = find_by_aggregate_id(aggregate_id)
aggregate
else
register_aggregate(aggregate_id, aggregate_type)
end
end
def register_aggregate(aggregate_id, aggregate_type)
id = storage.aggregates.insert(aggregate_id: aggregate_id, aggregate_type: aggregate_type.to_s)
find(id)
end
def find(id)
storage.aggregates[id]
end
def find_by_aggregate_id(aggregate_id)
storage.aggregates.first(aggregate_id: aggregate_id)
end
def aggregate_types
storage.aggregates.select(:aggregate_type).distinct.select_map(:aggregate_type)
end
def aggregate_ids(type: nil)
aggs = storage.aggregates
if type
aggs = aggs.where(aggregate_type: type)
end
aggs.order(:id).select_map(:aggregate_id)
end
end
end
|
module SandthornDriverSequel
class AggregateAccess < Access
def find_or_register(aggregate_id, aggregate_type)
if aggregate = find_by_aggregate_id(aggregate_id)
aggregate
else
register_aggregate(aggregate_id, aggregate_type)
end
end
def register_aggregate(aggregate_id, aggregate_type)
id = storage.aggregates.insert(aggregate_id: aggregate_id, aggregate_type: aggregate_type.to_s)
find(id)
end
def find(id)
storage.aggregates[id]
end
def find_by_aggregate_id(aggregate_id)
storage.aggregates.first(aggregate_id: aggregate_id)
end
def find_by_aggregate_id!(aggregate_id)
aggregate = find_by_aggregate_id(aggregate_id)
raise Errors::NoAggregateError, aggregate_id unless aggregate
aggregate
end
def aggregate_types
storage.aggregates.select(:aggregate_type).distinct.select_map(:aggregate_type)
end
def aggregate_ids(type: nil)
aggs = storage.aggregates
if type
aggs = aggs.where(aggregate_type: type)
end
aggs.order(:id).select_map(:aggregate_id)
end
end
end
|
Add an aggregate finder with bang that raises exception
|
Add an aggregate finder with bang that raises exception
|
Ruby
|
mit
|
Sandthorn/sandthorn_driver_sequel_2,Sandthorn/sandthorn_driver_sequel
|
ruby
|
## Code Before:
module SandthornDriverSequel
class AggregateAccess < Access
def find_or_register(aggregate_id, aggregate_type)
if aggregate = find_by_aggregate_id(aggregate_id)
aggregate
else
register_aggregate(aggregate_id, aggregate_type)
end
end
def register_aggregate(aggregate_id, aggregate_type)
id = storage.aggregates.insert(aggregate_id: aggregate_id, aggregate_type: aggregate_type.to_s)
find(id)
end
def find(id)
storage.aggregates[id]
end
def find_by_aggregate_id(aggregate_id)
storage.aggregates.first(aggregate_id: aggregate_id)
end
def aggregate_types
storage.aggregates.select(:aggregate_type).distinct.select_map(:aggregate_type)
end
def aggregate_ids(type: nil)
aggs = storage.aggregates
if type
aggs = aggs.where(aggregate_type: type)
end
aggs.order(:id).select_map(:aggregate_id)
end
end
end
## Instruction:
Add an aggregate finder with bang that raises exception
## Code After:
module SandthornDriverSequel
class AggregateAccess < Access
def find_or_register(aggregate_id, aggregate_type)
if aggregate = find_by_aggregate_id(aggregate_id)
aggregate
else
register_aggregate(aggregate_id, aggregate_type)
end
end
def register_aggregate(aggregate_id, aggregate_type)
id = storage.aggregates.insert(aggregate_id: aggregate_id, aggregate_type: aggregate_type.to_s)
find(id)
end
def find(id)
storage.aggregates[id]
end
def find_by_aggregate_id(aggregate_id)
storage.aggregates.first(aggregate_id: aggregate_id)
end
def find_by_aggregate_id!(aggregate_id)
aggregate = find_by_aggregate_id(aggregate_id)
raise Errors::NoAggregateError, aggregate_id unless aggregate
aggregate
end
def aggregate_types
storage.aggregates.select(:aggregate_type).distinct.select_map(:aggregate_type)
end
def aggregate_ids(type: nil)
aggs = storage.aggregates
if type
aggs = aggs.where(aggregate_type: type)
end
aggs.order(:id).select_map(:aggregate_id)
end
end
end
|
e7c5e62da700f51e69662689758ffebf70fa1494
|
cms/djangoapps/contentstore/context_processors.py
|
cms/djangoapps/contentstore/context_processors.py
|
import ConfigParser
from django.conf import settings
def doc_url(request):
config_file = open(settings.REPO_ROOT / "docs" / "config.ini")
config = ConfigParser.ConfigParser()
config.readfp(config_file)
# in the future, we will detect the locale; for now, we will
# hardcode en_us, since we only have English documentation
locale = "en_us"
def get_doc_url(token):
try:
return config.get(locale, token)
except ConfigParser.NoOptionError:
return config.get(locale, "default")
return {"doc_url": get_doc_url}
|
import ConfigParser
from django.conf import settings
config_file = open(settings.REPO_ROOT / "docs" / "config.ini")
config = ConfigParser.ConfigParser()
config.readfp(config_file)
def doc_url(request):
# in the future, we will detect the locale; for now, we will
# hardcode en_us, since we only have English documentation
locale = "en_us"
def get_doc_url(token):
try:
return config.get(locale, token)
except ConfigParser.NoOptionError:
return config.get(locale, "default")
return {"doc_url": get_doc_url}
|
Read from doc url mapping file at load time, rather than once per request
|
Read from doc url mapping file at load time, rather than once per request
|
Python
|
agpl-3.0
|
ampax/edx-platform,Softmotions/edx-platform,dcosentino/edx-platform,chudaol/edx-platform,prarthitm/edxplatform,cyanna/edx-platform,jazztpt/edx-platform,motion2015/a3,nikolas/edx-platform,msegado/edx-platform,hkawasaki/kawasaki-aio8-0,LearnEra/LearnEraPlaftform,pabloborrego93/edx-platform,wwj718/ANALYSE,procangroup/edx-platform,ahmadiga/min_edx,wwj718/edx-platform,edx/edx-platform,morenopc/edx-platform,leansoft/edx-platform,cyanna/edx-platform,shubhdev/edxOnBaadal,leansoft/edx-platform,SivilTaram/edx-platform,shabab12/edx-platform,zadgroup/edx-platform,dsajkl/123,pku9104038/edx-platform,antoviaque/edx-platform,ovnicraft/edx-platform,mahendra-r/edx-platform,zhenzhai/edx-platform,eestay/edx-platform,abdoosh00/edraak,jjmiranda/edx-platform,leansoft/edx-platform,nikolas/edx-platform,longmen21/edx-platform,jruiperezv/ANALYSE,kamalx/edx-platform,Kalyzee/edx-platform,andyzsf/edx,CourseTalk/edx-platform,beacloudgenius/edx-platform,chauhanhardik/populo_2,fly19890211/edx-platform,rismalrv/edx-platform,hkawasaki/kawasaki-aio8-0,teltek/edx-platform,openfun/edx-platform,devs1991/test_edx_docmode,shubhdev/openedx,zadgroup/edx-platform,waheedahmed/edx-platform,Kalyzee/edx-platform,vasyarv/edx-platform,shubhdev/openedx,louyihua/edx-platform,Shrhawk/edx-platform,don-github/edx-platform,alu042/edx-platform,zhenzhai/edx-platform,mcgachey/edx-platform,mitocw/edx-platform,xuxiao19910803/edx-platform,LICEF/edx-platform,jswope00/griffinx,y12uc231/edx-platform,nanolearning/edx-platform,inares/edx-platform,benpatterson/edx-platform,ahmedaljazzar/edx-platform,mjirayu/sit_academy,gsehub/edx-platform,deepsrijit1105/edx-platform,Stanford-Online/edx-platform,zofuthan/edx-platform,playm2mboy/edx-platform,a-parhom/edx-platform,miptliot/edx-platform,playm2mboy/edx-platform,beni55/edx-platform,alu042/edx-platform,LICEF/edx-platform,naresh21/synergetics-edx-platform,bigdatauniversity/edx-platform,AkA84/edx-platform,caesar2164/edx-platform,WatanabeYasumasa/edx-platform,4eek/edx-platform,AkA84/edx-platform,UOMx/edx-platform,openfun/edx-platform,pku9104038/edx-platform,eestay/edx-platform,ampax/edx-platform,doganov/edx-platform,synergeticsedx/deployment-wipro,hkawasaki/kawasaki-aio8-0,jzoldak/edx-platform,franosincic/edx-platform,jswope00/griffinx,hkawasaki/kawasaki-aio8-2,proversity-org/edx-platform,dcosentino/edx-platform,dkarakats/edx-platform,tanmaykm/edx-platform,appliedx/edx-platform,nagyistoce/edx-platform,knehez/edx-platform,openfun/edx-platform,torchingloom/edx-platform,alu042/edx-platform,iivic/BoiseStateX,a-parhom/edx-platform,xuxiao19910803/edx-platform,etzhou/edx-platform,SravanthiSinha/edx-platform,pomegranited/edx-platform,EDUlib/edx-platform,cognitiveclass/edx-platform,arifsetiawan/edx-platform,cselis86/edx-platform,Ayub-Khan/edx-platform,vismartltd/edx-platform,unicri/edx-platform,kursitet/edx-platform,adoosii/edx-platform,fintech-circle/edx-platform,bitifirefly/edx-platform,mitocw/edx-platform,zerobatu/edx-platform,solashirai/edx-platform,doismellburning/edx-platform,proversity-org/edx-platform,xuxiao19910803/edx,ampax/edx-platform-backup,jazztpt/edx-platform,ak2703/edx-platform,cecep-edu/edx-platform,jelugbo/tundex,RPI-OPENEDX/edx-platform,chauhanhardik/populo_2,BehavioralInsightsTeam/edx-platform,rhndg/openedx,martynovp/edx-platform,tiagochiavericosta/edx-platform,jamiefolsom/edx-platform,nanolearning/edx-platform,BehavioralInsightsTeam/edx-platform,doganov/edx-platform,vasyarv/edx-platform,edry/edx-platform,tiagochiavericosta/edx-platform,fintech-circle/edx-platform,DefyVentures/edx-platform,OmarIthawi/edx-platform,jamesblunt/edx-platform,ZLLab-Mooc/edx-platform,alexthered/kienhoc-platform,devs1991/test_edx_docmode,cecep-edu/edx-platform,tiagochiavericosta/edx-platform,Edraak/edx-platform,jelugbo/tundex,motion2015/edx-platform,nanolearningllc/edx-platform-cypress-2,rismalrv/edx-platform,halvertoluke/edx-platform,mbareta/edx-platform-ft,marcore/edx-platform,miptliot/edx-platform,vikas1885/test1,B-MOOC/edx-platform,Kalyzee/edx-platform,dsajkl/reqiop,Livit/Livit.Learn.EdX,appsembler/edx-platform,amir-qayyum-khan/edx-platform,playm2mboy/edx-platform,nanolearningllc/edx-platform-cypress,procangroup/edx-platform,J861449197/edx-platform,nttks/jenkins-test,jbassen/edx-platform,ovnicraft/edx-platform,appliedx/edx-platform,gymnasium/edx-platform,mushtaqak/edx-platform,marcore/edx-platform,hkawasaki/kawasaki-aio8-2,ferabra/edx-platform,mbareta/edx-platform-ft,kursitet/edx-platform,nagyistoce/edx-platform,hkawasaki/kawasaki-aio8-1,ovnicraft/edx-platform,inares/edx-platform,jonathan-beard/edx-platform,IndonesiaX/edx-platform,UOMx/edx-platform,marcore/edx-platform,peterm-itr/edx-platform,shashank971/edx-platform,devs1991/test_edx_docmode,Shrhawk/edx-platform,naresh21/synergetics-edx-platform,morenopc/edx-platform,nanolearningllc/edx-platform-cypress-2,zofuthan/edx-platform,zhenzhai/edx-platform,EDUlib/edx-platform,polimediaupv/edx-platform,procangroup/edx-platform,jazztpt/edx-platform,atsolakid/edx-platform,stvstnfrd/edx-platform,doismellburning/edx-platform,xingyepei/edx-platform,jswope00/griffinx,hamzehd/edx-platform,motion2015/edx-platform,Edraak/circleci-edx-platform,sudheerchintala/LearnEraPlatForm,xinjiguaike/edx-platform,nttks/jenkins-test,mushtaqak/edx-platform,alu042/edx-platform,analyseuc3m/ANALYSE-v1,appliedx/edx-platform,chudaol/edx-platform,ahmadiga/min_edx,sameetb-cuelogic/edx-platform-test,romain-li/edx-platform,ESOedX/edx-platform,simbs/edx-platform,abdoosh00/edraak,chauhanhardik/populo,TeachAtTUM/edx-platform,shubhdev/edx-platform,gsehub/edx-platform,martynovp/edx-platform,ampax/edx-platform,appliedx/edx-platform,vikas1885/test1,IONISx/edx-platform,TeachAtTUM/edx-platform,shabab12/edx-platform,dsajkl/123,shubhdev/edxOnBaadal,hastexo/edx-platform,hkawasaki/kawasaki-aio8-2,prarthitm/edxplatform,cecep-edu/edx-platform,ubc/edx-platform,shurihell/testasia,kamalx/edx-platform,valtech-mooc/edx-platform,polimediaupv/edx-platform,motion2015/a3,antoviaque/edx-platform,JioEducation/edx-platform,prarthitm/edxplatform,benpatterson/edx-platform,defance/edx-platform,cognitiveclass/edx-platform,romain-li/edx-platform,hkawasaki/kawasaki-aio8-2,nanolearningllc/edx-platform-cypress,UXE/local-edx,zerobatu/edx-platform,xuxiao19910803/edx,peterm-itr/edx-platform,synergeticsedx/deployment-wipro,Stanford-Online/edx-platform,Semi-global/edx-platform,caesar2164/edx-platform,atsolakid/edx-platform,DNFcode/edx-platform,ahmadio/edx-platform,ahmadio/edx-platform,mahendra-r/edx-platform,polimediaupv/edx-platform,10clouds/edx-platform,rhndg/openedx,xuxiao19910803/edx-platform,kmoocdev2/edx-platform,shubhdev/edxOnBaadal,wwj718/edx-platform,vikas1885/test1,ahmedaljazzar/edx-platform,J861449197/edx-platform,inares/edx-platform,atsolakid/edx-platform,abdoosh00/edraak,UOMx/edx-platform,jazkarta/edx-platform-for-isc,simbs/edx-platform,nanolearningllc/edx-platform-cypress-2,OmarIthawi/edx-platform,shubhdev/openedx,ampax/edx-platform-backup,stvstnfrd/edx-platform,synergeticsedx/deployment-wipro,itsjeyd/edx-platform,romain-li/edx-platform,analyseuc3m/ANALYSE-v1,chand3040/cloud_that,SivilTaram/edx-platform,mushtaqak/edx-platform,msegado/edx-platform,beni55/edx-platform,hamzehd/edx-platform,Ayub-Khan/edx-platform,vikas1885/test1,kamalx/edx-platform,eduNEXT/edunext-platform,jazkarta/edx-platform,mahendra-r/edx-platform,OmarIthawi/edx-platform,defance/edx-platform,andyzsf/edx,CourseTalk/edx-platform,arifsetiawan/edx-platform,JioEducation/edx-platform,chrisndodge/edx-platform,openfun/edx-platform,kmoocdev2/edx-platform,IONISx/edx-platform,yokose-ks/edx-platform,shurihell/testasia,wwj718/ANALYSE,alexthered/kienhoc-platform,solashirai/edx-platform,tanmaykm/edx-platform,mjirayu/sit_academy,chudaol/edx-platform,cognitiveclass/edx-platform,kxliugang/edx-platform,ahmadiga/min_edx,Edraak/edraak-platform,Edraak/circleci-edx-platform,Edraak/circleci-edx-platform,knehez/edx-platform,fly19890211/edx-platform,jonathan-beard/edx-platform,sameetb-cuelogic/edx-platform-test,AkA84/edx-platform,cyanna/edx-platform,zhenzhai/edx-platform,kmoocdev/edx-platform,etzhou/edx-platform,jelugbo/tundex,iivic/BoiseStateX,msegado/edx-platform,angelapper/edx-platform,jolyonb/edx-platform,zofuthan/edx-platform,itsjeyd/edx-platform,rhndg/openedx,chudaol/edx-platform,mtlchun/edx,ESOedX/edx-platform,xuxiao19910803/edx-platform,jamiefolsom/edx-platform,CourseTalk/edx-platform,rue89-tech/edx-platform,ZLLab-Mooc/edx-platform,jazztpt/edx-platform,UXE/local-edx,Semi-global/edx-platform,unicri/edx-platform,raccoongang/edx-platform,polimediaupv/edx-platform,MSOpenTech/edx-platform,Kalyzee/edx-platform,jbassen/edx-platform,pomegranited/edx-platform,arifsetiawan/edx-platform,Softmotions/edx-platform,IndonesiaX/edx-platform,ovnicraft/edx-platform,SivilTaram/edx-platform,longmen21/edx-platform,jamiefolsom/edx-platform,hmcmooc/muddx-platform,ubc/edx-platform,valtech-mooc/edx-platform,JCBarahona/edX,halvertoluke/edx-platform,jswope00/griffinx,DefyVentures/edx-platform,kmoocdev/edx-platform,zerobatu/edx-platform,Stanford-Online/edx-platform,cecep-edu/edx-platform,utecuy/edx-platform,Edraak/edraak-platform,nanolearningllc/edx-platform-cypress-2,defance/edx-platform,pku9104038/edx-platform,jswope00/GAI,stvstnfrd/edx-platform,chand3040/cloud_that,OmarIthawi/edx-platform,openfun/edx-platform,playm2mboy/edx-platform,adoosii/edx-platform,ampax/edx-platform-backup,olexiim/edx-platform,don-github/edx-platform,DefyVentures/edx-platform,appliedx/edx-platform,edry/edx-platform,dsajkl/reqiop,fintech-circle/edx-platform,martynovp/edx-platform,angelapper/edx-platform,SivilTaram/edx-platform,leansoft/edx-platform,edx/edx-platform,hkawasaki/kawasaki-aio8-1,doganov/edx-platform,ak2703/edx-platform,pomegranited/edx-platform,philanthropy-u/edx-platform,pomegranited/edx-platform,hamzehd/edx-platform,jbassen/edx-platform,dsajkl/123,franosincic/edx-platform,tanmaykm/edx-platform,hmcmooc/muddx-platform,mcgachey/edx-platform,SravanthiSinha/edx-platform,gsehub/edx-platform,louyihua/edx-platform,eemirtekin/edx-platform,sudheerchintala/LearnEraPlatForm,ampax/edx-platform-backup,bdero/edx-platform,xinjiguaike/edx-platform,jolyonb/edx-platform,nttks/jenkins-test,J861449197/edx-platform,jjmiranda/edx-platform,Shrhawk/edx-platform,jonathan-beard/edx-platform,antonve/s4-project-mooc,hamzehd/edx-platform,antoviaque/edx-platform,RPI-OPENEDX/edx-platform,solashirai/edx-platform,chauhanhardik/populo_2,jbzdak/edx-platform,nttks/edx-platform,ESOedX/edx-platform,EDUlib/edx-platform,edx-solutions/edx-platform,jamesblunt/edx-platform,xingyepei/edx-platform,mcgachey/edx-platform,kmoocdev2/edx-platform,dcosentino/edx-platform,rue89-tech/edx-platform,xuxiao19910803/edx,ampax/edx-platform,4eek/edx-platform,ahmadiga/min_edx,deepsrijit1105/edx-platform,jolyonb/edx-platform,unicri/edx-platform,ubc/edx-platform,rismalrv/edx-platform,MakeHer/edx-platform,motion2015/edx-platform,CredoReference/edx-platform,solashirai/edx-platform,jbzdak/edx-platform,Livit/Livit.Learn.EdX,RPI-OPENEDX/edx-platform,eduNEXT/edx-platform,hkawasaki/kawasaki-aio8-1,kmoocdev/edx-platform,devs1991/test_edx_docmode,Softmotions/edx-platform,morenopc/edx-platform,beni55/edx-platform,J861449197/edx-platform,jolyonb/edx-platform,itsjeyd/edx-platform,morenopc/edx-platform,shubhdev/edxOnBaadal,jazkarta/edx-platform,dkarakats/edx-platform,simbs/edx-platform,Lektorium-LLC/edx-platform,zadgroup/edx-platform,TeachAtTUM/edx-platform,RPI-OPENEDX/edx-platform,sameetb-cuelogic/edx-platform-test,nagyistoce/edx-platform,kursitet/edx-platform,jswope00/GAI,unicri/edx-platform,nikolas/edx-platform,Softmotions/edx-platform,LICEF/edx-platform,cognitiveclass/edx-platform,atsolakid/edx-platform,MSOpenTech/edx-platform,ahmadio/edx-platform,bitifirefly/edx-platform,carsongee/edx-platform,beacloudgenius/edx-platform,ak2703/edx-platform,defance/edx-platform,pepeportela/edx-platform,amir-qayyum-khan/edx-platform,JCBarahona/edX,carsongee/edx-platform,rhndg/openedx,gymnasium/edx-platform,beacloudgenius/edx-platform,kxliugang/edx-platform,longmen21/edx-platform,4eek/edx-platform,bitifirefly/edx-platform,mbareta/edx-platform-ft,ferabra/edx-platform,doganov/edx-platform,jonathan-beard/edx-platform,abdoosh00/edraak,vikas1885/test1,cecep-edu/edx-platform,franosincic/edx-platform,beni55/edx-platform,cpennington/edx-platform,Semi-global/edx-platform,B-MOOC/edx-platform,angelapper/edx-platform,ak2703/edx-platform,MakeHer/edx-platform,utecuy/edx-platform,zadgroup/edx-platform,jbzdak/edx-platform,olexiim/edx-platform,adoosii/edx-platform,cselis86/edx-platform,deepsrijit1105/edx-platform,bdero/edx-platform,angelapper/edx-platform,knehez/edx-platform,xingyepei/edx-platform,mbareta/edx-platform-ft,shubhdev/edx-platform,fly19890211/edx-platform,shashank971/edx-platform,xuxiao19910803/edx,edx/edx-platform,caesar2164/edx-platform,simbs/edx-platform,mahendra-r/edx-platform,Edraak/circleci-edx-platform,lduarte1991/edx-platform,jswope00/GAI,B-MOOC/edx-platform,chand3040/cloud_that,valtech-mooc/edx-platform,amir-qayyum-khan/edx-platform,B-MOOC/edx-platform,martynovp/edx-platform,vasyarv/edx-platform,zerobatu/edx-platform,jzoldak/edx-platform,mitocw/edx-platform,alexthered/kienhoc-platform,lduarte1991/edx-platform,motion2015/a3,alexthered/kienhoc-platform,BehavioralInsightsTeam/edx-platform,edx-solutions/edx-platform,shurihell/testasia,wwj718/ANALYSE,mtlchun/edx,philanthropy-u/edx-platform,olexiim/edx-platform,tiagochiavericosta/edx-platform,jelugbo/tundex,IONISx/edx-platform,mtlchun/edx,doismellburning/edx-platform,xinjiguaike/edx-platform,eemirtekin/edx-platform,vasyarv/edx-platform,MSOpenTech/edx-platform,Livit/Livit.Learn.EdX,knehez/edx-platform,bdero/edx-platform,raccoongang/edx-platform,mcgachey/edx-platform,shashank971/edx-platform,jzoldak/edx-platform,EDUlib/edx-platform,dkarakats/edx-platform,ZLLab-Mooc/edx-platform,itsjeyd/edx-platform,shabab12/edx-platform,J861449197/edx-platform,antonve/s4-project-mooc,jamesblunt/edx-platform,hmcmooc/muddx-platform,gymnasium/edx-platform,zubair-arbi/edx-platform,doismellburning/edx-platform,xuxiao19910803/edx-platform,appsembler/edx-platform,kamalx/edx-platform,zubair-arbi/edx-platform,LearnEra/LearnEraPlaftform,mcgachey/edx-platform,edry/edx-platform,shubhdev/openedx,JioEducation/edx-platform,solashirai/edx-platform,nanolearningllc/edx-platform-cypress,jruiperezv/ANALYSE,halvertoluke/edx-platform,analyseuc3m/ANALYSE-v1,arifsetiawan/edx-platform,appsembler/edx-platform,lduarte1991/edx-platform,Stanford-Online/edx-platform,ovnicraft/edx-platform,vismartltd/edx-platform,nagyistoce/edx-platform,LICEF/edx-platform,Lektorium-LLC/edx-platform,chauhanhardik/populo,chand3040/cloud_that,chrisndodge/edx-platform,cyanna/edx-platform,benpatterson/edx-platform,franosincic/edx-platform,Ayub-Khan/edx-platform,cselis86/edx-platform,mtlchun/edx,Lektorium-LLC/edx-platform,CredoReference/edx-platform,dcosentino/edx-platform,cognitiveclass/edx-platform,bigdatauniversity/edx-platform,JCBarahona/edX,jazztpt/edx-platform,antonve/s4-project-mooc,Edraak/edx-platform,shashank971/edx-platform,nanolearning/edx-platform,nanolearning/edx-platform,rue89-tech/edx-platform,miptliot/edx-platform,jonathan-beard/edx-platform,beni55/edx-platform,edx/edx-platform,devs1991/test_edx_docmode,nttks/edx-platform,dsajkl/reqiop,proversity-org/edx-platform,devs1991/test_edx_docmode,yokose-ks/edx-platform,antonve/s4-project-mooc,arbrandes/edx-platform,mahendra-r/edx-platform,y12uc231/edx-platform,zofuthan/edx-platform,sudheerchintala/LearnEraPlatForm,Ayub-Khan/edx-platform,ferabra/edx-platform,halvertoluke/edx-platform,beacloudgenius/edx-platform,inares/edx-platform,olexiim/edx-platform,beacloudgenius/edx-platform,hkawasaki/kawasaki-aio8-1,B-MOOC/edx-platform,vasyarv/edx-platform,wwj718/ANALYSE,arbrandes/edx-platform,4eek/edx-platform,WatanabeYasumasa/edx-platform,waheedahmed/edx-platform,ahmadio/edx-platform,a-parhom/edx-platform,valtech-mooc/edx-platform,eemirtekin/edx-platform,jruiperezv/ANALYSE,eduNEXT/edunext-platform,eduNEXT/edx-platform,bitifirefly/edx-platform,don-github/edx-platform,nttks/edx-platform,a-parhom/edx-platform,mjirayu/sit_academy,rismalrv/edx-platform,etzhou/edx-platform,inares/edx-platform,teltek/edx-platform,chauhanhardik/populo,kxliugang/edx-platform,IndonesiaX/edx-platform,jruiperezv/ANALYSE,shubhdev/edx-platform,Lektorium-LLC/edx-platform,ubc/edx-platform,ZLLab-Mooc/edx-platform,tanmaykm/edx-platform,jruiperezv/ANALYSE,devs1991/test_edx_docmode,jbzdak/edx-platform,rue89-tech/edx-platform,edx-solutions/edx-platform,doganov/edx-platform,edry/edx-platform,jamiefolsom/edx-platform,pabloborrego93/edx-platform,chrisndodge/edx-platform,SravanthiSinha/edx-platform,antonve/s4-project-mooc,proversity-org/edx-platform,jelugbo/tundex,auferack08/edx-platform,synergeticsedx/deployment-wipro,arifsetiawan/edx-platform,cselis86/edx-platform,marcore/edx-platform,jamesblunt/edx-platform,SravanthiSinha/edx-platform,hkawasaki/kawasaki-aio8-0,shurihell/testasia,UXE/local-edx,LearnEra/LearnEraPlaftform,LearnEra/LearnEraPlaftform,naresh21/synergetics-edx-platform,xinjiguaike/edx-platform,jazkarta/edx-platform,vismartltd/edx-platform,msegado/edx-platform,nikolas/edx-platform,jazkarta/edx-platform-for-isc,torchingloom/edx-platform,olexiim/edx-platform,wwj718/edx-platform,jazkarta/edx-platform,peterm-itr/edx-platform,louyihua/edx-platform,xinjiguaike/edx-platform,fly19890211/edx-platform,pepeportela/edx-platform,MakeHer/edx-platform,Edraak/edx-platform,yokose-ks/edx-platform,etzhou/edx-platform,BehavioralInsightsTeam/edx-platform,Endika/edx-platform,utecuy/edx-platform,waheedahmed/edx-platform,don-github/edx-platform,auferack08/edx-platform,hamzehd/edx-platform,utecuy/edx-platform,jbassen/edx-platform,chauhanhardik/populo,kamalx/edx-platform,atsolakid/edx-platform,bitifirefly/edx-platform,kursitet/edx-platform,chrisndodge/edx-platform,Shrhawk/edx-platform,UXE/local-edx,Unow/edx-platform,Endika/edx-platform,valtech-mooc/edx-platform,bigdatauniversity/edx-platform,eemirtekin/edx-platform,jamiefolsom/edx-platform,MakeHer/edx-platform,Ayub-Khan/edx-platform,jjmiranda/edx-platform,kxliugang/edx-platform,SravanthiSinha/edx-platform,10clouds/edx-platform,y12uc231/edx-platform,ZLLab-Mooc/edx-platform,ahmadiga/min_edx,Kalyzee/edx-platform,sameetb-cuelogic/edx-platform-test,ampax/edx-platform-backup,miptliot/edx-platform,jzoldak/edx-platform,cpennington/edx-platform,hastexo/edx-platform,ahmedaljazzar/edx-platform,eduNEXT/edunext-platform,don-github/edx-platform,arbrandes/edx-platform,10clouds/edx-platform,DefyVentures/edx-platform,yokose-ks/edx-platform,unicri/edx-platform,chudaol/edx-platform,chand3040/cloud_that,10clouds/edx-platform,eestay/edx-platform,jswope00/GAI,etzhou/edx-platform,zubair-arbi/edx-platform,analyseuc3m/ANALYSE-v1,morenopc/edx-platform,JCBarahona/edX,carsongee/edx-platform,kmoocdev/edx-platform,simbs/edx-platform,utecuy/edx-platform,deepsrijit1105/edx-platform,shabab12/edx-platform,yokose-ks/edx-platform,jswope00/griffinx,lduarte1991/edx-platform,romain-li/edx-platform,wwj718/edx-platform,zadgroup/edx-platform,fly19890211/edx-platform,Edraak/edx-platform,Edraak/edx-platform,WatanabeYasumasa/edx-platform,sameetb-cuelogic/edx-platform-test,jazkarta/edx-platform-for-isc,arbrandes/edx-platform,prarthitm/edxplatform,mushtaqak/edx-platform,CourseTalk/edx-platform,bdero/edx-platform,kmoocdev2/edx-platform,IONISx/edx-platform,cpennington/edx-platform,cyanna/edx-platform,4eek/edx-platform,polimediaupv/edx-platform,adoosii/edx-platform,nanolearningllc/edx-platform-cypress,amir-qayyum-khan/edx-platform,devs1991/test_edx_docmode,UOMx/edx-platform,torchingloom/edx-platform,bigdatauniversity/edx-platform,andyzsf/edx,stvstnfrd/edx-platform,antoviaque/edx-platform,edx-solutions/edx-platform,andyzsf/edx,Shrhawk/edx-platform,dkarakats/edx-platform,ferabra/edx-platform,motion2015/a3,iivic/BoiseStateX,eemirtekin/edx-platform,teltek/edx-platform,WatanabeYasumasa/edx-platform,Endika/edx-platform,franosincic/edx-platform,romain-li/edx-platform,chauhanhardik/populo_2,mjirayu/sit_academy,ak2703/edx-platform,kmoocdev2/edx-platform,gsehub/edx-platform,halvertoluke/edx-platform,LICEF/edx-platform,fintech-circle/edx-platform,SivilTaram/edx-platform,Unow/edx-platform,waheedahmed/edx-platform,kxliugang/edx-platform,jjmiranda/edx-platform,benpatterson/edx-platform,Endika/edx-platform,nttks/edx-platform,teltek/edx-platform,xuxiao19910803/edx,peterm-itr/edx-platform,nttks/edx-platform,jazkarta/edx-platform,caesar2164/edx-platform,torchingloom/edx-platform,CredoReference/edx-platform,dsajkl/123,edry/edx-platform,Edraak/circleci-edx-platform,shubhdev/edxOnBaadal,iivic/BoiseStateX,chauhanhardik/populo_2,raccoongang/edx-platform,y12uc231/edx-platform,nttks/jenkins-test,pabloborrego93/edx-platform,playm2mboy/edx-platform,AkA84/edx-platform,nanolearning/edx-platform,xingyepei/edx-platform,martynovp/edx-platform,sudheerchintala/LearnEraPlatForm,mitocw/edx-platform,ferabra/edx-platform,Softmotions/edx-platform,zerobatu/edx-platform,DefyVentures/edx-platform,iivic/BoiseStateX,CredoReference/edx-platform,eduNEXT/edx-platform,doismellburning/edx-platform,shubhdev/openedx,DNFcode/edx-platform,waheedahmed/edx-platform,shurihell/testasia,y12uc231/edx-platform,dsajkl/123,gymnasium/edx-platform,eestay/edx-platform,dsajkl/reqiop,raccoongang/edx-platform,alexthered/kienhoc-platform,chauhanhardik/populo,Unow/edx-platform,kursitet/edx-platform,kmoocdev/edx-platform,ahmedaljazzar/edx-platform,philanthropy-u/edx-platform,hmcmooc/muddx-platform,dcosentino/edx-platform,auferack08/edx-platform,nikolas/edx-platform,adoosii/edx-platform,ubc/edx-platform,auferack08/edx-platform,MSOpenTech/edx-platform,mushtaqak/edx-platform,eduNEXT/edx-platform,MSOpenTech/edx-platform,Edraak/edraak-platform,zubair-arbi/edx-platform,motion2015/edx-platform,vismartltd/edx-platform,carsongee/edx-platform,mjirayu/sit_academy,TeachAtTUM/edx-platform,JCBarahona/edX,rue89-tech/edx-platform,ESOedX/edx-platform,shubhdev/edx-platform,Unow/edx-platform,nanolearningllc/edx-platform-cypress-2,cpennington/edx-platform,pku9104038/edx-platform,eduNEXT/edunext-platform,shubhdev/edx-platform,philanthropy-u/edx-platform,hastexo/edx-platform,motion2015/edx-platform,jbassen/edx-platform,longmen21/edx-platform,Edraak/edraak-platform,rismalrv/edx-platform,MakeHer/edx-platform,xingyepei/edx-platform,jamesblunt/edx-platform,RPI-OPENEDX/edx-platform,zhenzhai/edx-platform,zubair-arbi/edx-platform,pepeportela/edx-platform,nagyistoce/edx-platform,benpatterson/edx-platform,vismartltd/edx-platform,Semi-global/edx-platform,jazkarta/edx-platform-for-isc,DNFcode/edx-platform,procangroup/edx-platform,ahmadio/edx-platform,naresh21/synergetics-edx-platform,IONISx/edx-platform,torchingloom/edx-platform,leansoft/edx-platform,shashank971/edx-platform,msegado/edx-platform,longmen21/edx-platform,zofuthan/edx-platform,appsembler/edx-platform,AkA84/edx-platform,IndonesiaX/edx-platform,dkarakats/edx-platform,IndonesiaX/edx-platform,DNFcode/edx-platform,eestay/edx-platform,nanolearningllc/edx-platform-cypress,pabloborrego93/edx-platform,motion2015/a3,tiagochiavericosta/edx-platform,Semi-global/edx-platform,louyihua/edx-platform,knehez/edx-platform,wwj718/edx-platform,JioEducation/edx-platform,pomegranited/edx-platform,cselis86/edx-platform,nttks/jenkins-test,mtlchun/edx,jazkarta/edx-platform-for-isc,jbzdak/edx-platform,Livit/Livit.Learn.EdX,bigdatauniversity/edx-platform,pepeportela/edx-platform,wwj718/ANALYSE,DNFcode/edx-platform,rhndg/openedx,hastexo/edx-platform
|
python
|
## Code Before:
import ConfigParser
from django.conf import settings
def doc_url(request):
config_file = open(settings.REPO_ROOT / "docs" / "config.ini")
config = ConfigParser.ConfigParser()
config.readfp(config_file)
# in the future, we will detect the locale; for now, we will
# hardcode en_us, since we only have English documentation
locale = "en_us"
def get_doc_url(token):
try:
return config.get(locale, token)
except ConfigParser.NoOptionError:
return config.get(locale, "default")
return {"doc_url": get_doc_url}
## Instruction:
Read from doc url mapping file at load time, rather than once per request
## Code After:
import ConfigParser
from django.conf import settings
config_file = open(settings.REPO_ROOT / "docs" / "config.ini")
config = ConfigParser.ConfigParser()
config.readfp(config_file)
def doc_url(request):
# in the future, we will detect the locale; for now, we will
# hardcode en_us, since we only have English documentation
locale = "en_us"
def get_doc_url(token):
try:
return config.get(locale, token)
except ConfigParser.NoOptionError:
return config.get(locale, "default")
return {"doc_url": get_doc_url}
|
01acebb804d9f9e19fa6052f8cceac2a8c627933
|
.travis.yml
|
.travis.yml
|
language: android
# Specify jdk to run lambda expression
jdk: oraclejdk8
env:
global:
- ANDROID_TARGET=android-23
- ANDROID_ABI=armeabi-v7a
android:
components:
- build-tools-23.0.2
- android-23
# Google repositories
- extra-android-m2repository
- extra-google-m2repository
- extra-android-support
# - extra-google-google_play_services
# Ressource(s) to run emulator during test
- sys-img-armeabi-v7a-android-23
# Build
script:
- ./gradlew assembleAndroidTest
# Sync Slack
notifications:
slack: assogenda:m88NLRiY4UxkgThbI1ONxdFr
|
language: android
# Specify jdk to run lambda expression
jdk: oraclejdk8
env:
global:
- ANDROID_TARGET=android-23
- ANDROID_ABI=armeabi-v7a
android:
components:
- build-tools-23.0.2
- android-23
# Google repositories
- extra-android-m2repository
- extra-google-m2repository
- extra-android-support
# - extra-google-google_play_services
# Ressource(s) to run emulator during test
- sys-img-armeabi-v7a-android-23
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
# Build
script:
- ./gradlew assembleAndroidTest
# Sync Slack
notifications:
slack: assogenda:m88NLRiY4UxkgThbI1ONxdFr
|
Add android and google licenses
|
Add android and google licenses
|
YAML
|
apache-2.0
|
Bouquet2/AssoGenda
|
yaml
|
## Code Before:
language: android
# Specify jdk to run lambda expression
jdk: oraclejdk8
env:
global:
- ANDROID_TARGET=android-23
- ANDROID_ABI=armeabi-v7a
android:
components:
- build-tools-23.0.2
- android-23
# Google repositories
- extra-android-m2repository
- extra-google-m2repository
- extra-android-support
# - extra-google-google_play_services
# Ressource(s) to run emulator during test
- sys-img-armeabi-v7a-android-23
# Build
script:
- ./gradlew assembleAndroidTest
# Sync Slack
notifications:
slack: assogenda:m88NLRiY4UxkgThbI1ONxdFr
## Instruction:
Add android and google licenses
## Code After:
language: android
# Specify jdk to run lambda expression
jdk: oraclejdk8
env:
global:
- ANDROID_TARGET=android-23
- ANDROID_ABI=armeabi-v7a
android:
components:
- build-tools-23.0.2
- android-23
# Google repositories
- extra-android-m2repository
- extra-google-m2repository
- extra-android-support
# - extra-google-google_play_services
# Ressource(s) to run emulator during test
- sys-img-armeabi-v7a-android-23
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
# Build
script:
- ./gradlew assembleAndroidTest
# Sync Slack
notifications:
slack: assogenda:m88NLRiY4UxkgThbI1ONxdFr
|
123c0bd6ca8ff8d510b7468a4e5915bbb8629789
|
_posts/2015-04-06-expired_SSL_certificate.md
|
_posts/2015-04-06-expired_SSL_certificate.md
|
---
layout: post
title: Expired SSL certificate
---
Oops! We forgot to update our SSL certificate before it expired. This means you will get a warning in your web browser when you try to access our wiki or forum.
We are working on getting a new SSL certificate - please bear with us.
Until then, if you use Firefox you can try a 'private window' which may allow you to add an exception to ignore the expired certificate. You could also try a different web browser, as different browsers treat the issue in different ways.
Kind regards,
Philip Müller, Manjaro Development Team
|
---
layout: post
title: Expired SSL certificate
---
Oops! We didn't update our SSL certificate before it expired. This means you will get a warning in your web browser when you try to access our wiki or forum.
We are working on getting a new SSL certificate - please bear with us. We are waiting on the issuer (GlobalSign) to repond.
Until then, if you use Firefox you can try a 'private window' which may allow you to add an exception to ignore the expired certificate. You could also try a different web browser, as different browsers treat the issue in different ways.
Kind regards,
Philip Müller, Manjaro Development Team
|
Remove 'forgot' as we did remember; GlobalSign were tardy.
|
Remove 'forgot' as we did remember; GlobalSign were tardy.
|
Markdown
|
mit
|
bgiesing/manjaro.github.io,chinacivilsocietywatch/chinacivilsocietywatch.github.io,fingli/manjaro.github.io,manjaro/manjaro.github.io,Acidburn0zzz/manjaro.github.io
|
markdown
|
## Code Before:
---
layout: post
title: Expired SSL certificate
---
Oops! We forgot to update our SSL certificate before it expired. This means you will get a warning in your web browser when you try to access our wiki or forum.
We are working on getting a new SSL certificate - please bear with us.
Until then, if you use Firefox you can try a 'private window' which may allow you to add an exception to ignore the expired certificate. You could also try a different web browser, as different browsers treat the issue in different ways.
Kind regards,
Philip Müller, Manjaro Development Team
## Instruction:
Remove 'forgot' as we did remember; GlobalSign were tardy.
## Code After:
---
layout: post
title: Expired SSL certificate
---
Oops! We didn't update our SSL certificate before it expired. This means you will get a warning in your web browser when you try to access our wiki or forum.
We are working on getting a new SSL certificate - please bear with us. We are waiting on the issuer (GlobalSign) to repond.
Until then, if you use Firefox you can try a 'private window' which may allow you to add an exception to ignore the expired certificate. You could also try a different web browser, as different browsers treat the issue in different ways.
Kind regards,
Philip Müller, Manjaro Development Team
|
5bde1316213584d9c82f409ceb643a9bd53f44ca
|
lightControler/startControlers.sh
|
lightControler/startControlers.sh
|
echo "Starting controlers script"
serverAddr=""
serverPort=""
[[ $# -eq 0 ]] && echo "Missing parameter, usage: $0 numberOfCtrl [serverAddr] [serverPort]" && exit 1;
[[ $# -gt 1 ]] && serverAddr=$2
[[ $# -gt 2 ]] && serverPort=$3
declare -a processes
for ((i = 1; i <= $1; i++)); do
./controler "ctrl$i" $serverAddr $serverPort &
processes+=($!)
done
echo "All controlers started."
while true ; do
echo "$PS2"
read cmd
case "$cmd" in
"w" | "walker")
kill -10 ${processes[0]}
;;
"p" | "ping")
# send SIGUSR2 to all processes
kill -12 ${processes[@]}
;;
"s" | "stop")
break
;;
esac
done
echo "Killing all processes..."
kill ${processes[@]}
echo "Done. Bye."
|
echo "Starting controlers script"
serverAddr=""
serverPort=""
[[ $# -eq 0 ]] && echo "Missing parameter, usage: $0 numberOfCtrl [serverAddr] [serverPort]" && exit 1;
[[ $# -gt 1 ]] && serverAddr=$2
[[ $# -gt 2 ]] && serverPort=$3
declare -a processes
kill_processes(){
echo "Killing all processes..."
kill ${processes[@]}
echo "Done. Bye."
}
handle_sigint(){
kill_processes
exit 0
}
trap handle_sigint SIGINT
for ((i = 1; i <= $1; i++)); do
./controler "ctrl$i" $serverAddr $serverPort &
processes+=($!)
done
echo "All controlers started."
while true ; do
echo "$PS2"
read cmd
case "$cmd" in
"w" | "walker")
kill -10 ${processes[0]}
;;
"p" | "ping")
# send SIGUSR2 to all processes
kill -12 ${processes[@]}
;;
"s" | "stop")
break
;;
esac
done
kill_processes
|
Fix script to handle SIGINT
|
Fix script to handle SIGINT
|
Shell
|
mit
|
Justewi/CentralTrafficLightManagement,Justewi/CentralTrafficLightManagement,Justewi/CentralTrafficLightManagement,Justewi/CentralTrafficLightManagement
|
shell
|
## Code Before:
echo "Starting controlers script"
serverAddr=""
serverPort=""
[[ $# -eq 0 ]] && echo "Missing parameter, usage: $0 numberOfCtrl [serverAddr] [serverPort]" && exit 1;
[[ $# -gt 1 ]] && serverAddr=$2
[[ $# -gt 2 ]] && serverPort=$3
declare -a processes
for ((i = 1; i <= $1; i++)); do
./controler "ctrl$i" $serverAddr $serverPort &
processes+=($!)
done
echo "All controlers started."
while true ; do
echo "$PS2"
read cmd
case "$cmd" in
"w" | "walker")
kill -10 ${processes[0]}
;;
"p" | "ping")
# send SIGUSR2 to all processes
kill -12 ${processes[@]}
;;
"s" | "stop")
break
;;
esac
done
echo "Killing all processes..."
kill ${processes[@]}
echo "Done. Bye."
## Instruction:
Fix script to handle SIGINT
## Code After:
echo "Starting controlers script"
serverAddr=""
serverPort=""
[[ $# -eq 0 ]] && echo "Missing parameter, usage: $0 numberOfCtrl [serverAddr] [serverPort]" && exit 1;
[[ $# -gt 1 ]] && serverAddr=$2
[[ $# -gt 2 ]] && serverPort=$3
declare -a processes
kill_processes(){
echo "Killing all processes..."
kill ${processes[@]}
echo "Done. Bye."
}
handle_sigint(){
kill_processes
exit 0
}
trap handle_sigint SIGINT
for ((i = 1; i <= $1; i++)); do
./controler "ctrl$i" $serverAddr $serverPort &
processes+=($!)
done
echo "All controlers started."
while true ; do
echo "$PS2"
read cmd
case "$cmd" in
"w" | "walker")
kill -10 ${processes[0]}
;;
"p" | "ping")
# send SIGUSR2 to all processes
kill -12 ${processes[@]}
;;
"s" | "stop")
break
;;
esac
done
kill_processes
|
28f41b62c65c867fe26e4ff6b77c7b3da2311cf6
|
commons/src/main/scala/kantan/csv/engine/commons/package.scala
|
commons/src/main/scala/kantan/csv/engine/commons/package.scala
|
/*
* Copyright 2017 Nicolas Rinaudo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kantan.csv.engine
import java.io.{Reader, Writer}
import kantan.codecs.resource.ResourceIterator
import kantan.csv._
import org.apache.commons.csv.{CSVFormat, CSVPrinter, QuoteMode}
import scala.collection.JavaConverters._
package object commons {
def format(sep: Char): CSVFormat = CSVFormat.RFC4180.withDelimiter(sep)
implicit val reader = ReaderEngine { (reader: Reader, sep: Char) ⇒
ResourceIterator.fromIterator(format(sep).parse(reader).iterator.asScala.map(CsvSeq.apply))
}
implicit val writer = WriterEngine { (writer: Writer, sep: Char) ⇒
CsvWriter(new CSVPrinter(writer, format(sep).withQuoteMode(QuoteMode.MINIMAL))) { (csv, ss) ⇒
csv.printRecord(ss.asJava)
}(_.close())
}
}
|
/*
* Copyright 2017 Nicolas Rinaudo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kantan.csv.engine
import kantan.codecs.resource.ResourceIterator
import kantan.csv._
import org.apache.commons.csv.{CSVFormat, CSVPrinter, QuoteMode}
import scala.collection.JavaConverters._
package object commons {
def defaultFormat(sep: Char): CSVFormat = CSVFormat.RFC4180.withDelimiter(sep)
def readerFrom(f: Char ⇒ CSVFormat): ReaderEngine = ReaderEngine { (r, s) ⇒
ResourceIterator.fromIterator(f(s).parse(r).iterator.asScala.map(CsvSeq.apply))
}
implicit val reader: ReaderEngine = readerFrom(defaultFormat)
def writerFrom(f: Char ⇒ CSVFormat): WriterEngine = WriterEngine { (w, s) ⇒
CsvWriter(new CSVPrinter(w, f(s).withQuoteMode(QuoteMode.MINIMAL))) { (csv, ss) ⇒
csv.printRecord(ss.asJava)
}(_.close())
}
implicit val writer: WriterEngine = writerFrom(defaultFormat)
}
|
Make commons-csv much more configurable by exposing CSVFormat.
|
Make commons-csv much more configurable by exposing CSVFormat.
|
Scala
|
mit
|
nrinaudo/scala-csv,nrinaudo/tabulate
|
scala
|
## Code Before:
/*
* Copyright 2017 Nicolas Rinaudo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kantan.csv.engine
import java.io.{Reader, Writer}
import kantan.codecs.resource.ResourceIterator
import kantan.csv._
import org.apache.commons.csv.{CSVFormat, CSVPrinter, QuoteMode}
import scala.collection.JavaConverters._
package object commons {
def format(sep: Char): CSVFormat = CSVFormat.RFC4180.withDelimiter(sep)
implicit val reader = ReaderEngine { (reader: Reader, sep: Char) ⇒
ResourceIterator.fromIterator(format(sep).parse(reader).iterator.asScala.map(CsvSeq.apply))
}
implicit val writer = WriterEngine { (writer: Writer, sep: Char) ⇒
CsvWriter(new CSVPrinter(writer, format(sep).withQuoteMode(QuoteMode.MINIMAL))) { (csv, ss) ⇒
csv.printRecord(ss.asJava)
}(_.close())
}
}
## Instruction:
Make commons-csv much more configurable by exposing CSVFormat.
## Code After:
/*
* Copyright 2017 Nicolas Rinaudo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kantan.csv.engine
import kantan.codecs.resource.ResourceIterator
import kantan.csv._
import org.apache.commons.csv.{CSVFormat, CSVPrinter, QuoteMode}
import scala.collection.JavaConverters._
package object commons {
def defaultFormat(sep: Char): CSVFormat = CSVFormat.RFC4180.withDelimiter(sep)
def readerFrom(f: Char ⇒ CSVFormat): ReaderEngine = ReaderEngine { (r, s) ⇒
ResourceIterator.fromIterator(f(s).parse(r).iterator.asScala.map(CsvSeq.apply))
}
implicit val reader: ReaderEngine = readerFrom(defaultFormat)
def writerFrom(f: Char ⇒ CSVFormat): WriterEngine = WriterEngine { (w, s) ⇒
CsvWriter(new CSVPrinter(w, f(s).withQuoteMode(QuoteMode.MINIMAL))) { (csv, ss) ⇒
csv.printRecord(ss.asJava)
}(_.close())
}
implicit val writer: WriterEngine = writerFrom(defaultFormat)
}
|
13c39cb5100567bf8a504100cc6e16b6b3289d26
|
integration/helpers/fake_data.go
|
integration/helpers/fake_data.go
|
package helpers
import (
"fmt"
"io/ioutil"
"net/http"
"os"
"path/filepath"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/ghttp"
)
func AddFiftyOneOrgs(server *ghttp.Server) {
AddHandler(server,
http.MethodGet,
"/v3/organizations",
http.StatusOK,
[]byte(fmt.Sprintf(string(fixtureData("fifty-orgs-page-1.json")), server.URL())),
)
AddHandler(server,
http.MethodGet,
"/v3/organizations?page=2&per_page=50",
http.StatusOK,
fixtureData("fifty-orgs-page-2.json"),
)
}
func fixtureData(name string) []byte {
wd := os.Getenv("GOPATH")
fp := filepath.Join(wd, "src", "code.cloudfoundry.org", "cli", "integration", "helpers", "fixtures", name)
b, err := ioutil.ReadFile(fp)
Expect(err).ToNot(HaveOccurred())
return b
}
|
package helpers
import (
"fmt"
"io/ioutil"
"net/http"
"os"
"path/filepath"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/ghttp"
)
func AddFiftyOneOrgs(server *ghttp.Server) {
AddHandler(server,
http.MethodGet,
"/v3/organizations?order_by=name",
http.StatusOK,
[]byte(fmt.Sprintf(string(fixtureData("fifty-orgs-page-1.json")), server.URL())),
)
AddHandler(server,
http.MethodGet,
"/v3/organizations?page=2&per_page=50",
http.StatusOK,
fixtureData("fifty-orgs-page-2.json"),
)
}
func fixtureData(name string) []byte {
wd := os.Getenv("GOPATH")
fp := filepath.Join(wd, "src", "code.cloudfoundry.org", "cli", "integration", "helpers", "fixtures", name)
b, err := ioutil.ReadFile(fp)
Expect(err).ToNot(HaveOccurred())
return b
}
|
Fix test server to expect order_by parameter
|
Fix test server to expect order_by parameter
[#163096814](https://www.pivotaltracker.com/story/show/163096814)
Co-authored-by: Alexander Berezovsky <[email protected]>
|
Go
|
apache-2.0
|
cloudfoundry/cli,cloudfoundry/cli,cloudfoundry/cli
|
go
|
## Code Before:
package helpers
import (
"fmt"
"io/ioutil"
"net/http"
"os"
"path/filepath"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/ghttp"
)
func AddFiftyOneOrgs(server *ghttp.Server) {
AddHandler(server,
http.MethodGet,
"/v3/organizations",
http.StatusOK,
[]byte(fmt.Sprintf(string(fixtureData("fifty-orgs-page-1.json")), server.URL())),
)
AddHandler(server,
http.MethodGet,
"/v3/organizations?page=2&per_page=50",
http.StatusOK,
fixtureData("fifty-orgs-page-2.json"),
)
}
func fixtureData(name string) []byte {
wd := os.Getenv("GOPATH")
fp := filepath.Join(wd, "src", "code.cloudfoundry.org", "cli", "integration", "helpers", "fixtures", name)
b, err := ioutil.ReadFile(fp)
Expect(err).ToNot(HaveOccurred())
return b
}
## Instruction:
Fix test server to expect order_by parameter
[#163096814](https://www.pivotaltracker.com/story/show/163096814)
Co-authored-by: Alexander Berezovsky <[email protected]>
## Code After:
package helpers
import (
"fmt"
"io/ioutil"
"net/http"
"os"
"path/filepath"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/ghttp"
)
func AddFiftyOneOrgs(server *ghttp.Server) {
AddHandler(server,
http.MethodGet,
"/v3/organizations?order_by=name",
http.StatusOK,
[]byte(fmt.Sprintf(string(fixtureData("fifty-orgs-page-1.json")), server.URL())),
)
AddHandler(server,
http.MethodGet,
"/v3/organizations?page=2&per_page=50",
http.StatusOK,
fixtureData("fifty-orgs-page-2.json"),
)
}
func fixtureData(name string) []byte {
wd := os.Getenv("GOPATH")
fp := filepath.Join(wd, "src", "code.cloudfoundry.org", "cli", "integration", "helpers", "fixtures", name)
b, err := ioutil.ReadFile(fp)
Expect(err).ToNot(HaveOccurred())
return b
}
|
205ec47f672f0a7e15028ca9cccb8a4fb11c604a
|
app/models/self_review_response_map.rb
|
app/models/self_review_response_map.rb
|
class SelfReviewResponseMap < ResponseMap
belongs_to :reviewee, class_name: 'Team', foreign_key: 'reviewee_id'
belongs_to :assignment, class_name: 'Assignment', foreign_key: 'reviewed_object_id'
# This method is used to get questionnaire for self-review to be performed by user
def questionnaire(round)
if self.assignment.varying_rubrics_by_round?
Questionnaire.find(self.assignment.review_questionnaire_id(round))
else
Questionnaire.find(self.assignment.review_questionnaire_id)
end
end
# This method helps to find contributor - here Team ID
def contributor
Team.find_by_id(self.reviewee_id)
end
# This method returns 'Title' of type of review (used to manipulate headings accordingly)
def get_title
"Self Review"
end
end
|
class SelfReviewResponseMap < ResponseMap
belongs_to :reviewee, class_name: 'Team', foreign_key: 'reviewee_id'
belongs_to :assignment, class_name: 'Assignment', foreign_key: 'reviewed_object_id'
# This method is used to get questionnaire for self-review to be performed by user
def questionnaire(round)
if self.assignment.varying_rubrics_by_round?
Questionnaire.find(self.assignment.review_questionnaire_id(round))
else
Questionnaire.find(self.assignment.review_questionnaire_id)
end
end
# This method helps to find contributor - here Team ID
def contributor
Team.find_by_id(self.reviewee_id)
end
# This method returns 'Title' of type of review (used to manipulate headings accordingly)
def get_title
"Self Review"
end
#do not send any reminder for self review received.
def email(defn, participant, assignment)
end
end
|
Fix E1639: do not send any reminder on receiving self review.
|
Fix E1639: do not send any reminder on receiving self review.
|
Ruby
|
mit
|
michaelamoran/expertiza,michaelamoran/expertiza,joshio1/expertiza,joshio1/expertiza,arpitashekhar/expertiza,expertiza/expertiza,redsock88/expertiza,sid5788/expertiza,expertiza/expertiza,rmmaily/expertiza,arpitashekhar/expertiza,ApertureScienceInnovators/expertiza,arpitashekhar/expertiza,joshio1/expertiza,ApertureScienceInnovators/expertiza,KunmiaoYang/expertiza,kira0992/expertiza,michaelamoran/expertiza,rmmaily/expertiza,urmilparikh95/expertiza,redsock88/expertiza,sid5788/expertiza,expertiza/expertiza,ApertureScienceInnovators/expertiza,kira0992/expertiza,expertiza/expertiza,mhhassan/expertiza,sid5788/expertiza,sid5788/expertiza,ApertureScienceInnovators/expertiza,mhhassan/expertiza,urmilparikh95/expertiza,michaelamoran/expertiza,mhhassan/expertiza,rmmaily/expertiza,KunmiaoYang/expertiza,akshayjain114/expertiza,kira0992/expertiza,mhhassan/expertiza,akshayjain114/expertiza,redsock88/expertiza,urmilparikh95/expertiza,KunmiaoYang/expertiza,joshio1/expertiza,urmilparikh95/expertiza,arpitashekhar/expertiza,KunmiaoYang/expertiza,rmmaily/expertiza,kira0992/expertiza,redsock88/expertiza,akshayjain114/expertiza,akshayjain114/expertiza
|
ruby
|
## Code Before:
class SelfReviewResponseMap < ResponseMap
belongs_to :reviewee, class_name: 'Team', foreign_key: 'reviewee_id'
belongs_to :assignment, class_name: 'Assignment', foreign_key: 'reviewed_object_id'
# This method is used to get questionnaire for self-review to be performed by user
def questionnaire(round)
if self.assignment.varying_rubrics_by_round?
Questionnaire.find(self.assignment.review_questionnaire_id(round))
else
Questionnaire.find(self.assignment.review_questionnaire_id)
end
end
# This method helps to find contributor - here Team ID
def contributor
Team.find_by_id(self.reviewee_id)
end
# This method returns 'Title' of type of review (used to manipulate headings accordingly)
def get_title
"Self Review"
end
end
## Instruction:
Fix E1639: do not send any reminder on receiving self review.
## Code After:
class SelfReviewResponseMap < ResponseMap
belongs_to :reviewee, class_name: 'Team', foreign_key: 'reviewee_id'
belongs_to :assignment, class_name: 'Assignment', foreign_key: 'reviewed_object_id'
# This method is used to get questionnaire for self-review to be performed by user
def questionnaire(round)
if self.assignment.varying_rubrics_by_round?
Questionnaire.find(self.assignment.review_questionnaire_id(round))
else
Questionnaire.find(self.assignment.review_questionnaire_id)
end
end
# This method helps to find contributor - here Team ID
def contributor
Team.find_by_id(self.reviewee_id)
end
# This method returns 'Title' of type of review (used to manipulate headings accordingly)
def get_title
"Self Review"
end
#do not send any reminder for self review received.
def email(defn, participant, assignment)
end
end
|
62f155918b9f32f5a6daaa8db1e3ed2a77c9d067
|
.travis.yml
|
.travis.yml
|
language: ruby
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- 2.0.0
- jruby-18mode
- rbx-18mode
deploy:
provider: rubygems
api_key:
secure: ZmZoDL1tilWvQrqRWDm2K4xQ5Grt9eRJzYVZPLANR0P1TM5BJBLk+UhWCWCPkkDVIBWMa5ANsiFYBxtH65Lw+uqMztSpVusk0l0LQXZGv9jMpT9445A8008U3vvfS0ke7IG8Q4bMAC7Sd6VGaiHDyZC7zmNvnqMpmVX7ShcgBME=
gem: dpl
on:
repo: rkh/dpl
ruby: 2.0.0
|
language: ruby
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- 2.0.0
- jruby-18mode
- rbx-18mode
deploy:
provider: rubygems
api_key:
secure: ZmZoDL1tilWvQrqRWDm2K4xQ5Grt9eRJzYVZPLANR0P1TM5BJBLk+UhWCWCPkkDVIBWMa5ANsiFYBxtH65Lw+uqMztSpVusk0l0LQXZGv9jMpT9445A8008U3vvfS0ke7IG8Q4bMAC7Sd6VGaiHDyZC7zmNvnqMpmVX7ShcgBME=
gem: dpl
on:
repo: rkh/dpl
|
Revert "release from ruby 2.0"
|
Revert "release from ruby 2.0"
This reverts commit 6ee59f2c22285ba43bc0fd19bd692e37999e5f61.
|
YAML
|
mit
|
WeConnect/dpl,LoicMahieu/dpl,bensojona/dpl,travis-ci/dpl,zabawaba99/dpl,Misfit-SW-China/dpl,georgantasp/dpl,testfairy/dpl,testfairy/dpl,travis-ci/dpl,jonathan-s/dpl,felixrieseberg/dpl,meatballhat/dpl,wtcross/dpl,johanneswuerbach/dpl,mathiasrw/dpl,Hearst-Hatchery/dpl,giltsl/travis-test,computology/dpl,gmegidish/dpl,nmohoric/dpl,axelfontaine/dpl,kalbasit/dpl,montaro/dpl,testfairy/dpl,STRd6/dpl,mattk42/dpl,goodeggs/dpl,sebest/dpl,clayreimann/dpl,jsloyer/dpl,ianblenke/dpl,travis-ci/dpl,tt/dpl,flowlo/dpl,Zyko0/dpl,timoschilling/dpl,jorihardman/dpl,pengsrc/dpl,adamjmcgrath/dpl
|
yaml
|
## Code Before:
language: ruby
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- 2.0.0
- jruby-18mode
- rbx-18mode
deploy:
provider: rubygems
api_key:
secure: ZmZoDL1tilWvQrqRWDm2K4xQ5Grt9eRJzYVZPLANR0P1TM5BJBLk+UhWCWCPkkDVIBWMa5ANsiFYBxtH65Lw+uqMztSpVusk0l0LQXZGv9jMpT9445A8008U3vvfS0ke7IG8Q4bMAC7Sd6VGaiHDyZC7zmNvnqMpmVX7ShcgBME=
gem: dpl
on:
repo: rkh/dpl
ruby: 2.0.0
## Instruction:
Revert "release from ruby 2.0"
This reverts commit 6ee59f2c22285ba43bc0fd19bd692e37999e5f61.
## Code After:
language: ruby
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- 2.0.0
- jruby-18mode
- rbx-18mode
deploy:
provider: rubygems
api_key:
secure: ZmZoDL1tilWvQrqRWDm2K4xQ5Grt9eRJzYVZPLANR0P1TM5BJBLk+UhWCWCPkkDVIBWMa5ANsiFYBxtH65Lw+uqMztSpVusk0l0LQXZGv9jMpT9445A8008U3vvfS0ke7IG8Q4bMAC7Sd6VGaiHDyZC7zmNvnqMpmVX7ShcgBME=
gem: dpl
on:
repo: rkh/dpl
|
9a23296a23dfd4c9fd067295dd82115d0e49d5b0
|
concrete/elements/attribute/key/header.php
|
concrete/elements/attribute/key/header.php
|
<?php
defined('C5_EXECUTE') or die("Access Denied.");
?>
<div style="display: none">
<div id="ccm-dialog-delete-attribute" class="ccm-ui">
<form method="post" action="<?= $deleteAction ?>">
<?=Core::make("token")->output('delete_attribute')?>
<input type="hidden" name="id" value="<?=$key->getAttributeKeyID()?>">
<p><?=t('Are you sure you want to delete this attribute? This cannot be undone.')?></p>
<div class="dialog-buttons">
<button class="btn btn-default pull-left" onclick="jQuery.fn.dialog.closeTop()"><?=t('Cancel')?></button>
<button class="btn btn-danger pull-right" onclick="$('#ccm-dialog-delete-attribute form').submit()"><?=t('Delete Attribute')?></button>
</div>
</form>
</div>
</div>
<button type="button" class="btn btn-danger" data-action="delete-attribute"><?= t('Delete Attribute') ?></button>
<script type="text/javascript">
$(function() {
$('button[data-action=delete-attribute]').on('click', function() {
var $element = $('#ccm-dialog-delete-attribute');
jQuery.fn.dialog.open({
element: $element,
modal: true,
width: 320,
title: '<?=t('Delete Attribute')?>',
height: 'auto'
});
});
});
</script>
|
<?php
defined('C5_EXECUTE') or die("Access Denied.");
?>
<div style="display: none">
<div id="ccm-dialog-delete-attribute" class="ccm-ui">
<form method="post" action="<?= $deleteAction ?>">
<?=Core::make("token")->output('delete_attribute')?>
<input type="hidden" name="id" value="<?=$key->getAttributeKeyID()?>">
<p><?=t('Are you sure you want to delete this attribute? This cannot be undone.')?></p>
<div class="dialog-buttons">
<button class="btn btn-default pull-left" onclick="jQuery.fn.dialog.closeTop()"><?=t('Cancel')?></button>
<button class="btn btn-danger pull-right" onclick="$('#ccm-dialog-delete-attribute form').submit()"><?=t('Delete Attribute')?></button>
</div>
</form>
</div>
</div>
<button type="button" class="btn btn-danger" data-action="delete-attribute"><?= t('Delete Attribute') ?></button>
<script type="text/javascript">
$(function() {
$('button[data-action=delete-attribute]').on('click', function() {
var $element = $('#ccm-dialog-delete-attribute');
jQuery.fn.dialog.open({
element: $element,
modal: true,
width: 320,
title: <?= json_encode(t('Delete Attribute')) ?>,
height: 'auto'
});
});
});
</script>
|
Format translation of "Delete Attribute" for javascript
|
Format translation of "Delete Attribute" for javascript
|
PHP
|
mit
|
a3020/concrete5,haeflimi/concrete5,biplobice/concrete5,haeflimi/concrete5,triplei/concrete5-8,haeflimi/concrete5,hissy/concrete5,jaromirdalecky/concrete5,jaromirdalecky/concrete5,triplei/concrete5-8,MrKarlDilkington/concrete5,mainio/concrete5,jaromirdalecky/concrete5,concrete5/concrete5,olsgreen/concrete5,hissy/concrete5,biplobice/concrete5,deek87/concrete5,hissy/concrete5,biplobice/concrete5,concrete5/concrete5,deek87/concrete5,mlocati/concrete5,mlocati/concrete5,hissy/concrete5,jaromirdalecky/concrete5,mlocati/concrete5,rikzuiderlicht/concrete5,triplei/concrete5-8,MrKarlDilkington/concrete5,concrete5/concrete5,haeflimi/concrete5,deek87/concrete5,a3020/concrete5,rikzuiderlicht/concrete5,deek87/concrete5,mlocati/concrete5,MrKarlDilkington/concrete5,biplobice/concrete5,mainio/concrete5,concrete5/concrete5,mainio/concrete5,olsgreen/concrete5,olsgreen/concrete5,rikzuiderlicht/concrete5
|
php
|
## Code Before:
<?php
defined('C5_EXECUTE') or die("Access Denied.");
?>
<div style="display: none">
<div id="ccm-dialog-delete-attribute" class="ccm-ui">
<form method="post" action="<?= $deleteAction ?>">
<?=Core::make("token")->output('delete_attribute')?>
<input type="hidden" name="id" value="<?=$key->getAttributeKeyID()?>">
<p><?=t('Are you sure you want to delete this attribute? This cannot be undone.')?></p>
<div class="dialog-buttons">
<button class="btn btn-default pull-left" onclick="jQuery.fn.dialog.closeTop()"><?=t('Cancel')?></button>
<button class="btn btn-danger pull-right" onclick="$('#ccm-dialog-delete-attribute form').submit()"><?=t('Delete Attribute')?></button>
</div>
</form>
</div>
</div>
<button type="button" class="btn btn-danger" data-action="delete-attribute"><?= t('Delete Attribute') ?></button>
<script type="text/javascript">
$(function() {
$('button[data-action=delete-attribute]').on('click', function() {
var $element = $('#ccm-dialog-delete-attribute');
jQuery.fn.dialog.open({
element: $element,
modal: true,
width: 320,
title: '<?=t('Delete Attribute')?>',
height: 'auto'
});
});
});
</script>
## Instruction:
Format translation of "Delete Attribute" for javascript
## Code After:
<?php
defined('C5_EXECUTE') or die("Access Denied.");
?>
<div style="display: none">
<div id="ccm-dialog-delete-attribute" class="ccm-ui">
<form method="post" action="<?= $deleteAction ?>">
<?=Core::make("token")->output('delete_attribute')?>
<input type="hidden" name="id" value="<?=$key->getAttributeKeyID()?>">
<p><?=t('Are you sure you want to delete this attribute? This cannot be undone.')?></p>
<div class="dialog-buttons">
<button class="btn btn-default pull-left" onclick="jQuery.fn.dialog.closeTop()"><?=t('Cancel')?></button>
<button class="btn btn-danger pull-right" onclick="$('#ccm-dialog-delete-attribute form').submit()"><?=t('Delete Attribute')?></button>
</div>
</form>
</div>
</div>
<button type="button" class="btn btn-danger" data-action="delete-attribute"><?= t('Delete Attribute') ?></button>
<script type="text/javascript">
$(function() {
$('button[data-action=delete-attribute]').on('click', function() {
var $element = $('#ccm-dialog-delete-attribute');
jQuery.fn.dialog.open({
element: $element,
modal: true,
width: 320,
title: <?= json_encode(t('Delete Attribute')) ?>,
height: 'auto'
});
});
});
</script>
|
d722c73469050404929e5e0eb0a2ab70dee5aa4f
|
setup.cfg
|
setup.cfg
|
[nosetests]
verbosity=2
detailed-errors=1
with-coverage=0
cover-inclusive=0
cover-package=0
with-xunit=1
|
[nosetests]
verbosity=2
detailed-errors=1
with-coverage=0
cover-inclusive=0
cover-package=0
with-xunit=1
[aliases]
test=pytest
|
Make code more pytest compatible
|
Make code more pytest compatible
Signed-off-by: Owen Synge <[email protected]>
|
INI
|
apache-2.0
|
hepix-virtualisation/vmcatcher
|
ini
|
## Code Before:
[nosetests]
verbosity=2
detailed-errors=1
with-coverage=0
cover-inclusive=0
cover-package=0
with-xunit=1
## Instruction:
Make code more pytest compatible
Signed-off-by: Owen Synge <[email protected]>
## Code After:
[nosetests]
verbosity=2
detailed-errors=1
with-coverage=0
cover-inclusive=0
cover-package=0
with-xunit=1
[aliases]
test=pytest
|
0bfff0e5b17c544e3176520b1505b87942f69f58
|
_includes/asides/about-auth0.markdown
|
_includes/asides/about-auth0.markdown
|
**About Auth0**
Auth0, a global leader in Identity-as-a-Service (IDaaS), provides thousands of customers in every market sector with the only identity solution they need for their web, mobile, IoT, and internal applications. Its extensible platform seamlessly authenticates and secures more than 50M logins per day, making it loved by developers and trusted by global enterprises. Auth0 has raised more than $54 million from Meritech Capital Partners, NTT DOCOMO Ventures, Telstra Ventures, Trinity Ventures, Bessemer Venture Partners, and K9 Ventures. The company’s U.S. headquarters in Bellevue, WA, and additional offices in Buenos Aires, London, and Sydney, support its global customers that are located in 70+ countries.
For more information, visit [https://auth0.com](https://auth0.com/) or follow [@auth0 on Twitter](https://twitter.com/auth0).
|
Auth0, a global leader in Identity-as-a-Service (IDaaS), provides thousands of customers in every market sector with the only identity solution they need for their web, mobile, IoT, and internal applications. Its extensible platform seamlessly authenticates and secures more than 50M logins per day, making it loved by developers and trusted by global enterprises. Auth0 has raised more than $54 million from Meritech Capital Partners, NTT DOCOMO Ventures, Telstra Ventures, Trinity Ventures, Bessemer Venture Partners, and K9 Ventures. The company’s U.S. headquarters in Bellevue, WA, and additional offices in Buenos Aires, London, and Sydney, support its global customers that are located in 70+ countries.
For more information, visit [https://auth0.com](https://auth0.com/) or follow [@auth0 on Twitter](https://twitter.com/auth0).
|
Fix formatting of generic "About Auth0" aside.
|
Fix formatting of generic "About Auth0" aside.
|
Markdown
|
mit
|
auth0/blog,auth0/blog,kmaida/blog,kmaida/blog,kmaida/blog,kmaida/blog,auth0/blog,mike-casas/blog,mike-casas/blog,mike-casas/blog,auth0/blog
|
markdown
|
## Code Before:
**About Auth0**
Auth0, a global leader in Identity-as-a-Service (IDaaS), provides thousands of customers in every market sector with the only identity solution they need for their web, mobile, IoT, and internal applications. Its extensible platform seamlessly authenticates and secures more than 50M logins per day, making it loved by developers and trusted by global enterprises. Auth0 has raised more than $54 million from Meritech Capital Partners, NTT DOCOMO Ventures, Telstra Ventures, Trinity Ventures, Bessemer Venture Partners, and K9 Ventures. The company’s U.S. headquarters in Bellevue, WA, and additional offices in Buenos Aires, London, and Sydney, support its global customers that are located in 70+ countries.
For more information, visit [https://auth0.com](https://auth0.com/) or follow [@auth0 on Twitter](https://twitter.com/auth0).
## Instruction:
Fix formatting of generic "About Auth0" aside.
## Code After:
Auth0, a global leader in Identity-as-a-Service (IDaaS), provides thousands of customers in every market sector with the only identity solution they need for their web, mobile, IoT, and internal applications. Its extensible platform seamlessly authenticates and secures more than 50M logins per day, making it loved by developers and trusted by global enterprises. Auth0 has raised more than $54 million from Meritech Capital Partners, NTT DOCOMO Ventures, Telstra Ventures, Trinity Ventures, Bessemer Venture Partners, and K9 Ventures. The company’s U.S. headquarters in Bellevue, WA, and additional offices in Buenos Aires, London, and Sydney, support its global customers that are located in 70+ countries.
For more information, visit [https://auth0.com](https://auth0.com/) or follow [@auth0 on Twitter](https://twitter.com/auth0).
|
966804b7b2fb69fda578a680fb857510fb3c4d16
|
test/integration/tests/4220-freeze-command/Main.hs
|
test/integration/tests/4220-freeze-command/Main.hs
|
import Control.Monad (unless)
import StackTest
main :: IO ()
main = do
stackCheckStdout ["freeze"] $ \stdOut -> do
let expected = unlines
[ "packages:"
, "- ."
, "extra-deps:"
, "- hackage: a50-0.5@sha256:b8dfcc13dcbb12e444128bb0e17527a2a7a9bd74ca9450d6f6862c4b394ac054,1491"
, " pantry-tree:"
, " size: 409"
, " sha256: a7c6151a18b04afe1f13637627cad4deff91af51d336c4f33e95fc98c64c40d3"
, "resolver:"
, " size: 527165"
, " url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/11/19.yaml"
, " sha256: 0116ad1779b20ad2c9d6620f172531f13b12bb69867e78f4277157e28865dfd4"
]
unless (stdOut == expected) $
error $ concat [ "Expected: "
, show expected
, "\nActual: "
, show stdOut
]
|
import Control.Monad (unless)
import StackTest
main :: IO ()
main = do
stackCheckStdout ["freeze"] $ \stdOut -> do
let expected = unlines
[ "resolver:"
, " size: 527165"
, " url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/11/19.yaml"
, " sha256: 0116ad1779b20ad2c9d6620f172531f13b12bb69867e78f4277157e28865dfd4"
, "extra-deps:"
, "- hackage: a50-0.5@sha256:b8dfcc13dcbb12e444128bb0e17527a2a7a9bd74ca9450d6f6862c4b394ac054,1491"
, " pantry-tree:"
, " size: 409"
, " sha256: a7c6151a18b04afe1f13637627cad4deff91af51d336c4f33e95fc98c64c40d3"
]
unless (stdOut == expected) $
error $ concat [ "Expected: "
, show expected
, "\nActual: "
, show stdOut
]
|
Fix test suite broken by changes in freeze output
|
Fix test suite broken by changes in freeze output
|
Haskell
|
bsd-3-clause
|
juhp/stack,juhp/stack
|
haskell
|
## Code Before:
import Control.Monad (unless)
import StackTest
main :: IO ()
main = do
stackCheckStdout ["freeze"] $ \stdOut -> do
let expected = unlines
[ "packages:"
, "- ."
, "extra-deps:"
, "- hackage: a50-0.5@sha256:b8dfcc13dcbb12e444128bb0e17527a2a7a9bd74ca9450d6f6862c4b394ac054,1491"
, " pantry-tree:"
, " size: 409"
, " sha256: a7c6151a18b04afe1f13637627cad4deff91af51d336c4f33e95fc98c64c40d3"
, "resolver:"
, " size: 527165"
, " url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/11/19.yaml"
, " sha256: 0116ad1779b20ad2c9d6620f172531f13b12bb69867e78f4277157e28865dfd4"
]
unless (stdOut == expected) $
error $ concat [ "Expected: "
, show expected
, "\nActual: "
, show stdOut
]
## Instruction:
Fix test suite broken by changes in freeze output
## Code After:
import Control.Monad (unless)
import StackTest
main :: IO ()
main = do
stackCheckStdout ["freeze"] $ \stdOut -> do
let expected = unlines
[ "resolver:"
, " size: 527165"
, " url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/11/19.yaml"
, " sha256: 0116ad1779b20ad2c9d6620f172531f13b12bb69867e78f4277157e28865dfd4"
, "extra-deps:"
, "- hackage: a50-0.5@sha256:b8dfcc13dcbb12e444128bb0e17527a2a7a9bd74ca9450d6f6862c4b394ac054,1491"
, " pantry-tree:"
, " size: 409"
, " sha256: a7c6151a18b04afe1f13637627cad4deff91af51d336c4f33e95fc98c64c40d3"
]
unless (stdOut == expected) $
error $ concat [ "Expected: "
, show expected
, "\nActual: "
, show stdOut
]
|
211563458d1b5a6354dae2c0caa2d4ef822dd832
|
dariah_contributions/templates/dariah_contributions/contribution_detail.html
|
dariah_contributions/templates/dariah_contributions/contribution_detail.html
|
{% extends "content_left_sidebar.html" %}
{% load i18n %}
{% block content %}
<p>
<a href="{% url 'dariah_contributions:detail_rdf' contribution.dc_identifier %}">{% trans "Show as RDF" %}</a>
{% if contribution.author == request.user %}
| <a href="{% url 'dariah_contributions:update' contribution.dc_identifier %}">{% trans 'Edit' %}</a>
| <a href="{% url 'dariah_contributions:delete' contribution.dc_identifier %}">{% trans 'Delete' %}</a>
{% endif %}
</p>
<h3>{{ contribution.dc_title }}</h3>
<table class="table">
{% for field, value in contribution.attrs %}
<tr>
<td>{{ field }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
{% for field, value in many2many_fields.items %}
<tr>
<td>{{ field }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}
|
{% extends "content_left_sidebar.html" %}
{% load i18n %}
{% block content %}
<h3>{{ contribution.dc_title }}</h3>
<table class="table">
{% for field, value in contribution.attrs %}
<tr>
<td>{{ field }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
{% for field, value in many2many_fields.items %}
<tr>
<td>{{ field }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}
{% block sidebar %}
<h1>Actions</h1>
<ul>
<li><a href="{% url 'dariah_contributions:detail_rdf' contribution.dc_identifier %}">{% trans "Show as RDF" %}</a></li>
{% if contribution.author == request.user %}
<li><a href="{% url 'dariah_contributions:update' contribution.dc_identifier %}">{% trans 'Edit' %}</a></li>
<li><a href="{% url 'dariah_contributions:delete' contribution.dc_identifier %}">{% trans 'Delete' %}</a></li>
{% endif %}
</ul>
{% endblock %}
|
Move actions in detail view to sidebar.
|
Move actions in detail view to sidebar.
|
HTML
|
apache-2.0
|
DANS-KNAW/dariah-contribute,DANS-KNAW/dariah-contribute
|
html
|
## Code Before:
{% extends "content_left_sidebar.html" %}
{% load i18n %}
{% block content %}
<p>
<a href="{% url 'dariah_contributions:detail_rdf' contribution.dc_identifier %}">{% trans "Show as RDF" %}</a>
{% if contribution.author == request.user %}
| <a href="{% url 'dariah_contributions:update' contribution.dc_identifier %}">{% trans 'Edit' %}</a>
| <a href="{% url 'dariah_contributions:delete' contribution.dc_identifier %}">{% trans 'Delete' %}</a>
{% endif %}
</p>
<h3>{{ contribution.dc_title }}</h3>
<table class="table">
{% for field, value in contribution.attrs %}
<tr>
<td>{{ field }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
{% for field, value in many2many_fields.items %}
<tr>
<td>{{ field }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}
## Instruction:
Move actions in detail view to sidebar.
## Code After:
{% extends "content_left_sidebar.html" %}
{% load i18n %}
{% block content %}
<h3>{{ contribution.dc_title }}</h3>
<table class="table">
{% for field, value in contribution.attrs %}
<tr>
<td>{{ field }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
{% for field, value in many2many_fields.items %}
<tr>
<td>{{ field }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}
{% block sidebar %}
<h1>Actions</h1>
<ul>
<li><a href="{% url 'dariah_contributions:detail_rdf' contribution.dc_identifier %}">{% trans "Show as RDF" %}</a></li>
{% if contribution.author == request.user %}
<li><a href="{% url 'dariah_contributions:update' contribution.dc_identifier %}">{% trans 'Edit' %}</a></li>
<li><a href="{% url 'dariah_contributions:delete' contribution.dc_identifier %}">{% trans 'Delete' %}</a></li>
{% endif %}
</ul>
{% endblock %}
|
800503e891a9ee87641f0a4d1e45074bf8dd98b6
|
metadata/io.rebble.charon.yml
|
metadata/io.rebble.charon.yml
|
Categories:
- Connectivity
- System
License: MIT
AuthorName: The Rebble Alliance
AuthorEmail: [email protected]
WebSite: https://rebble.io
SourceCode: https://github.com/pebble-dev/rebble-sideloader
IssueTracker: https://github.com/pebble-dev/rebble-sideloader/issues
Translation: https://crowdin.com/project/charon
AutoName: Sideload Helper by Rebble
RepoType: git
Repo: https://github.com/pebble-dev/rebble-sideloader
Builds:
- versionName: '1.3'
versionCode: 4
commit: v1.3
subdir: app
gradle:
- yes
antifeatures:
- NonFreeDep
AutoUpdateMode: Version v%v
UpdateCheckMode: RepoManifest
|
Categories:
- Connectivity
- System
License: MIT
AuthorName: The Rebble Alliance
AuthorEmail: [email protected]
WebSite: https://rebble.io
SourceCode: https://github.com/pebble-dev/rebble-sideloader
IssueTracker: https://github.com/pebble-dev/rebble-sideloader/issues
Translation: https://crowdin.com/project/charon
AutoName: Sideloader
RepoType: git
Repo: https://github.com/pebble-dev/rebble-sideloader
Builds:
- versionName: '1.3'
versionCode: 4
commit: v1.3
subdir: app
gradle:
- yes
antifeatures:
- NonFreeDep
AutoUpdateMode: Version v%v
UpdateCheckMode: RepoManifest
CurrentVersion: '1.3'
CurrentVersionCode: 4
|
Update CurrentVersion of Sideloader to 1.3 (4)
|
Update CurrentVersion of Sideloader to 1.3 (4)
|
YAML
|
agpl-3.0
|
f-droid/fdroiddata,f-droid/fdroiddata
|
yaml
|
## Code Before:
Categories:
- Connectivity
- System
License: MIT
AuthorName: The Rebble Alliance
AuthorEmail: [email protected]
WebSite: https://rebble.io
SourceCode: https://github.com/pebble-dev/rebble-sideloader
IssueTracker: https://github.com/pebble-dev/rebble-sideloader/issues
Translation: https://crowdin.com/project/charon
AutoName: Sideload Helper by Rebble
RepoType: git
Repo: https://github.com/pebble-dev/rebble-sideloader
Builds:
- versionName: '1.3'
versionCode: 4
commit: v1.3
subdir: app
gradle:
- yes
antifeatures:
- NonFreeDep
AutoUpdateMode: Version v%v
UpdateCheckMode: RepoManifest
## Instruction:
Update CurrentVersion of Sideloader to 1.3 (4)
## Code After:
Categories:
- Connectivity
- System
License: MIT
AuthorName: The Rebble Alliance
AuthorEmail: [email protected]
WebSite: https://rebble.io
SourceCode: https://github.com/pebble-dev/rebble-sideloader
IssueTracker: https://github.com/pebble-dev/rebble-sideloader/issues
Translation: https://crowdin.com/project/charon
AutoName: Sideloader
RepoType: git
Repo: https://github.com/pebble-dev/rebble-sideloader
Builds:
- versionName: '1.3'
versionCode: 4
commit: v1.3
subdir: app
gradle:
- yes
antifeatures:
- NonFreeDep
AutoUpdateMode: Version v%v
UpdateCheckMode: RepoManifest
CurrentVersion: '1.3'
CurrentVersionCode: 4
|
ee39f4c2b72bef6515eaa379bfac8d320f2699cb
|
Sources/Nimble/Utils/SourceLocation.swift
|
Sources/Nimble/Utils/SourceLocation.swift
|
import Foundation
#if _runtime(_ObjC)
public typealias FileString = String
#else
public typealias FileString = StaticString
#endif
public final class SourceLocation : NSObject {
public let file: FileString
public let line: UInt
override init() {
file = "Unknown File"
line = 0
}
init(file: FileString, line: UInt) {
self.file = file
self.line = line
}
override public var description: String {
return "\(file):\(line)"
}
}
|
import Foundation
// Ideally we would always use `StaticString` as the type for tracking the file name
// that expectations originate from, for consistency with `assert` etc. from the
// stdlib, and because recent versions of the XCTest overlay require `StaticString`
// when calling `XCTFail`. Under the Objective-C runtime (i.e. building on Mac), we
// have to use `String` instead because StaticString can't be generated from Objective-C
#if _runtime(_ObjC)
public typealias FileString = String
#else
public typealias FileString = StaticString
#endif
public final class SourceLocation : NSObject {
public let file: FileString
public let line: UInt
override init() {
file = "Unknown File"
line = 0
}
init(file: FileString, line: UInt) {
self.file = file
self.line = line
}
override public var description: String {
return "\(file):\(line)"
}
}
|
Add documentation about the motivation of the FileString typealias.
|
Add documentation about the motivation of the FileString typealias.
|
Swift
|
apache-2.0
|
Quick/Nimble,AnthonyMDev/Nimble,dgdosen/Nimble,mishimay/Nimble,jeffh/Nimble,Quick/Nimble,twobitlabs/Nimble,Quick/Nimble,feinstruktur/Nimble,phatblat/Nimble,phatblat/Nimble,DanielAsher/Nimble,DanielAsher/Nimble,ashfurrow/Nimble,AnthonyMDev/Nimble,mishimay/Nimble,feinstruktur/Nimble,AnthonyMDev/Nimble,ashfurrow/Nimble,ashfurrow/Nimble,dgdosen/Nimble,twobitlabs/Nimble,jeffh/Nimble,dgdosen/Nimble,abbeycode/Nimble,feinstruktur/Nimble,abbeycode/Nimble,abbeycode/Nimble,phatblat/Nimble,jeffh/Nimble,abbeycode/Nimble,twobitlabs/Nimble,DanielAsher/Nimble,dgdosen/Nimble,mishimay/Nimble,jeffh/Nimble
|
swift
|
## Code Before:
import Foundation
#if _runtime(_ObjC)
public typealias FileString = String
#else
public typealias FileString = StaticString
#endif
public final class SourceLocation : NSObject {
public let file: FileString
public let line: UInt
override init() {
file = "Unknown File"
line = 0
}
init(file: FileString, line: UInt) {
self.file = file
self.line = line
}
override public var description: String {
return "\(file):\(line)"
}
}
## Instruction:
Add documentation about the motivation of the FileString typealias.
## Code After:
import Foundation
// Ideally we would always use `StaticString` as the type for tracking the file name
// that expectations originate from, for consistency with `assert` etc. from the
// stdlib, and because recent versions of the XCTest overlay require `StaticString`
// when calling `XCTFail`. Under the Objective-C runtime (i.e. building on Mac), we
// have to use `String` instead because StaticString can't be generated from Objective-C
#if _runtime(_ObjC)
public typealias FileString = String
#else
public typealias FileString = StaticString
#endif
public final class SourceLocation : NSObject {
public let file: FileString
public let line: UInt
override init() {
file = "Unknown File"
line = 0
}
init(file: FileString, line: UInt) {
self.file = file
self.line = line
}
override public var description: String {
return "\(file):\(line)"
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.