commit stringlengths 40 40 | old_file stringlengths 4 184 | new_file stringlengths 4 184 | old_contents stringlengths 1 3.6k | new_contents stringlengths 5 3.38k | subject stringlengths 15 778 | message stringlengths 16 6.74k | lang stringclasses 201 values | license stringclasses 13 values | repos stringlengths 6 116k | config stringclasses 201 values | content stringlengths 137 7.24k | diff stringlengths 26 5.55k | diff_length int64 1 123 | relative_diff_length float64 0.01 89 | n_lines_added int64 0 108 | n_lines_deleted int64 0 106 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d94887d20a9b985593ae2566bc100345a4700021 | example/stats.dart | example/stats.dart | import "package:osx/osx.dart";
void main() {
say("Battery is at ${Battery.getLevel()}%");
}
| import "package:osx/osx.dart";
void main() {
say("Battery is at ${Battery.getLevel()}%");
say("There are ${Applications.list().length} apps installed");
}
| Add More to Stats Example | Add More to Stats Example
| Dart | mit | DirectMyFile/osx.dart | dart | ## Code Before:
import "package:osx/osx.dart";
void main() {
say("Battery is at ${Battery.getLevel()}%");
}
## Instruction:
Add More to Stats Example
## Code After:
import "package:osx/osx.dart";
void main() {
say("Battery is at ${Battery.getLevel()}%");
say("There are ${Applications.list().length} apps installed");
}
| import "package:osx/osx.dart";
void main() {
say("Battery is at ${Battery.getLevel()}%");
+ say("There are ${Applications.list().length} apps installed");
} | 1 | 0.2 | 1 | 0 |
805add46aee33c91774cdc1b9a3792d7261637c9 | lib/specinfra/backend/base.rb | lib/specinfra/backend/base.rb | require 'singleton'
require 'specinfra/command_result'
module SpecInfra
module Backend
class Base
include Singleton
def set_commands(c)
@commands = c
end
def set_example(e)
@example = e
end
def commands
@commands
end
def check_zero(cmd, *args)
run_command(commands.send(cmd, *args)).success?
end
# Default action is to call check_zero with args
def method_missing(meth, *args, &block)
check_zero(meth, *args)
end
end
end
end
| require 'singleton'
require 'specinfra/command_result'
module SpecInfra
module Backend
class Base
include Singleton
def set_commands(c)
@commands = c
end
def set_example(e)
@example = e
end
def commands
@commands
end
def check_zero(cmd, *args)
run_command(commands.send(cmd, *args)).success?
end
# Default action is to call check_zero with args
def method_missing(meth, *args, &block)
if meth =~ /^check/
check_zero(meth, *args)
else
run_command(commands.send(meth, *args))
end
end
end
end
end
| Return SpecInfra::CommandResult object when method name not start with `check_` | Return SpecInfra::CommandResult object when method name not start with
`check_`
| Ruby | mit | chinthakagodawita/specinfra,r7kamura/specinfra,hideyuki/specinfra,RoboticCheese/specinfra,serverspec/specinfra,thenexus6/specinfra,sergueik/specinfra,doc75/specinfra,ryotarai/specinfra,lurdan/specinfra,chef-partners/specinfra-cisco,minimum2scp/specinfra,chorrell/specinfra,seroron/specinfra,higanworks/specinfra,ihassin/specinfra,tarr1124/specinfra,miketheman/specinfra,k0kubun/specinfra,electrical/specinfra,stoned/specinfra,winebarrel/specinfra,nurse/specinfra,sorah/specinfra,skamithi/specinfra,edolnx/specinfra,mactkg/specinfra,cosmo0920/specinfra,3100/specinfra,murank/specinfra,ChristianKoehler/specinfra,glenux/contrib-specinfra,verisign/specinfra,elibus/specinfra,stefanhorning/specinfra,uroesch/specinfra,elmundio87/specinfra,aibou/specinfra,tacahilo/specinfra,optimizely/specinfra,gh2k/specinfra,bodgit/specinfra,hfm/specinfra,mizzy/specinfra,tagomoris/specinfra,sean-horn/specinfra,pfaffle/specinfra | ruby | ## Code Before:
require 'singleton'
require 'specinfra/command_result'
module SpecInfra
module Backend
class Base
include Singleton
def set_commands(c)
@commands = c
end
def set_example(e)
@example = e
end
def commands
@commands
end
def check_zero(cmd, *args)
run_command(commands.send(cmd, *args)).success?
end
# Default action is to call check_zero with args
def method_missing(meth, *args, &block)
check_zero(meth, *args)
end
end
end
end
## Instruction:
Return SpecInfra::CommandResult object when method name not start with
`check_`
## Code After:
require 'singleton'
require 'specinfra/command_result'
module SpecInfra
module Backend
class Base
include Singleton
def set_commands(c)
@commands = c
end
def set_example(e)
@example = e
end
def commands
@commands
end
def check_zero(cmd, *args)
run_command(commands.send(cmd, *args)).success?
end
# Default action is to call check_zero with args
def method_missing(meth, *args, &block)
if meth =~ /^check/
check_zero(meth, *args)
else
run_command(commands.send(meth, *args))
end
end
end
end
end
| require 'singleton'
require 'specinfra/command_result'
module SpecInfra
module Backend
class Base
include Singleton
def set_commands(c)
@commands = c
end
def set_example(e)
@example = e
end
def commands
@commands
end
def check_zero(cmd, *args)
run_command(commands.send(cmd, *args)).success?
end
# Default action is to call check_zero with args
def method_missing(meth, *args, &block)
+ if meth =~ /^check/
- check_zero(meth, *args)
+ check_zero(meth, *args)
? ++
+ else
+ run_command(commands.send(meth, *args))
+ end
end
end
end
end | 6 | 0.193548 | 5 | 1 |
30452fdb4136930093bdf515969012b0b3fa73cf | src/mixins/_word-break.scss | src/mixins/_word-break.scss | /// Break long words, hyphenate if possible (requires `lang` attribute)
/// @link http://kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
/// @link http://caniuse.com/#feat=css-hyphens
/// @link http://caniuse.com/#feat=wordwrap
///
/// @ignore Demo http://jsbin.com/fubor
/// @ignore - Hyphenation not currently suported in Chrome, Opera, Android, or IE9-
/// @ignore - Hyphenation depends on dictionary, so requires lang attribute be set
/// @ignore - Setting "word-break: break-all" will disable hyphens in Firefox and IE10+
///
@mixin fs-break-word {
hyphens: auto;// requires lang attribute be set on target element or ancestor
overflow-wrap: break-word;
word-wrap: break-word;
}
| /// Break long words, hyphenate if possible (requires `lang` attribute)
/// @link http://kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
/// @link https://justmarkup.com/log/2015/07/dealing-with-long-words-in-css/
/// @link http://caniuse.com/#feat=css-hyphens
/// @link http://caniuse.com/#feat=wordwrap
///
/// @ignore Demo http://jsbin.com/fubor
/// @ignore - Hyphenation not currently suported in Chrome, Opera, Android, or IE9-
/// @ignore - Hyphenation depends on dictionary, so requires lang attribute be set
/// @ignore - Setting "word-break: break-all" will disable hyphens in Firefox and IE10+
///
@mixin fs-break-word {
hyphens: auto;// requires lang attribute be set on target element or ancestor
overflow-wrap: break-word;
word-wrap: break-word;
}
| Comment update, add source link | Comment update, add source link
| SCSS | mit | Threespot/frontline-sass | scss | ## Code Before:
/// Break long words, hyphenate if possible (requires `lang` attribute)
/// @link http://kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
/// @link http://caniuse.com/#feat=css-hyphens
/// @link http://caniuse.com/#feat=wordwrap
///
/// @ignore Demo http://jsbin.com/fubor
/// @ignore - Hyphenation not currently suported in Chrome, Opera, Android, or IE9-
/// @ignore - Hyphenation depends on dictionary, so requires lang attribute be set
/// @ignore - Setting "word-break: break-all" will disable hyphens in Firefox and IE10+
///
@mixin fs-break-word {
hyphens: auto;// requires lang attribute be set on target element or ancestor
overflow-wrap: break-word;
word-wrap: break-word;
}
## Instruction:
Comment update, add source link
## Code After:
/// Break long words, hyphenate if possible (requires `lang` attribute)
/// @link http://kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
/// @link https://justmarkup.com/log/2015/07/dealing-with-long-words-in-css/
/// @link http://caniuse.com/#feat=css-hyphens
/// @link http://caniuse.com/#feat=wordwrap
///
/// @ignore Demo http://jsbin.com/fubor
/// @ignore - Hyphenation not currently suported in Chrome, Opera, Android, or IE9-
/// @ignore - Hyphenation depends on dictionary, so requires lang attribute be set
/// @ignore - Setting "word-break: break-all" will disable hyphens in Firefox and IE10+
///
@mixin fs-break-word {
hyphens: auto;// requires lang attribute be set on target element or ancestor
overflow-wrap: break-word;
word-wrap: break-word;
}
| /// Break long words, hyphenate if possible (requires `lang` attribute)
/// @link http://kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
+ /// @link https://justmarkup.com/log/2015/07/dealing-with-long-words-in-css/
/// @link http://caniuse.com/#feat=css-hyphens
/// @link http://caniuse.com/#feat=wordwrap
///
/// @ignore Demo http://jsbin.com/fubor
/// @ignore - Hyphenation not currently suported in Chrome, Opera, Android, or IE9-
/// @ignore - Hyphenation depends on dictionary, so requires lang attribute be set
/// @ignore - Setting "word-break: break-all" will disable hyphens in Firefox and IE10+
///
@mixin fs-break-word {
hyphens: auto;// requires lang attribute be set on target element or ancestor
overflow-wrap: break-word;
word-wrap: break-word;
} | 1 | 0.066667 | 1 | 0 |
e21514e05ab43724163020fed0ba9c95911761eb | .travis.yml | .travis.yml | language: node_js
node_js:
- "node"
- "7"
- "6.8.1"
env:
- NODE_ENV=production
before_script:
- npm install -g mocha
- npm install chai
- npm install supertest
| language: node_js
node_js:
- "node"
- "7"
- "6.8.1"
env:
- NODE_ENV=production
before_script:
- npm install -g mocha
- npm install chai
- npm install supertest
- npm install cheerio
| Add cheerio to Travis deps | Add cheerio to Travis deps
| YAML | mit | slavapavlutin/pavlutin-node,slavapavlutin/pavlutin-node | yaml | ## Code Before:
language: node_js
node_js:
- "node"
- "7"
- "6.8.1"
env:
- NODE_ENV=production
before_script:
- npm install -g mocha
- npm install chai
- npm install supertest
## Instruction:
Add cheerio to Travis deps
## Code After:
language: node_js
node_js:
- "node"
- "7"
- "6.8.1"
env:
- NODE_ENV=production
before_script:
- npm install -g mocha
- npm install chai
- npm install supertest
- npm install cheerio
| language: node_js
node_js:
- "node"
- "7"
- "6.8.1"
env:
- NODE_ENV=production
before_script:
- npm install -g mocha
- npm install chai
- npm install supertest
+ - npm install cheerio | 1 | 0.090909 | 1 | 0 |
e913429cfbcd11dbaa9610f89d69b2747e28ca1b | patrons/PatronAdd.js | patrons/PatronAdd.js | import React, { Component, PropTypes } from 'react';
import { connect } from 'stripes-connect';
import PatronForm from './PatronForm';
// One of multiple stripes-connected components in the patrons module
export default class PatronAdd extends Component {
static contextTypes = {
router: PropTypes.object.isRequired
};
// The manifest is provided in components by the module developer and consumed by 'stripes connect'
static manifest = { 'apis/patrons': { remote: true,
pk: '_id', // The primary key of records from this end-point
// (when it's not the default, "id")
clientGeneratePk: false, // Set if the backend service requires
// that it generates unique IDs for records
records: 'patrons' // The name of the property in the JSON response
// that holds the records
}};
createPatron(data) {
this.props.mutator['apis/patrons'].create(data);
this.context.router.push('/patrons/list');
}
cancel(data) {
this.context.router.push('/patrons/list');
}
render() {
return <PatronForm onSubmit={this.createPatron.bind(this)}
cancelForm={this.cancel}
action={PatronForm.actionTypes['create']}/>
}
}
// This function call might be implicit in a future version (invoked by the framework)
export default connect(PatronAdd, 'patrons');
| import React, { Component, PropTypes } from 'react';
import { connect } from 'stripes-connect';
import PatronForm from './PatronForm';
// One of multiple stripes-connected components in the patrons module
export default class PatronAdd extends Component {
static contextTypes = {
router: PropTypes.object.isRequired
};
// The manifest is provided in components by the module developer and consumed by 'stripes connect'
static manifest = { 'apis/patrons': { remote: true,
pk: '_id', // The primary key of records from this end-point
// Set this if not using the default, "id".
clientGeneratePk: false // Set this if the backend service requires
// that it generates unique IDs for records
}};
createPatron(data) {
this.props.mutator['apis/patrons'].create(data);
this.context.router.push('/patrons/list');
}
cancel(data) {
this.context.router.push('/patrons/list');
}
render() {
return <PatronForm onSubmit={this.createPatron.bind(this)}
cancelForm={this.cancel}
action={PatronForm.actionTypes['create']}/>
}
}
// This function call might be implicit in a future version (invoked by the framework)
export default connect(PatronAdd, 'patrons');
| Remove obsolete setting. Tweak comments. | Remove obsolete setting. Tweak comments.
| JavaScript | apache-2.0 | folio-org/stripes-experiments,folio-org/stripes-experiments | javascript | ## Code Before:
import React, { Component, PropTypes } from 'react';
import { connect } from 'stripes-connect';
import PatronForm from './PatronForm';
// One of multiple stripes-connected components in the patrons module
export default class PatronAdd extends Component {
static contextTypes = {
router: PropTypes.object.isRequired
};
// The manifest is provided in components by the module developer and consumed by 'stripes connect'
static manifest = { 'apis/patrons': { remote: true,
pk: '_id', // The primary key of records from this end-point
// (when it's not the default, "id")
clientGeneratePk: false, // Set if the backend service requires
// that it generates unique IDs for records
records: 'patrons' // The name of the property in the JSON response
// that holds the records
}};
createPatron(data) {
this.props.mutator['apis/patrons'].create(data);
this.context.router.push('/patrons/list');
}
cancel(data) {
this.context.router.push('/patrons/list');
}
render() {
return <PatronForm onSubmit={this.createPatron.bind(this)}
cancelForm={this.cancel}
action={PatronForm.actionTypes['create']}/>
}
}
// This function call might be implicit in a future version (invoked by the framework)
export default connect(PatronAdd, 'patrons');
## Instruction:
Remove obsolete setting. Tweak comments.
## Code After:
import React, { Component, PropTypes } from 'react';
import { connect } from 'stripes-connect';
import PatronForm from './PatronForm';
// One of multiple stripes-connected components in the patrons module
export default class PatronAdd extends Component {
static contextTypes = {
router: PropTypes.object.isRequired
};
// The manifest is provided in components by the module developer and consumed by 'stripes connect'
static manifest = { 'apis/patrons': { remote: true,
pk: '_id', // The primary key of records from this end-point
// Set this if not using the default, "id".
clientGeneratePk: false // Set this if the backend service requires
// that it generates unique IDs for records
}};
createPatron(data) {
this.props.mutator['apis/patrons'].create(data);
this.context.router.push('/patrons/list');
}
cancel(data) {
this.context.router.push('/patrons/list');
}
render() {
return <PatronForm onSubmit={this.createPatron.bind(this)}
cancelForm={this.cancel}
action={PatronForm.actionTypes['create']}/>
}
}
// This function call might be implicit in a future version (invoked by the framework)
export default connect(PatronAdd, 'patrons');
| import React, { Component, PropTypes } from 'react';
import { connect } from 'stripes-connect';
import PatronForm from './PatronForm';
// One of multiple stripes-connected components in the patrons module
export default class PatronAdd extends Component {
static contextTypes = {
router: PropTypes.object.isRequired
};
// The manifest is provided in components by the module developer and consumed by 'stripes connect'
static manifest = { 'apis/patrons': { remote: true,
pk: '_id', // The primary key of records from this end-point
- // (when it's not the default, "id")
? ^^ ^^ ^^^ ^
+ // Set this if not using the default, "id".
? +++ ^ ^^ ^ ++++++ ^
- clientGeneratePk: false, // Set if the backend service requires
? -
+ clientGeneratePk: false // Set this if the backend service requires
? +++++
- // that it generates unique IDs for records
? -
+ // that it generates unique IDs for records
- records: 'patrons' // The name of the property in the JSON response
- // that holds the records
}};
createPatron(data) {
this.props.mutator['apis/patrons'].create(data);
this.context.router.push('/patrons/list');
}
cancel(data) {
this.context.router.push('/patrons/list');
}
render() {
return <PatronForm onSubmit={this.createPatron.bind(this)}
cancelForm={this.cancel}
action={PatronForm.actionTypes['create']}/>
}
}
// This function call might be implicit in a future version (invoked by the framework)
export default connect(PatronAdd, 'patrons'); | 8 | 0.210526 | 3 | 5 |
5cba3170fdc0c65d53e6198f89dc4e78c7159a66 | resources/views/layouts/app_login_admin.blade.php | resources/views/layouts/app_login_admin.blade.php | <!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{__('admin_pages.login_form')}}</title>
<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet" />
<link href="{{ asset('css/mdb.min.css') }}" rel="stylesheet" />
<link href="{{ asset('css/adminCustom.css') }}" rel="stylesheet" />
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300|Material+Icons' rel='stylesheet' type='text/css'>
<script src="{{ asset('js/jquery-3.2.1.min.js') }}"></script>
</head>
<body>
@yield('content')
<script src="{{ asset('js/bootstrap.min.js') }}"></script>
<script src="{{ asset('js/bootbox.min.js') }}"></script>
<script src="{{ asset('js/mdb.min.js') }}"></script>
<script src="{{ asset('js/placeholders.min.js') }}"></script>
</body>
</html> | <!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{__('admin_pages.login_form')}}</title>
<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet" />
<link href="{{ asset('css/mdb.min.css') }}" rel="stylesheet" />
<link href="{{ asset('css/adminCustom.css') }}" rel="stylesheet" />
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300|Material+Icons' rel='stylesheet' type='text/css' />
<script src="{{ asset('js/jquery-3.2.1.min.js') }}"></script>
</head>
<body>
@yield('content')
<script src="{{ asset('js/bootstrap.min.js') }}"></script>
<script src="{{ asset('js/bootbox.min.js') }}"></script>
<script src="{{ asset('js/mdb.min.js') }}"></script>
<script src="{{ asset('js/placeholders.min.js') }}"></script>
</body>
</html> | Fix in admin meta tags | Fix in admin meta tags
| PHP | mit | kirilkirkov/Shopping-Cart-Solution-Laravel,kirilkirkov/Shopping-Cart-Solution-Laravel,kirilkirkov/Shopping-Cart-Solution-Laravel | php | ## Code Before:
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{__('admin_pages.login_form')}}</title>
<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet" />
<link href="{{ asset('css/mdb.min.css') }}" rel="stylesheet" />
<link href="{{ asset('css/adminCustom.css') }}" rel="stylesheet" />
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300|Material+Icons' rel='stylesheet' type='text/css'>
<script src="{{ asset('js/jquery-3.2.1.min.js') }}"></script>
</head>
<body>
@yield('content')
<script src="{{ asset('js/bootstrap.min.js') }}"></script>
<script src="{{ asset('js/bootbox.min.js') }}"></script>
<script src="{{ asset('js/mdb.min.js') }}"></script>
<script src="{{ asset('js/placeholders.min.js') }}"></script>
</body>
</html>
## Instruction:
Fix in admin meta tags
## Code After:
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{__('admin_pages.login_form')}}</title>
<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet" />
<link href="{{ asset('css/mdb.min.css') }}" rel="stylesheet" />
<link href="{{ asset('css/adminCustom.css') }}" rel="stylesheet" />
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300|Material+Icons' rel='stylesheet' type='text/css' />
<script src="{{ asset('js/jquery-3.2.1.min.js') }}"></script>
</head>
<body>
@yield('content')
<script src="{{ asset('js/bootstrap.min.js') }}"></script>
<script src="{{ asset('js/bootbox.min.js') }}"></script>
<script src="{{ asset('js/mdb.min.js') }}"></script>
<script src="{{ asset('js/placeholders.min.js') }}"></script>
</body>
</html> | <!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
- <meta charset="utf-8">
+ <meta charset="utf-8" />
? ++
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
? ++
- <meta name="viewport" content="width=device-width, initial-scale=1">
? -
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
? +++++++++++++++++++++++++++++++++++++++ ++
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{__('admin_pages.login_form')}}</title>
<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet" />
<link href="{{ asset('css/mdb.min.css') }}" rel="stylesheet" />
<link href="{{ asset('css/adminCustom.css') }}" rel="stylesheet" />
- <link href="http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet">
+ <link href="http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet" />
? ++
- <link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300|Material+Icons' rel='stylesheet' type='text/css'>
+ <link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300|Material+Icons' rel='stylesheet' type='text/css' />
? ++
<script src="{{ asset('js/jquery-3.2.1.min.js') }}"></script>
</head>
<body>
@yield('content')
<script src="{{ asset('js/bootstrap.min.js') }}"></script>
<script src="{{ asset('js/bootbox.min.js') }}"></script>
<script src="{{ asset('js/mdb.min.js') }}"></script>
<script src="{{ asset('js/placeholders.min.js') }}"></script>
</body>
</html> | 10 | 0.434783 | 5 | 5 |
3343252dc4ac07c50d53de60bb7f364cdb49c970 | docs/basic-http-auth/README.md | docs/basic-http-auth/README.md |
Remote **CIKit** host is Nginx based web server which protects web-traffic using basic HTTP authentication. You will [set the credentials for it during server provisioning](../../scripts/provision.yml#L41-57).
Besides, you can set the list of IP addresses which will be whitelisted for authentication omitting. [Add IPs here](../../scripts/vars/ip.yml) before the server setup.
Authentication applies to Jenkins, Solr, builds - to each resource accessible from the web.
## Proxy structure
The next scheme demonstrates the structure of **CIKit** based server.

HTTPS traffic proxying on 443 port works the same.
Everything is simple in case of **Solr** and **Jenkins**. Here is an answer for question "**what is Apache for?**".
Historically Apache is older than Nginx and all supported by **CIKit** CMFs are working with it out of the box without additional configuration. Also each project could have its own `.htaccess` to influence server configuration.
|
Remote **CIKit** host is Nginx based web server which protects web-traffic using basic HTTP authentication. You can configure the credentials for in different ways: using `.env-config.yml`, passing `--http-auth-user=admin --http-auth-pass=password` options to `cikit` utility or leaving everything as is, and get password generated in `cikit-credentials/YOUR_HOSTNAME/http_auth_pass` file.
Moreover, you can set the list of IP addresses which will be whitelisted for skipping authentication. Use `.env-config.yml` for this, for instance:
```yml
allowed_ips:
# Localhost must be without authentication to run Behat tests.
- 127.0.0.1
# Configure credentials here, but make sure they won't be publicly available.
http_auth_user: admin
http_auth_pass: password
```
Authentication applies to Jenkins, Solr, builds - to each resource accessible from the web.
## Proxy structure
The next scheme demonstrates the structure of **CIKit** based server.

HTTPS traffic proxying on 443 port works the same.
Everything is simple in case of **Solr** and **Jenkins**. Here is an answer for question "**what is Apache for?**".
Historically Apache is older than Nginx and all supported by **CIKit** CMFs are working with it out of the box without additional configuration. Also each project could have its own `.htaccess` to influence server configuration.
| Fix docs for basic HTTP auth | [CIKit] Fix docs for basic HTTP auth
| Markdown | apache-2.0 | BR0kEN-/cikit,BR0kEN-/cikit,BR0kEN-/cikit,BR0kEN-/cikit,BR0kEN-/cikit | markdown | ## Code Before:
Remote **CIKit** host is Nginx based web server which protects web-traffic using basic HTTP authentication. You will [set the credentials for it during server provisioning](../../scripts/provision.yml#L41-57).
Besides, you can set the list of IP addresses which will be whitelisted for authentication omitting. [Add IPs here](../../scripts/vars/ip.yml) before the server setup.
Authentication applies to Jenkins, Solr, builds - to each resource accessible from the web.
## Proxy structure
The next scheme demonstrates the structure of **CIKit** based server.

HTTPS traffic proxying on 443 port works the same.
Everything is simple in case of **Solr** and **Jenkins**. Here is an answer for question "**what is Apache for?**".
Historically Apache is older than Nginx and all supported by **CIKit** CMFs are working with it out of the box without additional configuration. Also each project could have its own `.htaccess` to influence server configuration.
## Instruction:
[CIKit] Fix docs for basic HTTP auth
## Code After:
Remote **CIKit** host is Nginx based web server which protects web-traffic using basic HTTP authentication. You can configure the credentials for in different ways: using `.env-config.yml`, passing `--http-auth-user=admin --http-auth-pass=password` options to `cikit` utility or leaving everything as is, and get password generated in `cikit-credentials/YOUR_HOSTNAME/http_auth_pass` file.
Moreover, you can set the list of IP addresses which will be whitelisted for skipping authentication. Use `.env-config.yml` for this, for instance:
```yml
allowed_ips:
# Localhost must be without authentication to run Behat tests.
- 127.0.0.1
# Configure credentials here, but make sure they won't be publicly available.
http_auth_user: admin
http_auth_pass: password
```
Authentication applies to Jenkins, Solr, builds - to each resource accessible from the web.
## Proxy structure
The next scheme demonstrates the structure of **CIKit** based server.

HTTPS traffic proxying on 443 port works the same.
Everything is simple in case of **Solr** and **Jenkins**. Here is an answer for question "**what is Apache for?**".
Historically Apache is older than Nginx and all supported by **CIKit** CMFs are working with it out of the box without additional configuration. Also each project could have its own `.htaccess` to influence server configuration.
|
- Remote **CIKit** host is Nginx based web server which protects web-traffic using basic HTTP authentication. You will [set the credentials for it during server provisioning](../../scripts/provision.yml#L41-57).
+ Remote **CIKit** host is Nginx based web server which protects web-traffic using basic HTTP authentication. You can configure the credentials for in different ways: using `.env-config.yml`, passing `--http-auth-user=admin --http-auth-pass=password` options to `cikit` utility or leaving everything as is, and get password generated in `cikit-credentials/YOUR_HOSTNAME/http_auth_pass` file.
- Besides, you can set the list of IP addresses which will be whitelisted for authentication omitting. [Add IPs here](../../scripts/vars/ip.yml) before the server setup.
+ Moreover, you can set the list of IP addresses which will be whitelisted for skipping authentication. Use `.env-config.yml` for this, for instance:
+
+ ```yml
+ allowed_ips:
+ # Localhost must be without authentication to run Behat tests.
+ - 127.0.0.1
+
+ # Configure credentials here, but make sure they won't be publicly available.
+ http_auth_user: admin
+ http_auth_pass: password
+ ```
Authentication applies to Jenkins, Solr, builds - to each resource accessible from the web.
## Proxy structure
The next scheme demonstrates the structure of **CIKit** based server.

HTTPS traffic proxying on 443 port works the same.
Everything is simple in case of **Solr** and **Jenkins**. Here is an answer for question "**what is Apache for?**".
Historically Apache is older than Nginx and all supported by **CIKit** CMFs are working with it out of the box without additional configuration. Also each project could have its own `.htaccess` to influence server configuration. | 14 | 0.777778 | 12 | 2 |
56d7265655f2ec6811b1b705f892bb843b735b1d | dev-tests/run.sh | dev-tests/run.sh |
get_script_dir () {
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$( readlink "$SOURCE" )"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
cd -P "$( dirname "$SOURCE" )"
pwd
}
ROOT_DIR="$(get_script_dir)"
echo "Starting the Mesos environment and the workflow application..."
cp $ROOT_DIR/../target/scala-2.11/workflow-assembly-0.1.jar workflow/lib/workflow.jar
if groups $USER | grep &>/dev/null '\bdocker\b'; then
DOCKER_COMPOSE="docker-compose"
else
DOCKER_COMPOSE="sudo docker-compose"
fi
$DOCKER_COMPOSE up
|
get_script_dir () {
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$( readlink "$SOURCE" )"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
cd -P "$( dirname "$SOURCE" )"
pwd
}
ROOT_DIR="$(get_script_dir)"
used_ports=$(sudo /bin/sh -c "lsof -iTCP -sTCP:LISTEN -P -n | grep -E ':(8087|5432|2181|2888|3888|5050|5051|4400)'" || true)
if [ "$used_ports" != "" ]; then
echo "Some applications already use the ports required by this set of applications. Please close them."
echo -n "$used_ports"
echo
exit 1
fi
if pgrep -lf sshuttle > /dev/null ; then
echo "sshuttle detected. Please close this program as it messes with networking and prevents Docker links to work"
exit 1
fi
echo "Starting the Mesos environment and the workflow application..."
cp $ROOT_DIR/../target/scala-2.11/workflow-assembly-0.1.jar workflow/lib/workflow.jar
if groups $USER | grep &>/dev/null '\bdocker\b'; then
DOCKER_COMPOSE="docker-compose"
else
DOCKER_COMPOSE="sudo docker-compose"
fi
$DOCKER_COMPOSE up
| Add tests to ensure that the containers starts without problems | Add tests to ensure that the containers starts without problems
| Shell | apache-2.0 | HBPSP8Repo/workflow,HBPSP8Repo/workflow,LREN-CHUV/workflow,LREN-CHUV/workflow | shell | ## Code Before:
get_script_dir () {
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$( readlink "$SOURCE" )"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
cd -P "$( dirname "$SOURCE" )"
pwd
}
ROOT_DIR="$(get_script_dir)"
echo "Starting the Mesos environment and the workflow application..."
cp $ROOT_DIR/../target/scala-2.11/workflow-assembly-0.1.jar workflow/lib/workflow.jar
if groups $USER | grep &>/dev/null '\bdocker\b'; then
DOCKER_COMPOSE="docker-compose"
else
DOCKER_COMPOSE="sudo docker-compose"
fi
$DOCKER_COMPOSE up
## Instruction:
Add tests to ensure that the containers starts without problems
## Code After:
get_script_dir () {
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$( readlink "$SOURCE" )"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
cd -P "$( dirname "$SOURCE" )"
pwd
}
ROOT_DIR="$(get_script_dir)"
used_ports=$(sudo /bin/sh -c "lsof -iTCP -sTCP:LISTEN -P -n | grep -E ':(8087|5432|2181|2888|3888|5050|5051|4400)'" || true)
if [ "$used_ports" != "" ]; then
echo "Some applications already use the ports required by this set of applications. Please close them."
echo -n "$used_ports"
echo
exit 1
fi
if pgrep -lf sshuttle > /dev/null ; then
echo "sshuttle detected. Please close this program as it messes with networking and prevents Docker links to work"
exit 1
fi
echo "Starting the Mesos environment and the workflow application..."
cp $ROOT_DIR/../target/scala-2.11/workflow-assembly-0.1.jar workflow/lib/workflow.jar
if groups $USER | grep &>/dev/null '\bdocker\b'; then
DOCKER_COMPOSE="docker-compose"
else
DOCKER_COMPOSE="sudo docker-compose"
fi
$DOCKER_COMPOSE up
|
get_script_dir () {
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$( readlink "$SOURCE" )"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
cd -P "$( dirname "$SOURCE" )"
pwd
}
ROOT_DIR="$(get_script_dir)"
+ used_ports=$(sudo /bin/sh -c "lsof -iTCP -sTCP:LISTEN -P -n | grep -E ':(8087|5432|2181|2888|3888|5050|5051|4400)'" || true)
+
+ if [ "$used_ports" != "" ]; then
+ echo "Some applications already use the ports required by this set of applications. Please close them."
+ echo -n "$used_ports"
+ echo
+ exit 1
+ fi
+
+ if pgrep -lf sshuttle > /dev/null ; then
+ echo "sshuttle detected. Please close this program as it messes with networking and prevents Docker links to work"
+ exit 1
+ fi
+
echo "Starting the Mesos environment and the workflow application..."
cp $ROOT_DIR/../target/scala-2.11/workflow-assembly-0.1.jar workflow/lib/workflow.jar
if groups $USER | grep &>/dev/null '\bdocker\b'; then
DOCKER_COMPOSE="docker-compose"
else
DOCKER_COMPOSE="sudo docker-compose"
fi
$DOCKER_COMPOSE up | 14 | 0.538462 | 14 | 0 |
06b21e9e374761410637f063a90d235abd0e5326 | .travis.yml | .travis.yml | language: clojure
lein: lein2
script: "lein2 do test-phantom*, test-node*"
jdk:
- oraclejdk8
sudo: false
| language: clojure
lein: lein2
before_script:
- phantomjs -v
- node -v
script: "lein2 do test-phantom*, test-node*"
jdk:
- oraclejdk8
sudo: false
| Add version display of current testing harness | Add version display of current testing harness
| YAML | epl-1.0 | Lambda-X/replumb,Lambda-X/replumb,ScalaConsultants/replumb,ScalaConsultants/replumb,ScalaConsultants/replumb,Lambda-X/replumb | yaml | ## Code Before:
language: clojure
lein: lein2
script: "lein2 do test-phantom*, test-node*"
jdk:
- oraclejdk8
sudo: false
## Instruction:
Add version display of current testing harness
## Code After:
language: clojure
lein: lein2
before_script:
- phantomjs -v
- node -v
script: "lein2 do test-phantom*, test-node*"
jdk:
- oraclejdk8
sudo: false
| language: clojure
lein: lein2
+ before_script:
+ - phantomjs -v
+ - node -v
script: "lein2 do test-phantom*, test-node*"
jdk:
- oraclejdk8
sudo: false | 3 | 0.5 | 3 | 0 |
cc79cbc7e09587596bec2bda5bb4ef954a2f6137 | javascript/graph-widget/src/webapi.js | javascript/graph-widget/src/webapi.js | import 'isomorphic-fetch'
/**
* Fetch a list of nodes and their relation types
*/
export function fetchNodeList() {
return fetch('//localhost:8000/admin/chemtrails_permissions/accessrule/nodelist/').then((response) => {
if (response.status >= 400) {
throw new Error('Bad response from the server')
}
return response.json();
})
}
| import 'isomorphic-fetch'
/**
* Fetch a list of nodes and their relation types
*/
export function fetchNodeList() {
return fetch('//localhost:8000/admin/chemtrails_permissions/accessrule/nodelist/', {
credentials: 'include'
}).then((response) => {
if (response.status >= 400) {
throw new Error('Bad response from the server')
}
return response.json();
})
}
| Include credentials in API call | Include credentials in API call
| JavaScript | mit | inonit/django-chemtrails,inonit/django-chemtrails,inonit/django-chemtrails | javascript | ## Code Before:
import 'isomorphic-fetch'
/**
* Fetch a list of nodes and their relation types
*/
export function fetchNodeList() {
return fetch('//localhost:8000/admin/chemtrails_permissions/accessrule/nodelist/').then((response) => {
if (response.status >= 400) {
throw new Error('Bad response from the server')
}
return response.json();
})
}
## Instruction:
Include credentials in API call
## Code After:
import 'isomorphic-fetch'
/**
* Fetch a list of nodes and their relation types
*/
export function fetchNodeList() {
return fetch('//localhost:8000/admin/chemtrails_permissions/accessrule/nodelist/', {
credentials: 'include'
}).then((response) => {
if (response.status >= 400) {
throw new Error('Bad response from the server')
}
return response.json();
})
}
| import 'isomorphic-fetch'
/**
* Fetch a list of nodes and their relation types
*/
export function fetchNodeList() {
- return fetch('//localhost:8000/admin/chemtrails_permissions/accessrule/nodelist/').then((response) => {
? ^^^^^^^^^^^^^^^^^^^^
+ return fetch('//localhost:8000/admin/chemtrails_permissions/accessrule/nodelist/', {
? ^
+ credentials: 'include'
+ }).then((response) => {
if (response.status >= 400) {
throw new Error('Bad response from the server')
}
return response.json();
})
} | 4 | 0.307692 | 3 | 1 |
c2f2acc518f017a0d7b8ccfa6640595f2769aa98 | nib/plugins/prettyurls.py | nib/plugins/prettyurls.py | from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)$ /$1.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)/$ /$1 [L,R]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)/$ /$1 [L,R]
"""
apache_redirects_base = b"""
RewriteEngine on
RewriteBase /
"""
@after
class PrettyURLProcessor(Processor):
def process(self, documents, resources):
for document in documents:
filename = path.basename(document.uri)
if filename == 'index.html':
document.uri = path.dirname(document.path)
elif document.extension == '.html':
document.uri = document.path
htaccess = None
for resource in resources:
if resource.path == '.htaccess':
htaccess = resource
if not htaccess:
htaccess = Resource(path='.htaccess',
content=apache_redirects_base)
resources.append(htaccess)
htaccess.content += apache_redirects
return documents, resources
| from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)$ /$1.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)/$ /$1 [L,R]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)/$ /$1 [L,R]
"""
apache_redirects_base = b"""
RewriteEngine on
RewriteBase /
"""
nginx_rules = b"""
location / {
#root {0};
index index.html;
try_files $uri $uri.html $uri/index.html;
}
"""
@after
class PrettyURLProcessor(Processor):
def process(self, documents, resources):
for document in documents:
filename = path.basename(document.uri)
if filename == 'index.html':
document.uri = path.dirname(document.path)
elif document.extension == '.html':
document.uri = document.path
htaccess = None
for resource in resources:
if resource.path == '.htaccess':
htaccess = resource
if not htaccess:
htaccess = Resource(path='.htaccess',
content=apache_redirects_base)
resources.append(htaccess)
htaccess.content += apache_redirects
nginx = Resource(path='.nginx',
content=nginx_rules)
resources.append(nginx)
return documents, resources
| Add nginx rules for pretty URLs | Add nginx rules for pretty URLs
| Python | mit | jreese/nib | python | ## Code Before:
from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)$ /$1.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)/$ /$1 [L,R]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)/$ /$1 [L,R]
"""
apache_redirects_base = b"""
RewriteEngine on
RewriteBase /
"""
@after
class PrettyURLProcessor(Processor):
def process(self, documents, resources):
for document in documents:
filename = path.basename(document.uri)
if filename == 'index.html':
document.uri = path.dirname(document.path)
elif document.extension == '.html':
document.uri = document.path
htaccess = None
for resource in resources:
if resource.path == '.htaccess':
htaccess = resource
if not htaccess:
htaccess = Resource(path='.htaccess',
content=apache_redirects_base)
resources.append(htaccess)
htaccess.content += apache_redirects
return documents, resources
## Instruction:
Add nginx rules for pretty URLs
## Code After:
from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)$ /$1.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)/$ /$1 [L,R]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)/$ /$1 [L,R]
"""
apache_redirects_base = b"""
RewriteEngine on
RewriteBase /
"""
nginx_rules = b"""
location / {
#root {0};
index index.html;
try_files $uri $uri.html $uri/index.html;
}
"""
@after
class PrettyURLProcessor(Processor):
def process(self, documents, resources):
for document in documents:
filename = path.basename(document.uri)
if filename == 'index.html':
document.uri = path.dirname(document.path)
elif document.extension == '.html':
document.uri = document.path
htaccess = None
for resource in resources:
if resource.path == '.htaccess':
htaccess = resource
if not htaccess:
htaccess = Resource(path='.htaccess',
content=apache_redirects_base)
resources.append(htaccess)
htaccess.content += apache_redirects
nginx = Resource(path='.nginx',
content=nginx_rules)
resources.append(nginx)
return documents, resources
| from __future__ import absolute_import, division, print_function, unicode_literals
from os import path
from nib import Resource, Processor, after
apache_redirects = b"""
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)$ /$1/index.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)$ /$1.html [L]
RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f
RewriteRule ^(.*)/$ /$1 [L,R]
RewriteCond %{DOCUMENT_ROOT}/$1.html -f
RewriteRule ^(.*)/$ /$1 [L,R]
"""
apache_redirects_base = b"""
RewriteEngine on
RewriteBase /
"""
+ nginx_rules = b"""
+ location / {
+ #root {0};
+ index index.html;
+ try_files $uri $uri.html $uri/index.html;
+ }
+ """
+
@after
class PrettyURLProcessor(Processor):
def process(self, documents, resources):
for document in documents:
filename = path.basename(document.uri)
if filename == 'index.html':
document.uri = path.dirname(document.path)
elif document.extension == '.html':
document.uri = document.path
htaccess = None
for resource in resources:
if resource.path == '.htaccess':
htaccess = resource
if not htaccess:
htaccess = Resource(path='.htaccess',
content=apache_redirects_base)
resources.append(htaccess)
htaccess.content += apache_redirects
+ nginx = Resource(path='.nginx',
+ content=nginx_rules)
+ resources.append(nginx)
+
return documents, resources | 12 | 0.25 | 12 | 0 |
e86ad1b8fe54269e865ecb78346b4c3a8f211388 | Gulpfile.js | Gulpfile.js | 'use-strict';
//////////////////////////////
// Requires
//////////////////////////////
var gulp = require('gulp');
var svgSprite = require('gulp-svg-sprite');
var rename = require('gulp-rename');
// SVG Config
var config = {
mode: {
symbol: { // symbol mode to build the SVG
dest: 'sprite', // destination foldeer
sprite: 'sprite.svg', //sprite name
example: true // Build sample page
}
}
};
gulp.task('sprite-page', function() {
return gulp.src('svg/**/*.svg')
.pipe(svgSprite(config))
.pipe(gulp.dest('.'));
});
gulp.task('sprite-shortcut', function() {
return gulp.src('sprite/sprite.svg')
.pipe(rename('sprite.svg'))
.pipe(gulp.dest('.'));
});
gulp.task('default', ['sprite-page', 'sprite-shortcut']);
| 'use-strict';
//////////////////////////////
// Requires
//////////////////////////////
var gulp = require('gulp');
var svgSprite = require('gulp-svg-sprite');
// SVG Config
var config = {
mode: {
symbol: { // symbol mode to build the SVG
dest: 'sprite', // destination foldeer
sprite: 'sprite.svg', //sprite name
example: true // Build sample page
}
}
};
gulp.task('sprite-page', function() {
return gulp.src('svg/**/*.svg')
.pipe(svgSprite(config))
.pipe(gulp.dest('.'));
});
gulp.task('sprite-shortcut', function() {
return gulp.src('sprite/sprite.svg')
.pipe(gulp.dest('.'));
});
gulp.task('default', ['sprite-page', 'sprite-shortcut']);
| Remove rename since gulp.dest will copy files on its own | Remove rename since gulp.dest will copy files on its own
| JavaScript | mit | una/svg-icon-system-boilerplate,una/svg-icon-system-boilerplate | javascript | ## Code Before:
'use-strict';
//////////////////////////////
// Requires
//////////////////////////////
var gulp = require('gulp');
var svgSprite = require('gulp-svg-sprite');
var rename = require('gulp-rename');
// SVG Config
var config = {
mode: {
symbol: { // symbol mode to build the SVG
dest: 'sprite', // destination foldeer
sprite: 'sprite.svg', //sprite name
example: true // Build sample page
}
}
};
gulp.task('sprite-page', function() {
return gulp.src('svg/**/*.svg')
.pipe(svgSprite(config))
.pipe(gulp.dest('.'));
});
gulp.task('sprite-shortcut', function() {
return gulp.src('sprite/sprite.svg')
.pipe(rename('sprite.svg'))
.pipe(gulp.dest('.'));
});
gulp.task('default', ['sprite-page', 'sprite-shortcut']);
## Instruction:
Remove rename since gulp.dest will copy files on its own
## Code After:
'use-strict';
//////////////////////////////
// Requires
//////////////////////////////
var gulp = require('gulp');
var svgSprite = require('gulp-svg-sprite');
// SVG Config
var config = {
mode: {
symbol: { // symbol mode to build the SVG
dest: 'sprite', // destination foldeer
sprite: 'sprite.svg', //sprite name
example: true // Build sample page
}
}
};
gulp.task('sprite-page', function() {
return gulp.src('svg/**/*.svg')
.pipe(svgSprite(config))
.pipe(gulp.dest('.'));
});
gulp.task('sprite-shortcut', function() {
return gulp.src('sprite/sprite.svg')
.pipe(gulp.dest('.'));
});
gulp.task('default', ['sprite-page', 'sprite-shortcut']);
| 'use-strict';
//////////////////////////////
// Requires
//////////////////////////////
var gulp = require('gulp');
var svgSprite = require('gulp-svg-sprite');
- var rename = require('gulp-rename');
-
// SVG Config
var config = {
mode: {
symbol: { // symbol mode to build the SVG
dest: 'sprite', // destination foldeer
sprite: 'sprite.svg', //sprite name
example: true // Build sample page
}
}
};
gulp.task('sprite-page', function() {
return gulp.src('svg/**/*.svg')
.pipe(svgSprite(config))
.pipe(gulp.dest('.'));
});
gulp.task('sprite-shortcut', function() {
return gulp.src('sprite/sprite.svg')
- .pipe(rename('sprite.svg'))
.pipe(gulp.dest('.'));
});
gulp.task('default', ['sprite-page', 'sprite-shortcut']); | 3 | 0.085714 | 0 | 3 |
6837e4c5b8b0a6b9566ef91ef0ae33e789bb6fd4 | doom.d/config.el | doom.d/config.el | ;;; ~/.doom.d/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here
(setq
doom-font (font-spec :family "Iosevka" :size 16)
doom-theme 'doom-one-light)
; doom-theme 'doom-molokai)
; ln -s /Users/david/Library/Mobile\ Documents/iCloud\~com\~appsonthemove\~beorg/Documents/org org
(setq org-agenda-files
(list
"~/org/inbox.org"
"~/org/notes.org"
"~/org/zignyl.org"))
; log the time when something is marked done
(setq org-log-done 'time)
(map! (:map override
"C-l" #'switch-to-buffer)
;; global keybindings
:n "J" #'evil-scroll-page-down
:n "K" #'evil-scroll-page-up
:v "\\\\" #'evil-commentary-line)
; :localleader
; "s" #'whitespace-mode)
(setq
mac-command-modifier 'meta
mac-option-modifier 'super)
(setq doom-localleader-key ",")
| ;;; ~/.doom.d/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here
(setq
doom-font (font-spec :family "Iosevka" :size 16)
doom-theme 'leuven)
; doom-theme 'doom-molokai)
; ln -s /Users/david/Library/Mobile\ Documents/iCloud\~com\~appsonthemove\~beorg/Documents/org org
(setq org-agenda-files '("~/org"))
; log the time when something is marked done
(setq org-log-done 'time)
(map! (:map override
"C-l" #'switch-to-buffer)
;; global keybindings
:n "J" #'evil-scroll-page-down
:n "K" #'evil-scroll-page-up
:v "\\\\" #'evil-commentary-line)
; :localleader
; "s" #'whitespace-mode)
(setq
mac-command-modifier 'meta
mac-option-modifier 'super)
(setq doom-localleader-key ",")
| Change color theme, track all under ~/org | Change color theme, track all under ~/org
| Emacs Lisp | mit | drmohundro/dotfiles | emacs-lisp | ## Code Before:
;;; ~/.doom.d/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here
(setq
doom-font (font-spec :family "Iosevka" :size 16)
doom-theme 'doom-one-light)
; doom-theme 'doom-molokai)
; ln -s /Users/david/Library/Mobile\ Documents/iCloud\~com\~appsonthemove\~beorg/Documents/org org
(setq org-agenda-files
(list
"~/org/inbox.org"
"~/org/notes.org"
"~/org/zignyl.org"))
; log the time when something is marked done
(setq org-log-done 'time)
(map! (:map override
"C-l" #'switch-to-buffer)
;; global keybindings
:n "J" #'evil-scroll-page-down
:n "K" #'evil-scroll-page-up
:v "\\\\" #'evil-commentary-line)
; :localleader
; "s" #'whitespace-mode)
(setq
mac-command-modifier 'meta
mac-option-modifier 'super)
(setq doom-localleader-key ",")
## Instruction:
Change color theme, track all under ~/org
## Code After:
;;; ~/.doom.d/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here
(setq
doom-font (font-spec :family "Iosevka" :size 16)
doom-theme 'leuven)
; doom-theme 'doom-molokai)
; ln -s /Users/david/Library/Mobile\ Documents/iCloud\~com\~appsonthemove\~beorg/Documents/org org
(setq org-agenda-files '("~/org"))
; log the time when something is marked done
(setq org-log-done 'time)
(map! (:map override
"C-l" #'switch-to-buffer)
;; global keybindings
:n "J" #'evil-scroll-page-down
:n "K" #'evil-scroll-page-up
:v "\\\\" #'evil-commentary-line)
; :localleader
; "s" #'whitespace-mode)
(setq
mac-command-modifier 'meta
mac-option-modifier 'super)
(setq doom-localleader-key ",")
| ;;; ~/.doom.d/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here
(setq
doom-font (font-spec :family "Iosevka" :size 16)
- doom-theme 'doom-one-light)
+ doom-theme 'leuven)
; doom-theme 'doom-molokai)
; ln -s /Users/david/Library/Mobile\ Documents/iCloud\~com\~appsonthemove\~beorg/Documents/org org
- (setq org-agenda-files
+ (setq org-agenda-files '("~/org"))
? ++++++++++++
- (list
- "~/org/inbox.org"
- "~/org/notes.org"
- "~/org/zignyl.org"))
; log the time when something is marked done
(setq org-log-done 'time)
(map! (:map override
"C-l" #'switch-to-buffer)
;; global keybindings
:n "J" #'evil-scroll-page-down
:n "K" #'evil-scroll-page-up
:v "\\\\" #'evil-commentary-line)
; :localleader
; "s" #'whitespace-mode)
(setq
mac-command-modifier 'meta
mac-option-modifier 'super)
(setq doom-localleader-key ",")
| 8 | 0.210526 | 2 | 6 |
0c218695366ef92082d91b98d12e74ec73c014f9 | .travis.yml | .travis.yml | language: python
python:
- "2.7"
install: "pip install -r requirements.txt --use-mirrors"
before_script:
- npm install -g jshint
- cp settings.sample.py settings.py
- export=LINTREVIEW_SETTINGS=./settings.py
script: "nosetests"
notifications:
email:
on_failure: change
| language: python
python:
- "2.7"
install: "pip install -r requirements.txt --use-mirrors"
before_script:
- npm install -g jshint
- cp settings.sample.py settings.py
env:
- LINTREVIEW_SETTINGS="./settings.py"
script: "nosetests"
notifications:
email:
on_failure: change
| Update how environment vars are set. | Update how environment vars are set.
| YAML | mit | zoidbergwill/lint-review,adrianmoisey/lint-review,markstory/lint-review,markstory/lint-review,adrianmoisey/lint-review,markstory/lint-review,zoidbergwill/lint-review,zoidbergwill/lint-review | yaml | ## Code Before:
language: python
python:
- "2.7"
install: "pip install -r requirements.txt --use-mirrors"
before_script:
- npm install -g jshint
- cp settings.sample.py settings.py
- export=LINTREVIEW_SETTINGS=./settings.py
script: "nosetests"
notifications:
email:
on_failure: change
## Instruction:
Update how environment vars are set.
## Code After:
language: python
python:
- "2.7"
install: "pip install -r requirements.txt --use-mirrors"
before_script:
- npm install -g jshint
- cp settings.sample.py settings.py
env:
- LINTREVIEW_SETTINGS="./settings.py"
script: "nosetests"
notifications:
email:
on_failure: change
| language: python
python:
- "2.7"
install: "pip install -r requirements.txt --use-mirrors"
before_script:
- npm install -g jshint
- cp settings.sample.py settings.py
+ env:
- - export=LINTREVIEW_SETTINGS=./settings.py
? -------
+ - LINTREVIEW_SETTINGS="./settings.py"
? + +
script: "nosetests"
notifications:
email:
on_failure: change | 3 | 0.25 | 2 | 1 |
5830d21a0304704d10ea5173ab4596848eefff26 | subreddit.js | subreddit.js | var bar = $('.sr-list');
var subreddits = ['nba', 'madmen', 'gameofthrones', 'programming', 'python', 'starcraft', 'malefashionadvice',
'wow', 'arduino', 'videos'];
bar.empty();
bar.append('<ul class="flat-list sr-bar hover">'+
'<li><a href="http://www.reddit.com/r/all">all</a></li>'+
'<li><span class="separator">-</span><a href="http://www.reddit.com/r/random/">random</a></li>'+
'</ul>');
bar.append('<span class="separator"> | </span>');
bar.append('<ul class="flat-list sr-bar hover" id="myreddit"></ul>');
var myreddit = $('ul#myreddit');
var i, len;
for (i = 0, len = subreddits.length; i < len; ++i) {
if (i != 0) {
myreddit.append('<li><span class="separator">-</span>'+
'<a href="http://reddit.com/r/'+subreddits[i]+'/">'+subreddits[i]+'</a></li>');
} else {
myreddit.append('<li><a href="http://reddit.com/r/'+subreddits[i]+'/">'+subreddits[i]+'</a></li>');
}
}
| var $bar = $('.sr-list');
var $customBar = $('.flat-list.sr-bar.hover:eq(1)');
var subreddits = ['nba', 'madmen', 'gameofthrones', 'programming', 'python', 'starcraft', 'malefashionadvice',
'wow', 'arduino', 'videos'];
var i, len;
$customBar.empty();
$bar.children('span.separator:eq(1)').remove();
$bar.children('.flat-list.sr-bar.hover:eq(2)').remove();
for (i = 0, len = subreddits.length; i < len; ++i) {
if (i != 0) {
$customBar.append('<li><span class="separator">-</span>'+
'<a href="http://reddit.com/r/'+subreddits[i]+'/">'+subreddits[i]+'</a></li>');
} else {
$customBar.append('<li><a href="http://reddit.com/r/'+subreddits[i]+'/">'+subreddits[i]+'</a></li>');
}
}
| Use eq() to select correct elements | Use eq() to select correct elements
| JavaScript | mit | oliviert/pinnit | javascript | ## Code Before:
var bar = $('.sr-list');
var subreddits = ['nba', 'madmen', 'gameofthrones', 'programming', 'python', 'starcraft', 'malefashionadvice',
'wow', 'arduino', 'videos'];
bar.empty();
bar.append('<ul class="flat-list sr-bar hover">'+
'<li><a href="http://www.reddit.com/r/all">all</a></li>'+
'<li><span class="separator">-</span><a href="http://www.reddit.com/r/random/">random</a></li>'+
'</ul>');
bar.append('<span class="separator"> | </span>');
bar.append('<ul class="flat-list sr-bar hover" id="myreddit"></ul>');
var myreddit = $('ul#myreddit');
var i, len;
for (i = 0, len = subreddits.length; i < len; ++i) {
if (i != 0) {
myreddit.append('<li><span class="separator">-</span>'+
'<a href="http://reddit.com/r/'+subreddits[i]+'/">'+subreddits[i]+'</a></li>');
} else {
myreddit.append('<li><a href="http://reddit.com/r/'+subreddits[i]+'/">'+subreddits[i]+'</a></li>');
}
}
## Instruction:
Use eq() to select correct elements
## Code After:
var $bar = $('.sr-list');
var $customBar = $('.flat-list.sr-bar.hover:eq(1)');
var subreddits = ['nba', 'madmen', 'gameofthrones', 'programming', 'python', 'starcraft', 'malefashionadvice',
'wow', 'arduino', 'videos'];
var i, len;
$customBar.empty();
$bar.children('span.separator:eq(1)').remove();
$bar.children('.flat-list.sr-bar.hover:eq(2)').remove();
for (i = 0, len = subreddits.length; i < len; ++i) {
if (i != 0) {
$customBar.append('<li><span class="separator">-</span>'+
'<a href="http://reddit.com/r/'+subreddits[i]+'/">'+subreddits[i]+'</a></li>');
} else {
$customBar.append('<li><a href="http://reddit.com/r/'+subreddits[i]+'/">'+subreddits[i]+'</a></li>');
}
}
| - var bar = $('.sr-list');
+ var $bar = $('.sr-list');
? +
+ var $customBar = $('.flat-list.sr-bar.hover:eq(1)');
var subreddits = ['nba', 'madmen', 'gameofthrones', 'programming', 'python', 'starcraft', 'malefashionadvice',
'wow', 'arduino', 'videos'];
- bar.empty();
- bar.append('<ul class="flat-list sr-bar hover">'+
- '<li><a href="http://www.reddit.com/r/all">all</a></li>'+
- '<li><span class="separator">-</span><a href="http://www.reddit.com/r/random/">random</a></li>'+
- '</ul>');
- bar.append('<span class="separator"> | </span>');
- bar.append('<ul class="flat-list sr-bar hover" id="myreddit"></ul>');
- var myreddit = $('ul#myreddit');
var i, len;
+ $customBar.empty();
+ $bar.children('span.separator:eq(1)').remove();
+ $bar.children('.flat-list.sr-bar.hover:eq(2)').remove();
for (i = 0, len = subreddits.length; i < len; ++i) {
if (i != 0) {
- myreddit.append('<li><span class="separator">-</span>'+
? ^ -----
+ $customBar.append('<li><span class="separator">-</span>'+
? ++++++ ^^
'<a href="http://reddit.com/r/'+subreddits[i]+'/">'+subreddits[i]+'</a></li>');
} else {
- myreddit.append('<li><a href="http://reddit.com/r/'+subreddits[i]+'/">'+subreddits[i]+'</a></li>');
? ^ -----
+ $customBar.append('<li><a href="http://reddit.com/r/'+subreddits[i]+'/">'+subreddits[i]+'</a></li>');
? ++++++ ^^
}
} | 18 | 0.9 | 7 | 11 |
554d61a3ba43fe0d1416376f0eb4201b25c95481 | client/templates/photos/photo_new.html | client/templates/photos/photo_new.html | <template name="photoNew">
<form name="photo" class="item-form form" enctype="multipart/form-data">
<div class="form-group">
<div class="controls">
<div class="fileUpload btn btn-primary btn-lg">
<span class="glyphicon glyphicon-camera"></span>
<input class="upload" id="fileinput" type="file" name="bitmap" accept="image/*">
</div>
{{#if photosUploaded}}
<div>
<label>Klik op OK om foto(s) te bewaren.</label>
</div>
{{/if}}
<BR>
<BR>
Voor wie is deze foto bestemd?
<BR>
<BR>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="radio 1" id="Everyone" autocomplete="off" checked> Iedereen
</label>
<label class="btn btn-primary">
<input type="radio" name="radio 2" id="Select" autocomplete="off"> Selecteer leden
</label>
</div>
</div>
</div>
<button type="submit" class="btn btn-primary submit">{{_ "OK"}}</button>
<button type="button" class="btn btn-default cancel">{{_ "Cancel"}}</button>
</form>
</template>
| <template name="photoNew">
<form name="photo" class="item-form form" enctype="multipart/form-data">
<div class="form-group">
<div class="controls">
<div class="fileUpload btn btn-primary btn-lg">
<span class="glyphicon glyphicon-camera"></span>
<input class="upload" id="fileinput" type="file" name="bitmap" accept="image/*;capture=camera">
</div>
{{#if photosUploaded}}
<div>
<label>Klik op OK om foto(s) te bewaren.</label>
</div>
{{/if}}
<BR>
<BR>
Voor wie is deze foto bestemd?
<BR>
<BR>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="radio 1" id="Everyone" autocomplete="off" checked> Iedereen
</label>
<label class="btn btn-primary">
<input type="radio" name="radio 2" id="Select" autocomplete="off"> Selecteer leden
</label>
</div>
</div>
</div>
<button type="submit" class="btn btn-primary submit">{{_ "OK"}}</button>
<button type="button" class="btn btn-default cancel">{{_ "Cancel"}}</button>
</form>
</template>
| Add camera as capture device | Add camera as capture device
| HTML | mit | mxipartners/mijnmxi,mxipartners/mijnmxi,mxipartners/mijnmxi | html | ## Code Before:
<template name="photoNew">
<form name="photo" class="item-form form" enctype="multipart/form-data">
<div class="form-group">
<div class="controls">
<div class="fileUpload btn btn-primary btn-lg">
<span class="glyphicon glyphicon-camera"></span>
<input class="upload" id="fileinput" type="file" name="bitmap" accept="image/*">
</div>
{{#if photosUploaded}}
<div>
<label>Klik op OK om foto(s) te bewaren.</label>
</div>
{{/if}}
<BR>
<BR>
Voor wie is deze foto bestemd?
<BR>
<BR>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="radio 1" id="Everyone" autocomplete="off" checked> Iedereen
</label>
<label class="btn btn-primary">
<input type="radio" name="radio 2" id="Select" autocomplete="off"> Selecteer leden
</label>
</div>
</div>
</div>
<button type="submit" class="btn btn-primary submit">{{_ "OK"}}</button>
<button type="button" class="btn btn-default cancel">{{_ "Cancel"}}</button>
</form>
</template>
## Instruction:
Add camera as capture device
## Code After:
<template name="photoNew">
<form name="photo" class="item-form form" enctype="multipart/form-data">
<div class="form-group">
<div class="controls">
<div class="fileUpload btn btn-primary btn-lg">
<span class="glyphicon glyphicon-camera"></span>
<input class="upload" id="fileinput" type="file" name="bitmap" accept="image/*;capture=camera">
</div>
{{#if photosUploaded}}
<div>
<label>Klik op OK om foto(s) te bewaren.</label>
</div>
{{/if}}
<BR>
<BR>
Voor wie is deze foto bestemd?
<BR>
<BR>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="radio 1" id="Everyone" autocomplete="off" checked> Iedereen
</label>
<label class="btn btn-primary">
<input type="radio" name="radio 2" id="Select" autocomplete="off"> Selecteer leden
</label>
</div>
</div>
</div>
<button type="submit" class="btn btn-primary submit">{{_ "OK"}}</button>
<button type="button" class="btn btn-default cancel">{{_ "Cancel"}}</button>
</form>
</template>
| <template name="photoNew">
<form name="photo" class="item-form form" enctype="multipart/form-data">
<div class="form-group">
<div class="controls">
<div class="fileUpload btn btn-primary btn-lg">
<span class="glyphicon glyphicon-camera"></span>
- <input class="upload" id="fileinput" type="file" name="bitmap" accept="image/*">
+ <input class="upload" id="fileinput" type="file" name="bitmap" accept="image/*;capture=camera">
? +++++++++++++++
</div>
{{#if photosUploaded}}
<div>
<label>Klik op OK om foto(s) te bewaren.</label>
</div>
{{/if}}
<BR>
<BR>
Voor wie is deze foto bestemd?
<BR>
<BR>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="radio 1" id="Everyone" autocomplete="off" checked> Iedereen
</label>
<label class="btn btn-primary">
<input type="radio" name="radio 2" id="Select" autocomplete="off"> Selecteer leden
</label>
</div>
</div>
</div>
<button type="submit" class="btn btn-primary submit">{{_ "OK"}}</button>
<button type="button" class="btn btn-default cancel">{{_ "Cancel"}}</button>
</form>
</template> | 2 | 0.0625 | 1 | 1 |
acb1a34584a2f31dbe59b77d48f782042293b049 | include/ieeefp.h | include/ieeefp.h | /* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef __i386__
#include <machine/floatingpoint.h>
#else /* !__i386__ */
extern fp_rnd fpgetround __P((void));
extern fp_rnd fpsetround __P((fp_rnd));
extern fp_except fpgetmask __P((void));
extern fp_except fpsetmask __P((fp_except));
extern fp_except fpgetsticky __P((void));
extern fp_except fpsetsticky __P((fp_except));
#endif /* __i386__ */
#endif /* _IEEEFP_H_ */
| /* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef __i386__
#include <machine/floatingpoint.h>
#else /* !__i386__ */
__BEGIN_DECLS
extern fp_rnd fpgetround __P((void));
extern fp_rnd fpsetround __P((fp_rnd));
extern fp_except fpgetmask __P((void));
extern fp_except fpsetmask __P((fp_except));
extern fp_except fpgetsticky __P((void));
extern fp_except fpsetsticky __P((fp_except));
__END_DECLS
#endif /* __i386__ */
#endif /* _IEEEFP_H_ */
| Allow fpsetmask(3) and friends to be used from a C++ program on the Alpha. | Allow fpsetmask(3) and friends to be used from a C++ program on the Alpha.
Reviewed by: dfr
| C | bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase | c | ## Code Before:
/* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef __i386__
#include <machine/floatingpoint.h>
#else /* !__i386__ */
extern fp_rnd fpgetround __P((void));
extern fp_rnd fpsetround __P((fp_rnd));
extern fp_except fpgetmask __P((void));
extern fp_except fpsetmask __P((fp_except));
extern fp_except fpgetsticky __P((void));
extern fp_except fpsetsticky __P((fp_except));
#endif /* __i386__ */
#endif /* _IEEEFP_H_ */
## Instruction:
Allow fpsetmask(3) and friends to be used from a C++ program on the Alpha.
Reviewed by: dfr
## Code After:
/* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef __i386__
#include <machine/floatingpoint.h>
#else /* !__i386__ */
__BEGIN_DECLS
extern fp_rnd fpgetround __P((void));
extern fp_rnd fpsetround __P((fp_rnd));
extern fp_except fpgetmask __P((void));
extern fp_except fpsetmask __P((fp_except));
extern fp_except fpgetsticky __P((void));
extern fp_except fpsetsticky __P((fp_except));
__END_DECLS
#endif /* __i386__ */
#endif /* _IEEEFP_H_ */
| /* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef __i386__
#include <machine/floatingpoint.h>
#else /* !__i386__ */
+ __BEGIN_DECLS
extern fp_rnd fpgetround __P((void));
extern fp_rnd fpsetround __P((fp_rnd));
extern fp_except fpgetmask __P((void));
extern fp_except fpsetmask __P((fp_except));
extern fp_except fpgetsticky __P((void));
extern fp_except fpsetsticky __P((fp_except));
+ __END_DECLS
#endif /* __i386__ */
#endif /* _IEEEFP_H_ */ | 2 | 0.08 | 2 | 0 |
61a290dc7541a7931c24728323651fbd0ad56d09 | app/views/documentation/api_examples/_php.html.haml | app/views/documentation/api_examples/_php.html.haml | %p Use the following code snippet to get data from the API.
:coderay
#!php
<?php
$morph_api_url = "https://api.morph.io/[USERNAME]/[SCRAPER NAME]/data.json";
$morph_api_key="[API KEY]";
$query="select * from 'data' limit 10";
$response=file_get_contents($morph_api_url.'?key='.$morph_api_key.'&query='.urlencode($query));
$js=json_decode($response,true);
foreach ($js as $line){
[DO WIZARDRY]
}
?>
| %p Use the following code snippet to get data from the API.
- block = capture do
:coderay
#!php
<?php
$morph_api_url = "[scraper_url]/data.json";
$morph_api_key="[api_key]";
$query="[query]";
$response=file_get_contents($morph_api_url.'?key='.$morph_api_key.'&query='.urlencode($query));
$js=json_decode($response,true);
foreach ($js as $line){
[DO WIZARDRY]
}
?>
= block.sub('[scraper_url]', "#{api_root}<span class='full_name'>#{h(@scraper.full_name)}</span>").sub('[api_key]', "<span class='unescaped-api_key'>#{current_user ? current_user.api_key : '[api_key]'}</span>").sub('[query]', "<span class='unescaped-query'>#{h(@query)}</span>").html_safe
| Make values in php example live updating | Make values in php example live updating
| Haml | agpl-3.0 | openaustralia/morph,otherchirps/morph,openaustralia/morph,openaustralia/morph,otherchirps/morph,openaustralia/morph,otherchirps/morph,otherchirps/morph,openaustralia/morph,otherchirps/morph,openaustralia/morph,otherchirps/morph,openaustralia/morph,otherchirps/morph | haml | ## Code Before:
%p Use the following code snippet to get data from the API.
:coderay
#!php
<?php
$morph_api_url = "https://api.morph.io/[USERNAME]/[SCRAPER NAME]/data.json";
$morph_api_key="[API KEY]";
$query="select * from 'data' limit 10";
$response=file_get_contents($morph_api_url.'?key='.$morph_api_key.'&query='.urlencode($query));
$js=json_decode($response,true);
foreach ($js as $line){
[DO WIZARDRY]
}
?>
## Instruction:
Make values in php example live updating
## Code After:
%p Use the following code snippet to get data from the API.
- block = capture do
:coderay
#!php
<?php
$morph_api_url = "[scraper_url]/data.json";
$morph_api_key="[api_key]";
$query="[query]";
$response=file_get_contents($morph_api_url.'?key='.$morph_api_key.'&query='.urlencode($query));
$js=json_decode($response,true);
foreach ($js as $line){
[DO WIZARDRY]
}
?>
= block.sub('[scraper_url]', "#{api_root}<span class='full_name'>#{h(@scraper.full_name)}</span>").sub('[api_key]', "<span class='unescaped-api_key'>#{current_user ? current_user.api_key : '[api_key]'}</span>").sub('[query]', "<span class='unescaped-query'>#{h(@query)}</span>").html_safe
| %p Use the following code snippet to get data from the API.
+ - block = capture do
- :coderay
+ :coderay
? ++
- #!php
+ #!php
? ++
- <?php
+ <?php
? ++
- $morph_api_url = "https://api.morph.io/[USERNAME]/[SCRAPER NAME]/data.json";
- $morph_api_key="[API KEY]";
+ $morph_api_url = "[scraper_url]/data.json";
+ $morph_api_key="[api_key]";
- $query="select * from 'data' limit 10";
+ $query="[query]";
- $response=file_get_contents($morph_api_url.'?key='.$morph_api_key.'&query='.urlencode($query));
+ $response=file_get_contents($morph_api_url.'?key='.$morph_api_key.'&query='.urlencode($query));
? ++
- $js=json_decode($response,true);
+ $js=json_decode($response,true);
? ++
- foreach ($js as $line){
+ foreach ($js as $line){
? ++
- [DO WIZARDRY]
+ [DO WIZARDRY]
? ++
- }
+ }
? ++
- ?>
+ ?>
? ++
+
+ = block.sub('[scraper_url]', "#{api_root}<span class='full_name'>#{h(@scraper.full_name)}</span>").sub('[api_key]', "<span class='unescaped-api_key'>#{current_user ? current_user.api_key : '[api_key]'}</span>").sub('[query]', "<span class='unescaped-query'>#{h(@query)}</span>").html_safe | 27 | 1.588235 | 15 | 12 |
3c8c62370d1b12a81883df429d448353a96160c9 | bower.sh | bower.sh |
cwd=$(pwd)
function install_bower {
dir=$1
cwd=$2
for folder in ${dir}; do
dirname="$cwd/$folder"
echo "$dirname\n"
if [[ ! -d "$dirname" ]]; then
continue
fi;
cd $dirname
echo $dirname
if [ -e bower.json ]; then
bower install
fi
done
cd $cwd
}
install_bower "module/*" $cwd
install_bower "vendor/*/*" $cwd
#root install
bower install
|
cwd=$(pwd)
function install_bower {
dir=$1
cwd=$2
for folder in ${dir}; do
dirname="$cwd/$folder"
if [[ ! -d "$dirname" ]]; then
continue
fi;
cd $dirname
if [ -e bower.json ]; then
bower install
fi
done
cd $cwd
}
install_bower "module/*" $cwd
install_bower "vendor/*/*" $cwd
#root install
bower install
| Remove debug and fix shebang | Remove debug and fix shebang
| Shell | mit | WeareJH/Hub,WeareJH/Hub,WeareJH/Hub | shell | ## Code Before:
cwd=$(pwd)
function install_bower {
dir=$1
cwd=$2
for folder in ${dir}; do
dirname="$cwd/$folder"
echo "$dirname\n"
if [[ ! -d "$dirname" ]]; then
continue
fi;
cd $dirname
echo $dirname
if [ -e bower.json ]; then
bower install
fi
done
cd $cwd
}
install_bower "module/*" $cwd
install_bower "vendor/*/*" $cwd
#root install
bower install
## Instruction:
Remove debug and fix shebang
## Code After:
cwd=$(pwd)
function install_bower {
dir=$1
cwd=$2
for folder in ${dir}; do
dirname="$cwd/$folder"
if [[ ! -d "$dirname" ]]; then
continue
fi;
cd $dirname
if [ -e bower.json ]; then
bower install
fi
done
cd $cwd
}
install_bower "module/*" $cwd
install_bower "vendor/*/*" $cwd
#root install
bower install
|
cwd=$(pwd)
function install_bower {
dir=$1
cwd=$2
for folder in ${dir}; do
dirname="$cwd/$folder"
- echo "$dirname\n"
-
if [[ ! -d "$dirname" ]]; then
continue
fi;
-
cd $dirname
- echo $dirname
-
if [ -e bower.json ]; then
bower install
fi
done
cd $cwd
}
install_bower "module/*" $cwd
install_bower "vendor/*/*" $cwd
#root install
bower install
| 5 | 0.142857 | 0 | 5 |
361edf438eaa7bbe7e0b14cc5c78c238be7c650c | plugins/system/conntrack-metrics.rb | plugins/system/conntrack-metrics.rb |
require 'sensu-plugin/metric/cli'
require 'socket'
class Conntrack < Sensu::Plugin::Metric::CLI::Graphite
option :scheme,
description: 'Metric naming scheme, text to prepend to .$parent.$child',
long: '--scheme SCHEME',
default: "#{Socket.gethostname}.conntrack.connections"
option :table,
description: 'Table to count',
long: '--table TABLE',
default: 'conntrack'
def run
value = `conntrack -C #{config[:table]}`.strip
timestamp = Time.now.to_i
output config[:scheme], value, timestamp
ok
end
end
|
require 'sensu-plugin/metric/cli'
require 'socket'
class Conntrack < Sensu::Plugin::Metric::CLI::Graphite
option :scheme,
description: 'Metric naming scheme, text to prepend to .$parent.$child',
long: '--scheme SCHEME',
default: "#{Socket.gethostname}.conntrack.connections"
option :table,
description: 'Table to count',
long: '--table TABLE',
default: 'conntrack'
def run
value = `conntrack -C #{config[:table]} 2>/dev/null`.strip
timestamp = Time.now.to_i
output config[:scheme], value, timestamp
ok
end
end
| Exclude errors in the conntrack shell output | Exclude errors in the conntrack shell output
This keeps warning messages from being sent to graphite in addition to the metric values.
| Ruby | mit | alexhjlee/sensu-community-plugins,justanshulsharma/sensu-community-plugins,gferguson-gd/sensu-community-plugins,gferguson-gd/sensu-community-plugins,jbehrends/sensu-community-plugins,tuenti/sensu-community-plugins,pkaeding/sensu-community-plugins,zerOnepal/sensu-community-plugins,nilroy/sensu-community-plugins,shnmorimoto/sensu-community-plugins,plasticbrain/sensu-community-plugins,pkaeding/sensu-community-plugins,tuenti/sensu-community-plugins,circleback/sensu-community-plugins,nagas/sensu-community-plugins,emillion/sensu-community-plugins,circleback/sensu-community-plugins,alexhjlee/sensu-community-plugins,himyouten/sensu-community-plugins,shnmorimoto/sensu-community-plugins,madAndroid/sensu-community-plugins,cread/sensu-community-plugins,lfdesousa/sensu-community-plugins,zerOnepal/sensu-community-plugins,nagas/sensu-community-plugins,jennytoo/sensu-community-plugins,giorgiosironi/sensu-community-plugins,circleback/sensu-community-plugins,justanshulsharma/sensu-community-plugins,jbehrends/sensu-community-plugins,circleback/sensu-community-plugins,new23d/sensu-community-plugins,nilroy/sensu-community-plugins,ideais/sensu-community-plugins,rikaard-groupby/sensu-community-plugins,giorgiosironi/sensu-community-plugins,giorgiosironi/sensu-community-plugins,shnmorimoto/sensu-community-plugins,julienba/sensu-community-plugins,justanshulsharma/sensu-community-plugins,mecavity/sensu-community-plugins,Squarespace/sensu-community-plugins,thehyve/sensu-community-plugins,petere/sensu-community-plugins,nilroy/sensu-community-plugins,tuenti/sensu-community-plugins,cmattoon/sensu-community-plugins,warmfusion/sensu-community-plugins,madAndroid/sensu-community-plugins,alexhjlee/sensu-community-plugins,intoximeters/sensu-community-plugins,mecavity/sensu-community-plugins,cread/sensu-community-plugins,Seraf/sensu-community-plugins,cmattoon/sensu-community-plugins,aryeguy/sensu-community-plugins,petere/sensu-community-plugins,estately/sensu-community-plugins,warmfusion/sensu-community-plugins,ideais/sensu-community-plugins,ideais/sensu-community-plugins,shnmorimoto/sensu-community-plugins,justanshulsharma/sensu-community-plugins,plasticbrain/sensu-community-plugins,lfdesousa/sensu-community-plugins,emillion/sensu-community-plugins,loveholidays/sensu-plugins,jennytoo/sensu-community-plugins,plasticbrain/sensu-community-plugins,cread/sensu-community-plugins,julienba/sensu-community-plugins,thehyve/sensu-community-plugins,Seraf/sensu-community-plugins,cotocisternas/sensu-community-plugins,intoximeters/sensu-community-plugins,julienba/sensu-community-plugins,petere/sensu-community-plugins,himyouten/sensu-community-plugins,emillion/sensu-community-plugins,tuenti/sensu-community-plugins,jbehrends/sensu-community-plugins,pkaeding/sensu-community-plugins,Seraf/sensu-community-plugins,new23d/sensu-community-plugins,giorgiosironi/sensu-community-plugins,cotocisternas/sensu-community-plugins,lfdesousa/sensu-community-plugins,new23d/sensu-community-plugins,aryeguy/sensu-community-plugins,zerOnepal/sensu-community-plugins,nilroy/sensu-community-plugins,intoximeters/sensu-community-plugins,julienba/sensu-community-plugins,estately/sensu-community-plugins,gferguson-gd/sensu-community-plugins,plasticbrain/sensu-community-plugins,tuenti/sensu-community-plugins,warmfusion/sensu-community-plugins,himyouten/sensu-community-plugins,zerOnepal/sensu-community-plugins,warmfusion/sensu-community-plugins,Squarespace/sensu-community-plugins,himyouten/sensu-community-plugins,thehyve/sensu-community-plugins,aryeguy/sensu-community-plugins,rikaard-groupby/sensu-community-plugins,mecavity/sensu-community-plugins,new23d/sensu-community-plugins,alexhjlee/sensu-community-plugins,loveholidays/sensu-plugins,Seraf/sensu-community-plugins,rikaard-groupby/sensu-community-plugins,loveholidays/sensu-plugins,mecavity/sensu-community-plugins,jbehrends/sensu-community-plugins,madAndroid/sensu-community-plugins,jennytoo/sensu-community-plugins,gferguson-gd/sensu-community-plugins,madAndroid/sensu-community-plugins,cmattoon/sensu-community-plugins,estately/sensu-community-plugins,ideais/sensu-community-plugins,petere/sensu-community-plugins,thehyve/sensu-community-plugins,estately/sensu-community-plugins,lfdesousa/sensu-community-plugins,emillion/sensu-community-plugins,aryeguy/sensu-community-plugins,nagas/sensu-community-plugins,cmattoon/sensu-community-plugins,cotocisternas/sensu-community-plugins,cotocisternas/sensu-community-plugins,intoximeters/sensu-community-plugins,Squarespace/sensu-community-plugins,loveholidays/sensu-plugins,nagas/sensu-community-plugins,cread/sensu-community-plugins,pkaeding/sensu-community-plugins,jennytoo/sensu-community-plugins,rikaard-groupby/sensu-community-plugins,Squarespace/sensu-community-plugins | ruby | ## Code Before:
require 'sensu-plugin/metric/cli'
require 'socket'
class Conntrack < Sensu::Plugin::Metric::CLI::Graphite
option :scheme,
description: 'Metric naming scheme, text to prepend to .$parent.$child',
long: '--scheme SCHEME',
default: "#{Socket.gethostname}.conntrack.connections"
option :table,
description: 'Table to count',
long: '--table TABLE',
default: 'conntrack'
def run
value = `conntrack -C #{config[:table]}`.strip
timestamp = Time.now.to_i
output config[:scheme], value, timestamp
ok
end
end
## Instruction:
Exclude errors in the conntrack shell output
This keeps warning messages from being sent to graphite in addition to the metric values.
## Code After:
require 'sensu-plugin/metric/cli'
require 'socket'
class Conntrack < Sensu::Plugin::Metric::CLI::Graphite
option :scheme,
description: 'Metric naming scheme, text to prepend to .$parent.$child',
long: '--scheme SCHEME',
default: "#{Socket.gethostname}.conntrack.connections"
option :table,
description: 'Table to count',
long: '--table TABLE',
default: 'conntrack'
def run
value = `conntrack -C #{config[:table]} 2>/dev/null`.strip
timestamp = Time.now.to_i
output config[:scheme], value, timestamp
ok
end
end
|
require 'sensu-plugin/metric/cli'
require 'socket'
class Conntrack < Sensu::Plugin::Metric::CLI::Graphite
option :scheme,
description: 'Metric naming scheme, text to prepend to .$parent.$child',
long: '--scheme SCHEME',
default: "#{Socket.gethostname}.conntrack.connections"
option :table,
description: 'Table to count',
long: '--table TABLE',
default: 'conntrack'
def run
- value = `conntrack -C #{config[:table]}`.strip
+ value = `conntrack -C #{config[:table]} 2>/dev/null`.strip
? +++++++++++++
timestamp = Time.now.to_i
output config[:scheme], value, timestamp
ok
end
end | 2 | 0.083333 | 1 | 1 |
b3f1c64ff54ec808961534f7d7352d0eb87d40a1 | modules/org.pathvisio.launcher/build.xml | modules/org.pathvisio.launcher/build.xml | <?xml version="1.0"?>
<project name="org.pathvisio.launcher" default="jar" basedir=".">
<import file="../../build-common.xml" />
<property name="jar.name" value="org.pathvisio.launcher.jar"/>
<target name="prepare" depends="svnversion">
<echo file="resources/version.props">
pathvisio.revision = ${subversion_revision}
pathvisio.version = ${pathvisio.version}
</echo>
</target>
<path id="project.class.path">
<fileset dir="../../lib">
<include name="org.eclipse.osgi.jar"/>
</fileset>
<fileset dir="${bundle.dest}">
<include name="org.pathvisio.core.jar"/>
</fileset>
</path>
<!-- override jar target, because we want to add Main-Class and Class-Path attributes -->
<target name="jar" depends="compile">
<echo>Creating JAR: ${jar.name}</echo>
<manifestclasspath property="jar.class.path" jarfile="${bundle.dest}/${jar.name}">
<classpath refid="project.class.path"/>
</manifestclasspath>
<jar jarfile="${bundle.dest}/${jar.name}" basedir="build" manifest="META-INF/MANIFEST.MF">
<manifest>
<attribute name="Class-Path" value="${jar.class.path}"/>
</manifest>
</jar>
</target>
</project>
| <?xml version="1.0"?>
<project name="org.pathvisio.launcher" default="jar" basedir=".">
<import file="../../build-common.xml" />
<property name="jar.name" value="org.pathvisio.launcher.jar"/>
<target name="prepare" depends="svnversion">
<mkdir dir="resources"/>
<echo file="resources/version.props">
pathvisio.revision = ${subversion_revision}
pathvisio.version = ${pathvisio.version}
</echo>
</target>
<path id="project.class.path">
<fileset dir="../../lib">
<include name="org.eclipse.osgi.jar"/>
</fileset>
<fileset dir="${bundle.dest}">
<include name="org.pathvisio.core.jar"/>
</fileset>
</path>
<!-- override jar target, because we want to add Main-Class and Class-Path attributes -->
<target name="jar" depends="compile">
<echo>Creating JAR: ${jar.name}</echo>
<manifestclasspath property="jar.class.path" jarfile="${bundle.dest}/${jar.name}">
<classpath refid="project.class.path"/>
</manifestclasspath>
<jar jarfile="${bundle.dest}/${jar.name}" basedir="build" manifest="META-INF/MANIFEST.MF">
<manifest>
<attribute name="Class-Path" value="${jar.class.path}"/>
</manifest>
</jar>
</target>
</project>
| Fix missing resources dir when writing version.props | Fix missing resources dir when writing version.props
git-svn-id: 6d8cdd4af04c6f63acdc5840a680025514bef303@3669 4f21837e-9f06-0410-ae49-bac5c3a7b9b6
| XML | apache-2.0 | egonw/pathvisio,egonw/pathvisio,egonw/pathvisio,egonw/pathvisio,egonw/pathvisio | xml | ## Code Before:
<?xml version="1.0"?>
<project name="org.pathvisio.launcher" default="jar" basedir=".">
<import file="../../build-common.xml" />
<property name="jar.name" value="org.pathvisio.launcher.jar"/>
<target name="prepare" depends="svnversion">
<echo file="resources/version.props">
pathvisio.revision = ${subversion_revision}
pathvisio.version = ${pathvisio.version}
</echo>
</target>
<path id="project.class.path">
<fileset dir="../../lib">
<include name="org.eclipse.osgi.jar"/>
</fileset>
<fileset dir="${bundle.dest}">
<include name="org.pathvisio.core.jar"/>
</fileset>
</path>
<!-- override jar target, because we want to add Main-Class and Class-Path attributes -->
<target name="jar" depends="compile">
<echo>Creating JAR: ${jar.name}</echo>
<manifestclasspath property="jar.class.path" jarfile="${bundle.dest}/${jar.name}">
<classpath refid="project.class.path"/>
</manifestclasspath>
<jar jarfile="${bundle.dest}/${jar.name}" basedir="build" manifest="META-INF/MANIFEST.MF">
<manifest>
<attribute name="Class-Path" value="${jar.class.path}"/>
</manifest>
</jar>
</target>
</project>
## Instruction:
Fix missing resources dir when writing version.props
git-svn-id: 6d8cdd4af04c6f63acdc5840a680025514bef303@3669 4f21837e-9f06-0410-ae49-bac5c3a7b9b6
## Code After:
<?xml version="1.0"?>
<project name="org.pathvisio.launcher" default="jar" basedir=".">
<import file="../../build-common.xml" />
<property name="jar.name" value="org.pathvisio.launcher.jar"/>
<target name="prepare" depends="svnversion">
<mkdir dir="resources"/>
<echo file="resources/version.props">
pathvisio.revision = ${subversion_revision}
pathvisio.version = ${pathvisio.version}
</echo>
</target>
<path id="project.class.path">
<fileset dir="../../lib">
<include name="org.eclipse.osgi.jar"/>
</fileset>
<fileset dir="${bundle.dest}">
<include name="org.pathvisio.core.jar"/>
</fileset>
</path>
<!-- override jar target, because we want to add Main-Class and Class-Path attributes -->
<target name="jar" depends="compile">
<echo>Creating JAR: ${jar.name}</echo>
<manifestclasspath property="jar.class.path" jarfile="${bundle.dest}/${jar.name}">
<classpath refid="project.class.path"/>
</manifestclasspath>
<jar jarfile="${bundle.dest}/${jar.name}" basedir="build" manifest="META-INF/MANIFEST.MF">
<manifest>
<attribute name="Class-Path" value="${jar.class.path}"/>
</manifest>
</jar>
</target>
</project>
| <?xml version="1.0"?>
<project name="org.pathvisio.launcher" default="jar" basedir=".">
<import file="../../build-common.xml" />
<property name="jar.name" value="org.pathvisio.launcher.jar"/>
<target name="prepare" depends="svnversion">
+ <mkdir dir="resources"/>
<echo file="resources/version.props">
pathvisio.revision = ${subversion_revision}
pathvisio.version = ${pathvisio.version}
</echo>
</target>
<path id="project.class.path">
<fileset dir="../../lib">
<include name="org.eclipse.osgi.jar"/>
</fileset>
<fileset dir="${bundle.dest}">
<include name="org.pathvisio.core.jar"/>
</fileset>
</path>
<!-- override jar target, because we want to add Main-Class and Class-Path attributes -->
<target name="jar" depends="compile">
<echo>Creating JAR: ${jar.name}</echo>
<manifestclasspath property="jar.class.path" jarfile="${bundle.dest}/${jar.name}">
<classpath refid="project.class.path"/>
</manifestclasspath>
<jar jarfile="${bundle.dest}/${jar.name}" basedir="build" manifest="META-INF/MANIFEST.MF">
<manifest>
<attribute name="Class-Path" value="${jar.class.path}"/>
</manifest>
</jar>
</target>
</project> | 1 | 0.027027 | 1 | 0 |
59b53507960d88a3f6d270c4996ac1e95a1c7c00 | src/js/letters/containers/LettersApp.jsx | src/js/letters/containers/LettersApp.jsx | import React from 'react';
import { connect } from 'react-redux';
import RequiredLoginView from '../../common/components/RequiredLoginView';
// This needs to be a React component for RequiredLoginView to pass down
// the isDataAvailable prop, which is only passed on failure.
function AppContent({ children, isDataAvailable }) {
const unregistered = isDataAvailable === false;
let view;
if (unregistered) {
view = (
<h4>
To view and download your VA letters, you need to verify your identity (or whatever).
</h4>
);
} else {
view = children;
}
return (
<div className="usa-grid">
{view}
</div>
);
}
class LettersApp extends React.Component {
render() {
return (
<RequiredLoginView
authRequired={3}
serviceRequired={"evss-claims"}
userProfile={this.props.profile}
loginUrl={this.props.loginUrl}
verifyUrl={this.props.verifyUrl}>
<AppContent>
<div>
{this.props.children}
</div>
</AppContent>
</RequiredLoginView>
);
}
}
function mapStateToProps(state) {
const userState = state.user;
return {
profile: userState.profile,
loginUrl: userState.login.loginUrl,
verifyUrl: userState.login.verifyUrl
};
}
export default connect(mapStateToProps)(LettersApp);
| import React from 'react';
import { connect } from 'react-redux';
import RequiredLoginView from '../../common/components/RequiredLoginView';
// This needs to be a React component for RequiredLoginView to pass down
// the isDataAvailable prop, which is only passed on failure.
function AppContent({ children, isDataAvailable }) {
const unregistered = isDataAvailable === false;
let view;
if (unregistered) {
view = (
<h4>
We weren't able to find information about your VA letters.
If you think you should be able to access this information, please call the Vets.gov Help Desk at 855-574-7286 (TTY: 800-829-4833). We're here Monday–Friday, 8:00 a.m.–8:00 p.m. (ET).
</h4>
);
} else {
view = children;
}
return (
<div className="usa-grid">
{view}
</div>
);
}
class LettersApp extends React.Component {
render() {
return (
<RequiredLoginView
authRequired={3}
serviceRequired={"evss-claims"}
userProfile={this.props.profile}
loginUrl={this.props.loginUrl}
verifyUrl={this.props.verifyUrl}>
<AppContent>
<div>
{this.props.children}
</div>
</AppContent>
</RequiredLoginView>
);
}
}
function mapStateToProps(state) {
const userState = state.user;
return {
profile: userState.profile,
loginUrl: userState.login.loginUrl,
verifyUrl: userState.login.verifyUrl
};
}
export default connect(mapStateToProps)(LettersApp);
| Change basic error message content | Change basic error message content
| JSX | cc0-1.0 | department-of-veterans-affairs/vets-website,department-of-veterans-affairs/vets-website | jsx | ## Code Before:
import React from 'react';
import { connect } from 'react-redux';
import RequiredLoginView from '../../common/components/RequiredLoginView';
// This needs to be a React component for RequiredLoginView to pass down
// the isDataAvailable prop, which is only passed on failure.
function AppContent({ children, isDataAvailable }) {
const unregistered = isDataAvailable === false;
let view;
if (unregistered) {
view = (
<h4>
To view and download your VA letters, you need to verify your identity (or whatever).
</h4>
);
} else {
view = children;
}
return (
<div className="usa-grid">
{view}
</div>
);
}
class LettersApp extends React.Component {
render() {
return (
<RequiredLoginView
authRequired={3}
serviceRequired={"evss-claims"}
userProfile={this.props.profile}
loginUrl={this.props.loginUrl}
verifyUrl={this.props.verifyUrl}>
<AppContent>
<div>
{this.props.children}
</div>
</AppContent>
</RequiredLoginView>
);
}
}
function mapStateToProps(state) {
const userState = state.user;
return {
profile: userState.profile,
loginUrl: userState.login.loginUrl,
verifyUrl: userState.login.verifyUrl
};
}
export default connect(mapStateToProps)(LettersApp);
## Instruction:
Change basic error message content
## Code After:
import React from 'react';
import { connect } from 'react-redux';
import RequiredLoginView from '../../common/components/RequiredLoginView';
// This needs to be a React component for RequiredLoginView to pass down
// the isDataAvailable prop, which is only passed on failure.
function AppContent({ children, isDataAvailable }) {
const unregistered = isDataAvailable === false;
let view;
if (unregistered) {
view = (
<h4>
We weren't able to find information about your VA letters.
If you think you should be able to access this information, please call the Vets.gov Help Desk at 855-574-7286 (TTY: 800-829-4833). We're here Monday–Friday, 8:00 a.m.–8:00 p.m. (ET).
</h4>
);
} else {
view = children;
}
return (
<div className="usa-grid">
{view}
</div>
);
}
class LettersApp extends React.Component {
render() {
return (
<RequiredLoginView
authRequired={3}
serviceRequired={"evss-claims"}
userProfile={this.props.profile}
loginUrl={this.props.loginUrl}
verifyUrl={this.props.verifyUrl}>
<AppContent>
<div>
{this.props.children}
</div>
</AppContent>
</RequiredLoginView>
);
}
}
function mapStateToProps(state) {
const userState = state.user;
return {
profile: userState.profile,
loginUrl: userState.login.loginUrl,
verifyUrl: userState.login.verifyUrl
};
}
export default connect(mapStateToProps)(LettersApp);
| import React from 'react';
import { connect } from 'react-redux';
import RequiredLoginView from '../../common/components/RequiredLoginView';
// This needs to be a React component for RequiredLoginView to pass down
// the isDataAvailable prop, which is only passed on failure.
function AppContent({ children, isDataAvailable }) {
const unregistered = isDataAvailable === false;
let view;
if (unregistered) {
view = (
<h4>
- To view and download your VA letters, you need to verify your identity (or whatever).
+ We weren't able to find information about your VA letters.
+ If you think you should be able to access this information, please call the Vets.gov Help Desk at 855-574-7286 (TTY: 800-829-4833). We're here Monday–Friday, 8:00 a.m.–8:00 p.m. (ET).
</h4>
);
} else {
view = children;
}
return (
<div className="usa-grid">
{view}
</div>
);
}
class LettersApp extends React.Component {
render() {
return (
<RequiredLoginView
authRequired={3}
serviceRequired={"evss-claims"}
userProfile={this.props.profile}
loginUrl={this.props.loginUrl}
verifyUrl={this.props.verifyUrl}>
<AppContent>
<div>
{this.props.children}
</div>
</AppContent>
</RequiredLoginView>
);
}
}
function mapStateToProps(state) {
const userState = state.user;
return {
profile: userState.profile,
loginUrl: userState.login.loginUrl,
verifyUrl: userState.login.verifyUrl
};
}
export default connect(mapStateToProps)(LettersApp); | 3 | 0.052632 | 2 | 1 |
9729fb382435520b50fa7ed4a71323b4c948ca00 | vim/after/vimrc_after.vim | vim/after/vimrc_after.vim | let g:yadr_disable_solarized_enhancements = 1
let g:hybrid_use_iTerm_colors = 1
colorscheme hybrid
| let g:yadr_disable_solarized_enhancements = 1
let g:hybrid_use_Xresources = 1
colorscheme hybrid
| Update hybrid settings due to vim-hybrid update | Update hybrid settings due to vim-hybrid update
| VimL | bsd-2-clause | stevenbarragan/dotfiles,stevenbarragan/dotfiles | viml | ## Code Before:
let g:yadr_disable_solarized_enhancements = 1
let g:hybrid_use_iTerm_colors = 1
colorscheme hybrid
## Instruction:
Update hybrid settings due to vim-hybrid update
## Code After:
let g:yadr_disable_solarized_enhancements = 1
let g:hybrid_use_Xresources = 1
colorscheme hybrid
| let g:yadr_disable_solarized_enhancements = 1
- let g:hybrid_use_iTerm_colors = 1
? ^^ -- ^^^^
+ let g:hybrid_use_Xresources = 1
? ^^ +++ ^
+
colorscheme hybrid | 3 | 1 | 2 | 1 |
fb56756ae5c704166bc79c60fc8a5aa6c59b34e4 | requirements.txt | requirements.txt | backoff==1.4.0
google-cloud-error-reporting==0.23.0
google-cloud-language==0.23.0
google-cloud-logging==0.23.1
holidays==0.8.1
lxml==3.7.3
oauth2==1.9.0.post1
pytest==3.0.6
pytz==2016.10
requests==2.13.0
simplejson==3.10.0
tweepy==3.5.0
| backoff==1.4.0
google-cloud==0.22.0
holidays==0.8.1
lxml==3.7.3
oauth2==1.9.0.post1
pytest==3.0.6
pytz==2016.10
requests==2.13.0
simplejson==3.10.0
tweepy==3.5.0
| Revert back to 0.22.0 of google-cloud. | Revert back to 0.22.0 of google-cloud.
The error reporting in 0.23.0 crashes and the logging and language
libraries need to match. Also now listing just one entry for all.
| Text | mit | maxbbraun/trump2cash | text | ## Code Before:
backoff==1.4.0
google-cloud-error-reporting==0.23.0
google-cloud-language==0.23.0
google-cloud-logging==0.23.1
holidays==0.8.1
lxml==3.7.3
oauth2==1.9.0.post1
pytest==3.0.6
pytz==2016.10
requests==2.13.0
simplejson==3.10.0
tweepy==3.5.0
## Instruction:
Revert back to 0.22.0 of google-cloud.
The error reporting in 0.23.0 crashes and the logging and language
libraries need to match. Also now listing just one entry for all.
## Code After:
backoff==1.4.0
google-cloud==0.22.0
holidays==0.8.1
lxml==3.7.3
oauth2==1.9.0.post1
pytest==3.0.6
pytz==2016.10
requests==2.13.0
simplejson==3.10.0
tweepy==3.5.0
| backoff==1.4.0
- google-cloud-error-reporting==0.23.0
- google-cloud-language==0.23.0
? --------- ^
+ google-cloud==0.22.0
? ^
- google-cloud-logging==0.23.1
holidays==0.8.1
lxml==3.7.3
oauth2==1.9.0.post1
pytest==3.0.6
pytz==2016.10
requests==2.13.0
simplejson==3.10.0
tweepy==3.5.0 | 4 | 0.333333 | 1 | 3 |
33793017933028ea196e9df30a055380dec5ca33 | test/setupTest.js | test/setupTest.js | /* eslint-env mocha */
// TODO : Do not reference the server from here or any related files
import { dropTestDb } from './utils'
import { SERVER_PORTS } from './constants'
import nconf from 'nconf'
// TODO : Remove the need for this
nconf.set('router', { httpPort: SERVER_PORTS.httpPort })
before(async () => {
await dropTestDb()
})
| /* eslint-env mocha */
require('../src/config/config')
import { SERVER_PORTS } from './constants'
import nconf from 'nconf'
// Set the router http port to the mocked constant value for the tests
nconf.set('router', { httpPort: SERVER_PORTS.httpPort })
| Remove the clearing of the database from the script | Remove the clearing of the database from the script
This was causing race conditions with some of the files which were already connected to a mongo connection and then not having a reference to an existing collection. This was picked up in the LogsAPITests were the tests were failing intermittently.
Replaced the inclusion of the entire utils script with just the required config script to override the router httpPort
OHM-732
| JavaScript | mpl-2.0 | jembi/openhim-core-js,jembi/openhim-core-js | javascript | ## Code Before:
/* eslint-env mocha */
// TODO : Do not reference the server from here or any related files
import { dropTestDb } from './utils'
import { SERVER_PORTS } from './constants'
import nconf from 'nconf'
// TODO : Remove the need for this
nconf.set('router', { httpPort: SERVER_PORTS.httpPort })
before(async () => {
await dropTestDb()
})
## Instruction:
Remove the clearing of the database from the script
This was causing race conditions with some of the files which were already connected to a mongo connection and then not having a reference to an existing collection. This was picked up in the LogsAPITests were the tests were failing intermittently.
Replaced the inclusion of the entire utils script with just the required config script to override the router httpPort
OHM-732
## Code After:
/* eslint-env mocha */
require('../src/config/config')
import { SERVER_PORTS } from './constants'
import nconf from 'nconf'
// Set the router http port to the mocked constant value for the tests
nconf.set('router', { httpPort: SERVER_PORTS.httpPort })
| /* eslint-env mocha */
- // TODO : Do not reference the server from here or any related files
- import { dropTestDb } from './utils'
+ require('../src/config/config')
+
import { SERVER_PORTS } from './constants'
import nconf from 'nconf'
- // TODO : Remove the need for this
+ // Set the router http port to the mocked constant value for the tests
nconf.set('router', { httpPort: SERVER_PORTS.httpPort })
-
- before(async () => {
- await dropTestDb()
- }) | 10 | 0.833333 | 3 | 7 |
a5fdffe2f37e2e1c34044c259ef56c0e5feca0cb | allegedb/allegedb/tests/test_branch_plan.py | allegedb/allegedb/tests/test_branch_plan.py | import pytest
import allegedb
@pytest.fixture(scope='function')
def orm():
with allegedb.ORM("sqlite:///:memory:") as it:
yield it
def test_single_plan(orm):
g = orm.new_graph('graph')
g.add_node(0)
orm.turn = 1
g.add_node(1)
with orm.plan():
orm.turn = 2
g.add_node(2)
assert orm.turn == 1
assert 2 not in g
orm.branch = 'b'
assert 2 not in g
assert 1 in g
orm.turn = 2
assert 2 in g
orm.turn = 1
orm.branch = 'trunk'
orm.turn = 0
assert 1 not in g
orm.branch = 'c'
orm.turn = 2
assert 1 not in g
assert 2 not in g | import pytest
import allegedb
@pytest.fixture(scope='function')
def orm():
with allegedb.ORM("sqlite:///:memory:") as it:
yield it
def test_single_plan(orm):
g = orm.new_graph('graph')
g.add_node(0)
orm.turn = 1
g.add_node(1)
with orm.plan():
orm.turn = 2
g.add_node(2)
assert orm.turn == 1
assert 2 not in g
orm.branch = 'b'
assert 2 not in g
assert 1 in g
orm.turn = 2
assert 2 in g
orm.turn = 1
orm.branch = 'trunk'
orm.turn = 0
assert 1 not in g
orm.branch = 'c'
orm.turn = 2
assert 1 not in g
assert 2 not in g
orm.turn = 0
orm.branch = 'trunk'
orm.turn = 2
assert 2 in g | Add an extra check in that test | Add an extra check in that test
| Python | agpl-3.0 | LogicalDash/LiSE,LogicalDash/LiSE | python | ## Code Before:
import pytest
import allegedb
@pytest.fixture(scope='function')
def orm():
with allegedb.ORM("sqlite:///:memory:") as it:
yield it
def test_single_plan(orm):
g = orm.new_graph('graph')
g.add_node(0)
orm.turn = 1
g.add_node(1)
with orm.plan():
orm.turn = 2
g.add_node(2)
assert orm.turn == 1
assert 2 not in g
orm.branch = 'b'
assert 2 not in g
assert 1 in g
orm.turn = 2
assert 2 in g
orm.turn = 1
orm.branch = 'trunk'
orm.turn = 0
assert 1 not in g
orm.branch = 'c'
orm.turn = 2
assert 1 not in g
assert 2 not in g
## Instruction:
Add an extra check in that test
## Code After:
import pytest
import allegedb
@pytest.fixture(scope='function')
def orm():
with allegedb.ORM("sqlite:///:memory:") as it:
yield it
def test_single_plan(orm):
g = orm.new_graph('graph')
g.add_node(0)
orm.turn = 1
g.add_node(1)
with orm.plan():
orm.turn = 2
g.add_node(2)
assert orm.turn == 1
assert 2 not in g
orm.branch = 'b'
assert 2 not in g
assert 1 in g
orm.turn = 2
assert 2 in g
orm.turn = 1
orm.branch = 'trunk'
orm.turn = 0
assert 1 not in g
orm.branch = 'c'
orm.turn = 2
assert 1 not in g
assert 2 not in g
orm.turn = 0
orm.branch = 'trunk'
orm.turn = 2
assert 2 in g | import pytest
import allegedb
@pytest.fixture(scope='function')
def orm():
with allegedb.ORM("sqlite:///:memory:") as it:
yield it
def test_single_plan(orm):
g = orm.new_graph('graph')
g.add_node(0)
orm.turn = 1
g.add_node(1)
with orm.plan():
orm.turn = 2
g.add_node(2)
assert orm.turn == 1
assert 2 not in g
orm.branch = 'b'
assert 2 not in g
assert 1 in g
orm.turn = 2
assert 2 in g
orm.turn = 1
orm.branch = 'trunk'
orm.turn = 0
assert 1 not in g
orm.branch = 'c'
orm.turn = 2
assert 1 not in g
assert 2 not in g
+ orm.turn = 0
+ orm.branch = 'trunk'
+ orm.turn = 2
+ assert 2 in g | 4 | 0.121212 | 4 | 0 |
e5b6619b7eacf0b341b84b76725da69106a1f420 | public/js/js.thirdparty.bat | public/js/js.thirdparty.bat | "C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.2.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.autocomplete.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
--js=jquery/jsBezier-0.6-min.js ^
--js=jquery/jquery.jsPlumb-1.7.5.js ^
--js=jquery/jquery.placeholder.js ^
--js=handlebars-v2.0.0.js ^
--js=dropdown.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js
echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause | "C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.2.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.autocomplete.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
--js=jquery/jquery.jsPlumb-1.7.5.js ^
--js=jquery/jquery.placeholder.js ^
--js=handlebars-v2.0.0.js ^
--js=dropdown.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js
echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause | Remove another jsBeizer reference as we weren't using it | Remove another jsBeizer reference as we weren't using it
| Batchfile | mit | marekr/siggy,marekr/siggy,marekr/siggy,marekr/siggy | batchfile | ## Code Before:
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.2.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.autocomplete.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
--js=jquery/jsBezier-0.6-min.js ^
--js=jquery/jquery.jsPlumb-1.7.5.js ^
--js=jquery/jquery.placeholder.js ^
--js=handlebars-v2.0.0.js ^
--js=dropdown.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js
echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause
## Instruction:
Remove another jsBeizer reference as we weren't using it
## Code After:
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.2.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.autocomplete.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
--js=jquery/jquery.jsPlumb-1.7.5.js ^
--js=jquery/jquery.placeholder.js ^
--js=handlebars-v2.0.0.js ^
--js=dropdown.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js
echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause | "C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.2.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.autocomplete.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
- --js=jquery/jsBezier-0.6-min.js ^
--js=jquery/jquery.jsPlumb-1.7.5.js ^
--js=jquery/jquery.placeholder.js ^
--js=handlebars-v2.0.0.js ^
--js=dropdown.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js
echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause | 1 | 0.041667 | 0 | 1 |
d1534795736c5938eba07a288e9996236211025b | README.md | README.md | > A Hierarchical Filesystem simulation in C++.
This is a project I made during my Masters at Computer Applications course at Dept. of Computer Science, university of Delhi.
The program lets you create a filesystem as a file and allows you to do file/directory operations in a Linux like terminal interface.
See `help.txt` for a list of available commands.
How to use:
```
$ make
$ ./filesystem FILE_SYSTEM_TITLE FILE_SYSTEM_SIZE_IN_MiB
```
It creates a binary file (using `fstream`) inside which files, directories and file/dir entries are created in binary form.
It allows you to create files, create hierarchical directories, delete files and (attempt to) recover deleted files, along with operations like list directory, print directory tree, print working directory, change directory. See `help.txt` for a complete list of commands, or use the inbuilt `help` command in program.
All operations are done at sector levels.
Copyright 2017 Sid Vishnoi under MIT license. | > A Hierarchical Filesystem simulation in C++.
This is a project I made during my Masters at Computer Applications course at Dept. of Computer Science, university of Delhi.
> See also: https://github.com/sidvishnoi/filesystem-assignment (Teaching material based on this assignment) : A file handling assignment made to teach some ideas about file systems and gain user's experience in C++ file handling.
The program lets you create a filesystem as a file and allows you to do file/directory operations in a Linux like terminal interface.
See `help.txt` for a list of available commands.
How to use:
```
$ make
$ ./filesystem FILE_SYSTEM_TITLE FILE_SYSTEM_SIZE_IN_MiB
```
It creates a binary file (using `fstream`) inside which files, directories and file/dir entries are created in binary form.
It allows you to create files, create hierarchical directories, delete files and (attempt to) recover deleted files, along with operations like list directory, print directory tree, print working directory, change directory. See `help.txt` for a complete list of commands, or use the inbuilt `help` command in program.
All operations are done at sector levels.
Copyright 2017 Sid Vishnoi under MIT license.
| Add link to teaching material | Add link to teaching material | Markdown | mit | sidvishnoi/filesystem-simulation | markdown | ## Code Before:
> A Hierarchical Filesystem simulation in C++.
This is a project I made during my Masters at Computer Applications course at Dept. of Computer Science, university of Delhi.
The program lets you create a filesystem as a file and allows you to do file/directory operations in a Linux like terminal interface.
See `help.txt` for a list of available commands.
How to use:
```
$ make
$ ./filesystem FILE_SYSTEM_TITLE FILE_SYSTEM_SIZE_IN_MiB
```
It creates a binary file (using `fstream`) inside which files, directories and file/dir entries are created in binary form.
It allows you to create files, create hierarchical directories, delete files and (attempt to) recover deleted files, along with operations like list directory, print directory tree, print working directory, change directory. See `help.txt` for a complete list of commands, or use the inbuilt `help` command in program.
All operations are done at sector levels.
Copyright 2017 Sid Vishnoi under MIT license.
## Instruction:
Add link to teaching material
## Code After:
> A Hierarchical Filesystem simulation in C++.
This is a project I made during my Masters at Computer Applications course at Dept. of Computer Science, university of Delhi.
> See also: https://github.com/sidvishnoi/filesystem-assignment (Teaching material based on this assignment) : A file handling assignment made to teach some ideas about file systems and gain user's experience in C++ file handling.
The program lets you create a filesystem as a file and allows you to do file/directory operations in a Linux like terminal interface.
See `help.txt` for a list of available commands.
How to use:
```
$ make
$ ./filesystem FILE_SYSTEM_TITLE FILE_SYSTEM_SIZE_IN_MiB
```
It creates a binary file (using `fstream`) inside which files, directories and file/dir entries are created in binary form.
It allows you to create files, create hierarchical directories, delete files and (attempt to) recover deleted files, along with operations like list directory, print directory tree, print working directory, change directory. See `help.txt` for a complete list of commands, or use the inbuilt `help` command in program.
All operations are done at sector levels.
Copyright 2017 Sid Vishnoi under MIT license.
| > A Hierarchical Filesystem simulation in C++.
This is a project I made during my Masters at Computer Applications course at Dept. of Computer Science, university of Delhi.
+
+ > See also: https://github.com/sidvishnoi/filesystem-assignment (Teaching material based on this assignment) : A file handling assignment made to teach some ideas about file systems and gain user's experience in C++ file handling.
The program lets you create a filesystem as a file and allows you to do file/directory operations in a Linux like terminal interface.
See `help.txt` for a list of available commands.
How to use:
```
$ make
$ ./filesystem FILE_SYSTEM_TITLE FILE_SYSTEM_SIZE_IN_MiB
```
It creates a binary file (using `fstream`) inside which files, directories and file/dir entries are created in binary form.
It allows you to create files, create hierarchical directories, delete files and (attempt to) recover deleted files, along with operations like list directory, print directory tree, print working directory, change directory. See `help.txt` for a complete list of commands, or use the inbuilt `help` command in program.
All operations are done at sector levels.
Copyright 2017 Sid Vishnoi under MIT license. | 2 | 0.090909 | 2 | 0 |
61c45c0d3311ce2bc348b44aaf40311b128f023c | app/assets/stylesheets/georgia/overrides/_flatly.scss | app/assets/stylesheets/georgia/overrides/_flatly.scss | table a, .table a { text-decoration: none; } | table a, .table a { text-decoration: none; }
.nav > li > a.btn-info:hover,
.nav > li > a.btn-info:focus {
background-color: #2077b2;
}
.nav > li > a.btn-warning:hover,
.nav > li > a.btn-warning:focus {
background-color: #be780a;
} | Add btn styling fixes on hover | Add btn styling fixes on hover
| SCSS | mit | georgia-cms/georgia,georgia-cms/georgia,georgia-cms/georgia | scss | ## Code Before:
table a, .table a { text-decoration: none; }
## Instruction:
Add btn styling fixes on hover
## Code After:
table a, .table a { text-decoration: none; }
.nav > li > a.btn-info:hover,
.nav > li > a.btn-info:focus {
background-color: #2077b2;
}
.nav > li > a.btn-warning:hover,
.nav > li > a.btn-warning:focus {
background-color: #be780a;
} | table a, .table a { text-decoration: none; }
+
+ .nav > li > a.btn-info:hover,
+ .nav > li > a.btn-info:focus {
+ background-color: #2077b2;
+ }
+
+ .nav > li > a.btn-warning:hover,
+ .nav > li > a.btn-warning:focus {
+ background-color: #be780a;
+ } | 10 | 10 | 10 | 0 |
c29d2f92456d35b5f92e521f551e089c7f8c94f8 | src/Paths.js | src/Paths.js | let argv = require('yargs').argv;
class Paths {
/**
* Create a new Paths instance.
*/
constructor() {
if (argv['$0'].includes('ava')) {
this.rootPath = path.resolve(__dirname, '../');
} else {
this.rootPath = process.cwd();
}
}
/**
* Set the root path to resolve webpack.mix.js.
*
* @param {string} path
*/
setRootPath(path) {
this.rootPath = path;
return this;
}
/**
* Determine the path to the user's webpack.mix.js file.
*/
mix() {
return this.root(
argv.env && argv.env.mixfile ? argv.env.mixfile : 'webpack.mix'
);
}
/**
* Determine the project root.
*
* @param {string|null} append
*/
root(append = '') {
return path.resolve(this.rootPath, append);
}
}
module.exports = Paths;
| let argv = require('yargs').argv;
class Paths {
/**
* Create a new Paths instance.
*/
constructor() {
if (argv['$0'].includes('ava')) {
this.rootPath = path.resolve(__dirname, '../');
} else {
this.rootPath = process.cwd();
}
}
/**
* Set the root path to resolve webpack.mix.js.
*
* @param {string} path
*/
setRootPath(path) {
this.rootPath = path;
return this;
}
/**
* Determine the path to the user's webpack.mix.js file.
*/
mix() {
return this.root(
process.env && process.env.MIX_FILE
? process.env.MIX_FILE
: 'webpack.mix'
);
}
/**
* Determine the project root.
*
* @param {string|null} append
*/
root(append = '') {
return path.resolve(this.rootPath, append);
}
}
module.exports = Paths;
| Use real env var for custom mix file | Use real env var for custom mix file
The previous approach doesn’t work with current webpack cli now.
| JavaScript | mit | JeffreyWay/laravel-mix | javascript | ## Code Before:
let argv = require('yargs').argv;
class Paths {
/**
* Create a new Paths instance.
*/
constructor() {
if (argv['$0'].includes('ava')) {
this.rootPath = path.resolve(__dirname, '../');
} else {
this.rootPath = process.cwd();
}
}
/**
* Set the root path to resolve webpack.mix.js.
*
* @param {string} path
*/
setRootPath(path) {
this.rootPath = path;
return this;
}
/**
* Determine the path to the user's webpack.mix.js file.
*/
mix() {
return this.root(
argv.env && argv.env.mixfile ? argv.env.mixfile : 'webpack.mix'
);
}
/**
* Determine the project root.
*
* @param {string|null} append
*/
root(append = '') {
return path.resolve(this.rootPath, append);
}
}
module.exports = Paths;
## Instruction:
Use real env var for custom mix file
The previous approach doesn’t work with current webpack cli now.
## Code After:
let argv = require('yargs').argv;
class Paths {
/**
* Create a new Paths instance.
*/
constructor() {
if (argv['$0'].includes('ava')) {
this.rootPath = path.resolve(__dirname, '../');
} else {
this.rootPath = process.cwd();
}
}
/**
* Set the root path to resolve webpack.mix.js.
*
* @param {string} path
*/
setRootPath(path) {
this.rootPath = path;
return this;
}
/**
* Determine the path to the user's webpack.mix.js file.
*/
mix() {
return this.root(
process.env && process.env.MIX_FILE
? process.env.MIX_FILE
: 'webpack.mix'
);
}
/**
* Determine the project root.
*
* @param {string|null} append
*/
root(append = '') {
return path.resolve(this.rootPath, append);
}
}
module.exports = Paths;
| let argv = require('yargs').argv;
class Paths {
/**
* Create a new Paths instance.
*/
constructor() {
if (argv['$0'].includes('ava')) {
this.rootPath = path.resolve(__dirname, '../');
} else {
this.rootPath = process.cwd();
}
}
/**
* Set the root path to resolve webpack.mix.js.
*
* @param {string} path
*/
setRootPath(path) {
this.rootPath = path;
return this;
}
/**
* Determine the path to the user's webpack.mix.js file.
*/
mix() {
return this.root(
- argv.env && argv.env.mixfile ? argv.env.mixfile : 'webpack.mix'
+ process.env && process.env.MIX_FILE
+ ? process.env.MIX_FILE
+ : 'webpack.mix'
);
}
/**
* Determine the project root.
*
* @param {string|null} append
*/
root(append = '') {
return path.resolve(this.rootPath, append);
}
}
module.exports = Paths; | 4 | 0.088889 | 3 | 1 |
3a3cc6ea2a38118c58caeefbd5566339129b40a7 | app/controllers/lti_launches_controller.rb | app/controllers/lti_launches_controller.rb | class LtiLaunchesController < ApplicationController
include Concerns::CanvasSupport
include Concerns::LtiSupport
layout "client"
skip_before_action :verify_authenticity_token
before_action :do_lti
def index
@canvas_api = canvas_api
@canvas_auth_required = @canvas_api.blank?
set_lti_launch_values
@lti_launch = ClientSetting.find(params[:id]) if params[:id].present?
end
end
| class LtiLaunchesController < ApplicationController
include Concerns::CanvasSupport
include Concerns::LtiSupport
layout "client"
skip_before_action :verify_authenticity_token
before_action :do_lti
def index
begin
@canvas_api = canvas_api
@canvas_auth_required = @canvas_api.blank?
rescue CanvasApiTokenRequired
@canvas_auth_required = true
end
set_lti_launch_values
@lti_launch = ClientSetting.find(params[:id]) if params[:id].present?
end
end
| Add code to capture token required error | Add code to capture token required error
| Ruby | mit | atomicjolt/lti_starter_app,atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app | ruby | ## Code Before:
class LtiLaunchesController < ApplicationController
include Concerns::CanvasSupport
include Concerns::LtiSupport
layout "client"
skip_before_action :verify_authenticity_token
before_action :do_lti
def index
@canvas_api = canvas_api
@canvas_auth_required = @canvas_api.blank?
set_lti_launch_values
@lti_launch = ClientSetting.find(params[:id]) if params[:id].present?
end
end
## Instruction:
Add code to capture token required error
## Code After:
class LtiLaunchesController < ApplicationController
include Concerns::CanvasSupport
include Concerns::LtiSupport
layout "client"
skip_before_action :verify_authenticity_token
before_action :do_lti
def index
begin
@canvas_api = canvas_api
@canvas_auth_required = @canvas_api.blank?
rescue CanvasApiTokenRequired
@canvas_auth_required = true
end
set_lti_launch_values
@lti_launch = ClientSetting.find(params[:id]) if params[:id].present?
end
end
| class LtiLaunchesController < ApplicationController
include Concerns::CanvasSupport
include Concerns::LtiSupport
layout "client"
skip_before_action :verify_authenticity_token
before_action :do_lti
def index
+ begin
- @canvas_api = canvas_api
+ @canvas_api = canvas_api
? ++
- @canvas_auth_required = @canvas_api.blank?
+ @canvas_auth_required = @canvas_api.blank?
? ++
+ rescue CanvasApiTokenRequired
+ @canvas_auth_required = true
+ end
set_lti_launch_values
@lti_launch = ClientSetting.find(params[:id]) if params[:id].present?
end
end | 8 | 0.470588 | 6 | 2 |
bc1313024509d25470eaac2ad74c48e27d492fd7 | composer.json | composer.json | {
"name": "mybuilder/supervisor-bundle",
"description": "Symfony 2/3/4 bundle which allows you to use @Supervisor annotations to configure how Supervisor runs your console commands.",
"keywords": ["supervisor", "supervisord"],
"minimum-stability": "stable",
"license": "MIT",
"authors": [
{
"name": "Edd Mann",
"email": "edd@mybuilder.com",
"homepage": "http://www.mybuilder.com"
}
],
"require": {
"francodacosta/supervisord": "~1.0",
"doctrine/annotations": "~1.0",
"symfony/console": "~2.7 || ~3.0 || ~4.0",
"symfony/config": "~2.7 || ~3.0 || ~4.0",
"symfony/framework-bundle": "~2.7 || ~3.0 || ~4.0",
"php": "~7.0"
},
"require-dev": {
"phpunit/phpunit": "~5.0"
},
"autoload": {
"psr-4": {
"MyBuilder\\Bundle\\SupervisorBundle\\": ""
}
},
"config": {
"bin-dir": "bin"
}
}
| {
"name": "mybuilder/supervisor-bundle",
"description": "Symfony 3/4 bundle which allows you to use @Supervisor annotations to configure how Supervisor runs your console commands.",
"keywords": [
"supervisor",
"supervisord"
],
"minimum-stability": "stable",
"license": "MIT",
"authors": [
{
"name": "Edd Mann",
"email": "edd@mybuilder.com",
"homepage": "http://www.mybuilder.com"
}
],
"require": {
"francodacosta/supervisord": "~1.0",
"doctrine/annotations": "~1.0",
"symfony/console": "~3.0||~4.0",
"symfony/config": "~3.0||~4.0",
"symfony/framework-bundle": "~3.0||~4.0",
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "~5.0"
},
"autoload": {
"psr-4": {
"MyBuilder\\Bundle\\SupervisorBundle\\": ""
}
},
"config": {
"bin-dir": "bin"
}
}
| Drop support for Symfony 2 and lower PHP versions | Drop support for Symfony 2 and lower PHP versions
| JSON | mit | mybuilder/supervisor-bundle | json | ## Code Before:
{
"name": "mybuilder/supervisor-bundle",
"description": "Symfony 2/3/4 bundle which allows you to use @Supervisor annotations to configure how Supervisor runs your console commands.",
"keywords": ["supervisor", "supervisord"],
"minimum-stability": "stable",
"license": "MIT",
"authors": [
{
"name": "Edd Mann",
"email": "edd@mybuilder.com",
"homepage": "http://www.mybuilder.com"
}
],
"require": {
"francodacosta/supervisord": "~1.0",
"doctrine/annotations": "~1.0",
"symfony/console": "~2.7 || ~3.0 || ~4.0",
"symfony/config": "~2.7 || ~3.0 || ~4.0",
"symfony/framework-bundle": "~2.7 || ~3.0 || ~4.0",
"php": "~7.0"
},
"require-dev": {
"phpunit/phpunit": "~5.0"
},
"autoload": {
"psr-4": {
"MyBuilder\\Bundle\\SupervisorBundle\\": ""
}
},
"config": {
"bin-dir": "bin"
}
}
## Instruction:
Drop support for Symfony 2 and lower PHP versions
## Code After:
{
"name": "mybuilder/supervisor-bundle",
"description": "Symfony 3/4 bundle which allows you to use @Supervisor annotations to configure how Supervisor runs your console commands.",
"keywords": [
"supervisor",
"supervisord"
],
"minimum-stability": "stable",
"license": "MIT",
"authors": [
{
"name": "Edd Mann",
"email": "edd@mybuilder.com",
"homepage": "http://www.mybuilder.com"
}
],
"require": {
"francodacosta/supervisord": "~1.0",
"doctrine/annotations": "~1.0",
"symfony/console": "~3.0||~4.0",
"symfony/config": "~3.0||~4.0",
"symfony/framework-bundle": "~3.0||~4.0",
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "~5.0"
},
"autoload": {
"psr-4": {
"MyBuilder\\Bundle\\SupervisorBundle\\": ""
}
},
"config": {
"bin-dir": "bin"
}
}
| {
"name": "mybuilder/supervisor-bundle",
- "description": "Symfony 2/3/4 bundle which allows you to use @Supervisor annotations to configure how Supervisor runs your console commands.",
? --
+ "description": "Symfony 3/4 bundle which allows you to use @Supervisor annotations to configure how Supervisor runs your console commands.",
- "keywords": ["supervisor", "supervisord"],
+ "keywords": [
+ "supervisor",
+ "supervisord"
+ ],
"minimum-stability": "stable",
"license": "MIT",
"authors": [
{
"name": "Edd Mann",
"email": "edd@mybuilder.com",
"homepage": "http://www.mybuilder.com"
}
],
"require": {
"francodacosta/supervisord": "~1.0",
"doctrine/annotations": "~1.0",
- "symfony/console": "~2.7 || ~3.0 || ~4.0",
? -------- - -
+ "symfony/console": "~3.0||~4.0",
- "symfony/config": "~2.7 || ~3.0 || ~4.0",
? -------- - -
+ "symfony/config": "~3.0||~4.0",
- "symfony/framework-bundle": "~2.7 || ~3.0 || ~4.0",
? -------- - -
+ "symfony/framework-bundle": "~3.0||~4.0",
- "php": "~7.0"
? ^ ^
+ "php": ">=7.3"
? ^^ ^
},
"require-dev": {
"phpunit/phpunit": "~5.0"
},
"autoload": {
"psr-4": {
"MyBuilder\\Bundle\\SupervisorBundle\\": ""
}
},
"config": {
"bin-dir": "bin"
}
} | 15 | 0.454545 | 9 | 6 |
85cb1155db0e4e14761cf65d56230e508185fc0f | quality-metrics/qm-003-license.md | quality-metrics/qm-003-license.md | ---
SMQM: 003
Author: Nathen Harvey <nharvey@chef.io>
Status: In Progress
License: Apache 2.0
---
# Cookbook has an open source license
Cookbook is licensed using an open source license.
Acceptable licenses are:
* Apache 2.0
* GNU Public License 2.0
* GNU Public License 3.0
* MIT
Cookbooks without open source licenses may not be modifiable and may not even be legally used by consumers.
### Verification
Pseudocode or actual code that can be used to automatically verify the rule and/or assign appropriate points.
it 'has an open source license' do
expect(cookbook_version.license).to match(/Apache 2.0|apache2|GNU Public License 2.0|gplv2|GNU Public License 3.0|gplv3|MIT/i)
end
| ---
SMQM: 003
Author: Nathen Harvey <nharvey@chef.io>
Status: In Progress
License: Apache 2.0
---
# Cookbook has an open source license
Cookbook is licensed using an open source license.
Acceptable licenses are:
* Apache-2.0, apachev2
* GPL-2.0, gplv2
* GPL-3.0, gplv3
* MIT, mit
Cookbooks without open source licenses may not be modifiable and may not even be legally used by consumers.
### Verification
Pseudocode or actual code that can be used to automatically verify the rule and/or assign appropriate points.
it 'has an open source license' do
expect(cookbook_version.license).to match(/Apache-2.0|apachev2|GPL-2.0|gplv2|GPL-3.0|gplv3|MIT|mit/i)
end
| Update the valid license strings | Update the valid license strings
Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
| Markdown | apache-2.0 | chef-cookbooks/cookbook-quality-metrics | markdown | ## Code Before:
---
SMQM: 003
Author: Nathen Harvey <nharvey@chef.io>
Status: In Progress
License: Apache 2.0
---
# Cookbook has an open source license
Cookbook is licensed using an open source license.
Acceptable licenses are:
* Apache 2.0
* GNU Public License 2.0
* GNU Public License 3.0
* MIT
Cookbooks without open source licenses may not be modifiable and may not even be legally used by consumers.
### Verification
Pseudocode or actual code that can be used to automatically verify the rule and/or assign appropriate points.
it 'has an open source license' do
expect(cookbook_version.license).to match(/Apache 2.0|apache2|GNU Public License 2.0|gplv2|GNU Public License 3.0|gplv3|MIT/i)
end
## Instruction:
Update the valid license strings
Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
## Code After:
---
SMQM: 003
Author: Nathen Harvey <nharvey@chef.io>
Status: In Progress
License: Apache 2.0
---
# Cookbook has an open source license
Cookbook is licensed using an open source license.
Acceptable licenses are:
* Apache-2.0, apachev2
* GPL-2.0, gplv2
* GPL-3.0, gplv3
* MIT, mit
Cookbooks without open source licenses may not be modifiable and may not even be legally used by consumers.
### Verification
Pseudocode or actual code that can be used to automatically verify the rule and/or assign appropriate points.
it 'has an open source license' do
expect(cookbook_version.license).to match(/Apache-2.0|apachev2|GPL-2.0|gplv2|GPL-3.0|gplv3|MIT|mit/i)
end
| ---
SMQM: 003
Author: Nathen Harvey <nharvey@chef.io>
Status: In Progress
License: Apache 2.0
---
# Cookbook has an open source license
Cookbook is licensed using an open source license.
Acceptable licenses are:
- * Apache 2.0
- * GNU Public License 2.0
- * GNU Public License 3.0
- * MIT
+ * Apache-2.0, apachev2
+ * GPL-2.0, gplv2
+ * GPL-3.0, gplv3
+ * MIT, mit
Cookbooks without open source licenses may not be modifiable and may not even be legally used by consumers.
### Verification
Pseudocode or actual code that can be used to automatically verify the rule and/or assign appropriate points.
it 'has an open source license' do
- expect(cookbook_version.license).to match(/Apache 2.0|apache2|GNU Public License 2.0|gplv2|GNU Public License 3.0|gplv3|MIT/i)
? ^ --- ------ ^^^^^^^ --- ------ ^^^^^^^
+ expect(cookbook_version.license).to match(/Apache-2.0|apachev2|GPL-2.0|gplv2|GPL-3.0|gplv3|MIT|mit/i)
? ^ + ^ ^ ++++
end | 10 | 0.37037 | 5 | 5 |
6bbb9f172c0011f822dfe27d91f8a8906373757d | modules/dialog/closefullscreen_control.js | modules/dialog/closefullscreen_control.js | /**
* # Control to close the full screen dialog.
*
* See [L.Control](https://www.mapbox.com/mapbox.js/api/v2.3.0/l-control/)
* documentation for more details.
*
* @class Kartographer.Dialog.CloseFullScreenControl
* @extends L.Control
*/
var CloseFullScreenControl = L.Control.extend( {
options: {
position: 'topright'
},
/**
* Creates the control element.
*
* @override
* @protected
*/
onAdd: function () {
var container = L.DomUtil.create( 'div', 'leaflet-bar' ),
link = L.DomUtil.create( 'a', 'oo-ui-icon-close', container );
link.href = '';
link.title = mw.msg( 'kartographer-fullscreen-close' );
L.DomEvent.addListener( link, 'click', this.closeFullScreen, this );
L.DomEvent.disableClickPropagation( container );
return container;
},
/**
* Closes the full screen dialog on `click`.
*
* @param {Event} e
* @protected
*/
closeFullScreen: function ( e ) {
L.DomEvent.stop( e );
// eslint-disable-next-line no-underscore-dangle
this._map.closeFullScreen();
}
} );
module.exports = CloseFullScreenControl;
| /**
* # Control to close the full screen dialog.
*
* See [L.Control](https://www.mapbox.com/mapbox.js/api/v2.3.0/l-control/)
* documentation for more details.
*
* @class Kartographer.Dialog.CloseFullScreenControl
* @extends L.Control
*/
var CloseFullScreenControl = L.Control.extend( {
options: {
position: 'topright'
},
/**
* Creates the control element.
*
* @override
* @protected
*/
onAdd: function () {
var container = L.DomUtil.create( 'div', 'leaflet-bar' ),
link = L.DomUtil.create( 'a', 'oo-ui-icon-close', container );
link.title = mw.msg( 'kartographer-fullscreen-close' );
link.role = 'button';
link.tabIndex = '0';
L.DomEvent.addListener( link, 'click', this.closeFullScreen, this );
L.DomEvent.disableClickPropagation( container );
return container;
},
/**
* Closes the full screen dialog on `click`.
*
* @param {Event} e
* @protected
*/
closeFullScreen: function ( e ) {
L.DomEvent.stop( e );
// eslint-disable-next-line no-underscore-dangle
this._map.closeFullScreen();
}
} );
module.exports = CloseFullScreenControl;
| Mark the close map dialog button with role button | Mark the close map dialog button with role button
Bug: T308320
Change-Id: I429ec8a081614d90e2b82e5e31918b9e61ca602d
| JavaScript | mit | wikimedia/mediawiki-extensions-Kartographer,wikimedia/mediawiki-extensions-Kartographer,wikimedia/mediawiki-extensions-Kartographer | javascript | ## Code Before:
/**
* # Control to close the full screen dialog.
*
* See [L.Control](https://www.mapbox.com/mapbox.js/api/v2.3.0/l-control/)
* documentation for more details.
*
* @class Kartographer.Dialog.CloseFullScreenControl
* @extends L.Control
*/
var CloseFullScreenControl = L.Control.extend( {
options: {
position: 'topright'
},
/**
* Creates the control element.
*
* @override
* @protected
*/
onAdd: function () {
var container = L.DomUtil.create( 'div', 'leaflet-bar' ),
link = L.DomUtil.create( 'a', 'oo-ui-icon-close', container );
link.href = '';
link.title = mw.msg( 'kartographer-fullscreen-close' );
L.DomEvent.addListener( link, 'click', this.closeFullScreen, this );
L.DomEvent.disableClickPropagation( container );
return container;
},
/**
* Closes the full screen dialog on `click`.
*
* @param {Event} e
* @protected
*/
closeFullScreen: function ( e ) {
L.DomEvent.stop( e );
// eslint-disable-next-line no-underscore-dangle
this._map.closeFullScreen();
}
} );
module.exports = CloseFullScreenControl;
## Instruction:
Mark the close map dialog button with role button
Bug: T308320
Change-Id: I429ec8a081614d90e2b82e5e31918b9e61ca602d
## Code After:
/**
* # Control to close the full screen dialog.
*
* See [L.Control](https://www.mapbox.com/mapbox.js/api/v2.3.0/l-control/)
* documentation for more details.
*
* @class Kartographer.Dialog.CloseFullScreenControl
* @extends L.Control
*/
var CloseFullScreenControl = L.Control.extend( {
options: {
position: 'topright'
},
/**
* Creates the control element.
*
* @override
* @protected
*/
onAdd: function () {
var container = L.DomUtil.create( 'div', 'leaflet-bar' ),
link = L.DomUtil.create( 'a', 'oo-ui-icon-close', container );
link.title = mw.msg( 'kartographer-fullscreen-close' );
link.role = 'button';
link.tabIndex = '0';
L.DomEvent.addListener( link, 'click', this.closeFullScreen, this );
L.DomEvent.disableClickPropagation( container );
return container;
},
/**
* Closes the full screen dialog on `click`.
*
* @param {Event} e
* @protected
*/
closeFullScreen: function ( e ) {
L.DomEvent.stop( e );
// eslint-disable-next-line no-underscore-dangle
this._map.closeFullScreen();
}
} );
module.exports = CloseFullScreenControl;
| /**
* # Control to close the full screen dialog.
*
* See [L.Control](https://www.mapbox.com/mapbox.js/api/v2.3.0/l-control/)
* documentation for more details.
*
* @class Kartographer.Dialog.CloseFullScreenControl
* @extends L.Control
*/
var CloseFullScreenControl = L.Control.extend( {
options: {
position: 'topright'
},
/**
* Creates the control element.
*
* @override
* @protected
*/
onAdd: function () {
var container = L.DomUtil.create( 'div', 'leaflet-bar' ),
link = L.DomUtil.create( 'a', 'oo-ui-icon-close', container );
- link.href = '';
link.title = mw.msg( 'kartographer-fullscreen-close' );
+ link.role = 'button';
+ link.tabIndex = '0';
L.DomEvent.addListener( link, 'click', this.closeFullScreen, this );
L.DomEvent.disableClickPropagation( container );
return container;
},
/**
* Closes the full screen dialog on `click`.
*
* @param {Event} e
* @protected
*/
closeFullScreen: function ( e ) {
L.DomEvent.stop( e );
// eslint-disable-next-line no-underscore-dangle
this._map.closeFullScreen();
}
} );
module.exports = CloseFullScreenControl; | 3 | 0.06383 | 2 | 1 |
60fb0bc9d6046e443d5ce141accc8123a9182e32 | CHANGELOG.md | CHANGELOG.md |
* It is now possible to install the latest major release of Minecraft using `minecraft_version: latest`. This will be the default behaviour in the next major version of this role (3).
* Only generate ACL JSON files if the variables (e.g., `minecraft_ops`) are non-empty.
## 2.1.1 (2016-03-08)
* Notify Galaxy on successful build.
## 2.1.0 (2016-03-08)
### Changes
* Fix minimum Ansible version (requires Ansible 1.8+).
* Replace Vagrant test environments with Docker test harness.
* Integrate Travis CI for automated integration testing.
## 2.0.0 (2016-03-01)
### Changes
* Install latest 1.9 release by default.
* Change default process supervisor (`minecraft_process_control`) from `supervisor` to `systemd`.
|
* (#5) Manage `server.properties` by setting `minecraft_server_properties` (Mark Côté).
* (#6) Hooks: Include additional tasks at specific points during execution.
### Changed
* Install latest major release of Minecraft by default.
### Fixed
* (#4) Improved build documentation.
## 2.2.0 (2016-05-30)
* It is now possible to install the latest major release of Minecraft using `minecraft_version: latest`. This will be the default behaviour in the next major version of this role (3).
* Only generate ACL JSON files if the variables (e.g., `minecraft_ops`) are non-empty.
## 2.1.1 (2016-03-08)
* Notify Galaxy on successful build.
## 2.1.0 (2016-03-08)
### Changes
* Fix minimum Ansible version (requires Ansible 1.8+).
* Replace Vagrant test environments with Docker test harness.
* Integrate Travis CI for automated integration testing.
## 2.0.0 (2016-03-01)
### Changes
* Install latest 1.9 release by default.
* Change default process supervisor (`minecraft_process_control`) from `supervisor` to `systemd`.
| Update change log for upcoming release | Update change log for upcoming release
| Markdown | apache-2.0 | devops-coop/ansible-minecraft,devops-coop/ansible-minecraft,devops-coop/ansible-minecraft | markdown | ## Code Before:
* It is now possible to install the latest major release of Minecraft using `minecraft_version: latest`. This will be the default behaviour in the next major version of this role (3).
* Only generate ACL JSON files if the variables (e.g., `minecraft_ops`) are non-empty.
## 2.1.1 (2016-03-08)
* Notify Galaxy on successful build.
## 2.1.0 (2016-03-08)
### Changes
* Fix minimum Ansible version (requires Ansible 1.8+).
* Replace Vagrant test environments with Docker test harness.
* Integrate Travis CI for automated integration testing.
## 2.0.0 (2016-03-01)
### Changes
* Install latest 1.9 release by default.
* Change default process supervisor (`minecraft_process_control`) from `supervisor` to `systemd`.
## Instruction:
Update change log for upcoming release
## Code After:
* (#5) Manage `server.properties` by setting `minecraft_server_properties` (Mark Côté).
* (#6) Hooks: Include additional tasks at specific points during execution.
### Changed
* Install latest major release of Minecraft by default.
### Fixed
* (#4) Improved build documentation.
## 2.2.0 (2016-05-30)
* It is now possible to install the latest major release of Minecraft using `minecraft_version: latest`. This will be the default behaviour in the next major version of this role (3).
* Only generate ACL JSON files if the variables (e.g., `minecraft_ops`) are non-empty.
## 2.1.1 (2016-03-08)
* Notify Galaxy on successful build.
## 2.1.0 (2016-03-08)
### Changes
* Fix minimum Ansible version (requires Ansible 1.8+).
* Replace Vagrant test environments with Docker test harness.
* Integrate Travis CI for automated integration testing.
## 2.0.0 (2016-03-01)
### Changes
* Install latest 1.9 release by default.
* Change default process supervisor (`minecraft_process_control`) from `supervisor` to `systemd`.
| +
+ * (#5) Manage `server.properties` by setting `minecraft_server_properties` (Mark Côté).
+ * (#6) Hooks: Include additional tasks at specific points during execution.
+
+ ### Changed
+
+ * Install latest major release of Minecraft by default.
+
+ ### Fixed
+
+ * (#4) Improved build documentation.
+
+ ## 2.2.0 (2016-05-30)
* It is now possible to install the latest major release of Minecraft using `minecraft_version: latest`. This will be the default behaviour in the next major version of this role (3).
* Only generate ACL JSON files if the variables (e.g., `minecraft_ops`) are non-empty.
## 2.1.1 (2016-03-08)
* Notify Galaxy on successful build.
## 2.1.0 (2016-03-08)
### Changes
* Fix minimum Ansible version (requires Ansible 1.8+).
* Replace Vagrant test environments with Docker test harness.
* Integrate Travis CI for automated integration testing.
## 2.0.0 (2016-03-01)
### Changes
* Install latest 1.9 release by default.
* Change default process supervisor (`minecraft_process_control`) from `supervisor` to `systemd`. | 13 | 0.590909 | 13 | 0 |
35769fcf0ae00e293c000647eb5acc6f5c2561ea | doc/vga_signal_explain_3.txt | doc/vga_signal_explain_3.txt | HSYNC timings
1.91 25.4 0.64
| µs | µs | µs |
+----+------------------------------+----+
31.8µs--\ | | | | /--31.8µs
| |
------+ | +----------------------------------------+ | +----
| | | : visible area : | | |
| | | : : | | |
+---+ : : +---+
: :
: : : :
+====+ +====+
back front
porch porch
| HSYNC timings
1.91 25.4 0.64
| µs | µs | µs |
|<-->|<---------------------------->|<-->|
31.8--\ | | | | /--31.8
µs | | µs
------+ | +----------------------------------------+ | +----
| | | : visible area : | | |
| | | : : | | |
+---+ : : +---+
: :
: : : :
+====+ +====+
back front
porch porch
| Split microseconds to two rows in HSYNC timings doc | Split microseconds to two rows in HSYNC timings doc
| Text | apache-2.0 | Jartza/attiny85-vga,Jartza/octapentaveega,Jartza/octapentaveega,Jartza/attiny85-vga | text | ## Code Before:
HSYNC timings
1.91 25.4 0.64
| µs | µs | µs |
+----+------------------------------+----+
31.8µs--\ | | | | /--31.8µs
| |
------+ | +----------------------------------------+ | +----
| | | : visible area : | | |
| | | : : | | |
+---+ : : +---+
: :
: : : :
+====+ +====+
back front
porch porch
## Instruction:
Split microseconds to two rows in HSYNC timings doc
## Code After:
HSYNC timings
1.91 25.4 0.64
| µs | µs | µs |
|<-->|<---------------------------->|<-->|
31.8--\ | | | | /--31.8
µs | | µs
------+ | +----------------------------------------+ | +----
| | | : visible area : | | |
| | | : : | | |
+---+ : : +---+
: :
: : : :
+====+ +====+
back front
porch porch
| HSYNC timings
1.91 25.4 0.64
| µs | µs | µs |
- +----+------------------------------+----+
? ^ ^^^ ^^^^^^
+ |<-->|<---------------------------->|<-->|
? ^^ ^^^ +++ ^^
- 31.8µs--\ | | | | /--31.8µs
? -- --
+ 31.8--\ | | | | /--31.8
? ++ ++
- | |
? ^^ --
+ µs | | µs
? ^^ ++
------+ | +----------------------------------------+ | +----
| | | : visible area : | | |
| | | : : | | |
+---+ : : +---+
: :
: : : :
+====+ +====+
back front
porch porch
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | 28 | 0.7 | 4 | 24 |
024ce19bb0c2459c5867e95c507ff6566742b158 | modules/govuk/templates/apps/review_o_matic_explore/upstart.conf.erb | modules/govuk/templates/apps/review_o_matic_explore/upstart.conf.erb | description "Proxy for Review-O-Matic Explore"
start on runlevel [2345]
stop on runlevel [!2345]
env PORT=3023
env UPSTREAM_AUTH=betademo:nottobeshared
env UPSTREAM_HOST="reviewomatic.<%= govuk_platform %>.alphagov.co.uk"
# Have to use this roundabout method of chuid'ing because lucid's upstart doesn't
# support the setuid and setgrp stanzas.
env USER=deploy
env GROUP=deploy
exec start-stop-daemon --start --chuid $USER:$USER --chdir /var/apps/review-o-matic-explore --exec /usr/bin/node server.js | description "Proxy for Review-O-Matic Explore"
start on runlevel [2345]
stop on runlevel [!2345]
env PORT=3023
env UPSTREAM_AUTH=betademo:nottobeshared
env UPSTREAM_HOST="reviewomatic.<%= govuk_platform %>.alphagov.co.uk"
# Have to use this roundabout method of chuid'ing because lucid's upstart doesn't
# support the setuid and setgrp stanzas.
env USER=deploy
env GROUP=deploy
exec start-stop-daemon --start --chuid $USER:$USER --chdir /var/apps/review-o-matic-explore --pidfile /var/run/review-o-matic-explore.pid -m --startas /usr/bin/node server.js | Use a pidfile for review-o-matic-explore | Use a pidfile for review-o-matic-explore
| HTML+ERB | mit | alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet | html+erb | ## Code Before:
description "Proxy for Review-O-Matic Explore"
start on runlevel [2345]
stop on runlevel [!2345]
env PORT=3023
env UPSTREAM_AUTH=betademo:nottobeshared
env UPSTREAM_HOST="reviewomatic.<%= govuk_platform %>.alphagov.co.uk"
# Have to use this roundabout method of chuid'ing because lucid's upstart doesn't
# support the setuid and setgrp stanzas.
env USER=deploy
env GROUP=deploy
exec start-stop-daemon --start --chuid $USER:$USER --chdir /var/apps/review-o-matic-explore --exec /usr/bin/node server.js
## Instruction:
Use a pidfile for review-o-matic-explore
## Code After:
description "Proxy for Review-O-Matic Explore"
start on runlevel [2345]
stop on runlevel [!2345]
env PORT=3023
env UPSTREAM_AUTH=betademo:nottobeshared
env UPSTREAM_HOST="reviewomatic.<%= govuk_platform %>.alphagov.co.uk"
# Have to use this roundabout method of chuid'ing because lucid's upstart doesn't
# support the setuid and setgrp stanzas.
env USER=deploy
env GROUP=deploy
exec start-stop-daemon --start --chuid $USER:$USER --chdir /var/apps/review-o-matic-explore --pidfile /var/run/review-o-matic-explore.pid -m --startas /usr/bin/node server.js | description "Proxy for Review-O-Matic Explore"
start on runlevel [2345]
stop on runlevel [!2345]
env PORT=3023
env UPSTREAM_AUTH=betademo:nottobeshared
env UPSTREAM_HOST="reviewomatic.<%= govuk_platform %>.alphagov.co.uk"
# Have to use this roundabout method of chuid'ing because lucid's upstart doesn't
# support the setuid and setgrp stanzas.
env USER=deploy
env GROUP=deploy
- exec start-stop-daemon --start --chuid $USER:$USER --chdir /var/apps/review-o-matic-explore --exec /usr/bin/node server.js
? ^
+ exec start-stop-daemon --start --chuid $USER:$USER --chdir /var/apps/review-o-matic-explore --pidfile /var/run/review-o-matic-explore.pid -m --startas /usr/bin/node server.js
? ++++++++++++++++++++++++++++++++ ++++ ^^^^^^^^^^^^^^^^^
| 2 | 0.133333 | 1 | 1 |
80b53951ffffe20c18c92cb567f07c2bda28936c | README.md | README.md |
Buggy hack that sometimes can copy visible content from Atom text buffer into clipboard preserving fonts and colors.

|
Buggy hack that sometimes can copy visible content from Atom text buffer into clipboard preserving fonts and colors.

| Fix demo gif URL for Atom website | Fix demo gif URL for Atom website
| Markdown | mit | frantic/copy-with-syntax | markdown | ## Code Before:
Buggy hack that sometimes can copy visible content from Atom text buffer into clipboard preserving fonts and colors.

## Instruction:
Fix demo gif URL for Atom website
## Code After:
Buggy hack that sometimes can copy visible content from Atom text buffer into clipboard preserving fonts and colors.

|
Buggy hack that sometimes can copy visible content from Atom text buffer into clipboard preserving fonts and colors.
- 
+  | 2 | 0.5 | 1 | 1 |
0cb33bf9562811f5cb68c53b0198c180233f953d | lib/generators/serviceworker/templates/serviceworker.js | lib/generators/serviceworker/templates/serviceworker.js | function onInstall() {
console.log('[Serviceworker]', "Installing!");
}
function onActivate() {
console.log('[Serviceworker]', "Activating!");
}
function onFetch() {
}
self.addEventListener('install', onInstall);
self.addEventListener('activate', onActivate);
self.addEventListener('fetch', onFetch);
| // function onInstall(event) {
// console.log('[Serviceworker]', "Installing!", event);
// event.waitUntil(
// caches.open('cached-assets-v1').then(function prefill(cache) {
// return cache.addAll([
// '<%#= asset_path "application.js" %>',
// '<%#= asset_path "application.css" %>',
// '/offline.html'
// ]);
// })
// );
// }
//
// function onActivate(event) {
// console.log('[Serviceworker]', "Activating!", event);
// event.waitUntil(
// caches.keys().then(function(cacheNames) {
// return Promise.all(
// cacheNames.filter(function(cacheName) {
// // Return true if you want to remove this cache,
// // but remember that caches are shared across
// // the whole origin
// }).map(function(cacheName) {
// return caches.delete(cacheName);
// })
// );
// })
// );
// }
//
// function onFetch(event) {
// // Fetch from cache, fallback to network
// event.respondWith(
// caches.match(event.request).then(function(response) {
// return response || fetch(event.request);
// })
// );
//
// // See https://jakearchibald.com/2014/offline-cookbook/#on-network-response for more examples
// }
//
// self.addEventListener('install', onInstall);
// self.addEventListener('activate', onActivate);
// self.addEventListener('fetch', onFetch);
| Add commented snippets for service worker | Add commented snippets for service worker
| JavaScript | mit | rossta/serviceworker-rails,rossta/serviceworker-rails,rossta/serviceworker-rails,rossta/serviceworker-rails | javascript | ## Code Before:
function onInstall() {
console.log('[Serviceworker]', "Installing!");
}
function onActivate() {
console.log('[Serviceworker]', "Activating!");
}
function onFetch() {
}
self.addEventListener('install', onInstall);
self.addEventListener('activate', onActivate);
self.addEventListener('fetch', onFetch);
## Instruction:
Add commented snippets for service worker
## Code After:
// function onInstall(event) {
// console.log('[Serviceworker]', "Installing!", event);
// event.waitUntil(
// caches.open('cached-assets-v1').then(function prefill(cache) {
// return cache.addAll([
// '<%#= asset_path "application.js" %>',
// '<%#= asset_path "application.css" %>',
// '/offline.html'
// ]);
// })
// );
// }
//
// function onActivate(event) {
// console.log('[Serviceworker]', "Activating!", event);
// event.waitUntil(
// caches.keys().then(function(cacheNames) {
// return Promise.all(
// cacheNames.filter(function(cacheName) {
// // Return true if you want to remove this cache,
// // but remember that caches are shared across
// // the whole origin
// }).map(function(cacheName) {
// return caches.delete(cacheName);
// })
// );
// })
// );
// }
//
// function onFetch(event) {
// // Fetch from cache, fallback to network
// event.respondWith(
// caches.match(event.request).then(function(response) {
// return response || fetch(event.request);
// })
// );
//
// // See https://jakearchibald.com/2014/offline-cookbook/#on-network-response for more examples
// }
//
// self.addEventListener('install', onInstall);
// self.addEventListener('activate', onActivate);
// self.addEventListener('fetch', onFetch);
| - function onInstall() {
+ // function onInstall(event) {
? +++ +++++
- console.log('[Serviceworker]', "Installing!");
+ // console.log('[Serviceworker]', "Installing!", event);
? +++ +++++++
- }
-
+ // event.waitUntil(
+ // caches.open('cached-assets-v1').then(function prefill(cache) {
+ // return cache.addAll([
+ // '<%#= asset_path "application.js" %>',
+ // '<%#= asset_path "application.css" %>',
+ // '/offline.html'
+ // ]);
+ // })
+ // );
+ // }
+ //
- function onActivate() {
+ // function onActivate(event) {
? +++ +++++
- console.log('[Serviceworker]', "Activating!");
+ // console.log('[Serviceworker]', "Activating!", event);
? +++ +++++++
- }
-
+ // event.waitUntil(
+ // caches.keys().then(function(cacheNames) {
+ // return Promise.all(
+ // cacheNames.filter(function(cacheName) {
+ // // Return true if you want to remove this cache,
+ // // but remember that caches are shared across
+ // // the whole origin
+ // }).map(function(cacheName) {
+ // return caches.delete(cacheName);
+ // })
+ // );
+ // })
+ // );
+ // }
+ //
- function onFetch() {
+ // function onFetch(event) {
? +++ +++++
- }
-
+ // // Fetch from cache, fallback to network
+ // event.respondWith(
+ // caches.match(event.request).then(function(response) {
+ // return response || fetch(event.request);
+ // })
+ // );
+ //
+ // // See https://jakearchibald.com/2014/offline-cookbook/#on-network-response for more examples
+ // }
+ //
- self.addEventListener('install', onInstall);
+ // self.addEventListener('install', onInstall);
? +++
- self.addEventListener('activate', onActivate);
+ // self.addEventListener('activate', onActivate);
? +++
- self.addEventListener('fetch', onFetch);
+ // self.addEventListener('fetch', onFetch);
? +++
| 58 | 4.142857 | 44 | 14 |
ad676e36e9756335841fa81621be35f59f95cb0a | models/product_model.js | models/product_model.js | var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = mongoose.Schema.Types.ObjectId;
var ProductType = require("./producttype_model");
var Location = require("./location_model");
var ProductSchema = new Schema({
name: String,
description: String,
location_id: { type: ObjectId, ref: 'Location' },
producttype_id: { type: ObjectId, ref: 'ProductType' },
price: { type: Number, validate: function(v) { return (v > 0); }, required: true },
member_discount: { type: Number, default: 0 },
topup_size: Number,
volume: Number,
xero_account: String,
xero_code: { type: String, index: true },
xero_id: String,
payment_options: [ { type: String, validate: /stuff|space|creditcard|account/, required: true } ],
self_service: { type: Boolean, default: false, index: true },
date_created: { type: Date, default: Date.now },
recurring_cost: { type: String, validate: /once-off|monthly|annually/, default: "monthly" },
_owner_id: ObjectId,
_deleted: { type: Boolean, default: false, index: true },
});
ProductSchema.set("_perms", {
admin: "crud",
owner: "r",
user: "r",
all: "r"
});
module.exports = mongoose.model('Product', ProductSchema);
| var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = mongoose.Schema.Types.ObjectId;
var ProductType = require("./producttype_model");
var Location = require("./location_model");
var ProductSchema = new Schema({
name: String,
description: String,
location_id: { type: ObjectId, ref: 'Location' },
producttype_id: { type: ObjectId, ref: 'ProductType' },
price: { type: Number, validate: function(v) { return (v > 0); }, required: true },
member_discount: { type: Number, default: 0 },
topup_size: Number,
volume: Number,
xero_account: String,
xero_code: { type: String, index: true },
xero_id: String,
payment_options: [ { type: String, validate: /stuff|space|creditcard|account/, required: true } ],
self_service: { type: Boolean, default: false, index: true },
date_created: { type: Date, default: Date.now },
pro_rata: { type: Boolean, default: false, index: true },
_owner_id: ObjectId,
_deleted: { type: Boolean, default: false, index: true },
});
ProductSchema.set("_perms", {
admin: "crud",
owner: "r",
user: "r",
all: "r"
});
module.exports = mongoose.model('Product', ProductSchema);
| Drop recurring_cost in favour of pro_rata boolean | Drop recurring_cost in favour of pro_rata boolean
| JavaScript | mit | 10layer/jexpress,10layer/jexpress | javascript | ## Code Before:
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = mongoose.Schema.Types.ObjectId;
var ProductType = require("./producttype_model");
var Location = require("./location_model");
var ProductSchema = new Schema({
name: String,
description: String,
location_id: { type: ObjectId, ref: 'Location' },
producttype_id: { type: ObjectId, ref: 'ProductType' },
price: { type: Number, validate: function(v) { return (v > 0); }, required: true },
member_discount: { type: Number, default: 0 },
topup_size: Number,
volume: Number,
xero_account: String,
xero_code: { type: String, index: true },
xero_id: String,
payment_options: [ { type: String, validate: /stuff|space|creditcard|account/, required: true } ],
self_service: { type: Boolean, default: false, index: true },
date_created: { type: Date, default: Date.now },
recurring_cost: { type: String, validate: /once-off|monthly|annually/, default: "monthly" },
_owner_id: ObjectId,
_deleted: { type: Boolean, default: false, index: true },
});
ProductSchema.set("_perms", {
admin: "crud",
owner: "r",
user: "r",
all: "r"
});
module.exports = mongoose.model('Product', ProductSchema);
## Instruction:
Drop recurring_cost in favour of pro_rata boolean
## Code After:
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = mongoose.Schema.Types.ObjectId;
var ProductType = require("./producttype_model");
var Location = require("./location_model");
var ProductSchema = new Schema({
name: String,
description: String,
location_id: { type: ObjectId, ref: 'Location' },
producttype_id: { type: ObjectId, ref: 'ProductType' },
price: { type: Number, validate: function(v) { return (v > 0); }, required: true },
member_discount: { type: Number, default: 0 },
topup_size: Number,
volume: Number,
xero_account: String,
xero_code: { type: String, index: true },
xero_id: String,
payment_options: [ { type: String, validate: /stuff|space|creditcard|account/, required: true } ],
self_service: { type: Boolean, default: false, index: true },
date_created: { type: Date, default: Date.now },
pro_rata: { type: Boolean, default: false, index: true },
_owner_id: ObjectId,
_deleted: { type: Boolean, default: false, index: true },
});
ProductSchema.set("_perms", {
admin: "crud",
owner: "r",
user: "r",
all: "r"
});
module.exports = mongoose.model('Product', ProductSchema);
| var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = mongoose.Schema.Types.ObjectId;
var ProductType = require("./producttype_model");
var Location = require("./location_model");
var ProductSchema = new Schema({
name: String,
description: String,
location_id: { type: ObjectId, ref: 'Location' },
producttype_id: { type: ObjectId, ref: 'ProductType' },
price: { type: Number, validate: function(v) { return (v > 0); }, required: true },
member_discount: { type: Number, default: 0 },
topup_size: Number,
volume: Number,
xero_account: String,
xero_code: { type: String, index: true },
xero_id: String,
payment_options: [ { type: String, validate: /stuff|space|creditcard|account/, required: true } ],
self_service: { type: Boolean, default: false, index: true },
date_created: { type: Date, default: Date.now },
- recurring_cost: { type: String, validate: /once-off|monthly|annually/, default: "monthly" },
+ pro_rata: { type: Boolean, default: false, index: true },
_owner_id: ObjectId,
_deleted: { type: Boolean, default: false, index: true },
});
ProductSchema.set("_perms", {
admin: "crud",
owner: "r",
user: "r",
all: "r"
});
module.exports = mongoose.model('Product', ProductSchema); | 2 | 0.055556 | 1 | 1 |
5796c780ba6472781f7a64b8e2071aac77a36415 | src/Symfony/Component/Mailer/Event/MessageEvent.php | src/Symfony/Component/Mailer/Event/MessageEvent.php | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Event;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mime\RawMessage;
/**
* Allows the transformation of a Message and the SMTP Envelope before the email is sent.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
final class MessageEvent extends Event
{
private $message;
private $envelope;
private $transport;
private $queued;
public function __construct(RawMessage $message, Envelope $envelope, string $transport, bool $queued = false)
{
$this->message = $message;
$this->envelope = $envelope;
$this->transport = $transport;
$this->queued = $queued;
}
public function getMessage(): RawMessage
{
return $this->message;
}
public function setMessage(RawMessage $message): void
{
$this->message = $message;
}
public function getEnvelope(): SmtpEnvelope
{
return $this->envelope;
}
public function setEnvelope(SmtpEnvelope $envelope): void
{
$this->envelope = $envelope;
}
public function getTransport(): string
{
return $this->transport;
}
public function isQueued(): bool
{
return $this->queued;
}
}
| <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Event;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mime\RawMessage;
/**
* Allows the transformation of a Message and the Envelope before the email is sent.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
final class MessageEvent extends Event
{
private $message;
private $envelope;
private $transport;
private $queued;
public function __construct(RawMessage $message, Envelope $envelope, string $transport, bool $queued = false)
{
$this->message = $message;
$this->envelope = $envelope;
$this->transport = $transport;
$this->queued = $queued;
}
public function getMessage(): RawMessage
{
return $this->message;
}
public function setMessage(RawMessage $message): void
{
$this->message = $message;
}
public function getEnvelope(): Envelope
{
return $this->envelope;
}
public function setEnvelope(Envelope $envelope): void
{
$this->envelope = $envelope;
}
public function getTransport(): string
{
return $this->transport;
}
public function isQueued(): bool
{
return $this->queued;
}
}
| Fix SmtpEnvelope renaming to Envelope | [Mailer] Fix SmtpEnvelope renaming to Envelope
| PHP | mit | ogizanagi/symfony,sgehrig/symfony,xabbuh/symfony,nicolas-grekas/symfony,jvasseur/symfony,tucksaun/symfony,garak/symfony,stof/symfony,jvasseur/symfony,ogizanagi/symfony,ro0NL/symfony,Simperfit/symfony,docteurklein/symfony,HeahDude/symfony,ro0NL/symfony,lyrixx/symfony,derrabus/symfony,Tobion/symfony,mpdude/symfony,curry684/symfony,stof/symfony,Taluu/symfony,mpdude/symfony,Koc/symfony,maidmaid/symfony,jvasseur/symfony,maidmaid/symfony,gonzalovilaseca/symfony,mpdude/symfony,chalasr/symfony,pyrech/symfony,romaricdrigon/symfony,mpdude/symfony,lyrixx/symfony,Tobion/symfony,pierredup/symfony,maidmaid/symfony,pierredup/symfony,stof/symfony,Nyholm/symfony,lstrojny/symfony,jakzal/symfony,chalasr/symfony,smatyas/symfony,1ed/symfony,symfony/symfony,MatTheCat/symfony,sgehrig/symfony,zorn-v/symfony,chalasr/symfony,symfony/symfony,zcodes/symfony,Slamdunk/symfony,alekitto/symfony,maidmaid/symfony,bendavies/symfony,jderusse/symfony,MatTheCat/symfony,damienalexandre/symfony,jakzal/symfony,shieldo/symfony,paradajozsef/symfony,ogizanagi/symfony,hhamon/symfony,nicolas-grekas/symfony,pyrech/symfony,zcodes/symfony,1ed/symfony,pierredup/symfony,paradajozsef/symfony,damienalexandre/symfony,ogizanagi/symfony,phramz/symfony,Deamon/symfony,bendavies/symfony,sgehrig/symfony,oleg-andreyev/symfony,paradajozsef/symfony,jakzal/symfony,OskarStark/symfony,bendavies/symfony,Koc/symfony,zcodes/symfony,xabbuh/symfony,shieldo/symfony,romaricdrigon/symfony,pierredup/symfony,alekitto/symfony,OskarStark/symfony,paradajozsef/symfony,phramz/symfony,HeahDude/symfony,xabbuh/symfony,voronkovich/symfony,mweimerskirch/symfony,tucksaun/symfony,tgalopin/symfony,tgalopin/symfony,mweimerskirch/symfony,gonzalovilaseca/symfony,zorn-v/symfony,smatyas/symfony,romaricdrigon/symfony,zerkms/symfony,1ed/symfony,oleg-andreyev/symfony,mnapoli/symfony,ragboyjr/symfony,Deamon/symfony,oleg-andreyev/symfony,gonzalovilaseca/symfony,kbond/symfony,localheinz/symfony,jvasseur/symfony,alekitto/symfony,derrabus/symfony,Nyholm/symfony,zerkms/symfony,lyrixx/symfony,tucksaun/symfony,hhamon/symfony,mnapoli/symfony,lstrojny/symfony,docteurklein/symfony,Simperfit/symfony,jderusse/symfony,fabpot/symfony,jderusse/symfony,dmaicher/symfony,fabpot/symfony,nicolas-grekas/symfony,Simperfit/symfony,gonzalovilaseca/symfony,alekitto/symfony,Taluu/symfony,smatyas/symfony,localheinz/symfony,bendavies/symfony,OskarStark/symfony,dmaicher/symfony,d-ph/symfony,xabbuh/symfony,garak/symfony,mnapoli/symfony,d-ph/symfony,phramz/symfony,Slamdunk/symfony,Simperfit/symfony,d-ph/symfony,dmaicher/symfony,mnapoli/symfony,1ed/symfony,mweimerskirch/symfony,MatTheCat/symfony,ro0NL/symfony,voronkovich/symfony,Nyholm/symfony,zorn-v/symfony,zerkms/symfony,tgalopin/symfony,kbond/symfony,Deamon/symfony,Deamon/symfony,kbond/symfony,damienalexandre/symfony,jderusse/symfony,pyrech/symfony,phramz/symfony,localheinz/symfony,ragboyjr/symfony,zerkms/symfony,sgehrig/symfony,HeahDude/symfony,localheinz/symfony,kbond/symfony,docteurklein/symfony,Koc/symfony,Slamdunk/symfony,shieldo/symfony,chalasr/symfony,Taluu/symfony,oleg-andreyev/symfony,hhamon/symfony,Simperfit/symfony,MatTheCat/symfony,curry684/symfony,fabpot/symfony,symfony/symfony,tgalopin/symfony,nicolas-grekas/symfony,symfony/symfony,ro0NL/symfony,stof/symfony,garak/symfony,damienalexandre/symfony,romaricdrigon/symfony,ragboyjr/symfony,fabpot/symfony,Koc/symfony,curry684/symfony,tucksaun/symfony,Nyholm/symfony,smatyas/symfony,mweimerskirch/symfony,lyrixx/symfony,jakzal/symfony,derrabus/symfony,d-ph/symfony,Tobion/symfony,garak/symfony,Taluu/symfony,mweimerskirch/symfony,shieldo/symfony,docteurklein/symfony,derrabus/symfony,Deamon/symfony,hhamon/symfony,zorn-v/symfony,lstrojny/symfony,Tobion/symfony,zcodes/symfony,dmaicher/symfony,Slamdunk/symfony,mnapoli/symfony,smatyas/symfony,voronkovich/symfony,docteurklein/symfony,voronkovich/symfony,OskarStark/symfony,pyrech/symfony,ragboyjr/symfony,curry684/symfony,HeahDude/symfony | php | ## Code Before:
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Event;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mime\RawMessage;
/**
* Allows the transformation of a Message and the SMTP Envelope before the email is sent.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
final class MessageEvent extends Event
{
private $message;
private $envelope;
private $transport;
private $queued;
public function __construct(RawMessage $message, Envelope $envelope, string $transport, bool $queued = false)
{
$this->message = $message;
$this->envelope = $envelope;
$this->transport = $transport;
$this->queued = $queued;
}
public function getMessage(): RawMessage
{
return $this->message;
}
public function setMessage(RawMessage $message): void
{
$this->message = $message;
}
public function getEnvelope(): SmtpEnvelope
{
return $this->envelope;
}
public function setEnvelope(SmtpEnvelope $envelope): void
{
$this->envelope = $envelope;
}
public function getTransport(): string
{
return $this->transport;
}
public function isQueued(): bool
{
return $this->queued;
}
}
## Instruction:
[Mailer] Fix SmtpEnvelope renaming to Envelope
## Code After:
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Event;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mime\RawMessage;
/**
* Allows the transformation of a Message and the Envelope before the email is sent.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
final class MessageEvent extends Event
{
private $message;
private $envelope;
private $transport;
private $queued;
public function __construct(RawMessage $message, Envelope $envelope, string $transport, bool $queued = false)
{
$this->message = $message;
$this->envelope = $envelope;
$this->transport = $transport;
$this->queued = $queued;
}
public function getMessage(): RawMessage
{
return $this->message;
}
public function setMessage(RawMessage $message): void
{
$this->message = $message;
}
public function getEnvelope(): Envelope
{
return $this->envelope;
}
public function setEnvelope(Envelope $envelope): void
{
$this->envelope = $envelope;
}
public function getTransport(): string
{
return $this->transport;
}
public function isQueued(): bool
{
return $this->queued;
}
}
| <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Mailer\Event;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\Mailer\Envelope;
use Symfony\Component\Mime\RawMessage;
/**
- * Allows the transformation of a Message and the SMTP Envelope before the email is sent.
? -----
+ * Allows the transformation of a Message and the Envelope before the email is sent.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
final class MessageEvent extends Event
{
private $message;
private $envelope;
private $transport;
private $queued;
public function __construct(RawMessage $message, Envelope $envelope, string $transport, bool $queued = false)
{
$this->message = $message;
$this->envelope = $envelope;
$this->transport = $transport;
$this->queued = $queued;
}
public function getMessage(): RawMessage
{
return $this->message;
}
public function setMessage(RawMessage $message): void
{
$this->message = $message;
}
- public function getEnvelope(): SmtpEnvelope
? ----
+ public function getEnvelope(): Envelope
{
return $this->envelope;
}
- public function setEnvelope(SmtpEnvelope $envelope): void
? ----
+ public function setEnvelope(Envelope $envelope): void
{
$this->envelope = $envelope;
}
public function getTransport(): string
{
return $this->transport;
}
public function isQueued(): bool
{
return $this->queued;
}
} | 6 | 0.089552 | 3 | 3 |
88f201d6c61befff81524d88418de66e3921a201 | roles/gateway/defaults/main.yml | roles/gateway/defaults/main.yml | ---
gateway_long_name: "moteino-gateway"
gateway_short_name: "gateway"
moteino_username: "moteino"
moteino_home_dir: "/srv/moteino"
#gateway_repo_url: "git@github.com:LowPowerLab/RaspberryPi-Gateway.git"
gateway_log_filename: "/var/log/{{gateway_long_name}}.log"
gateway_repo_url: "https://github.com/LowPowerLab/RaspberryPi-Gateway.git"
gateway_repo_dir: "{{moteino_home_dir}}/gateway"
gateway_syslog_id: "{{gateway_short_name}}"
ssl_cert_filename: "/etc/ssl/server.crt"
ssl_key_filename: "/etc/ssl/private/server.key"
update: false
| ---
gateway_long_name: "moteino-gateway"
gateway_short_name: "gateway"
moteino_username: "moteino"
moteino_home_dir: "/srv/moteino"
#gateway_repo_url: "git@github.com:LowPowerLab/RaspberryPi-Gateway.git"
gateway_log_filename: "/var/log/{{gateway_long_name}}.log"
gateway_repo_url: "https://github.com/LowPowerLab/RaspberryPi-Gateway.git"
gateway_repo_dir: "{{moteino_home_dir}}/{{gateway_short_name}}"
gateway_syslog_id: "{{gateway_short_name}}"
ssl_cert_filename: "/etc/ssl/server.crt"
ssl_key_filename: "/etc/ssl/private/server.key"
update: false
| Use short name variable in dir path. | Use short name variable in dir path.
| YAML | mit | cacack/ansible-moteino-gateway | yaml | ## Code Before:
---
gateway_long_name: "moteino-gateway"
gateway_short_name: "gateway"
moteino_username: "moteino"
moteino_home_dir: "/srv/moteino"
#gateway_repo_url: "git@github.com:LowPowerLab/RaspberryPi-Gateway.git"
gateway_log_filename: "/var/log/{{gateway_long_name}}.log"
gateway_repo_url: "https://github.com/LowPowerLab/RaspberryPi-Gateway.git"
gateway_repo_dir: "{{moteino_home_dir}}/gateway"
gateway_syslog_id: "{{gateway_short_name}}"
ssl_cert_filename: "/etc/ssl/server.crt"
ssl_key_filename: "/etc/ssl/private/server.key"
update: false
## Instruction:
Use short name variable in dir path.
## Code After:
---
gateway_long_name: "moteino-gateway"
gateway_short_name: "gateway"
moteino_username: "moteino"
moteino_home_dir: "/srv/moteino"
#gateway_repo_url: "git@github.com:LowPowerLab/RaspberryPi-Gateway.git"
gateway_log_filename: "/var/log/{{gateway_long_name}}.log"
gateway_repo_url: "https://github.com/LowPowerLab/RaspberryPi-Gateway.git"
gateway_repo_dir: "{{moteino_home_dir}}/{{gateway_short_name}}"
gateway_syslog_id: "{{gateway_short_name}}"
ssl_cert_filename: "/etc/ssl/server.crt"
ssl_key_filename: "/etc/ssl/private/server.key"
update: false
| ---
gateway_long_name: "moteino-gateway"
gateway_short_name: "gateway"
moteino_username: "moteino"
moteino_home_dir: "/srv/moteino"
#gateway_repo_url: "git@github.com:LowPowerLab/RaspberryPi-Gateway.git"
gateway_log_filename: "/var/log/{{gateway_long_name}}.log"
gateway_repo_url: "https://github.com/LowPowerLab/RaspberryPi-Gateway.git"
- gateway_repo_dir: "{{moteino_home_dir}}/gateway"
+ gateway_repo_dir: "{{moteino_home_dir}}/{{gateway_short_name}}"
? ++ +++++++++++++
gateway_syslog_id: "{{gateway_short_name}}"
ssl_cert_filename: "/etc/ssl/server.crt"
ssl_key_filename: "/etc/ssl/private/server.key"
update: false | 2 | 0.111111 | 1 | 1 |
8c6ff1de879eb3644e3a635b29c169604fdd9d82 | requirements.txt | requirements.txt | pypandoc~=1.4
# linting
flake8~=3.7.9
# testing
pytest~=5.3.2
pytest-cov~=2.8.1 | pypandoc~=1.4
# linting
flake8~=3.7.9
# testing
pytest~=4.6.8 # versions >=5.x require Python 3.5 or later
pytest-cov~=2.8.1 | Reduce version of pytest to a 2.7/3.4 compatible version | Reduce version of pytest to a 2.7/3.4 compatible version
| Text | unlicense | Bobspadger/python-amazon-mws,jameshiew/mws | text | ## Code Before:
pypandoc~=1.4
# linting
flake8~=3.7.9
# testing
pytest~=5.3.2
pytest-cov~=2.8.1
## Instruction:
Reduce version of pytest to a 2.7/3.4 compatible version
## Code After:
pypandoc~=1.4
# linting
flake8~=3.7.9
# testing
pytest~=4.6.8 # versions >=5.x require Python 3.5 or later
pytest-cov~=2.8.1 | pypandoc~=1.4
# linting
flake8~=3.7.9
# testing
- pytest~=5.3.2
+ pytest~=4.6.8 # versions >=5.x require Python 3.5 or later
pytest-cov~=2.8.1 | 2 | 0.25 | 1 | 1 |
4481b72136fcf9460aa6eb22568430c549e7875d | README.md | README.md | [](https://www.webcomponents.org/element/zedesk/chrome-tabs)
# \<chrome-tabs\>
Chrome tabs
Inspired by the project [chrome-tabs][1] by @adamschwartz, this project aims to create a webcomponent.

The component is licensed under the [ISC License](LICENSE.md)
Demo and doc are available on http://zedesk.github.io/chrome-tabs/
[1]: https://github.com/adamschwartz/chrome-tabs
| [](https://www.webcomponents.org/element/zedesk/chrome-tabs)
# \<chrome-tabs\>
Chrome tabs
Inspired by the project [chrome-tabs][1] by @adamschwartz, this project aims to create a webcomponent.

<!--
```
<custom-element-demo>
<template>
<link rel="import" href="chrome-tabs.html">
<link rel="import" href="chrome-tab.html">
<next-code-block></next-code-block>
</template>
</custom-element-demo>
```
-->
```html
<chrome-tabs extendable selected="1" >
<chrome-tab icon="https://www.polymer-project.org/images/logos/p-logo-32.png" title="Tab title"></chrome-tab>
<chrome-tab icon="https://assets-cdn.github.com/favicon.ico" title="Tab title"></chrome-tab>
<chrome-tab title="Tab title"></chrome-tab>
<chrome-tab title="Tab title"></chrome-tab>
</chrome-tabs>
```
The component is licensed under the [ISC License](LICENSE.md)
Demo and doc are available on http://zedesk.github.io/chrome-tabs/
[1]: https://github.com/adamschwartz/chrome-tabs
| Add a demo for webcomponents.org | Add a demo for webcomponents.org
| Markdown | isc | zedesk/chrome-tabs | markdown | ## Code Before:
[](https://www.webcomponents.org/element/zedesk/chrome-tabs)
# \<chrome-tabs\>
Chrome tabs
Inspired by the project [chrome-tabs][1] by @adamschwartz, this project aims to create a webcomponent.

The component is licensed under the [ISC License](LICENSE.md)
Demo and doc are available on http://zedesk.github.io/chrome-tabs/
[1]: https://github.com/adamschwartz/chrome-tabs
## Instruction:
Add a demo for webcomponents.org
## Code After:
[](https://www.webcomponents.org/element/zedesk/chrome-tabs)
# \<chrome-tabs\>
Chrome tabs
Inspired by the project [chrome-tabs][1] by @adamschwartz, this project aims to create a webcomponent.

<!--
```
<custom-element-demo>
<template>
<link rel="import" href="chrome-tabs.html">
<link rel="import" href="chrome-tab.html">
<next-code-block></next-code-block>
</template>
</custom-element-demo>
```
-->
```html
<chrome-tabs extendable selected="1" >
<chrome-tab icon="https://www.polymer-project.org/images/logos/p-logo-32.png" title="Tab title"></chrome-tab>
<chrome-tab icon="https://assets-cdn.github.com/favicon.ico" title="Tab title"></chrome-tab>
<chrome-tab title="Tab title"></chrome-tab>
<chrome-tab title="Tab title"></chrome-tab>
</chrome-tabs>
```
The component is licensed under the [ISC License](LICENSE.md)
Demo and doc are available on http://zedesk.github.io/chrome-tabs/
[1]: https://github.com/adamschwartz/chrome-tabs
| [](https://www.webcomponents.org/element/zedesk/chrome-tabs)
# \<chrome-tabs\>
Chrome tabs
Inspired by the project [chrome-tabs][1] by @adamschwartz, this project aims to create a webcomponent.

+ <!--
+ ```
+ <custom-element-demo>
+ <template>
+ <link rel="import" href="chrome-tabs.html">
+ <link rel="import" href="chrome-tab.html">
+ <next-code-block></next-code-block>
+ </template>
+ </custom-element-demo>
+ ```
+ -->
+ ```html
+ <chrome-tabs extendable selected="1" >
+ <chrome-tab icon="https://www.polymer-project.org/images/logos/p-logo-32.png" title="Tab title"></chrome-tab>
+ <chrome-tab icon="https://assets-cdn.github.com/favicon.ico" title="Tab title"></chrome-tab>
+ <chrome-tab title="Tab title"></chrome-tab>
+ <chrome-tab title="Tab title"></chrome-tab>
+ </chrome-tabs>
+ ```
+
The component is licensed under the [ISC License](LICENSE.md)
Demo and doc are available on http://zedesk.github.io/chrome-tabs/
[1]: https://github.com/adamschwartz/chrome-tabs | 20 | 1.333333 | 20 | 0 |
61b5bc8a7e81225a83d195e016bc4adbd7ca1db5 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='pymediainfo',
version='2.1.5',
author='Louis Sautier',
author_email='sautier.louis@gmail.com',
url='https://github.com/sbraz/pymediainfo',
description="""A Python wrapper for the mediainfo library.""",
packages=find_packages(),
namespace_packages=[],
include_package_data=True,
zip_safe=False,
license='MIT',
tests_require=["nose"],
test_suite="nose.collector",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"License :: OSI Approved :: MIT License",
]
)
| from setuptools import setup, find_packages
setup(
name='pymediainfo',
version='2.1.5',
author='Louis Sautier',
author_email='sautier.louis@gmail.com',
url='https://github.com/sbraz/pymediainfo',
description="""A Python wrapper for the mediainfo library.""",
packages=find_packages(),
namespace_packages=[],
include_package_data=True,
zip_safe=False,
license='MIT',
tests_require=["nose"],
test_suite="nose.collector",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"License :: OSI Approved :: MIT License",
]
)
| Add Python 2.6 to classifiers | Add Python 2.6 to classifiers
| Python | mit | paltman/pymediainfo,paltman-archive/pymediainfo | python | ## Code Before:
from setuptools import setup, find_packages
setup(
name='pymediainfo',
version='2.1.5',
author='Louis Sautier',
author_email='sautier.louis@gmail.com',
url='https://github.com/sbraz/pymediainfo',
description="""A Python wrapper for the mediainfo library.""",
packages=find_packages(),
namespace_packages=[],
include_package_data=True,
zip_safe=False,
license='MIT',
tests_require=["nose"],
test_suite="nose.collector",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"License :: OSI Approved :: MIT License",
]
)
## Instruction:
Add Python 2.6 to classifiers
## Code After:
from setuptools import setup, find_packages
setup(
name='pymediainfo',
version='2.1.5',
author='Louis Sautier',
author_email='sautier.louis@gmail.com',
url='https://github.com/sbraz/pymediainfo',
description="""A Python wrapper for the mediainfo library.""",
packages=find_packages(),
namespace_packages=[],
include_package_data=True,
zip_safe=False,
license='MIT',
tests_require=["nose"],
test_suite="nose.collector",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"License :: OSI Approved :: MIT License",
]
)
| from setuptools import setup, find_packages
setup(
name='pymediainfo',
version='2.1.5',
author='Louis Sautier',
author_email='sautier.louis@gmail.com',
url='https://github.com/sbraz/pymediainfo',
description="""A Python wrapper for the mediainfo library.""",
packages=find_packages(),
namespace_packages=[],
include_package_data=True,
zip_safe=False,
license='MIT',
tests_require=["nose"],
test_suite="nose.collector",
classifiers=[
"Development Status :: 5 - Production/Stable",
+ "Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"License :: OSI Approved :: MIT License",
]
) | 1 | 0.037037 | 1 | 0 |
82245cc973619abf1d746da8af7ef137454ca6e9 | Cargo.toml | Cargo.toml | [package]
authors = ["Eric Kidd <git@randomhacks.net>"]
description = "Fetch secrets from either environment variables or Hashicorp's Vault"
documentation = "http://docs.randomhacks.net/credentials/"
license = "CC0-1.0"
name = "credentials"
readme = "README.md"
repository = "https://github.com/emk/credentials"
version = "0.4.0"
[dependencies]
hyper = "0.8.0"
lazy_static = "0.1.15"
log = "0.3.5"
regex = "0.1.58"
rustc-serialize = "0.3.18"
[dev-dependencies]
env_logger = "0.3.2"
yup-hyper-mock = "1.3.2"
[features]
unstable = []
| [package]
authors = ["Eric Kidd <git@randomhacks.net>"]
description = "Fetch secrets from either environment variables or Hashicorp's Vault"
documentation = "http://docs.randomhacks.net/credentials/"
license = "CC0-1.0"
name = "credentials"
readme = "README.md"
repository = "https://github.com/emk/credentials"
version = "0.4.1"
[dependencies]
hyper = { version = "0.9.2", default-features = false }
lazy_static = "0.2.2"
log = "0.3.5"
regex = "0.1.58"
rustc-serialize = "0.3.18"
[dev-dependencies]
env_logger = "0.3.2"
yup-hyper-mock = "1.3.2"
[features]
# We allow this library to be built without SSL, although it's fairly
# useless to do so except for local development purposes.
default = ["ssl"]
ssl = ["hyper/ssl"]
# Required by `travis-cargo`.
unstable = []
| Update dependencies and allow building hyper without SSL | v0.4.1: Update dependencies and allow building hyper without SSL
This shouldn't affect any of our public APIs.
| TOML | cc0-1.0 | emk/credentials | toml | ## Code Before:
[package]
authors = ["Eric Kidd <git@randomhacks.net>"]
description = "Fetch secrets from either environment variables or Hashicorp's Vault"
documentation = "http://docs.randomhacks.net/credentials/"
license = "CC0-1.0"
name = "credentials"
readme = "README.md"
repository = "https://github.com/emk/credentials"
version = "0.4.0"
[dependencies]
hyper = "0.8.0"
lazy_static = "0.1.15"
log = "0.3.5"
regex = "0.1.58"
rustc-serialize = "0.3.18"
[dev-dependencies]
env_logger = "0.3.2"
yup-hyper-mock = "1.3.2"
[features]
unstable = []
## Instruction:
v0.4.1: Update dependencies and allow building hyper without SSL
This shouldn't affect any of our public APIs.
## Code After:
[package]
authors = ["Eric Kidd <git@randomhacks.net>"]
description = "Fetch secrets from either environment variables or Hashicorp's Vault"
documentation = "http://docs.randomhacks.net/credentials/"
license = "CC0-1.0"
name = "credentials"
readme = "README.md"
repository = "https://github.com/emk/credentials"
version = "0.4.1"
[dependencies]
hyper = { version = "0.9.2", default-features = false }
lazy_static = "0.2.2"
log = "0.3.5"
regex = "0.1.58"
rustc-serialize = "0.3.18"
[dev-dependencies]
env_logger = "0.3.2"
yup-hyper-mock = "1.3.2"
[features]
# We allow this library to be built without SSL, although it's fairly
# useless to do so except for local development purposes.
default = ["ssl"]
ssl = ["hyper/ssl"]
# Required by `travis-cargo`.
unstable = []
| [package]
authors = ["Eric Kidd <git@randomhacks.net>"]
description = "Fetch secrets from either environment variables or Hashicorp's Vault"
documentation = "http://docs.randomhacks.net/credentials/"
license = "CC0-1.0"
name = "credentials"
readme = "README.md"
repository = "https://github.com/emk/credentials"
- version = "0.4.0"
? ^
+ version = "0.4.1"
? ^
[dependencies]
- hyper = "0.8.0"
+ hyper = { version = "0.9.2", default-features = false }
- lazy_static = "0.1.15"
? ^ ^^
+ lazy_static = "0.2.2"
? ^ ^
log = "0.3.5"
regex = "0.1.58"
rustc-serialize = "0.3.18"
[dev-dependencies]
env_logger = "0.3.2"
yup-hyper-mock = "1.3.2"
[features]
+ # We allow this library to be built without SSL, although it's fairly
+ # useless to do so except for local development purposes.
+ default = ["ssl"]
+ ssl = ["hyper/ssl"]
+
+ # Required by `travis-cargo`.
unstable = [] | 12 | 0.521739 | 9 | 3 |
487b13a78729cfd4e505dd3b3a466ed3ced1fe15 | app/views/resources/_display_resources.html.erb | app/views/resources/_display_resources.html.erb | <li><%= link_to resource.title, resource_path(resource) %> - <%= link_to resource.language_name, language_path(resource.language) %></li>
| <li><%= link_to resource.title, resource_path(resource) %>
<ul>
<% resource.languages.each do |language| %>
<li><%= link_to language.name, language_path(language) %></li>
<% end %>
</ul>
</li>
| Add languages list to resource display partial. | Add languages list to resource display partial.
| HTML+ERB | mit | abonner1/code_learning_resources_manager,abonner1/sorter,abonner1/sorter,abonner1/code_learning_resources_manager,abonner1/sorter,abonner1/code_learning_resources_manager | html+erb | ## Code Before:
<li><%= link_to resource.title, resource_path(resource) %> - <%= link_to resource.language_name, language_path(resource.language) %></li>
## Instruction:
Add languages list to resource display partial.
## Code After:
<li><%= link_to resource.title, resource_path(resource) %>
<ul>
<% resource.languages.each do |language| %>
<li><%= link_to language.name, language_path(language) %></li>
<% end %>
</ul>
</li>
| - <li><%= link_to resource.title, resource_path(resource) %> - <%= link_to resource.language_name, language_path(resource.language) %></li>
+ <li><%= link_to resource.title, resource_path(resource) %>
+ <ul>
+ <% resource.languages.each do |language| %>
+ <li><%= link_to language.name, language_path(language) %></li>
+ <% end %>
+ </ul>
+ </li> | 8 | 8 | 7 | 1 |
727fd5ee6382ebee8aac5cb717b212647866d818 | templates/rc.local.erb | templates/rc.local.erb |
touch /var/lock/subsys/local
/root/.ip_info.sh &
<% if @print_console_login == true -%>
/root/.console_login.sh &
<% else -%>
/root/.ssh_keygen.sh &
<% end -%>
<% if @hostname == "student" -%>
if ! puppet -V; then
curl -k https://master.puppetlabs.vm:8140/packages/current/install.bash | sudo bash
fi
<% end -%>
|
touch /var/lock/subsys/local
/root/.ip_info.sh &
<% if @print_console_login == true -%>
/root/.console_login.sh &
<% else -%>
/root/.ssh_keygen.sh &
<% end -%>
<% if @hostname == "student" -%>
if ! hash puppet 2>/dev/null; then
curl -k https://master.puppetlabs.vm:8140/packages/current/install.bash | sudo bash
fi
<% end -%>
| Correct check if puppet command exists | Correct check if puppet command exists
| HTML+ERB | apache-2.0 | puppetlabs/pltraining-bootstrap,carthik/pltraining-bootstrap,samuelson/pltraining-bootstrap,klynton/pltraining-bootstrap,puppetlabs/pltraining-bootstrap,joshsamuelson/pltraining-bootstrap,kjhenner/pltraining-bootstrap,carthik/pltraining-bootstrap,samuelson/pltraining-bootstrap,binford2k/pltraining-bootstrap,klynton/pltraining-bootstrap,joshsamuelson/pltraining-bootstrap,kjhenner/pltraining-bootstrap,carthik/pltraining-bootstrap,joshsamuelson/pltraining-bootstrap,binford2k/pltraining-bootstrap,kjhenner/pltraining-bootstrap,klynton/pltraining-bootstrap,puppetlabs/pltraining-bootstrap,binford2k/pltraining-bootstrap,samuelson/pltraining-bootstrap | html+erb | ## Code Before:
touch /var/lock/subsys/local
/root/.ip_info.sh &
<% if @print_console_login == true -%>
/root/.console_login.sh &
<% else -%>
/root/.ssh_keygen.sh &
<% end -%>
<% if @hostname == "student" -%>
if ! puppet -V; then
curl -k https://master.puppetlabs.vm:8140/packages/current/install.bash | sudo bash
fi
<% end -%>
## Instruction:
Correct check if puppet command exists
## Code After:
touch /var/lock/subsys/local
/root/.ip_info.sh &
<% if @print_console_login == true -%>
/root/.console_login.sh &
<% else -%>
/root/.ssh_keygen.sh &
<% end -%>
<% if @hostname == "student" -%>
if ! hash puppet 2>/dev/null; then
curl -k https://master.puppetlabs.vm:8140/packages/current/install.bash | sudo bash
fi
<% end -%>
|
touch /var/lock/subsys/local
/root/.ip_info.sh &
<% if @print_console_login == true -%>
/root/.console_login.sh &
<% else -%>
/root/.ssh_keygen.sh &
<% end -%>
<% if @hostname == "student" -%>
- if ! puppet -V; then
+ if ! hash puppet 2>/dev/null; then
curl -k https://master.puppetlabs.vm:8140/packages/current/install.bash | sudo bash
fi
<% end -%> | 2 | 0.142857 | 1 | 1 |
845e0db2d83e8c4771053ee1e46459ac47fa5aad | FileKit/FileKit.swift | FileKit/FileKit.swift | //
// FileKit.swift
// FileKit
//
// Created by Nikolai Vazquez on 9/1/15.
// Copyright © 2015 Nikolai Vazquez. All rights reserved.
//
import Foundation
public class File: StringLiteralConvertible {
// MARK: - File
public var path: Path
public init(path: Path) {
self.path = path
}
// MARK: - StringLiteralConvertible
public typealias ExtendedGraphemeClusterLiteralType = StringLiteralType
public typealias UnicodeScalarLiteralType = StringLiteralType
public required init(extendedGraphemeClusterLiteral value: ExtendedGraphemeClusterLiteralType) {
path = Path(value)
}
public required init(stringLiteral value: StringLiteralType) {
path = Path(value)
}
public required init(unicodeScalarLiteral value: UnicodeScalarLiteralType) {
path = Path(value)
}
}
| //
// FileKit.swift
// FileKit
//
// Created by Nikolai Vazquez on 9/1/15.
// Copyright © 2015 Nikolai Vazquez. All rights reserved.
//
import Foundation
public class File: StringLiteralConvertible {
// MARK: - File
public var path: Path
public init(path: Path) {
self.path = path
}
func moveToPath(path: Path) throws {
try NSFileManager.defaultManager().moveItemAtPath(path._path, toPath: path._path)
self.path = path
}
// MARK: - StringLiteralConvertible
public typealias ExtendedGraphemeClusterLiteralType = StringLiteralType
public typealias UnicodeScalarLiteralType = StringLiteralType
public required init(extendedGraphemeClusterLiteral value: ExtendedGraphemeClusterLiteralType) {
path = Path(value)
}
public required init(stringLiteral value: StringLiteralType) {
path = Path(value)
}
public required init(unicodeScalarLiteral value: UnicodeScalarLiteralType) {
path = Path(value)
}
}
| Add moveToPath(_:) method to File | Add moveToPath(_:) method to File
| Swift | mit | RyanTech/FileKit,alessandrostone/FileKit,hejunbinlan/FileKit,alessandrostone/FileKit,voidException/FileKit,voidException/FileKit,RyanTech/FileKit,carabina/FileKit,hejunbinlan/FileKit,carabina/FileKit | swift | ## Code Before:
//
// FileKit.swift
// FileKit
//
// Created by Nikolai Vazquez on 9/1/15.
// Copyright © 2015 Nikolai Vazquez. All rights reserved.
//
import Foundation
public class File: StringLiteralConvertible {
// MARK: - File
public var path: Path
public init(path: Path) {
self.path = path
}
// MARK: - StringLiteralConvertible
public typealias ExtendedGraphemeClusterLiteralType = StringLiteralType
public typealias UnicodeScalarLiteralType = StringLiteralType
public required init(extendedGraphemeClusterLiteral value: ExtendedGraphemeClusterLiteralType) {
path = Path(value)
}
public required init(stringLiteral value: StringLiteralType) {
path = Path(value)
}
public required init(unicodeScalarLiteral value: UnicodeScalarLiteralType) {
path = Path(value)
}
}
## Instruction:
Add moveToPath(_:) method to File
## Code After:
//
// FileKit.swift
// FileKit
//
// Created by Nikolai Vazquez on 9/1/15.
// Copyright © 2015 Nikolai Vazquez. All rights reserved.
//
import Foundation
public class File: StringLiteralConvertible {
// MARK: - File
public var path: Path
public init(path: Path) {
self.path = path
}
func moveToPath(path: Path) throws {
try NSFileManager.defaultManager().moveItemAtPath(path._path, toPath: path._path)
self.path = path
}
// MARK: - StringLiteralConvertible
public typealias ExtendedGraphemeClusterLiteralType = StringLiteralType
public typealias UnicodeScalarLiteralType = StringLiteralType
public required init(extendedGraphemeClusterLiteral value: ExtendedGraphemeClusterLiteralType) {
path = Path(value)
}
public required init(stringLiteral value: StringLiteralType) {
path = Path(value)
}
public required init(unicodeScalarLiteral value: UnicodeScalarLiteralType) {
path = Path(value)
}
}
| //
// FileKit.swift
// FileKit
//
// Created by Nikolai Vazquez on 9/1/15.
// Copyright © 2015 Nikolai Vazquez. All rights reserved.
//
import Foundation
public class File: StringLiteralConvertible {
// MARK: - File
public var path: Path
public init(path: Path) {
+ self.path = path
+ }
+
+ func moveToPath(path: Path) throws {
+ try NSFileManager.defaultManager().moveItemAtPath(path._path, toPath: path._path)
self.path = path
}
// MARK: - StringLiteralConvertible
public typealias ExtendedGraphemeClusterLiteralType = StringLiteralType
public typealias UnicodeScalarLiteralType = StringLiteralType
public required init(extendedGraphemeClusterLiteral value: ExtendedGraphemeClusterLiteralType) {
path = Path(value)
}
public required init(stringLiteral value: StringLiteralType) {
path = Path(value)
}
public required init(unicodeScalarLiteral value: UnicodeScalarLiteralType) {
path = Path(value)
}
} | 5 | 0.128205 | 5 | 0 |
2017f9efc0a748d2c8cf6b1e6cc4a24ac009315c | src/commands/CreateUserCommand.php | src/commands/CreateUserCommand.php | <?php
namespace solutionweb\gatekeeper\utils\commands;
/**
* Command to create a user.
*
* @author Bert Peters <bert.ljpeters@gmail.com>
*/
class CreateUserCommand extends GatekeeperCommand
{
protected $commandInformation = [
"description" => "Create a new user.",
"options" => [
"noactivate" => [
"optional" => true,
"description" => "Do not activate the user by default.",
],
],
];
/**
* Create a user.
*
* @param boolean|string $noactivate
*/
public function execute($noactivate = false)
{
$username = $this->question("Username");
$email = $this->question("Email");
$password = $this->secret("Password", null, false);
if ($password != $this->secret("Repeat", null, true)) {
$this->error("Passwords do not match.");
return;
}
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$this->error("Invalid email supplied.");
return;
}
$user = $this->gatekeeper->createUser($email, $username, $password, !$noactivate);
$this->write("User " . $user->getId() . " created.");
}
}
| <?php
namespace solutionweb\gatekeeper\utils\commands;
/**
* Command to create a user.
*
* @author Bert Peters <bert.ljpeters@gmail.com>
*/
class CreateUserCommand extends GatekeeperCommand
{
protected $commandInformation = [
"description" => "Create a new user.",
"options" => [
"noactivate" => [
"optional" => true,
"description" => "Do not activate the user by default.",
],
"username" => [
"optional" => true,
"description" => "username to create. Will prompt if not present.",
],
"email" => [
"optional" => true,
"description" => "email to use. Will prompt if not present.",
],
"password" => [
"optional" => true,
"description" => "password to use. Will prompt if not present.",
],
],
];
/**
* Create a user.
*
* @param boolean|string $noactivate
*/
public function execute($noactivate = false, $password = null, $username = null, $email = null)
{
if ($username == null) {
$username = $this->question("Username");
}
if ($email == null) {
$email = $this->question("Email");
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$this->error("Invalid email supplied.");
return;
}
}
if ($password == null) {
$password = $this->secret("Password", null, false);
if ($password != $this->secret("Repeat", null, true)) {
$this->error("Passwords do not match.");
return;
}
}
$user = $this->gatekeeper->createUser($email, $username, $password, !$noactivate);
$this->write("User " . $user->getId() . " created.");
}
}
| Allow user creation from script. | Allow user creation from script.
| PHP | mit | bertptrs/gatekeeper-utils,SolutionWeb/gatekeeper-utils | php | ## Code Before:
<?php
namespace solutionweb\gatekeeper\utils\commands;
/**
* Command to create a user.
*
* @author Bert Peters <bert.ljpeters@gmail.com>
*/
class CreateUserCommand extends GatekeeperCommand
{
protected $commandInformation = [
"description" => "Create a new user.",
"options" => [
"noactivate" => [
"optional" => true,
"description" => "Do not activate the user by default.",
],
],
];
/**
* Create a user.
*
* @param boolean|string $noactivate
*/
public function execute($noactivate = false)
{
$username = $this->question("Username");
$email = $this->question("Email");
$password = $this->secret("Password", null, false);
if ($password != $this->secret("Repeat", null, true)) {
$this->error("Passwords do not match.");
return;
}
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$this->error("Invalid email supplied.");
return;
}
$user = $this->gatekeeper->createUser($email, $username, $password, !$noactivate);
$this->write("User " . $user->getId() . " created.");
}
}
## Instruction:
Allow user creation from script.
## Code After:
<?php
namespace solutionweb\gatekeeper\utils\commands;
/**
* Command to create a user.
*
* @author Bert Peters <bert.ljpeters@gmail.com>
*/
class CreateUserCommand extends GatekeeperCommand
{
protected $commandInformation = [
"description" => "Create a new user.",
"options" => [
"noactivate" => [
"optional" => true,
"description" => "Do not activate the user by default.",
],
"username" => [
"optional" => true,
"description" => "username to create. Will prompt if not present.",
],
"email" => [
"optional" => true,
"description" => "email to use. Will prompt if not present.",
],
"password" => [
"optional" => true,
"description" => "password to use. Will prompt if not present.",
],
],
];
/**
* Create a user.
*
* @param boolean|string $noactivate
*/
public function execute($noactivate = false, $password = null, $username = null, $email = null)
{
if ($username == null) {
$username = $this->question("Username");
}
if ($email == null) {
$email = $this->question("Email");
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$this->error("Invalid email supplied.");
return;
}
}
if ($password == null) {
$password = $this->secret("Password", null, false);
if ($password != $this->secret("Repeat", null, true)) {
$this->error("Passwords do not match.");
return;
}
}
$user = $this->gatekeeper->createUser($email, $username, $password, !$noactivate);
$this->write("User " . $user->getId() . " created.");
}
}
| <?php
namespace solutionweb\gatekeeper\utils\commands;
/**
* Command to create a user.
*
* @author Bert Peters <bert.ljpeters@gmail.com>
*/
class CreateUserCommand extends GatekeeperCommand
{
protected $commandInformation = [
"description" => "Create a new user.",
"options" => [
"noactivate" => [
"optional" => true,
"description" => "Do not activate the user by default.",
],
+ "username" => [
+ "optional" => true,
+ "description" => "username to create. Will prompt if not present.",
+ ],
+ "email" => [
+ "optional" => true,
+ "description" => "email to use. Will prompt if not present.",
+ ],
+ "password" => [
+ "optional" => true,
+ "description" => "password to use. Will prompt if not present.",
+ ],
],
];
/**
* Create a user.
*
* @param boolean|string $noactivate
*/
- public function execute($noactivate = false)
+ public function execute($noactivate = false, $password = null, $username = null, $email = null)
{
+ if ($username == null) {
- $username = $this->question("Username");
+ $username = $this->question("Username");
? ++++
+ }
+ if ($email == null) {
- $email = $this->question("Email");
+ $email = $this->question("Email");
? ++++
+ if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
+ $this->error("Invalid email supplied.");
+ return;
+ }
+ }
+ if ($password == null) {
- $password = $this->secret("Password", null, false);
+ $password = $this->secret("Password", null, false);
? ++++
- if ($password != $this->secret("Repeat", null, true)) {
+ if ($password != $this->secret("Repeat", null, true)) {
? ++++
- $this->error("Passwords do not match.");
+ $this->error("Passwords do not match.");
? ++++
- return;
+ return;
? ++++
+ }
}
+
- if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
- $this->error("Invalid email supplied.");
- return;
- }
$user = $this->gatekeeper->createUser($email, $username, $password, !$noactivate);
$this->write("User " . $user->getId() . " created.");
}
} | 41 | 0.87234 | 30 | 11 |
5575a1cbb26f1494aaf292c12884741571823074 | README.md | README.md | All my useful dotfiles
Simply download and run the script to install my dotfile
## Requirements
### VIM
If you want to use RFC plugin, you must to compile your vim with ruby support, and install the nokogiri gem
```
gem install nokogiri
curl https://raw.githubusercontent.com/PixiBixi/dotfiles/master/init.sh | bash
```
### SSH
In order to user `ControlMaster`, we need to create `~/.ssh/private` folder
```
mkdir ~/.ssh/private
```
### Git
`git h` uses an external software, lets install it
```
gem install giturl
```
## MacOS Specific
Few things only for MacOS
### iTerm 2
* [Theme](https://github.com/sindresorhus/iterm2-snazzy) for iTerm 2
* Use **Natural Key Mapping**
* Preference
* Profile, mainly use default
* Keys
* Key Mapping
* Presets > Use _Natural Text Editing_
| All my useful dotfiles
Simply download and run the script to install my dotfile
## Requirements
### zsh
Notre configuration zsh est évidemment basée sur celle qui est fournie en défaut par [oh-my-zsh](https://ohmyz.sh/). Pour l'installer, une simple ligne :
```
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```
Cepenant, nous utilisons un plugin custom : zsh-syntax-highlighting. Son installation est très simple
```shell
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
```
### vim
If you want to use RFC plugin, you must to compile your vim with ruby support, and install the nokogiri gem
```
gem install nokogiri
curl https://raw.githubusercontent.com/PixiBixi/dotfiles/master/init.sh | bash
```
### ssh
In order to user `ControlMaster`, we need to create `~/.ssh/private` folder
```
mkdir ~/.ssh/private
```
### Git
`git h` uses an external software, lets install it
```
gem install giturl
```
## MacOS Specific
Few things only for MacOS
### iTerm 2
* [Theme](https://github.com/sindresorhus/iterm2-snazzy) for iTerm 2
* Use **Natural Key Mapping**
* Preference
* Profile, mainly use default
* Keys
* Key Mapping
* Presets > Use _Natural Text Editing_
| Add installations note for zsh | feat(readme): Add installations note for zsh
| Markdown | apache-2.0 | PixiBixi/dotfiles,PixiBixi/dotfiles | markdown | ## Code Before:
All my useful dotfiles
Simply download and run the script to install my dotfile
## Requirements
### VIM
If you want to use RFC plugin, you must to compile your vim with ruby support, and install the nokogiri gem
```
gem install nokogiri
curl https://raw.githubusercontent.com/PixiBixi/dotfiles/master/init.sh | bash
```
### SSH
In order to user `ControlMaster`, we need to create `~/.ssh/private` folder
```
mkdir ~/.ssh/private
```
### Git
`git h` uses an external software, lets install it
```
gem install giturl
```
## MacOS Specific
Few things only for MacOS
### iTerm 2
* [Theme](https://github.com/sindresorhus/iterm2-snazzy) for iTerm 2
* Use **Natural Key Mapping**
* Preference
* Profile, mainly use default
* Keys
* Key Mapping
* Presets > Use _Natural Text Editing_
## Instruction:
feat(readme): Add installations note for zsh
## Code After:
All my useful dotfiles
Simply download and run the script to install my dotfile
## Requirements
### zsh
Notre configuration zsh est évidemment basée sur celle qui est fournie en défaut par [oh-my-zsh](https://ohmyz.sh/). Pour l'installer, une simple ligne :
```
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```
Cepenant, nous utilisons un plugin custom : zsh-syntax-highlighting. Son installation est très simple
```shell
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
```
### vim
If you want to use RFC plugin, you must to compile your vim with ruby support, and install the nokogiri gem
```
gem install nokogiri
curl https://raw.githubusercontent.com/PixiBixi/dotfiles/master/init.sh | bash
```
### ssh
In order to user `ControlMaster`, we need to create `~/.ssh/private` folder
```
mkdir ~/.ssh/private
```
### Git
`git h` uses an external software, lets install it
```
gem install giturl
```
## MacOS Specific
Few things only for MacOS
### iTerm 2
* [Theme](https://github.com/sindresorhus/iterm2-snazzy) for iTerm 2
* Use **Natural Key Mapping**
* Preference
* Profile, mainly use default
* Keys
* Key Mapping
* Presets > Use _Natural Text Editing_
| All my useful dotfiles
Simply download and run the script to install my dotfile
## Requirements
- ### VIM
+ ### zsh
+
+ Notre configuration zsh est évidemment basée sur celle qui est fournie en défaut par [oh-my-zsh](https://ohmyz.sh/). Pour l'installer, une simple ligne :
+
+ ```
+ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
+ ```
+
+ Cepenant, nous utilisons un plugin custom : zsh-syntax-highlighting. Son installation est très simple
+
+ ```shell
+ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
+ ```
+
+ ### vim
If you want to use RFC plugin, you must to compile your vim with ruby support, and install the nokogiri gem
```
gem install nokogiri
curl https://raw.githubusercontent.com/PixiBixi/dotfiles/master/init.sh | bash
```
- ### SSH
+ ### ssh
In order to user `ControlMaster`, we need to create `~/.ssh/private` folder
```
mkdir ~/.ssh/private
```
### Git
`git h` uses an external software, lets install it
```
gem install giturl
```
## MacOS Specific
Few things only for MacOS
### iTerm 2
* [Theme](https://github.com/sindresorhus/iterm2-snazzy) for iTerm 2
* Use **Natural Key Mapping**
* Preference
* Profile, mainly use default
* Keys
* Key Mapping
* Presets > Use _Natural Text Editing_ | 18 | 0.409091 | 16 | 2 |
5543318f30c0e61f140b66af0789440ccaeabde5 | lib/go-cda-tools/import/go-importer.rb | lib/go-cda-tools/import/go-importer.rb | require 'ffi'
require 'health-data-standards'
require 'os'
module GoCDATools
module Import
class GoImporter
include Singleton
extend FFI::Library
if OS.linux?
ffi_lib File.expand_path("../../../ext/libgocda-linux.so", File.dirname(__FILE__))
end
if OS.mac?
ffi_lib File.expand_path("../../../ext/libgocda-mac.so", File.dirname(__FILE__))
end
attach_function :import_cat1, [:string], :string
def parse_with_ffi(file)
data = file.kind_of?(String) ? file : file.inner_html
data.gsub!("<?xml-stylesheet type=\"text/xsl\" href=\"cda.xsl\">",'')
patient_json_string = import_cat1(data)
if patient_json_string.start_with?("Error")
raise patient_json_string
end
patient = Record.new(JSON.parse(patient_json_string))
HealthDataStandards::Import::Cat1::PatientImporter.instance.normalize_references(patient)
patient.dedup_record!
patient
end
end
end
end
| require 'ffi'
require 'health-data-standards'
require 'os'
module GoCDATools
module Import
class GoImporter
include Singleton
extend FFI::Library
if OS.linux?
ffi_lib File.expand_path("../../../ext/libgocda-linux.so", File.dirname(__FILE__))
end
if OS.mac?
ffi_lib File.expand_path("../../../ext/libgocda-mac.so", File.dirname(__FILE__))
end
attach_function :import_cat1, [:string], :string
def parse_with_ffi(file)
data = file.kind_of?(String) ? file : file.to_xml
patient_json_string = import_cat1(data)
if patient_json_string.start_with?("Error")
raise patient_json_string
end
patient = Record.new(JSON.parse(patient_json_string))
HealthDataStandards::Import::Cat1::PatientImporter.instance.normalize_references(patient)
patient.dedup_record!
patient
end
end
end
end
| Change inner_html to to_xml. Since we are parsing XML files | Change inner_html to to_xml. Since we are parsing XML files
| Ruby | apache-2.0 | projectcypress/go-cda-tools,projectcypress/go-cda-tools,projectcypress/go-cda-tools | ruby | ## Code Before:
require 'ffi'
require 'health-data-standards'
require 'os'
module GoCDATools
module Import
class GoImporter
include Singleton
extend FFI::Library
if OS.linux?
ffi_lib File.expand_path("../../../ext/libgocda-linux.so", File.dirname(__FILE__))
end
if OS.mac?
ffi_lib File.expand_path("../../../ext/libgocda-mac.so", File.dirname(__FILE__))
end
attach_function :import_cat1, [:string], :string
def parse_with_ffi(file)
data = file.kind_of?(String) ? file : file.inner_html
data.gsub!("<?xml-stylesheet type=\"text/xsl\" href=\"cda.xsl\">",'')
patient_json_string = import_cat1(data)
if patient_json_string.start_with?("Error")
raise patient_json_string
end
patient = Record.new(JSON.parse(patient_json_string))
HealthDataStandards::Import::Cat1::PatientImporter.instance.normalize_references(patient)
patient.dedup_record!
patient
end
end
end
end
## Instruction:
Change inner_html to to_xml. Since we are parsing XML files
## Code After:
require 'ffi'
require 'health-data-standards'
require 'os'
module GoCDATools
module Import
class GoImporter
include Singleton
extend FFI::Library
if OS.linux?
ffi_lib File.expand_path("../../../ext/libgocda-linux.so", File.dirname(__FILE__))
end
if OS.mac?
ffi_lib File.expand_path("../../../ext/libgocda-mac.so", File.dirname(__FILE__))
end
attach_function :import_cat1, [:string], :string
def parse_with_ffi(file)
data = file.kind_of?(String) ? file : file.to_xml
patient_json_string = import_cat1(data)
if patient_json_string.start_with?("Error")
raise patient_json_string
end
patient = Record.new(JSON.parse(patient_json_string))
HealthDataStandards::Import::Cat1::PatientImporter.instance.normalize_references(patient)
patient.dedup_record!
patient
end
end
end
end
| require 'ffi'
require 'health-data-standards'
require 'os'
module GoCDATools
module Import
class GoImporter
include Singleton
extend FFI::Library
if OS.linux?
ffi_lib File.expand_path("../../../ext/libgocda-linux.so", File.dirname(__FILE__))
end
if OS.mac?
ffi_lib File.expand_path("../../../ext/libgocda-mac.so", File.dirname(__FILE__))
end
attach_function :import_cat1, [:string], :string
def parse_with_ffi(file)
- data = file.kind_of?(String) ? file : file.inner_html
? ^^^^^ ^^
+ data = file.kind_of?(String) ? file : file.to_xml
? ^^ ^
- data.gsub!("<?xml-stylesheet type=\"text/xsl\" href=\"cda.xsl\">",'')
patient_json_string = import_cat1(data)
if patient_json_string.start_with?("Error")
raise patient_json_string
end
patient = Record.new(JSON.parse(patient_json_string))
HealthDataStandards::Import::Cat1::PatientImporter.instance.normalize_references(patient)
patient.dedup_record!
patient
end
end
end
end | 3 | 0.090909 | 1 | 2 |
4fb4b8a3ef0463c81d4413c8bfa5eff8b8cd7b21 | .travis.yml | .travis.yml | language: python
branches:
only:
- master
python:
- "2.7"
sudo: required
services:
- docker
install:
- "sudo apt-get update -qq"
- "sudo apt-get install -y nodejs python-demjson"
- "pip install --allow-all-external -r requirements.txt"
- "pip install --allow-all-external demjson"
env:
- MAKE_TARGET=docker.test
- MAKE_TARGET=test.syntax
- MAKE_TARGET=test.edx_east_roles
script:
- make $MAKE_TARGET
| language: python
branches:
only:
- master
python:
- "2.7"
sudo: required
services:
- docker
install:
- "sudo apt-get update -qq"
- "sudo apt-get install -y nodejs python-demjson"
- "pip install --allow-all-external -r requirements.txt"
- "pip install --allow-all-external demjson"
env:
- MAKE_TARGET=docker.test
- MAKE_TARGET=test.syntax
- MAKE_TARGET=test.edx_east_roles
script:
- make --keep-going $MAKE_TARGET
| Build all make targets, even if some fail | Build all make targets, even if some fail
| YAML | agpl-3.0 | gsehub/configuration,appsembler/configuration,CredoReference/configuration,Stanford-Online/configuration,usernamenumber/configuration,appsembler/configuration,pobrejuanito/configuration,michaelsteiner19/open-edx-configuration,alu042/configuration,Stanford-Online/configuration,edx/configuration,open-craft/configuration,proversity-org/configuration,stvstnfrd/configuration,hks-epod/configuration,arbrandes/edx-configuration,Livit/Livit.Learn.EdX.configuration,appsembler/configuration,pobrejuanito/configuration,marcore/configuration,pobrejuanito/configuration,lgfa29/configuration,usernamenumber/configuration,EDUlib/configuration,Stanford-Online/configuration,lgfa29/configuration,armaan/edx-configuration,hastexo/edx-configuration,rue89-tech/configuration,openfun/configuration,rue89-tech/configuration,nunpa/configuration,hks-epod/configuration,openfun/configuration,CredoReference/configuration,eduStack/configuration,arbrandes/edx-configuration,EDUlib/configuration,hks-epod/configuration,gsehub/configuration,marcore/configuration,jorgeomarmh/configuration,michaelsteiner19/open-edx-configuration,fghaas/edx-configuration,antoviaque/configuration,open-craft/configuration,hastexo/edx-configuration,EDUlib/configuration,eduStack/configuration,lgfa29/configuration,marcore/configuration,nunpa/configuration,edx/configuration,michaelsteiner19/open-edx-configuration,stvstnfrd/configuration,nunpa/configuration,jorgeomarmh/configuration,Livit/Livit.Learn.EdX.configuration,Livit/Livit.Learn.EdX.configuration,rue89-tech/configuration,usernamenumber/configuration,hastexo/edx-configuration,armaan/edx-configuration,edx/configuration,rue89-tech/configuration,EDUlib/configuration,stvstnfrd/configuration,lgfa29/configuration,proversity-org/configuration,hastexo/edx-configuration,hks-epod/configuration,arbrandes/edx-configuration,proversity-org/configuration,fghaas/edx-configuration,gsehub/configuration,mitodl/configuration,alu042/configuration,Livit/Livit.Learn.EdX.configuration,antoviaque/configuration,open-craft/configuration,appsembler/configuration,rue89-tech/configuration,alu042/configuration,jorgeomarmh/configuration,nunpa/configuration,gsehub/configuration,edx/configuration,alu042/configuration,openfun/configuration,marcore/configuration,EDUlib/configuration,antoviaque/configuration,Stanford-Online/configuration,mitodl/configuration,armaan/edx-configuration,pobrejuanito/configuration,hks-epod/configuration,proversity-org/configuration,michaelsteiner19/open-edx-configuration,arbrandes/edx-configuration,gsehub/configuration,CredoReference/configuration,arbrandes/edx-configuration,usernamenumber/configuration,jorgeomarmh/configuration,openfun/configuration,hastexo/edx-configuration,CredoReference/configuration,proversity-org/configuration,fghaas/edx-configuration,antoviaque/configuration,open-craft/configuration,mitodl/configuration,armaan/edx-configuration,eduStack/configuration,fghaas/edx-configuration,Stanford-Online/configuration,stvstnfrd/configuration,stvstnfrd/configuration,mitodl/configuration | yaml | ## Code Before:
language: python
branches:
only:
- master
python:
- "2.7"
sudo: required
services:
- docker
install:
- "sudo apt-get update -qq"
- "sudo apt-get install -y nodejs python-demjson"
- "pip install --allow-all-external -r requirements.txt"
- "pip install --allow-all-external demjson"
env:
- MAKE_TARGET=docker.test
- MAKE_TARGET=test.syntax
- MAKE_TARGET=test.edx_east_roles
script:
- make $MAKE_TARGET
## Instruction:
Build all make targets, even if some fail
## Code After:
language: python
branches:
only:
- master
python:
- "2.7"
sudo: required
services:
- docker
install:
- "sudo apt-get update -qq"
- "sudo apt-get install -y nodejs python-demjson"
- "pip install --allow-all-external -r requirements.txt"
- "pip install --allow-all-external demjson"
env:
- MAKE_TARGET=docker.test
- MAKE_TARGET=test.syntax
- MAKE_TARGET=test.edx_east_roles
script:
- make --keep-going $MAKE_TARGET
| language: python
branches:
only:
- master
python:
- "2.7"
sudo: required
services:
- docker
install:
- "sudo apt-get update -qq"
- "sudo apt-get install -y nodejs python-demjson"
- "pip install --allow-all-external -r requirements.txt"
- "pip install --allow-all-external demjson"
env:
- MAKE_TARGET=docker.test
- MAKE_TARGET=test.syntax
- MAKE_TARGET=test.edx_east_roles
script:
- - make $MAKE_TARGET
+ - make --keep-going $MAKE_TARGET
? +++++++++++++
| 2 | 0.1 | 1 | 1 |
d3386bead33f17383d80da81b45723e68ec27efc | sparkle/src/Foreign/Java/Types.hs | sparkle/src/Foreign/Java/Types.hs | {-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Foreign.Java.Types where
import Foreign.C
import Foreign.Ptr
import Foreign.Storable (Storable(..))
newtype JVM = JVM (Ptr JVM)
deriving (Eq, Show, Storable)
newtype JNIEnv = JNIEnv (Ptr JNIEnv)
deriving (Eq, Show, Storable)
newtype JObject = JObject (Ptr JObject)
deriving (Eq, Show, Storable)
newtype JClass = JClass (Ptr JClass)
deriving (Eq, Show, Storable)
newtype JMethodID = JMethodID (Ptr JMethodID)
deriving (Eq, Show, Storable)
type JString = JObject
type JIntArray = JObject
type JByteArray = JObject
type JDoubleArray = JObject
type JObjectArray = JObject
data JValue
= JObj JObject
| JInt CInt
| JByte CChar
| JDouble CDouble
| JBoolean CUChar
| JLong CLong
instance Storable JValue where
sizeOf _ = 8
alignment _ = 8
poke p (JObj o) = poke (castPtr p) o
poke p (JInt i) = poke (castPtr p) i
poke p (JByte b) = poke (castPtr p) b
poke p (JDouble d) = poke (castPtr p) d
poke p (JBoolean b) = poke (castPtr p) b
poke p (JLong l) = poke (castPtr p) l
peek _ = error "Storable JValue: undefined peek"
| {-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Foreign.Java.Types where
import Foreign.C
import Foreign.Ptr
import Foreign.Storable (Storable(..))
newtype JVM = JVM (Ptr JVM)
deriving (Eq, Show, Storable)
newtype JNIEnv = JNIEnv (Ptr JNIEnv)
deriving (Eq, Show, Storable)
newtype JObject = JObject (Ptr JObject)
deriving (Eq, Show, Storable)
newtype JMethodID = JMethodID (Ptr JMethodID)
deriving (Eq, Show, Storable)
type JClass = JObject
type JString = JObject
type JIntArray = JObject
type JByteArray = JObject
type JDoubleArray = JObject
type JObjectArray = JObject
data JValue
= JObj JObject
| JInt CInt
| JByte CChar
| JDouble CDouble
| JBoolean CUChar
| JLong CLong
instance Storable JValue where
sizeOf _ = 8
alignment _ = 8
poke p (JObj o) = poke (castPtr p) o
poke p (JInt i) = poke (castPtr p) i
poke p (JByte b) = poke (castPtr p) b
poke p (JDouble d) = poke (castPtr p) d
poke p (JBoolean b) = poke (castPtr p) b
poke p (JLong l) = poke (castPtr p) l
peek _ = error "Storable JValue: undefined peek"
| Make JClass a type synonym for JObject. | Make JClass a type synonym for JObject.
Since jclass is just a typedef for jobject according to the JNI spec.
| Haskell | bsd-3-clause | tweag/sparkle,tweag/sparkle | haskell | ## Code Before:
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Foreign.Java.Types where
import Foreign.C
import Foreign.Ptr
import Foreign.Storable (Storable(..))
newtype JVM = JVM (Ptr JVM)
deriving (Eq, Show, Storable)
newtype JNIEnv = JNIEnv (Ptr JNIEnv)
deriving (Eq, Show, Storable)
newtype JObject = JObject (Ptr JObject)
deriving (Eq, Show, Storable)
newtype JClass = JClass (Ptr JClass)
deriving (Eq, Show, Storable)
newtype JMethodID = JMethodID (Ptr JMethodID)
deriving (Eq, Show, Storable)
type JString = JObject
type JIntArray = JObject
type JByteArray = JObject
type JDoubleArray = JObject
type JObjectArray = JObject
data JValue
= JObj JObject
| JInt CInt
| JByte CChar
| JDouble CDouble
| JBoolean CUChar
| JLong CLong
instance Storable JValue where
sizeOf _ = 8
alignment _ = 8
poke p (JObj o) = poke (castPtr p) o
poke p (JInt i) = poke (castPtr p) i
poke p (JByte b) = poke (castPtr p) b
poke p (JDouble d) = poke (castPtr p) d
poke p (JBoolean b) = poke (castPtr p) b
poke p (JLong l) = poke (castPtr p) l
peek _ = error "Storable JValue: undefined peek"
## Instruction:
Make JClass a type synonym for JObject.
Since jclass is just a typedef for jobject according to the JNI spec.
## Code After:
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Foreign.Java.Types where
import Foreign.C
import Foreign.Ptr
import Foreign.Storable (Storable(..))
newtype JVM = JVM (Ptr JVM)
deriving (Eq, Show, Storable)
newtype JNIEnv = JNIEnv (Ptr JNIEnv)
deriving (Eq, Show, Storable)
newtype JObject = JObject (Ptr JObject)
deriving (Eq, Show, Storable)
newtype JMethodID = JMethodID (Ptr JMethodID)
deriving (Eq, Show, Storable)
type JClass = JObject
type JString = JObject
type JIntArray = JObject
type JByteArray = JObject
type JDoubleArray = JObject
type JObjectArray = JObject
data JValue
= JObj JObject
| JInt CInt
| JByte CChar
| JDouble CDouble
| JBoolean CUChar
| JLong CLong
instance Storable JValue where
sizeOf _ = 8
alignment _ = 8
poke p (JObj o) = poke (castPtr p) o
poke p (JInt i) = poke (castPtr p) i
poke p (JByte b) = poke (castPtr p) b
poke p (JDouble d) = poke (castPtr p) d
poke p (JBoolean b) = poke (castPtr p) b
poke p (JLong l) = poke (castPtr p) l
peek _ = error "Storable JValue: undefined peek"
| {-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Foreign.Java.Types where
import Foreign.C
import Foreign.Ptr
import Foreign.Storable (Storable(..))
newtype JVM = JVM (Ptr JVM)
deriving (Eq, Show, Storable)
newtype JNIEnv = JNIEnv (Ptr JNIEnv)
deriving (Eq, Show, Storable)
newtype JObject = JObject (Ptr JObject)
deriving (Eq, Show, Storable)
- newtype JClass = JClass (Ptr JClass)
- deriving (Eq, Show, Storable)
-
newtype JMethodID = JMethodID (Ptr JMethodID)
deriving (Eq, Show, Storable)
+ type JClass = JObject
type JString = JObject
type JIntArray = JObject
type JByteArray = JObject
type JDoubleArray = JObject
type JObjectArray = JObject
data JValue
= JObj JObject
| JInt CInt
| JByte CChar
| JDouble CDouble
| JBoolean CUChar
| JLong CLong
instance Storable JValue where
sizeOf _ = 8
alignment _ = 8
poke p (JObj o) = poke (castPtr p) o
poke p (JInt i) = poke (castPtr p) i
poke p (JByte b) = poke (castPtr p) b
poke p (JDouble d) = poke (castPtr p) d
poke p (JBoolean b) = poke (castPtr p) b
poke p (JLong l) = poke (castPtr p) l
peek _ = error "Storable JValue: undefined peek" | 4 | 0.081633 | 1 | 3 |
6d0df03ae599e6bae9d9b914c35fdbba7267b86d | gulpfile.js | gulpfile.js | 'use strict'
const paths = require('./config/paths.json')
const gulp = require('gulp')
const cssnano = require('gulp-cssnano')
const del = require('del')
const rename = require('gulp-rename')
const sass = require('gulp-sass')
// Clean task ----------------------------
// Deletes the /public directory
// ---------------------------------------
gulp.task('clean', () => {
return del(paths.public)
})
// Styles build task ---------------------
// Compiles CSS from Sass
// Output both a minified and non-minified version into /public/stylesheets/
// ---------------------------------------
gulp.task('styles', () => {
return gulp.src(paths.assetsScss + '**/*.scss')
.pipe(sass({
includePaths: [
'node_modules/govuk_frontend_toolkit/stylesheets'
]
}).on('error', sass.logError))
.pipe(gulp.dest(paths.publicCss))
.pipe(rename({ suffix: '.min' }))
.pipe(cssnano())
.pipe(gulp.dest(paths.publicCss))
})
// Images build task ---------------------
// Copies images to /public/images
// ---------------------------------------
gulp.task('images', () => {
return gulp.src(paths.assetsImg + '**/*')
.pipe(gulp.dest(paths.publicImg))
})
| 'use strict'
const paths = require('./config/paths.json')
const gulp = require('gulp')
const cssnano = require('gulp-cssnano')
const del = require('del')
const rename = require('gulp-rename')
const sass = require('gulp-sass')
// Clean task ----------------------------
// Deletes the /public directory
// ---------------------------------------
gulp.task('clean', () => {
return del(paths.public)
})
// Styles build task ---------------------
// Compiles CSS from Sass
// Output both a minified and non-minified version into /public/stylesheets/
// ---------------------------------------
gulp.task('styles', () => {
return gulp.src(paths.assetsScss + '**/*.scss')
.pipe(sass({
includePaths: [
'node_modules/govuk_frontend_toolkit/stylesheets'
]
}).on('error', sass.logError))
.pipe(gulp.dest(paths.publicCss))
.pipe(rename({ suffix: '.min' }))
.pipe(cssnano())
.pipe(gulp.dest(paths.publicCss))
})
// Images build task ---------------------
// Copies images to /public/images
// ---------------------------------------
gulp.task('images', () => {
return gulp.src(paths.assetsImg + '**/*')
.pipe(gulp.dest(paths.publicImg))
})
// Scripts build task ---------------------
// Copies JavaScript to /public/javascripts
// ---------------------------------------
gulp.task('scripts', () => {
return gulp.src(paths.assetsJs + '**/*.js')
.pipe(gulp.dest(paths.publicJs))
})
| Add a Scripts build task | Add a Scripts build task
Copies JavaScript to /public/javascripts
| JavaScript | mit | alphagov/govuk_elements,alphagov/govuk_elements,alphagov/govuk_elements,alphagov/govuk_elements | javascript | ## Code Before:
'use strict'
const paths = require('./config/paths.json')
const gulp = require('gulp')
const cssnano = require('gulp-cssnano')
const del = require('del')
const rename = require('gulp-rename')
const sass = require('gulp-sass')
// Clean task ----------------------------
// Deletes the /public directory
// ---------------------------------------
gulp.task('clean', () => {
return del(paths.public)
})
// Styles build task ---------------------
// Compiles CSS from Sass
// Output both a minified and non-minified version into /public/stylesheets/
// ---------------------------------------
gulp.task('styles', () => {
return gulp.src(paths.assetsScss + '**/*.scss')
.pipe(sass({
includePaths: [
'node_modules/govuk_frontend_toolkit/stylesheets'
]
}).on('error', sass.logError))
.pipe(gulp.dest(paths.publicCss))
.pipe(rename({ suffix: '.min' }))
.pipe(cssnano())
.pipe(gulp.dest(paths.publicCss))
})
// Images build task ---------------------
// Copies images to /public/images
// ---------------------------------------
gulp.task('images', () => {
return gulp.src(paths.assetsImg + '**/*')
.pipe(gulp.dest(paths.publicImg))
})
## Instruction:
Add a Scripts build task
Copies JavaScript to /public/javascripts
## Code After:
'use strict'
const paths = require('./config/paths.json')
const gulp = require('gulp')
const cssnano = require('gulp-cssnano')
const del = require('del')
const rename = require('gulp-rename')
const sass = require('gulp-sass')
// Clean task ----------------------------
// Deletes the /public directory
// ---------------------------------------
gulp.task('clean', () => {
return del(paths.public)
})
// Styles build task ---------------------
// Compiles CSS from Sass
// Output both a minified and non-minified version into /public/stylesheets/
// ---------------------------------------
gulp.task('styles', () => {
return gulp.src(paths.assetsScss + '**/*.scss')
.pipe(sass({
includePaths: [
'node_modules/govuk_frontend_toolkit/stylesheets'
]
}).on('error', sass.logError))
.pipe(gulp.dest(paths.publicCss))
.pipe(rename({ suffix: '.min' }))
.pipe(cssnano())
.pipe(gulp.dest(paths.publicCss))
})
// Images build task ---------------------
// Copies images to /public/images
// ---------------------------------------
gulp.task('images', () => {
return gulp.src(paths.assetsImg + '**/*')
.pipe(gulp.dest(paths.publicImg))
})
// Scripts build task ---------------------
// Copies JavaScript to /public/javascripts
// ---------------------------------------
gulp.task('scripts', () => {
return gulp.src(paths.assetsJs + '**/*.js')
.pipe(gulp.dest(paths.publicJs))
})
| 'use strict'
const paths = require('./config/paths.json')
const gulp = require('gulp')
const cssnano = require('gulp-cssnano')
const del = require('del')
const rename = require('gulp-rename')
const sass = require('gulp-sass')
// Clean task ----------------------------
// Deletes the /public directory
// ---------------------------------------
gulp.task('clean', () => {
return del(paths.public)
})
// Styles build task ---------------------
// Compiles CSS from Sass
// Output both a minified and non-minified version into /public/stylesheets/
// ---------------------------------------
gulp.task('styles', () => {
return gulp.src(paths.assetsScss + '**/*.scss')
.pipe(sass({
includePaths: [
'node_modules/govuk_frontend_toolkit/stylesheets'
]
}).on('error', sass.logError))
.pipe(gulp.dest(paths.publicCss))
.pipe(rename({ suffix: '.min' }))
.pipe(cssnano())
.pipe(gulp.dest(paths.publicCss))
})
// Images build task ---------------------
// Copies images to /public/images
// ---------------------------------------
gulp.task('images', () => {
return gulp.src(paths.assetsImg + '**/*')
.pipe(gulp.dest(paths.publicImg))
})
+ // Scripts build task ---------------------
+ // Copies JavaScript to /public/javascripts
+ // ---------------------------------------
+ gulp.task('scripts', () => {
+ return gulp.src(paths.assetsJs + '**/*.js')
+ .pipe(gulp.dest(paths.publicJs))
+ }) | 7 | 0.159091 | 7 | 0 |
9129cc04474d90ae287236351eb64265ed89cacb | verify/go-tools/verify-gometalinter.sh | verify/go-tools/verify-gometalinter.sh |
set -o errexit
set -o nounset
set -o pipefail
gometalinter --deadline=180s --vendor \
--cyclo-over=50 --dupl-threshold=100 \
--exclude=".*should not use dot imports \(golint\)$" \
--disable-all \
--enable=vet \
--enable=deadcode \
--enable=golint \
--enable=vetshadow \
--enable=gocyclo \
--skip=.git \
--skip=.tool \
--skip=vendor \
--tests \
./...
|
set -o errexit
set -o nounset
set -o pipefail
gometalinter --deadline="${GOMETALINTER_DEADLINE:-180s}" --vendor \
--cyclo-over=50 --dupl-threshold=100 \
--exclude=".*should not use dot imports \(golint\)$" \
--disable-all \
--enable=vet \
--enable=deadcode \
--enable=golint \
--enable=vetshadow \
--enable=gocyclo \
--skip=.git \
--skip=.tool \
--skip=vendor \
--tests \
./...
| Adjust gometalinter's by using an env | Adjust gometalinter's by using an env
Signed-off-by: Nick Jüttner <75ef9faee755c70589550b513ad881e5a603182c@zalando.de>
| Shell | apache-2.0 | kubernetes/repo-infra,kubernetes/repo-infra,kubernetes/repo-infra | shell | ## Code Before:
set -o errexit
set -o nounset
set -o pipefail
gometalinter --deadline=180s --vendor \
--cyclo-over=50 --dupl-threshold=100 \
--exclude=".*should not use dot imports \(golint\)$" \
--disable-all \
--enable=vet \
--enable=deadcode \
--enable=golint \
--enable=vetshadow \
--enable=gocyclo \
--skip=.git \
--skip=.tool \
--skip=vendor \
--tests \
./...
## Instruction:
Adjust gometalinter's by using an env
Signed-off-by: Nick Jüttner <75ef9faee755c70589550b513ad881e5a603182c@zalando.de>
## Code After:
set -o errexit
set -o nounset
set -o pipefail
gometalinter --deadline="${GOMETALINTER_DEADLINE:-180s}" --vendor \
--cyclo-over=50 --dupl-threshold=100 \
--exclude=".*should not use dot imports \(golint\)$" \
--disable-all \
--enable=vet \
--enable=deadcode \
--enable=golint \
--enable=vetshadow \
--enable=gocyclo \
--skip=.git \
--skip=.tool \
--skip=vendor \
--tests \
./...
|
set -o errexit
set -o nounset
set -o pipefail
- gometalinter --deadline=180s --vendor \
+ gometalinter --deadline="${GOMETALINTER_DEADLINE:-180s}" --vendor \
--cyclo-over=50 --dupl-threshold=100 \
--exclude=".*should not use dot imports \(golint\)$" \
--disable-all \
--enable=vet \
--enable=deadcode \
--enable=golint \
--enable=vetshadow \
--enable=gocyclo \
--skip=.git \
--skip=.tool \
--skip=vendor \
--tests \
./... | 2 | 0.105263 | 1 | 1 |
874e62f4a0083ded15470e480508bf798db70d53 | metadata/naman14.timber.txt | metadata/naman14.timber.txt | Categories:Multimedia
License:GPLv3+
Web Site:
Source Code:https://github.com/naman14/Timber
Issue Tracker:https://github.com/naman14/Timber/issues
Auto Name:Timber
Summary:Material Design Music Player
Description:
Timber is a Music Player currently in Beta
.
Repo Type:git
Repo:https://github.com/naman14/Timber
Build:0.11b,3
commit=9ae127610c18e22716ad4d07471e3955fd11f347
subdir=app
gradle=yes
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:0.122b
Current Version Code:6
| Categories:Multimedia
License:GPLv3+
Web Site:https://github.com/naman14/Timber/blob/HEAD/README.md
Source Code:https://github.com/naman14/Timber
Issue Tracker:https://github.com/naman14/Timber/issues
Changelog:https://github.com/naman14/Timber/blob/HEAD/Changelog.md
Auto Name:Timber
Summary:Material Design Music Player
Description:
Timber is a Music Player currently in Beta
.
Repo Type:git
Repo:https://github.com/naman14/Timber
Build:0.11b,3
commit=9ae127610c18e22716ad4d07471e3955fd11f347
subdir=app
gradle=yes
Build:0.122b,6
commit=f95512a84b2876e3afe7101f0cb1ef49ce829c20
subdir=app
gradle=yes
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:0.122b
Current Version Code:6
| Update Timber to 0.122b (6) | Update Timber to 0.122b (6)
| Text | agpl-3.0 | f-droid/fdroid-data,f-droid/fdroiddata,f-droid/fdroiddata | text | ## Code Before:
Categories:Multimedia
License:GPLv3+
Web Site:
Source Code:https://github.com/naman14/Timber
Issue Tracker:https://github.com/naman14/Timber/issues
Auto Name:Timber
Summary:Material Design Music Player
Description:
Timber is a Music Player currently in Beta
.
Repo Type:git
Repo:https://github.com/naman14/Timber
Build:0.11b,3
commit=9ae127610c18e22716ad4d07471e3955fd11f347
subdir=app
gradle=yes
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:0.122b
Current Version Code:6
## Instruction:
Update Timber to 0.122b (6)
## Code After:
Categories:Multimedia
License:GPLv3+
Web Site:https://github.com/naman14/Timber/blob/HEAD/README.md
Source Code:https://github.com/naman14/Timber
Issue Tracker:https://github.com/naman14/Timber/issues
Changelog:https://github.com/naman14/Timber/blob/HEAD/Changelog.md
Auto Name:Timber
Summary:Material Design Music Player
Description:
Timber is a Music Player currently in Beta
.
Repo Type:git
Repo:https://github.com/naman14/Timber
Build:0.11b,3
commit=9ae127610c18e22716ad4d07471e3955fd11f347
subdir=app
gradle=yes
Build:0.122b,6
commit=f95512a84b2876e3afe7101f0cb1ef49ce829c20
subdir=app
gradle=yes
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:0.122b
Current Version Code:6
| Categories:Multimedia
License:GPLv3+
- Web Site:
+ Web Site:https://github.com/naman14/Timber/blob/HEAD/README.md
Source Code:https://github.com/naman14/Timber
Issue Tracker:https://github.com/naman14/Timber/issues
+ Changelog:https://github.com/naman14/Timber/blob/HEAD/Changelog.md
Auto Name:Timber
Summary:Material Design Music Player
Description:
Timber is a Music Player currently in Beta
.
Repo Type:git
Repo:https://github.com/naman14/Timber
Build:0.11b,3
commit=9ae127610c18e22716ad4d07471e3955fd11f347
subdir=app
gradle=yes
+ Build:0.122b,6
+ commit=f95512a84b2876e3afe7101f0cb1ef49ce829c20
+ subdir=app
+ gradle=yes
+
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:0.122b
Current Version Code:6 | 8 | 0.333333 | 7 | 1 |
d5412179a7891359caf7e5f7f42b210587712c47 | conf/environment.yml | conf/environment.yml | name: cfu-common
channels:
- defaults
- litex-hub
dependencies:
- litex-hub::gcc-riscv32-elf-newlib
- litex-hub::dfu-util
- litex-hub::flterm
- litex-hub::openocd
- litex-hub::verilator
- litex-hub::nextpnr-nexus
- litex-hub::nextpnr-ecp5
- litex-hub::nextpnr-ice40
- litex-hub::iceprog
- litex-hub::yosys
- python=3.7
- pip
- pip:
- -r ./requirements.txt
| name: cfu-common
channels:
- defaults
- litex-hub
dependencies:
- litex-hub::gcc-riscv32-elf-newlib
- litex-hub::dfu-util
- litex-hub::flterm
- litex-hub::openocd
- litex-hub::verilator
- litex-hub::nextpnr-nexus
- litex-hub::nextpnr-ecp5
- litex-hub::nextpnr-ice40
- litex-hub::iceprog
- litex-hub::yosys
- litex-hub::symbiflow-yosys-plugins
- python=3.7
- pip
- pip:
- -r ./requirements.txt
| Add SymbiFlow Yosys plugins even for non-Xilinx env. | Add SymbiFlow Yosys plugins even for non-Xilinx env.
(required for some Lattice Nexus optimization)
Signed-off-by: Tim Callahan <ea16a3c075a6a229c9a452aa4faba7441b41c040@google.com>
| YAML | apache-2.0 | google/CFU-Playground,google/CFU-Playground,google/CFU-Playground,google/CFU-Playground | yaml | ## Code Before:
name: cfu-common
channels:
- defaults
- litex-hub
dependencies:
- litex-hub::gcc-riscv32-elf-newlib
- litex-hub::dfu-util
- litex-hub::flterm
- litex-hub::openocd
- litex-hub::verilator
- litex-hub::nextpnr-nexus
- litex-hub::nextpnr-ecp5
- litex-hub::nextpnr-ice40
- litex-hub::iceprog
- litex-hub::yosys
- python=3.7
- pip
- pip:
- -r ./requirements.txt
## Instruction:
Add SymbiFlow Yosys plugins even for non-Xilinx env.
(required for some Lattice Nexus optimization)
Signed-off-by: Tim Callahan <ea16a3c075a6a229c9a452aa4faba7441b41c040@google.com>
## Code After:
name: cfu-common
channels:
- defaults
- litex-hub
dependencies:
- litex-hub::gcc-riscv32-elf-newlib
- litex-hub::dfu-util
- litex-hub::flterm
- litex-hub::openocd
- litex-hub::verilator
- litex-hub::nextpnr-nexus
- litex-hub::nextpnr-ecp5
- litex-hub::nextpnr-ice40
- litex-hub::iceprog
- litex-hub::yosys
- litex-hub::symbiflow-yosys-plugins
- python=3.7
- pip
- pip:
- -r ./requirements.txt
| name: cfu-common
channels:
- defaults
- litex-hub
dependencies:
- litex-hub::gcc-riscv32-elf-newlib
- litex-hub::dfu-util
- litex-hub::flterm
- litex-hub::openocd
- litex-hub::verilator
- litex-hub::nextpnr-nexus
- litex-hub::nextpnr-ecp5
- litex-hub::nextpnr-ice40
- litex-hub::iceprog
- litex-hub::yosys
+ - litex-hub::symbiflow-yosys-plugins
- python=3.7
- pip
- pip:
- -r ./requirements.txt | 1 | 0.052632 | 1 | 0 |
d20e92cac8aafd60568ede6524e7194a2bd00807 | README.md | README.md | Sign in with Twitter
====================
Sign in with Twitter is a very basic Rails 3 application that demonstrates how
to use the [Sign in with Twitter][siwt] workflow using version 1 of the
[twitter gem][twitter] (which has removed built-in OAuth support) and the
[omniauth gem][omniauth].
[siwt]: http://dev.twitter.com/pages/sign_in_with_twitter
[twitter]: https://github.com/jnunemaker/twitter
[omniauth]: https://github.com/intridea/omniauth
Demo
----
You can see a running version of the application at
<http://sign-in-with-twitter.heroku.com/>.
Installation
------------
git clone git://github.com/sferik/sign-in-with-twitter.git
cd sign-in-with-twitter
bundle install
Usage
-----
Sign in with Twitter requires you to [register an app with Twitter][apps] to
obtain OAuth credentials. Once you obtain credentials, substitute your consumer
key and secret into the command below.
[apps]: http://dev.twitter.com/apps
CONSUMER_KEY=abc CONSUMER_SECRET=123 rails server
| Sign in with Twitter
====================
Sign in with Twitter is a very basic Rails 3 application that demonstrates how
to use the [Sign in with Twitter][siwt] workflow using version 1 of the
[twitter gem][twitter] (which has removed built-in OAuth support) and the
[omniauth gem][omniauth].
[siwt]: http://dev.twitter.com/pages/sign_in_with_twitter
[twitter]: https://github.com/jnunemaker/twitter
[omniauth]: https://github.com/intridea/omniauth
Continuous Integration
----------------------
[](http://travis-ci.org/sferik/sign-in-with-twitter)
Demo
----
You can see a running version of the application at
<http://sign-in-with-twitter.heroku.com/>.
Installation
------------
git clone git://github.com/sferik/sign-in-with-twitter.git
cd sign-in-with-twitter
bundle install
Usage
-----
Sign in with Twitter requires you to [register an app with Twitter][apps] to
obtain OAuth credentials. Once you obtain credentials, substitute your consumer
key and secret into the command below.
[apps]: http://dev.twitter.com/apps
CONSUMER_KEY=abc CONSUMER_SECRET=123 rails server
| Add link to Travis CI | Add link to Travis CI
| Markdown | mit | arrogantgamer/ludum_dare_28,sferik/sign-in-with-twitter,ksmetana/rails-app-twitter-test,ksmetana/rails-app-twitter-test,sferik/sign-in-with-twitter,sferik/sign-in-with-twitter,theonlyjames/garbage,theonlyjames/garbage,maxogden/ciccflip,arrogantgamer/ludum_dare_28,maxogden/ciccflip | markdown | ## Code Before:
Sign in with Twitter
====================
Sign in with Twitter is a very basic Rails 3 application that demonstrates how
to use the [Sign in with Twitter][siwt] workflow using version 1 of the
[twitter gem][twitter] (which has removed built-in OAuth support) and the
[omniauth gem][omniauth].
[siwt]: http://dev.twitter.com/pages/sign_in_with_twitter
[twitter]: https://github.com/jnunemaker/twitter
[omniauth]: https://github.com/intridea/omniauth
Demo
----
You can see a running version of the application at
<http://sign-in-with-twitter.heroku.com/>.
Installation
------------
git clone git://github.com/sferik/sign-in-with-twitter.git
cd sign-in-with-twitter
bundle install
Usage
-----
Sign in with Twitter requires you to [register an app with Twitter][apps] to
obtain OAuth credentials. Once you obtain credentials, substitute your consumer
key and secret into the command below.
[apps]: http://dev.twitter.com/apps
CONSUMER_KEY=abc CONSUMER_SECRET=123 rails server
## Instruction:
Add link to Travis CI
## Code After:
Sign in with Twitter
====================
Sign in with Twitter is a very basic Rails 3 application that demonstrates how
to use the [Sign in with Twitter][siwt] workflow using version 1 of the
[twitter gem][twitter] (which has removed built-in OAuth support) and the
[omniauth gem][omniauth].
[siwt]: http://dev.twitter.com/pages/sign_in_with_twitter
[twitter]: https://github.com/jnunemaker/twitter
[omniauth]: https://github.com/intridea/omniauth
Continuous Integration
----------------------
[](http://travis-ci.org/sferik/sign-in-with-twitter)
Demo
----
You can see a running version of the application at
<http://sign-in-with-twitter.heroku.com/>.
Installation
------------
git clone git://github.com/sferik/sign-in-with-twitter.git
cd sign-in-with-twitter
bundle install
Usage
-----
Sign in with Twitter requires you to [register an app with Twitter][apps] to
obtain OAuth credentials. Once you obtain credentials, substitute your consumer
key and secret into the command below.
[apps]: http://dev.twitter.com/apps
CONSUMER_KEY=abc CONSUMER_SECRET=123 rails server
| Sign in with Twitter
====================
Sign in with Twitter is a very basic Rails 3 application that demonstrates how
to use the [Sign in with Twitter][siwt] workflow using version 1 of the
[twitter gem][twitter] (which has removed built-in OAuth support) and the
[omniauth gem][omniauth].
[siwt]: http://dev.twitter.com/pages/sign_in_with_twitter
[twitter]: https://github.com/jnunemaker/twitter
[omniauth]: https://github.com/intridea/omniauth
+
+ Continuous Integration
+ ----------------------
+ [](http://travis-ci.org/sferik/sign-in-with-twitter)
Demo
----
You can see a running version of the application at
<http://sign-in-with-twitter.heroku.com/>.
Installation
------------
git clone git://github.com/sferik/sign-in-with-twitter.git
cd sign-in-with-twitter
bundle install
Usage
-----
Sign in with Twitter requires you to [register an app with Twitter][apps] to
obtain OAuth credentials. Once you obtain credentials, substitute your consumer
key and secret into the command below.
[apps]: http://dev.twitter.com/apps
CONSUMER_KEY=abc CONSUMER_SECRET=123 rails server | 4 | 0.129032 | 4 | 0 |
f7c27dcb0857639c546f7bc6dd454e0554ecbd7b | src/SearchInRotatedSortedArray.cpp | src/SearchInRotatedSortedArray.cpp |
int SearchInRotatedSortedArray::search(vector<int>& nums, int target)
{
if (nums.empty()) return -1;
int p = 0;
while (p + 1 < nums.size() && nums[p] < nums[p + 1])
p++;
if (p + 1 == nums.size())
return partialSearch(nums, 0, nums.size() - 1, target);
if (target <= nums[nums.size() - 1])
return partialSearch(nums, p + 1, nums.size() - 1, target);
else
return partialSearch(nums, 0, p, target);
}
int SearchInRotatedSortedArray::partialSearch(vector<int>& nums, int p, int q, int target)
{
while (p < q) {
int m = (p + q) / 2;
if (nums[m] == target)
return m;
else if (nums[m] < target)
p = m + 1;
else
q = m;
}
return (nums[p] == target) ? p : -1;
}
|
int SearchInRotatedSortedArray::search(vector<int>& nums, int target)
{
if (nums.empty()) return -1;
return partialSearch(nums, 0, nums.size() - 1, target);
}
int SearchInRotatedSortedArray::partialSearch(vector<int>& nums, int p, int q, int target)
{
if (p > q) return -1;
int m = (p + q) / 2;
if (nums[m] == target) return m;
if (nums[p] > nums[q]) {
int left = partialSearch(nums, p, m - 1, target);
if (left != -1) return left;
else return partialSearch(nums, m + 1, q, target);
} else {
if (nums[m] < target) return partialSearch(nums, m + 1, q, target);
else return partialSearch(nums, p, m - 1, target);
}
} | Update Problem 33. Search in Rotated Sorted Array | Update Problem 33. Search in Rotated Sorted Array
| C++ | mit | yanzhe-chen/leetcode | c++ | ## Code Before:
int SearchInRotatedSortedArray::search(vector<int>& nums, int target)
{
if (nums.empty()) return -1;
int p = 0;
while (p + 1 < nums.size() && nums[p] < nums[p + 1])
p++;
if (p + 1 == nums.size())
return partialSearch(nums, 0, nums.size() - 1, target);
if (target <= nums[nums.size() - 1])
return partialSearch(nums, p + 1, nums.size() - 1, target);
else
return partialSearch(nums, 0, p, target);
}
int SearchInRotatedSortedArray::partialSearch(vector<int>& nums, int p, int q, int target)
{
while (p < q) {
int m = (p + q) / 2;
if (nums[m] == target)
return m;
else if (nums[m] < target)
p = m + 1;
else
q = m;
}
return (nums[p] == target) ? p : -1;
}
## Instruction:
Update Problem 33. Search in Rotated Sorted Array
## Code After:
int SearchInRotatedSortedArray::search(vector<int>& nums, int target)
{
if (nums.empty()) return -1;
return partialSearch(nums, 0, nums.size() - 1, target);
}
int SearchInRotatedSortedArray::partialSearch(vector<int>& nums, int p, int q, int target)
{
if (p > q) return -1;
int m = (p + q) / 2;
if (nums[m] == target) return m;
if (nums[p] > nums[q]) {
int left = partialSearch(nums, p, m - 1, target);
if (left != -1) return left;
else return partialSearch(nums, m + 1, q, target);
} else {
if (nums[m] < target) return partialSearch(nums, m + 1, q, target);
else return partialSearch(nums, p, m - 1, target);
}
} |
int SearchInRotatedSortedArray::search(vector<int>& nums, int target)
{
if (nums.empty()) return -1;
- int p = 0;
- while (p + 1 < nums.size() && nums[p] < nums[p + 1])
- p++;
-
- if (p + 1 == nums.size())
- return partialSearch(nums, 0, nums.size() - 1, target);
? --
+ return partialSearch(nums, 0, nums.size() - 1, target);
-
- if (target <= nums[nums.size() - 1])
- return partialSearch(nums, p + 1, nums.size() - 1, target);
- else
- return partialSearch(nums, 0, p, target);
}
int SearchInRotatedSortedArray::partialSearch(vector<int>& nums, int p, int q, int target)
{
- while (p < q) {
+ if (p > q) return -1;
+
- int m = (p + q) / 2;
? --
+ int m = (p + q) / 2;
+
- if (nums[m] == target)
? --
+ if (nums[m] == target) return m;
? ++++++++++
- return m;
- else if (nums[m] < target)
- p = m + 1;
+
+ if (nums[p] > nums[q]) {
+ int left = partialSearch(nums, p, m - 1, target);
+ if (left != -1) return left;
+ else return partialSearch(nums, m + 1, q, target);
- else
? ^
+ } else {
? ^ ++
- q = m;
+ if (nums[m] < target) return partialSearch(nums, m + 1, q, target);
+ else return partialSearch(nums, p, m - 1, target);
}
-
- return (nums[p] == target) ? p : -1;
} | 35 | 1.09375 | 14 | 21 |
5ef1f60e9ec5d3094e49e72c3b74e7877e785c51 | script/config.rb | script/config.rb |
UPLOAD_TO = 'sitnik@sitnik.ru:/home/sitnik/data/www/sitnik.ru/'
require 'pathname'
ROOT = Pathname.new(__FILE__).dirname.parent.realpath
PUBLIC = ROOT.join('public')
CONTENT = ROOT.join('content')
def build
load Pathname.new(__FILE__).dirname.join('build')
end
|
UPLOAD_TO = 'ai@sitnik.ru:/home/ai/sitnik.ru/'
require 'pathname'
ROOT = Pathname.new(__FILE__).dirname.parent.realpath
PUBLIC = ROOT.join('public')
CONTENT = ROOT.join('content')
def build
load Pathname.new(__FILE__).dirname.join('build')
end
| Change rsync path on server | Change rsync path on server
| Ruby | mit | ai/sitnik.ru | ruby | ## Code Before:
UPLOAD_TO = 'sitnik@sitnik.ru:/home/sitnik/data/www/sitnik.ru/'
require 'pathname'
ROOT = Pathname.new(__FILE__).dirname.parent.realpath
PUBLIC = ROOT.join('public')
CONTENT = ROOT.join('content')
def build
load Pathname.new(__FILE__).dirname.join('build')
end
## Instruction:
Change rsync path on server
## Code After:
UPLOAD_TO = 'ai@sitnik.ru:/home/ai/sitnik.ru/'
require 'pathname'
ROOT = Pathname.new(__FILE__).dirname.parent.realpath
PUBLIC = ROOT.join('public')
CONTENT = ROOT.join('content')
def build
load Pathname.new(__FILE__).dirname.join('build')
end
|
- UPLOAD_TO = 'sitnik@sitnik.ru:/home/sitnik/data/www/sitnik.ru/'
? ^ ---- ^ -------------
+ UPLOAD_TO = 'ai@sitnik.ru:/home/ai/sitnik.ru/'
? ^ ^
-
require 'pathname'
ROOT = Pathname.new(__FILE__).dirname.parent.realpath
PUBLIC = ROOT.join('public')
CONTENT = ROOT.join('content')
def build
load Pathname.new(__FILE__).dirname.join('build')
end | 3 | 0.25 | 1 | 2 |
a52a535f004d3474a546f8a692ed19d90ec884f5 | home/.config/pop-shell/config.json | home/.config/pop-shell/config.json | {
"float": [
{
"class": "pop-shell-example",
"title": "pop-shell-example"
},
{
"class": "ulauncher"
},
{
"class": "Steam"
},
{
"class": "ocs-url"
},
{
"class": "gnome-terminal-server",
"title": "Preferences – Profile “Unnamed”"
},
{
"class": "gnome-control-center"
}
],
"skiptaskbarhidden": [],
"log_on_focus": false,
"move_pointer_on_switch": false,
"default_pointer_position": "TOP_LEFT"
} | {
"float": [
{
"class": "pop-shell-example",
"title": "pop-shell-example"
},
{
"class": "ulauncher"
},
{
"class": "Steam"
},
{
"class": "ocs-url"
},
{
"class": "gnome-terminal-server",
"title": "Preferences – Profile “Unnamed”"
},
{
"class": "gnome-control-center"
},
{
"class": "update-manager"
}
],
"skiptaskbarhidden": [],
"log_on_focus": false,
"move_pointer_on_switch": false,
"default_pointer_position": "TOP_LEFT"
} | Add update-manager to pop-shell exceptions | Add update-manager to pop-shell exceptions
| JSON | mit | NullVoxPopuli/dotfiles,NullVoxPopuli/dotfiles,NullVoxPopuli/dotfiles | json | ## Code Before:
{
"float": [
{
"class": "pop-shell-example",
"title": "pop-shell-example"
},
{
"class": "ulauncher"
},
{
"class": "Steam"
},
{
"class": "ocs-url"
},
{
"class": "gnome-terminal-server",
"title": "Preferences – Profile “Unnamed”"
},
{
"class": "gnome-control-center"
}
],
"skiptaskbarhidden": [],
"log_on_focus": false,
"move_pointer_on_switch": false,
"default_pointer_position": "TOP_LEFT"
}
## Instruction:
Add update-manager to pop-shell exceptions
## Code After:
{
"float": [
{
"class": "pop-shell-example",
"title": "pop-shell-example"
},
{
"class": "ulauncher"
},
{
"class": "Steam"
},
{
"class": "ocs-url"
},
{
"class": "gnome-terminal-server",
"title": "Preferences – Profile “Unnamed”"
},
{
"class": "gnome-control-center"
},
{
"class": "update-manager"
}
],
"skiptaskbarhidden": [],
"log_on_focus": false,
"move_pointer_on_switch": false,
"default_pointer_position": "TOP_LEFT"
} | {
"float": [
{
"class": "pop-shell-example",
"title": "pop-shell-example"
},
{
"class": "ulauncher"
},
{
"class": "Steam"
},
{
"class": "ocs-url"
},
{
"class": "gnome-terminal-server",
"title": "Preferences – Profile “Unnamed”"
},
{
"class": "gnome-control-center"
+ },
+ {
+ "class": "update-manager"
}
],
"skiptaskbarhidden": [],
"log_on_focus": false,
"move_pointer_on_switch": false,
"default_pointer_position": "TOP_LEFT"
} | 3 | 0.107143 | 3 | 0 |
fc9a443c3dffe7eabc70596f0f173c013ae90a6f | lib/shore/client/uuid_helpers.rb | lib/shore/client/uuid_helpers.rb | module Shore
module Client
module UUID
UUID_FORMAT = 'H8H4H4H4H12'
# from_urlsafe("uUtUi3QLle6IvU1oOYIezg")
# => "b94b548b-740b-95ee-88bd-4d6839821ece"
def self.from_urlsafe(url)
url = url.gsub('_','/').gsub('-','+')
url.unpack('m').first.unpack(UUID_FORMAT).join('-')
end
# to_urlsafe('b94b548b-740b-95ee-88bd-4d6839821ece')
# => "uUtUi3QLle6IvU1oOYIezg"
def self.to_urlsafe(uuid)
bytestring = uuid.split('-').pack(UUID_FORMAT)
Base64.urlsafe_encode64(bytestring).gsub('=','')
end
end
end
end
| module Shore
module Client
module UUID
UUID_FORMAT = 'H8H4H4H4H12'
# from_urlsafe("uUtUi3QLle6IvU1oOYIezg")
# => "b94b548b-740b-95ee-88bd-4d6839821ece"
def self.from_urlsafe(url)
url = url.gsub('_','/').gsub('-','+')
url.unpack('m').first.unpack(UUID_FORMAT).join('-')
end
# to_urlsafe('b94b548b-740b-95ee-88bd-4d6839821ece')
# => "uUtUi3QLle6IvU1oOYIezg"
def self.to_urlsafe(uuid)
bytestring = uuid.split('-').pack(UUID_FORMAT)
Base64.urlsafe_encode64(bytestring).gsub('=','')
end
end
end
end
| Fix formatting in UUID helper | Fix formatting in UUID helper
| Ruby | mit | shore-gmbh/shore-ruby-client,shore-gmbh/shore-ruby-client | ruby | ## Code Before:
module Shore
module Client
module UUID
UUID_FORMAT = 'H8H4H4H4H12'
# from_urlsafe("uUtUi3QLle6IvU1oOYIezg")
# => "b94b548b-740b-95ee-88bd-4d6839821ece"
def self.from_urlsafe(url)
url = url.gsub('_','/').gsub('-','+')
url.unpack('m').first.unpack(UUID_FORMAT).join('-')
end
# to_urlsafe('b94b548b-740b-95ee-88bd-4d6839821ece')
# => "uUtUi3QLle6IvU1oOYIezg"
def self.to_urlsafe(uuid)
bytestring = uuid.split('-').pack(UUID_FORMAT)
Base64.urlsafe_encode64(bytestring).gsub('=','')
end
end
end
end
## Instruction:
Fix formatting in UUID helper
## Code After:
module Shore
module Client
module UUID
UUID_FORMAT = 'H8H4H4H4H12'
# from_urlsafe("uUtUi3QLle6IvU1oOYIezg")
# => "b94b548b-740b-95ee-88bd-4d6839821ece"
def self.from_urlsafe(url)
url = url.gsub('_','/').gsub('-','+')
url.unpack('m').first.unpack(UUID_FORMAT).join('-')
end
# to_urlsafe('b94b548b-740b-95ee-88bd-4d6839821ece')
# => "uUtUi3QLle6IvU1oOYIezg"
def self.to_urlsafe(uuid)
bytestring = uuid.split('-').pack(UUID_FORMAT)
Base64.urlsafe_encode64(bytestring).gsub('=','')
end
end
end
end
| module Shore
module Client
module UUID
- UUID_FORMAT = 'H8H4H4H4H12'
? ^^^
+ UUID_FORMAT = 'H8H4H4H4H12'
? ^^^^^^
# from_urlsafe("uUtUi3QLle6IvU1oOYIezg")
- # => "b94b548b-740b-95ee-88bd-4d6839821ece"
? ^^^
+ # => "b94b548b-740b-95ee-88bd-4d6839821ece"
? ^^^^^^
def self.from_urlsafe(url)
url = url.gsub('_','/').gsub('-','+')
- url.unpack('m').first.unpack(UUID_FORMAT).join('-')
? ^^^^
+ url.unpack('m').first.unpack(UUID_FORMAT).join('-')
? ^^^^^^^^
- end
+ end
- # to_urlsafe('b94b548b-740b-95ee-88bd-4d6839821ece')
? ^^^
+ # to_urlsafe('b94b548b-740b-95ee-88bd-4d6839821ece')
? ^^^^^^
- # => "uUtUi3QLle6IvU1oOYIezg"
? ^^
+ # => "uUtUi3QLle6IvU1oOYIezg"
? ^^^^
def self.to_urlsafe(uuid)
- bytestring = uuid.split('-').pack(UUID_FORMAT)
? ^^^^
+ bytestring = uuid.split('-').pack(UUID_FORMAT)
? ^^^^^^^^
Base64.urlsafe_encode64(bytestring).gsub('=','')
- end
+ end
end
end
end | 16 | 0.761905 | 8 | 8 |
e0c185166a7337daccb288d5ee328b6e42550d4d | README.md | README.md | A Webpack plugin to download translations from Phraseapp and place them in your project
|
Webpack plugin for generating translations files from PhraseApp.
This plugin uses the download API endpoint from PhraseApp, for further information please see the following [link](https://phraseapp.com/docs/api/v2/locales/#download)
## Usage
In your `webpack.config.js`
```javascript
var PhraseAppBuilderPlugin = require('webpack-pharseapp-builder');
module.exports = {
// ...
plugins: [
new PhraseAppBuilderPlugin({
localesId: ['someLocaleId'], // Get the locales id from PhraseApp, you can add many ids
accessToken: 'theAccesTokenId', // Get your accessToken from PhraseApp
projectId: 'theProjectId', // Get the project id from PhraseApp
format: 'json' // specify the format from Pharseapp
})
]
};
```
This will generate translations files in your configured output directory, for example:
```json
// build/es.json
{
"some.key": "hello",
}
```
**Options:**
* `localesId`: The locales id from your PhraseApp project.
* `accessToken`: The accessToken to authorize the PhraseApp API.
* `projectId`: The project id from PhraseApp from where you want to extract your translations
* `format`: The format to download the translations
| Update readme with the proper description | Update readme with the proper description
| Markdown | mit | cornerjob/webpack-phraseapp-builder | markdown | ## Code Before:
A Webpack plugin to download translations from Phraseapp and place them in your project
## Instruction:
Update readme with the proper description
## Code After:
Webpack plugin for generating translations files from PhraseApp.
This plugin uses the download API endpoint from PhraseApp, for further information please see the following [link](https://phraseapp.com/docs/api/v2/locales/#download)
## Usage
In your `webpack.config.js`
```javascript
var PhraseAppBuilderPlugin = require('webpack-pharseapp-builder');
module.exports = {
// ...
plugins: [
new PhraseAppBuilderPlugin({
localesId: ['someLocaleId'], // Get the locales id from PhraseApp, you can add many ids
accessToken: 'theAccesTokenId', // Get your accessToken from PhraseApp
projectId: 'theProjectId', // Get the project id from PhraseApp
format: 'json' // specify the format from Pharseapp
})
]
};
```
This will generate translations files in your configured output directory, for example:
```json
// build/es.json
{
"some.key": "hello",
}
```
**Options:**
* `localesId`: The locales id from your PhraseApp project.
* `accessToken`: The accessToken to authorize the PhraseApp API.
* `projectId`: The project id from PhraseApp from where you want to extract your translations
* `format`: The format to download the translations
| - A Webpack plugin to download translations from Phraseapp and place them in your project
+
+ Webpack plugin for generating translations files from PhraseApp.
+ This plugin uses the download API endpoint from PhraseApp, for further information please see the following [link](https://phraseapp.com/docs/api/v2/locales/#download)
+
+ ## Usage
+
+ In your `webpack.config.js`
+
+ ```javascript
+ var PhraseAppBuilderPlugin = require('webpack-pharseapp-builder');
+
+ module.exports = {
+ // ...
+ plugins: [
+ new PhraseAppBuilderPlugin({
+ localesId: ['someLocaleId'], // Get the locales id from PhraseApp, you can add many ids
+ accessToken: 'theAccesTokenId', // Get your accessToken from PhraseApp
+ projectId: 'theProjectId', // Get the project id from PhraseApp
+ format: 'json' // specify the format from Pharseapp
+ })
+ ]
+ };
+ ```
+
+ This will generate translations files in your configured output directory, for example:
+
+ ```json
+ // build/es.json
+
+ {
+ "some.key": "hello",
+ }
+ ```
+
+ **Options:**
+
+ * `localesId`: The locales id from your PhraseApp project.
+ * `accessToken`: The accessToken to authorize the PhraseApp API.
+ * `projectId`: The project id from PhraseApp from where you want to extract your translations
+ * `format`: The format to download the translations | 41 | 41 | 40 | 1 |
2a1f827ab67562ecf7957effeca3ba3f75f4b45f | components/terminal/init.js | components/terminal/init.js | /*
* Copyright (c) Codiad & Kent Safranski (codiad.com), distributed
* as-is and without warranty under the MIT License. See
* [root]/license.txt for more. This information must remain intact.
*/
(function(global, $){
global.codiad.terminal = {
termWidth: $(window)
.outerWidth() - 500,
open: function() {
codiad.modal.load(this.termWidth, 'components/terminal/dialog.php');
}
};
})(this, jQuery); | /*
* Copyright (c) Codiad & Kent Safranski (codiad.com), distributed
* as-is and without warranty under the MIT License. See
* [root]/license.txt for more. This information must remain intact.
*/
(function(global, $){
global.codiad.terminal = {
termWidth: $(window)
.outerWidth() - 500,
open: function() {
codiad.modal.load(this.termWidth, 'components/terminal/dialog.php');
codiad.modal.hideOverlay();
}
};
})(this, jQuery); | Remove overlay so files/editor still accessible when terminal is open | Remove overlay so files/editor still accessible when terminal is open
| JavaScript | mit | cobisimo/Codiad,BogusCurry/Codiad,cobisimo/Codiad,l3dlp/Codiad,Tepira/Codiad,titiushko/Codiad,dragonro/Codiad,evertton/Codiad,begemot-amp/Codiad,dragonro/Codiad,titiushko/Codiad,justintime4tea/Codiad,AlphaStaxLLC/Codiad,evertton/Codiad,hoksi/Codiad,lucasfurlani/ACIDE,justintime4tea/Codiad,begemot-amp/Codiad,AlphaStaxLLC/Codiad,beavis28/Codiad,Andr3as/Codiad,Andrey-Pavlov/Codiad,hoksi/Codiad,Andr3as/Codiad,lucasfurlani/ACIDE,Andrey-Pavlov/Codiad,fly19890211/Codiad,l3dlp/Codiad,dragonro/Codiad,lucasfurlani/ACIDE,BogusCurry/Codiad,justintime4tea/Codiad,fly19890211/Codiad,Tepira/Codiad,dragonro/Codiad,beavis28/Codiad | javascript | ## Code Before:
/*
* Copyright (c) Codiad & Kent Safranski (codiad.com), distributed
* as-is and without warranty under the MIT License. See
* [root]/license.txt for more. This information must remain intact.
*/
(function(global, $){
global.codiad.terminal = {
termWidth: $(window)
.outerWidth() - 500,
open: function() {
codiad.modal.load(this.termWidth, 'components/terminal/dialog.php');
}
};
})(this, jQuery);
## Instruction:
Remove overlay so files/editor still accessible when terminal is open
## Code After:
/*
* Copyright (c) Codiad & Kent Safranski (codiad.com), distributed
* as-is and without warranty under the MIT License. See
* [root]/license.txt for more. This information must remain intact.
*/
(function(global, $){
global.codiad.terminal = {
termWidth: $(window)
.outerWidth() - 500,
open: function() {
codiad.modal.load(this.termWidth, 'components/terminal/dialog.php');
codiad.modal.hideOverlay();
}
};
})(this, jQuery); | /*
* Copyright (c) Codiad & Kent Safranski (codiad.com), distributed
* as-is and without warranty under the MIT License. See
* [root]/license.txt for more. This information must remain intact.
*/
(function(global, $){
global.codiad.terminal = {
termWidth: $(window)
.outerWidth() - 500,
open: function() {
codiad.modal.load(this.termWidth, 'components/terminal/dialog.php');
+ codiad.modal.hideOverlay();
}
};
})(this, jQuery); | 1 | 0.055556 | 1 | 0 |
990129dee1726f0c86efc3763ea406dcf0e0e328 | CHANGELOG.md | CHANGELOG.md | v0.3.0
======
* Added support for XML based web services ([jschaedl](https://github.com/jschaedl))
| v0.3.0
======
* Added support for XML based web services ([jschaedl](https://github.com/jschaedl))
v0.4.0
======
* PHP 5.4 support has been dropped and PHP 7.1 was added to the travis config.
* All the production dependencies has been updated to the latest versions.
** behat/behat to 3.3.0
** justinrainbow/json-schema to 4.1.0
** guzzlehttp/guzzle to 6.2.2
* Some of the obsolete development dependencies have been removed.
* Simple make file was added to simplify the execution of tests.
| Change log for version 0.4.0 | Change log for version 0.4.0
| Markdown | mit | theDisco/Arachne | markdown | ## Code Before:
v0.3.0
======
* Added support for XML based web services ([jschaedl](https://github.com/jschaedl))
## Instruction:
Change log for version 0.4.0
## Code After:
v0.3.0
======
* Added support for XML based web services ([jschaedl](https://github.com/jschaedl))
v0.4.0
======
* PHP 5.4 support has been dropped and PHP 7.1 was added to the travis config.
* All the production dependencies has been updated to the latest versions.
** behat/behat to 3.3.0
** justinrainbow/json-schema to 4.1.0
** guzzlehttp/guzzle to 6.2.2
* Some of the obsolete development dependencies have been removed.
* Simple make file was added to simplify the execution of tests.
| v0.3.0
======
* Added support for XML based web services ([jschaedl](https://github.com/jschaedl))
+
+ v0.4.0
+ ======
+ * PHP 5.4 support has been dropped and PHP 7.1 was added to the travis config.
+ * All the production dependencies has been updated to the latest versions.
+ ** behat/behat to 3.3.0
+ ** justinrainbow/json-schema to 4.1.0
+ ** guzzlehttp/guzzle to 6.2.2
+ * Some of the obsolete development dependencies have been removed.
+ * Simple make file was added to simplify the execution of tests. | 10 | 3.333333 | 10 | 0 |
be22adbf134224dc99a82b97ae9e1e39766a0718 | models/_query/BbiiMemberQuery.php | models/_query/BbiiMemberQuery.php | <?php
namespace frontend\modules\bbii\models\_query;
use yii\db\ActiveQuery;
/**
* Created to replace Yii1's scope concept. Yii2 uses query classes
*
* @since 0.0.5
*/
class BbiiMemberQuery extends ActiveQuery
{
public function find()
{
return $this;
}
public function findAll()
{
return $this;
}
// custom query methods
public function present()
{
return $this->andWhere([
'last_visit > \''.date('Y-m-d H:i:s', time() - 900).'\''
])->orderBy('last_visit DESC');
}
public function show()
{
return $this->andWhere(['show_online' => 1]);
}
public function newest()
{
return $this->orderBy('first_visit DESC')->limit(1);
}
public function moderator()
{
return $this->andWhere(['moderator' => 1]);
}
}
| <?php
namespace frontend\modules\bbii\models\_query;
use yii\db\ActiveQuery;
/**
* Created to replace Yii1's scope concept. Yii2 uses query classes
*
* @since 0.0.5
*/
class BbiiMemberQuery extends ActiveQuery
{
public function find()
{
return $this;
}
public function findAll()
{
return $this;
}
// custom query methods
public function present()
{
return $this->andWhere(
'last_visit > \''.date('Y-m-d H:i:s', time() - 900).'\''
)->orderBy('last_visit DESC');
}
public function show()
{
return $this->andWhere(['show_online' => 1]);
}
public function newest()
{
return $this->orderBy('first_visit DESC')->limit(1);
}
public function moderator()
{
return $this->andWhere(['moderator' => 1]);
}
public function hidden()
{
return true;
}
}
| FIX query class for Member MDL | FIX query class for Member MDL
| PHP | bsd-2-clause | sourcetoad/bbii2,sourcetoad/bbii2 | php | ## Code Before:
<?php
namespace frontend\modules\bbii\models\_query;
use yii\db\ActiveQuery;
/**
* Created to replace Yii1's scope concept. Yii2 uses query classes
*
* @since 0.0.5
*/
class BbiiMemberQuery extends ActiveQuery
{
public function find()
{
return $this;
}
public function findAll()
{
return $this;
}
// custom query methods
public function present()
{
return $this->andWhere([
'last_visit > \''.date('Y-m-d H:i:s', time() - 900).'\''
])->orderBy('last_visit DESC');
}
public function show()
{
return $this->andWhere(['show_online' => 1]);
}
public function newest()
{
return $this->orderBy('first_visit DESC')->limit(1);
}
public function moderator()
{
return $this->andWhere(['moderator' => 1]);
}
}
## Instruction:
FIX query class for Member MDL
## Code After:
<?php
namespace frontend\modules\bbii\models\_query;
use yii\db\ActiveQuery;
/**
* Created to replace Yii1's scope concept. Yii2 uses query classes
*
* @since 0.0.5
*/
class BbiiMemberQuery extends ActiveQuery
{
public function find()
{
return $this;
}
public function findAll()
{
return $this;
}
// custom query methods
public function present()
{
return $this->andWhere(
'last_visit > \''.date('Y-m-d H:i:s', time() - 900).'\''
)->orderBy('last_visit DESC');
}
public function show()
{
return $this->andWhere(['show_online' => 1]);
}
public function newest()
{
return $this->orderBy('first_visit DESC')->limit(1);
}
public function moderator()
{
return $this->andWhere(['moderator' => 1]);
}
public function hidden()
{
return true;
}
}
| <?php
namespace frontend\modules\bbii\models\_query;
use yii\db\ActiveQuery;
/**
* Created to replace Yii1's scope concept. Yii2 uses query classes
*
* @since 0.0.5
*/
class BbiiMemberQuery extends ActiveQuery
{
public function find()
{
return $this;
}
public function findAll()
{
return $this;
}
// custom query methods
public function present()
{
- return $this->andWhere([
? -
+ return $this->andWhere(
'last_visit > \''.date('Y-m-d H:i:s', time() - 900).'\''
- ])->orderBy('last_visit DESC');
? -
+ )->orderBy('last_visit DESC');
}
public function show()
{
return $this->andWhere(['show_online' => 1]);
}
public function newest()
{
return $this->orderBy('first_visit DESC')->limit(1);
}
public function moderator()
{
return $this->andWhere(['moderator' => 1]);
}
+
+ public function hidden()
+ {
+ return true;
+ }
} | 9 | 0.169811 | 7 | 2 |
f11fc45ca6c22f1ac9c5284f27be8c5b92c9c5e7 | app/src/main/res/xml/prefs.xml | app/src/main/res/xml/prefs.xml | <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/reminders">
<RingtonePreference
android:title="@string/reminder_ringtone"
android:key="reminder_tone"
android:ringtoneType="notification|alarm"
android:showDefault="true"
android:showSilent="true"></RingtonePreference>
<CheckBoxPreference
android:title="@string/insistent_alarm"
android:key="insistent"></CheckBoxPreference>
</PreferenceCategory>
<CheckBoxPreference
android:key="auto_update"
android:title="@string/pref_auto_download"
android:defaultValue="false"/>
</PreferenceScreen>
| <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/general_settings">
<CheckBoxPreference
android:key="auto_update"
android:title="@string/pref_auto_download"
android:defaultValue="false"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/reminders">
<RingtonePreference
android:title="@string/reminder_ringtone"
android:key="reminder_tone"
android:ringtoneType="notification|alarm"
android:showDefault="true"
android:showSilent="true"/>
<CheckBoxPreference
android:title="@string/insistent_alarm"
android:key="insistent"/>
</PreferenceCategory>
</PreferenceScreen>
| Add a general PreferenceCategory to get consistent layout | Add a general PreferenceCategory to get consistent layout
| XML | apache-2.0 | EventFahrplan/EventFahrplan,EventFahrplan/EventFahrplan | xml | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/reminders">
<RingtonePreference
android:title="@string/reminder_ringtone"
android:key="reminder_tone"
android:ringtoneType="notification|alarm"
android:showDefault="true"
android:showSilent="true"></RingtonePreference>
<CheckBoxPreference
android:title="@string/insistent_alarm"
android:key="insistent"></CheckBoxPreference>
</PreferenceCategory>
<CheckBoxPreference
android:key="auto_update"
android:title="@string/pref_auto_download"
android:defaultValue="false"/>
</PreferenceScreen>
## Instruction:
Add a general PreferenceCategory to get consistent layout
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="@string/general_settings">
<CheckBoxPreference
android:key="auto_update"
android:title="@string/pref_auto_download"
android:defaultValue="false"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/reminders">
<RingtonePreference
android:title="@string/reminder_ringtone"
android:key="reminder_tone"
android:ringtoneType="notification|alarm"
android:showDefault="true"
android:showSilent="true"/>
<CheckBoxPreference
android:title="@string/insistent_alarm"
android:key="insistent"/>
</PreferenceCategory>
</PreferenceScreen>
| <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
- xmlns:android="http://schemas.android.com/apk/res/android">
? ----
+ xmlns:android="http://schemas.android.com/apk/res/android">
- <PreferenceCategory android:title="@string/reminders">
? ^ ^^^
+ <PreferenceCategory android:title="@string/general_settings">
? ++++ ++++ ^^ ^
- <RingtonePreference
- android:title="@string/reminder_ringtone"
- android:key="reminder_tone"
- android:ringtoneType="notification|alarm"
- android:showDefault="true"
- android:showSilent="true"></RingtonePreference>
<CheckBoxPreference
- android:title="@string/insistent_alarm"
- android:key="insistent"></CheckBoxPreference>
-
- </PreferenceCategory>
- <CheckBoxPreference
android:key="auto_update"
android:title="@string/pref_auto_download"
android:defaultValue="false"/>
+ </PreferenceCategory>
+ <PreferenceCategory android:title="@string/reminders">
+ <RingtonePreference
+ android:title="@string/reminder_ringtone"
+ android:key="reminder_tone"
+ android:ringtoneType="notification|alarm"
+ android:showDefault="true"
+ android:showSilent="true"/>
+ <CheckBoxPreference
+ android:title="@string/insistent_alarm"
+ android:key="insistent"/>
+ </PreferenceCategory>
</PreferenceScreen> | 27 | 1.35 | 14 | 13 |
0055c44df7839720c733909bafae9b3d6c8a4844 | blog-index.html | blog-index.html | ---
---
<div class="spacer">
</div>
{% for post in site.posts %}
<article>
<h2><a href="{{ post.url | prepend: site.baseurl}}">{{ post.title }}</a></h2>
<div class="tags">
<strong>Tags:</strong> {% for tag in post.tags%} {{ tag }} {% endfor %}
</div><!-- end tags -->
<section class="post-preview">
{{ post.excerpt | strip_html }}
</section>
<section class="article-footer">
{{ post.author }} | <time datetime="{{ post.date | date: %Y-%m-%d}}"> {{ post.date | date_to_string }}</time>
</section>
</article>
{% endfor %}
| ---
---
<div class="spacer">
</div>
{% for post in site.posts %}
<article>
<h2><a href="{{ post.url | prepend: site.baseurl}}">{{ post.title }}</a></h2>
<section class="post-preview">
{{ post.excerpt | strip_html }}
</section>
<div class="tags">
<strong>Tags:</strong> {% for tag in post.tags%} {{ tag }} {% endfor %}
</div><!-- end tags -->
<section class="article-footer">
<small>
{{ post.author }} | <time datetime="{{ post.date | date: %Y-%m-%d}}"> {{ post.date | date_to_string }}</time>
</small>
</section>
</article>
{% endfor %}
| Reorder an article such that the excerpt comes before the tags. | Reorder an article such that the excerpt comes before the tags.
| HTML | mit | StevenXL/stevenxl.github.io,StevenXL/stevenxl.github.io | html | ## Code Before:
---
---
<div class="spacer">
</div>
{% for post in site.posts %}
<article>
<h2><a href="{{ post.url | prepend: site.baseurl}}">{{ post.title }}</a></h2>
<div class="tags">
<strong>Tags:</strong> {% for tag in post.tags%} {{ tag }} {% endfor %}
</div><!-- end tags -->
<section class="post-preview">
{{ post.excerpt | strip_html }}
</section>
<section class="article-footer">
{{ post.author }} | <time datetime="{{ post.date | date: %Y-%m-%d}}"> {{ post.date | date_to_string }}</time>
</section>
</article>
{% endfor %}
## Instruction:
Reorder an article such that the excerpt comes before the tags.
## Code After:
---
---
<div class="spacer">
</div>
{% for post in site.posts %}
<article>
<h2><a href="{{ post.url | prepend: site.baseurl}}">{{ post.title }}</a></h2>
<section class="post-preview">
{{ post.excerpt | strip_html }}
</section>
<div class="tags">
<strong>Tags:</strong> {% for tag in post.tags%} {{ tag }} {% endfor %}
</div><!-- end tags -->
<section class="article-footer">
<small>
{{ post.author }} | <time datetime="{{ post.date | date: %Y-%m-%d}}"> {{ post.date | date_to_string }}</time>
</small>
</section>
</article>
{% endfor %}
| ---
---
<div class="spacer">
</div>
{% for post in site.posts %}
<article>
<h2><a href="{{ post.url | prepend: site.baseurl}}">{{ post.title }}</a></h2>
+ <section class="post-preview">
+ {{ post.excerpt | strip_html }}
+ </section>
+
<div class="tags">
<strong>Tags:</strong> {% for tag in post.tags%} {{ tag }} {% endfor %}
</div><!-- end tags -->
- <section class="post-preview">
- {{ post.excerpt | strip_html }}
- </section>
-
<section class="article-footer">
+ <small>
{{ post.author }} | <time datetime="{{ post.date | date: %Y-%m-%d}}"> {{ post.date | date_to_string }}</time>
+ </small>
</section>
</article>
{% endfor %} | 10 | 0.416667 | 6 | 4 |
542ffbafe17055988e580e71dd834600efca7495 | meta-oe/recipes-support/libgusb/libgusb_0.3.8.bb | meta-oe/recipes-support/libgusb/libgusb_0.3.8.bb | SUMMARY = "GUsb is a GObject wrapper for libusb1"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
DEPENDS = "glib-2.0 libusb"
inherit meson gobject-introspection gtk-doc gettext vala
PACKAGECONFIG ??= "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vapi', '', d)}"
PACKAGECONFIG[vapi] = "-Dvapi=true,-Dvapi=false"
SRC_URI = "git://github.com/hughsie/libgusb.git;branch=main;protocol=https"
SRCREV = "db9edbd8b45662d551194a0985173732f8f557a5"
S = "${WORKDIR}/git"
PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false"
| SUMMARY = "GUsb is a GObject wrapper for libusb1"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
DEPENDS = "glib-2.0 libusb"
inherit meson gobject-introspection gtk-doc gettext vala
PACKAGECONFIG ??= "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vapi', '', d)}"
PACKAGECONFIG[vapi] = "-Dvapi=true,-Dvapi=false"
SRC_URI = "git://github.com/hughsie/libgusb.git;branch=main;protocol=https"
SRCREV = "db9edbd8b45662d551194a0985173732f8f557a5"
S = "${WORKDIR}/git"
| Revert "libgusb: Use the correct args to disable vala support" | Revert "libgusb: Use the correct args to disable vala support"
This reverts commit cb1968b5410fa415f5c6c70264ce83c4112b6d4d.
There is already vapi PACKAGECONFIG added in:
https://git.openembedded.org/meta-openembedded/commit/?id=8e816f6fd17ae4142e67b2224ef88dae97435a1c
which resolves this.
Signed-off-by: Martin Jansa <516df3ff67e1fa5d153800b15fb204c0a1a389dc@gmail.com>
Signed-off-by: Khem Raj <729d64b6f67515e258459a5f6d20ec88b2caf8df@gmail.com>
| BitBake | mit | schnitzeltony/meta-openembedded,schnitzeltony/meta-openembedded,moto-timo/meta-openembedded,openembedded/meta-openembedded,rehsack/meta-openembedded,moto-timo/meta-openembedded,openembedded/meta-openembedded,rehsack/meta-openembedded,schnitzeltony/meta-openembedded,rehsack/meta-openembedded,rehsack/meta-openembedded,openembedded/meta-openembedded,schnitzeltony/meta-openembedded,openembedded/meta-openembedded,openembedded/meta-openembedded,rehsack/meta-openembedded,rehsack/meta-openembedded,moto-timo/meta-openembedded,moto-timo/meta-openembedded,openembedded/meta-openembedded,schnitzeltony/meta-openembedded,schnitzeltony/meta-openembedded,openembedded/meta-openembedded,schnitzeltony/meta-openembedded,openembedded/meta-openembedded,rehsack/meta-openembedded,moto-timo/meta-openembedded | bitbake | ## Code Before:
SUMMARY = "GUsb is a GObject wrapper for libusb1"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
DEPENDS = "glib-2.0 libusb"
inherit meson gobject-introspection gtk-doc gettext vala
PACKAGECONFIG ??= "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vapi', '', d)}"
PACKAGECONFIG[vapi] = "-Dvapi=true,-Dvapi=false"
SRC_URI = "git://github.com/hughsie/libgusb.git;branch=main;protocol=https"
SRCREV = "db9edbd8b45662d551194a0985173732f8f557a5"
S = "${WORKDIR}/git"
PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false"
## Instruction:
Revert "libgusb: Use the correct args to disable vala support"
This reverts commit cb1968b5410fa415f5c6c70264ce83c4112b6d4d.
There is already vapi PACKAGECONFIG added in:
https://git.openembedded.org/meta-openembedded/commit/?id=8e816f6fd17ae4142e67b2224ef88dae97435a1c
which resolves this.
Signed-off-by: Martin Jansa <516df3ff67e1fa5d153800b15fb204c0a1a389dc@gmail.com>
Signed-off-by: Khem Raj <729d64b6f67515e258459a5f6d20ec88b2caf8df@gmail.com>
## Code After:
SUMMARY = "GUsb is a GObject wrapper for libusb1"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
DEPENDS = "glib-2.0 libusb"
inherit meson gobject-introspection gtk-doc gettext vala
PACKAGECONFIG ??= "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vapi', '', d)}"
PACKAGECONFIG[vapi] = "-Dvapi=true,-Dvapi=false"
SRC_URI = "git://github.com/hughsie/libgusb.git;branch=main;protocol=https"
SRCREV = "db9edbd8b45662d551194a0985173732f8f557a5"
S = "${WORKDIR}/git"
| SUMMARY = "GUsb is a GObject wrapper for libusb1"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
DEPENDS = "glib-2.0 libusb"
inherit meson gobject-introspection gtk-doc gettext vala
PACKAGECONFIG ??= "${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vapi', '', d)}"
PACKAGECONFIG[vapi] = "-Dvapi=true,-Dvapi=false"
SRC_URI = "git://github.com/hughsie/libgusb.git;branch=main;protocol=https"
SRCREV = "db9edbd8b45662d551194a0985173732f8f557a5"
S = "${WORKDIR}/git"
-
- PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false" | 2 | 0.125 | 0 | 2 |
64590261f431e181b3c8bb11cf5ac6930c73a0a9 | index.js | index.js | var exec = require('child_process').exec;
var through = require('through2');
var gutil = require('gulp-util');
var merge = require('merge');
var PluginError = gutil.PluginError;
var vnuJar = require('vnu-jar');
module.exports = function(opt) {
var vnuCmd = 'java -Xss512k -jar ' + vnuJar + ' ';
var options = merge({
'errors-only': false,
'format': 'gnu',
'html': false,
'no-stream': false,
'verbose': false,
}, opt);
// Set options
Object.keys(options).forEach(function (key) {
var val = options[key];
if (key === 'format' && val !== 'gnu') vnuCmd += '--format ' + val + ' ';
if (val === true) vnuCmd += '--' + key + ' ';
});
var stream = through.obj(function(file, enc, cb) {
if (file.isNull()) return cb(null, file);
if (file.isStream()) {
return cb(new PluginError('gulp-html', 'Streaming not supported'));
}
exec(vnuCmd + file.history, function (err, stdout, stderr) {
if (err === null) return cb(null, file);
return cb(new PluginError('gulp-html', stderr));
});
});
return stream;
};
| var exec = require('child_process').exec;
var through = require('through2');
var gutil = require('gulp-util');
var merge = require('merge');
var PluginError = gutil.PluginError;
var vnuJar = require('vnu-jar');
module.exports = function(opt) {
var vnuCmd = 'java -Xss512k -jar ' + vnuJar + ' ';
var options = merge({
'errors-only': false,
'format': 'gnu',
'html': false,
'no-stream': false,
'verbose': false,
}, opt);
// Set options
Object.keys(options).forEach(function (key) {
var val = options[key];
if (key === 'format' && val !== 'gnu') vnuCmd += '--format ' + val + ' ';
if (val === true) vnuCmd += '--' + key + ' ';
});
var stream = through.obj(function(file, enc, cb) {
if (file.isNull()) return cb(null, file);
if (file.isStream()) {
return cb(new PluginError('gulp-html', 'Streaming not supported'));
}
exec(vnuCmd + file.history, function (err, stdout, stderr) {
if (err === null) return cb(null, file);
return cb(new PluginError('gulp-html', stderr || stdout));
});
});
return stream;
};
| Use stdout when stderr is empty | Use stdout when stderr is empty
| JavaScript | mit | watilde/gulp-html,watilde/gulp-html | javascript | ## Code Before:
var exec = require('child_process').exec;
var through = require('through2');
var gutil = require('gulp-util');
var merge = require('merge');
var PluginError = gutil.PluginError;
var vnuJar = require('vnu-jar');
module.exports = function(opt) {
var vnuCmd = 'java -Xss512k -jar ' + vnuJar + ' ';
var options = merge({
'errors-only': false,
'format': 'gnu',
'html': false,
'no-stream': false,
'verbose': false,
}, opt);
// Set options
Object.keys(options).forEach(function (key) {
var val = options[key];
if (key === 'format' && val !== 'gnu') vnuCmd += '--format ' + val + ' ';
if (val === true) vnuCmd += '--' + key + ' ';
});
var stream = through.obj(function(file, enc, cb) {
if (file.isNull()) return cb(null, file);
if (file.isStream()) {
return cb(new PluginError('gulp-html', 'Streaming not supported'));
}
exec(vnuCmd + file.history, function (err, stdout, stderr) {
if (err === null) return cb(null, file);
return cb(new PluginError('gulp-html', stderr));
});
});
return stream;
};
## Instruction:
Use stdout when stderr is empty
## Code After:
var exec = require('child_process').exec;
var through = require('through2');
var gutil = require('gulp-util');
var merge = require('merge');
var PluginError = gutil.PluginError;
var vnuJar = require('vnu-jar');
module.exports = function(opt) {
var vnuCmd = 'java -Xss512k -jar ' + vnuJar + ' ';
var options = merge({
'errors-only': false,
'format': 'gnu',
'html': false,
'no-stream': false,
'verbose': false,
}, opt);
// Set options
Object.keys(options).forEach(function (key) {
var val = options[key];
if (key === 'format' && val !== 'gnu') vnuCmd += '--format ' + val + ' ';
if (val === true) vnuCmd += '--' + key + ' ';
});
var stream = through.obj(function(file, enc, cb) {
if (file.isNull()) return cb(null, file);
if (file.isStream()) {
return cb(new PluginError('gulp-html', 'Streaming not supported'));
}
exec(vnuCmd + file.history, function (err, stdout, stderr) {
if (err === null) return cb(null, file);
return cb(new PluginError('gulp-html', stderr || stdout));
});
});
return stream;
};
| var exec = require('child_process').exec;
var through = require('through2');
var gutil = require('gulp-util');
var merge = require('merge');
var PluginError = gutil.PluginError;
var vnuJar = require('vnu-jar');
module.exports = function(opt) {
var vnuCmd = 'java -Xss512k -jar ' + vnuJar + ' ';
var options = merge({
'errors-only': false,
'format': 'gnu',
'html': false,
'no-stream': false,
'verbose': false,
}, opt);
// Set options
Object.keys(options).forEach(function (key) {
var val = options[key];
if (key === 'format' && val !== 'gnu') vnuCmd += '--format ' + val + ' ';
if (val === true) vnuCmd += '--' + key + ' ';
});
var stream = through.obj(function(file, enc, cb) {
if (file.isNull()) return cb(null, file);
if (file.isStream()) {
return cb(new PluginError('gulp-html', 'Streaming not supported'));
}
exec(vnuCmd + file.history, function (err, stdout, stderr) {
if (err === null) return cb(null, file);
- return cb(new PluginError('gulp-html', stderr));
+ return cb(new PluginError('gulp-html', stderr || stdout));
? ++++++++++
});
});
return stream;
}; | 2 | 0.051282 | 1 | 1 |
7cfe48aef3115348bda0e48c21d752e703770e19 | maven-ant.xml | maven-ant.xml | <?xml version="1.0"?>
<project name="maven-ant" basedir="." xmlns:artifact="urn:maven-artifact-ant">
<property name="maven-ant.vers" value="2.1.1"/>
<property name="maven-ant.dir" value="${user.home}/.m2/ant-support"/>
<property name="maven-ant.jar" value="${maven-ant.dir}/maven-ant-tasks-${maven-ant.vers}.jar"/>
<property name="maven-ant.url"
value="http://mirrors.ibiblio.org/pub/mirrors/apache/maven/binaries"/>
<condition property="maven-ant.exists"><available file="${maven-ant.jar}"/></condition>
<target name="-download-maven-ant" unless="maven-ant.exists">
<mkdir dir="${maven-ant.dir}"/>
<get src="${maven-ant.url}/maven-ant-tasks-${maven-ant.vers}.jar"
dest="${maven-ant.jar}" usetimestamp="true"/>
</target>
<target name="-init-maven-ant" depends="-download-maven-ant">
<taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant" classpath="${maven-ant.jar}"/>
</target>
</project>
| <?xml version="1.0"?>
<project name="maven-ant" basedir="." xmlns:artifact="urn:maven-artifact-ant">
<property name="maven-ant.vers" value="2.1.3"/>
<property name="maven-ant.dir" value="${user.home}/.m2/ant-support"/>
<property name="maven-ant.jar" value="${maven-ant.dir}/maven-ant-tasks-${maven-ant.vers}.jar"/>
<property name="maven-ant.url"
value="http://mirrors.ibiblio.org/apache/maven/ant-tasks/${maven-ant.vers}/binaries/"/>
<condition property="maven-ant.exists"><available file="${maven-ant.jar}"/></condition>
<target name="-download-maven-ant" unless="maven-ant.exists">
<mkdir dir="${maven-ant.dir}"/>
<get src="${maven-ant.url}/maven-ant-tasks-${maven-ant.vers}.jar"
dest="${maven-ant.jar}" usetimestamp="true"/>
</target>
<target name="-init-maven-ant" depends="-download-maven-ant">
<taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant" classpath="${maven-ant.jar}"/>
</target>
</project>
| Update the location and version of the maven ant task | Update the location and version of the maven ant task
| XML | bsd-3-clause | threerings/game-gardens | xml | ## Code Before:
<?xml version="1.0"?>
<project name="maven-ant" basedir="." xmlns:artifact="urn:maven-artifact-ant">
<property name="maven-ant.vers" value="2.1.1"/>
<property name="maven-ant.dir" value="${user.home}/.m2/ant-support"/>
<property name="maven-ant.jar" value="${maven-ant.dir}/maven-ant-tasks-${maven-ant.vers}.jar"/>
<property name="maven-ant.url"
value="http://mirrors.ibiblio.org/pub/mirrors/apache/maven/binaries"/>
<condition property="maven-ant.exists"><available file="${maven-ant.jar}"/></condition>
<target name="-download-maven-ant" unless="maven-ant.exists">
<mkdir dir="${maven-ant.dir}"/>
<get src="${maven-ant.url}/maven-ant-tasks-${maven-ant.vers}.jar"
dest="${maven-ant.jar}" usetimestamp="true"/>
</target>
<target name="-init-maven-ant" depends="-download-maven-ant">
<taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant" classpath="${maven-ant.jar}"/>
</target>
</project>
## Instruction:
Update the location and version of the maven ant task
## Code After:
<?xml version="1.0"?>
<project name="maven-ant" basedir="." xmlns:artifact="urn:maven-artifact-ant">
<property name="maven-ant.vers" value="2.1.3"/>
<property name="maven-ant.dir" value="${user.home}/.m2/ant-support"/>
<property name="maven-ant.jar" value="${maven-ant.dir}/maven-ant-tasks-${maven-ant.vers}.jar"/>
<property name="maven-ant.url"
value="http://mirrors.ibiblio.org/apache/maven/ant-tasks/${maven-ant.vers}/binaries/"/>
<condition property="maven-ant.exists"><available file="${maven-ant.jar}"/></condition>
<target name="-download-maven-ant" unless="maven-ant.exists">
<mkdir dir="${maven-ant.dir}"/>
<get src="${maven-ant.url}/maven-ant-tasks-${maven-ant.vers}.jar"
dest="${maven-ant.jar}" usetimestamp="true"/>
</target>
<target name="-init-maven-ant" depends="-download-maven-ant">
<taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant" classpath="${maven-ant.jar}"/>
</target>
</project>
| <?xml version="1.0"?>
<project name="maven-ant" basedir="." xmlns:artifact="urn:maven-artifact-ant">
- <property name="maven-ant.vers" value="2.1.1"/>
? ^
+ <property name="maven-ant.vers" value="2.1.3"/>
? ^
<property name="maven-ant.dir" value="${user.home}/.m2/ant-support"/>
<property name="maven-ant.jar" value="${maven-ant.dir}/maven-ant-tasks-${maven-ant.vers}.jar"/>
<property name="maven-ant.url"
- value="http://mirrors.ibiblio.org/pub/mirrors/apache/maven/binaries"/>
+ value="http://mirrors.ibiblio.org/apache/maven/ant-tasks/${maven-ant.vers}/binaries/"/>
<condition property="maven-ant.exists"><available file="${maven-ant.jar}"/></condition>
<target name="-download-maven-ant" unless="maven-ant.exists">
<mkdir dir="${maven-ant.dir}"/>
<get src="${maven-ant.url}/maven-ant-tasks-${maven-ant.vers}.jar"
dest="${maven-ant.jar}" usetimestamp="true"/>
</target>
<target name="-init-maven-ant" depends="-download-maven-ant">
<taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant" classpath="${maven-ant.jar}"/>
</target>
</project> | 4 | 0.2 | 2 | 2 |
9c0a82fa20aa07697d8b170bbbfae9f2e5f2675d | bookmarklets/tumblr-share.js | bookmarklets/tumblr-share.js | ((window, document) => {
const encode = window.encodeURIComponent;
const $ = document.querySelector.bind(document);
const $$ = document.querySelectorAll.bind(document);
const url = ((t=$("link[rel=canonical]")) && t.href)
|| ((t=$('meta[property="og:url"],meta[property="twitter:url"]')) && t.content)
|| location.href;
const title = document.title;
const q = {
url: encode(url),
caption: encode(`<a href="${url}">${title}</a>`),
};
// extract imgage
// twitter
const query = "#permalink-overlay [data-element-context='platform_photo_card'] img";
const imgs = Array.from($$(query))
.map(i => i.src + ":orig");
if (imgs.length !== 0) {
q.posttype = "photo";
q.content = imgs.map(encode).join(",");
}
window.open('https://www.tumblr.com/widgets/share/tool?'+Object.entries(q).map(e => e.join("=")).join("&"),
'_blank');
})(window, document);
| ((window, document) => {
const encode = window.encodeURIComponent;
const $ = document.querySelector.bind(document);
const $$ = document.querySelectorAll.bind(document);
const url = ((t=$("link[rel=canonical]")) && t.href)
|| ((t=$('meta[property="og:url"],meta[property="twitter:url"]')) && t.content)
|| location.href;
const title = document.title;
const q = {
url: encode(url),
caption: encode(`<a href="${url}">${title}</a>`),
};
// extract imgage
// twitter
const query = "#permalink-overlay [data-element-context='platform_photo_card'] img";
const imgs = Array.from($$(query))
.map(i => i.src + ":orig");
if (imgs.length !== 0) {
q.posttype = "photo";
q.content = imgs.map(encode).join(",");
}
const tumblr = 'https://www.tumblr.com/widgets/share/tool?'
+Object.entries(q).map(e => e.join("=")).join("&");
const height = screen && screen.height || 600;
window.open(tumblr, null, `height=${height},width=540`);
})(window, document);
| Use external window for tumlr share | Use external window for tumlr share
| JavaScript | unlicense | kui/dotfiles,kui/dotfiles,kui/dotfiles,kui/dotfiles | javascript | ## Code Before:
((window, document) => {
const encode = window.encodeURIComponent;
const $ = document.querySelector.bind(document);
const $$ = document.querySelectorAll.bind(document);
const url = ((t=$("link[rel=canonical]")) && t.href)
|| ((t=$('meta[property="og:url"],meta[property="twitter:url"]')) && t.content)
|| location.href;
const title = document.title;
const q = {
url: encode(url),
caption: encode(`<a href="${url}">${title}</a>`),
};
// extract imgage
// twitter
const query = "#permalink-overlay [data-element-context='platform_photo_card'] img";
const imgs = Array.from($$(query))
.map(i => i.src + ":orig");
if (imgs.length !== 0) {
q.posttype = "photo";
q.content = imgs.map(encode).join(",");
}
window.open('https://www.tumblr.com/widgets/share/tool?'+Object.entries(q).map(e => e.join("=")).join("&"),
'_blank');
})(window, document);
## Instruction:
Use external window for tumlr share
## Code After:
((window, document) => {
const encode = window.encodeURIComponent;
const $ = document.querySelector.bind(document);
const $$ = document.querySelectorAll.bind(document);
const url = ((t=$("link[rel=canonical]")) && t.href)
|| ((t=$('meta[property="og:url"],meta[property="twitter:url"]')) && t.content)
|| location.href;
const title = document.title;
const q = {
url: encode(url),
caption: encode(`<a href="${url}">${title}</a>`),
};
// extract imgage
// twitter
const query = "#permalink-overlay [data-element-context='platform_photo_card'] img";
const imgs = Array.from($$(query))
.map(i => i.src + ":orig");
if (imgs.length !== 0) {
q.posttype = "photo";
q.content = imgs.map(encode).join(",");
}
const tumblr = 'https://www.tumblr.com/widgets/share/tool?'
+Object.entries(q).map(e => e.join("=")).join("&");
const height = screen && screen.height || 600;
window.open(tumblr, null, `height=${height},width=540`);
})(window, document);
| ((window, document) => {
const encode = window.encodeURIComponent;
const $ = document.querySelector.bind(document);
const $$ = document.querySelectorAll.bind(document);
const url = ((t=$("link[rel=canonical]")) && t.href)
|| ((t=$('meta[property="og:url"],meta[property="twitter:url"]')) && t.content)
|| location.href;
const title = document.title;
const q = {
url: encode(url),
caption: encode(`<a href="${url}">${title}</a>`),
};
// extract imgage
// twitter
const query = "#permalink-overlay [data-element-context='platform_photo_card'] img";
const imgs = Array.from($$(query))
.map(i => i.src + ":orig");
if (imgs.length !== 0) {
q.posttype = "photo";
q.content = imgs.map(encode).join(",");
}
- window.open('https://www.tumblr.com/widgets/share/tool?'+Object.entries(q).map(e => e.join("=")).join("&"),
- '_blank');
+ const tumblr = 'https://www.tumblr.com/widgets/share/tool?'
+ +Object.entries(q).map(e => e.join("=")).join("&");
+ const height = screen && screen.height || 600;
+ window.open(tumblr, null, `height=${height},width=540`);
})(window, document); | 6 | 0.222222 | 4 | 2 |
d4a464f02df7ef674f159a96f5b0bbe018a92079 | capistrano.gemspec | capistrano.gemspec | require './lib/capistrano/version'
Gem::Specification.new do |s|
s.name = 'capistrano'
s.version = PKG_VERSION
s.platform = Gem::Platform::RUBY
s.summary = <<-DESC.strip.gsub(/\n\s+/, " ")
Capistrano is a framework and utility for executing commands in parallel
on multiple remote machines, via SSH. The primary goal is to simplify and
automate the deployment of web applications.
DESC
s.files = Dir.glob("{bin,lib,examples,test}/**/*")
s.files.concat %w(README MIT-LICENSE ChangeLog)
s.require_path = 'lib'
s.autorequire = 'capistrano'
s.bindir = "bin"
s.executables << "cap"
s.add_dependency 'rake', ">= 0.7.0"
s.add_dependency 'net-ssh', ">= #{Capistrano::Version::SSH_REQUIRED.join(".")}"
s.add_dependency 'net-sftp', ">= #{Capistrano::Version::SFTP_REQUIRED.join(".")}"
s.author = "Jamis Buck"
s.email = "jamis@37signals.com"
s.homepage = "http://www.rubyonrails.org"
end
| require './lib/capistrano/version'
Gem::Specification.new do |s|
s.name = 'capistrano'
s.version = PKG_VERSION
s.platform = Gem::Platform::RUBY
s.summary = <<-DESC.strip.gsub(/\n\s+/, " ")
Capistrano is a framework and utility for executing commands in parallel
on multiple remote machines, via SSH. The primary goal is to simplify and
automate the deployment of web applications.
DESC
s.files = Dir.glob("{bin,lib,examples,test}/**/*") + %w(README MIT-LICENSE CHANGELOG THANKS)
s.require_path = 'lib'
s.autorequire = 'capistrano'
s.bindir = "bin"
s.executables << "cap"
s.add_dependency 'rake', ">= 0.7.0"
s.add_dependency 'net-ssh', ">= #{Capistrano::Version::SSH_REQUIRED.join(".")}"
s.add_dependency 'net-sftp', ">= #{Capistrano::Version::SFTP_REQUIRED.join(".")}"
s.author = "Jamis Buck"
s.email = "jamis@37signals.com"
s.homepage = "http://www.rubyonrails.org"
end
| Fix gemspec to include license file, etc. | Fix gemspec to include license file, etc.
git-svn-id: 9d685678486d2699cf6cf82c17578cbe0280bb1f@4832 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
| Ruby | mit | ascarter/capistrano,dstrctrng/alpha_omega,dstrctrng/alpha_omega,halorgium/capistrano | ruby | ## Code Before:
require './lib/capistrano/version'
Gem::Specification.new do |s|
s.name = 'capistrano'
s.version = PKG_VERSION
s.platform = Gem::Platform::RUBY
s.summary = <<-DESC.strip.gsub(/\n\s+/, " ")
Capistrano is a framework and utility for executing commands in parallel
on multiple remote machines, via SSH. The primary goal is to simplify and
automate the deployment of web applications.
DESC
s.files = Dir.glob("{bin,lib,examples,test}/**/*")
s.files.concat %w(README MIT-LICENSE ChangeLog)
s.require_path = 'lib'
s.autorequire = 'capistrano'
s.bindir = "bin"
s.executables << "cap"
s.add_dependency 'rake', ">= 0.7.0"
s.add_dependency 'net-ssh', ">= #{Capistrano::Version::SSH_REQUIRED.join(".")}"
s.add_dependency 'net-sftp', ">= #{Capistrano::Version::SFTP_REQUIRED.join(".")}"
s.author = "Jamis Buck"
s.email = "jamis@37signals.com"
s.homepage = "http://www.rubyonrails.org"
end
## Instruction:
Fix gemspec to include license file, etc.
git-svn-id: 9d685678486d2699cf6cf82c17578cbe0280bb1f@4832 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
## Code After:
require './lib/capistrano/version'
Gem::Specification.new do |s|
s.name = 'capistrano'
s.version = PKG_VERSION
s.platform = Gem::Platform::RUBY
s.summary = <<-DESC.strip.gsub(/\n\s+/, " ")
Capistrano is a framework and utility for executing commands in parallel
on multiple remote machines, via SSH. The primary goal is to simplify and
automate the deployment of web applications.
DESC
s.files = Dir.glob("{bin,lib,examples,test}/**/*") + %w(README MIT-LICENSE CHANGELOG THANKS)
s.require_path = 'lib'
s.autorequire = 'capistrano'
s.bindir = "bin"
s.executables << "cap"
s.add_dependency 'rake', ">= 0.7.0"
s.add_dependency 'net-ssh', ">= #{Capistrano::Version::SSH_REQUIRED.join(".")}"
s.add_dependency 'net-sftp', ">= #{Capistrano::Version::SFTP_REQUIRED.join(".")}"
s.author = "Jamis Buck"
s.email = "jamis@37signals.com"
s.homepage = "http://www.rubyonrails.org"
end
| require './lib/capistrano/version'
Gem::Specification.new do |s|
s.name = 'capistrano'
s.version = PKG_VERSION
s.platform = Gem::Platform::RUBY
s.summary = <<-DESC.strip.gsub(/\n\s+/, " ")
Capistrano is a framework and utility for executing commands in parallel
on multiple remote machines, via SSH. The primary goal is to simplify and
automate the deployment of web applications.
DESC
+ s.files = Dir.glob("{bin,lib,examples,test}/**/*") + %w(README MIT-LICENSE CHANGELOG THANKS)
- s.files = Dir.glob("{bin,lib,examples,test}/**/*")
- s.files.concat %w(README MIT-LICENSE ChangeLog)
s.require_path = 'lib'
s.autorequire = 'capistrano'
s.bindir = "bin"
s.executables << "cap"
s.add_dependency 'rake', ">= 0.7.0"
s.add_dependency 'net-ssh', ">= #{Capistrano::Version::SSH_REQUIRED.join(".")}"
s.add_dependency 'net-sftp', ">= #{Capistrano::Version::SFTP_REQUIRED.join(".")}"
s.author = "Jamis Buck"
s.email = "jamis@37signals.com"
s.homepage = "http://www.rubyonrails.org"
end | 3 | 0.096774 | 1 | 2 |
2d0e01f41420efa222ff0fe3a068fa6e231dfd35 | installation_instructions.txt | installation_instructions.txt | 1. Requirements: http://ph7cms.com/doc/en/requirements
2. Installation: http://ph7cms.com/doc/en/install
3. Once you finished the installation, your admin panel URL will be: http://YOUR-PH7CMS-SITE.com/admin123/ | 1. Requirements: http://ph7cms.com/doc/en/requirements
2. Installation: http://ph7cms.com/doc/en/install
3. Once you finished the installation, your admin panel URL will be: http://YOUR-PH7CMS-SITE.com/admin123
--- Good Hosting ---
http://ph7cms.com/hosting/
--- Useful doc ---
Documentation: http://ph7cms.com/doc/
Knowledgebase: http://clients.hizup.com/knowledgebase.php
--- If you hold pH7CMSPro (http://ph7cms.com/pro) ---
Your member area is: http://clients.hizup.com/clientarea.php | Add more useful details after, when the installation is finished | Add more useful details after, when the installation is finished
| Text | mit | pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS | text | ## Code Before:
1. Requirements: http://ph7cms.com/doc/en/requirements
2. Installation: http://ph7cms.com/doc/en/install
3. Once you finished the installation, your admin panel URL will be: http://YOUR-PH7CMS-SITE.com/admin123/
## Instruction:
Add more useful details after, when the installation is finished
## Code After:
1. Requirements: http://ph7cms.com/doc/en/requirements
2. Installation: http://ph7cms.com/doc/en/install
3. Once you finished the installation, your admin panel URL will be: http://YOUR-PH7CMS-SITE.com/admin123
--- Good Hosting ---
http://ph7cms.com/hosting/
--- Useful doc ---
Documentation: http://ph7cms.com/doc/
Knowledgebase: http://clients.hizup.com/knowledgebase.php
--- If you hold pH7CMSPro (http://ph7cms.com/pro) ---
Your member area is: http://clients.hizup.com/clientarea.php | 1. Requirements: http://ph7cms.com/doc/en/requirements
2. Installation: http://ph7cms.com/doc/en/install
- 3. Once you finished the installation, your admin panel URL will be: http://YOUR-PH7CMS-SITE.com/admin123/
? -
+ 3. Once you finished the installation, your admin panel URL will be: http://YOUR-PH7CMS-SITE.com/admin123
+
+ --- Good Hosting ---
+ http://ph7cms.com/hosting/
+
+ --- Useful doc ---
+ Documentation: http://ph7cms.com/doc/
+ Knowledgebase: http://clients.hizup.com/knowledgebase.php
+
+ --- If you hold pH7CMSPro (http://ph7cms.com/pro) ---
+ Your member area is: http://clients.hizup.com/clientarea.php | 12 | 4 | 11 | 1 |
c1579779f1267ad942bc9b293c5880396b05e155 | .travis.yml | .travis.yml | language: bash
sudo: required
addons:
apt:
sources:
- debian-sid
packages:
- shellcheck
before_install:
- sudo add-apt-repository ppa:duggan/bats -y
- sudo apt-get -qq update
- sudo apt-get install -y bats jq
script:
- ./test.sh
| language: bash
sudo: required
# addons:
# apt:
# sources:
# - debian-sid
# packages:
# - shellcheck
#
# before_install:
# - sudo add-apt-repository ppa:duggan/bats -y
# - sudo apt-get -qq update
# - sudo apt-get install -y bats jq
script:
- ./test.sh
| Fix apt dependencies issues on TRAVIS | Fix apt dependencies issues on TRAVIS
| YAML | mit | Josef-Friedrich/Hue-shell,Josef-Friedrich/Hue-shell | yaml | ## Code Before:
language: bash
sudo: required
addons:
apt:
sources:
- debian-sid
packages:
- shellcheck
before_install:
- sudo add-apt-repository ppa:duggan/bats -y
- sudo apt-get -qq update
- sudo apt-get install -y bats jq
script:
- ./test.sh
## Instruction:
Fix apt dependencies issues on TRAVIS
## Code After:
language: bash
sudo: required
# addons:
# apt:
# sources:
# - debian-sid
# packages:
# - shellcheck
#
# before_install:
# - sudo add-apt-repository ppa:duggan/bats -y
# - sudo apt-get -qq update
# - sudo apt-get install -y bats jq
script:
- ./test.sh
| language: bash
sudo: required
- addons:
+ # addons:
? ++
- apt:
+ # apt:
? ++
- sources:
+ # sources:
? ++
- - debian-sid
+ # - debian-sid
? ++
- packages:
+ # packages:
? ++
- - shellcheck
+ # - shellcheck
? ++
-
+ #
- before_install:
+ # before_install:
? ++
- - sudo add-apt-repository ppa:duggan/bats -y
+ # - sudo add-apt-repository ppa:duggan/bats -y
? ++
- - sudo apt-get -qq update
+ # - sudo apt-get -qq update
? ++
- - sudo apt-get install -y bats jq
+ # - sudo apt-get install -y bats jq
? ++
script:
- ./test.sh | 22 | 1.375 | 11 | 11 |
22f0702ccb5f08d94ee00690bad0145316be258c | metadata/com.willhauck.linconnectclient.txt | metadata/com.willhauck.linconnectclient.txt | Categories:System
License:GPLv3
Web Site:
Source Code:https://github.com/hauckwill/linconnect-client
Issue Tracker:https://github.com/hauckwill/linconnect-client/issues
Auto Name:LinConnect
Summary:Mirror notifications to desktop
Description:
Install the server on the desktop: see the source code page.
* Extremely simple setup
* Integrated with Linux desktop icon theme
* Uses LibNotify and Python for compatibility
Encryption isn't yet supported.
Status: Alpha
.
Repo Type:git
Repo:https://github.com/hauckwill/linconnect-client.git
Build:2.13,7
commit=0d2e7bd73564b6
subdir=LinConnectClient
srclibs=1:Changelog-cketti@v1.2.0
target=android-19
Build:2.20,220
commit=66e3aa62
subdir=LinConnectClient
srclibs=1:Changelog-cketti@v1.2.0
target=android-19
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:2.20
Current Version Code:220
| Categories:System
License:GPLv3
Web Site:
Source Code:https://github.com/hauckwill/linconnect-client
Issue Tracker:https://github.com/hauckwill/linconnect-client/issues
Auto Name:LinConnect
Summary:Mirror notifications to desktop
Description:
Install the server on the desktop: see the source code page.
* Extremely simple setup
* Integrated with Linux desktop icon theme
* Uses LibNotify and Python for compatibility
Encryption isn't yet supported.
Status: Alpha
.
Repo Type:git
Repo:https://github.com/hauckwill/linconnect-client.git
Build:2.13,7
commit=0d2e7bd73564b6
subdir=LinConnectClient
srclibs=1:Changelog-cketti@v1.2.0
target=android-19
Build:2.20,220
commit=66e3aa62
subdir=LinConnectClient
srclibs=1:Changelog-cketti@v1.2.0
target=android-19
Build:2.21,221
commit=04deb2f350e522e527a595b537bf63b17cb77559
subdir=LinConnectClient
srclibs=1:Changelog-cketti@v1.2.2
target=android-21
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:2.21
Current Version Code:221
| Update LinConnect to 2.21 (221) | Update LinConnect to 2.21 (221)
| Text | agpl-3.0 | f-droid/fdroid-data,f-droid/fdroiddata,f-droid/fdroiddata | text | ## Code Before:
Categories:System
License:GPLv3
Web Site:
Source Code:https://github.com/hauckwill/linconnect-client
Issue Tracker:https://github.com/hauckwill/linconnect-client/issues
Auto Name:LinConnect
Summary:Mirror notifications to desktop
Description:
Install the server on the desktop: see the source code page.
* Extremely simple setup
* Integrated with Linux desktop icon theme
* Uses LibNotify and Python for compatibility
Encryption isn't yet supported.
Status: Alpha
.
Repo Type:git
Repo:https://github.com/hauckwill/linconnect-client.git
Build:2.13,7
commit=0d2e7bd73564b6
subdir=LinConnectClient
srclibs=1:Changelog-cketti@v1.2.0
target=android-19
Build:2.20,220
commit=66e3aa62
subdir=LinConnectClient
srclibs=1:Changelog-cketti@v1.2.0
target=android-19
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:2.20
Current Version Code:220
## Instruction:
Update LinConnect to 2.21 (221)
## Code After:
Categories:System
License:GPLv3
Web Site:
Source Code:https://github.com/hauckwill/linconnect-client
Issue Tracker:https://github.com/hauckwill/linconnect-client/issues
Auto Name:LinConnect
Summary:Mirror notifications to desktop
Description:
Install the server on the desktop: see the source code page.
* Extremely simple setup
* Integrated with Linux desktop icon theme
* Uses LibNotify and Python for compatibility
Encryption isn't yet supported.
Status: Alpha
.
Repo Type:git
Repo:https://github.com/hauckwill/linconnect-client.git
Build:2.13,7
commit=0d2e7bd73564b6
subdir=LinConnectClient
srclibs=1:Changelog-cketti@v1.2.0
target=android-19
Build:2.20,220
commit=66e3aa62
subdir=LinConnectClient
srclibs=1:Changelog-cketti@v1.2.0
target=android-19
Build:2.21,221
commit=04deb2f350e522e527a595b537bf63b17cb77559
subdir=LinConnectClient
srclibs=1:Changelog-cketti@v1.2.2
target=android-21
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:2.21
Current Version Code:221
| Categories:System
License:GPLv3
Web Site:
Source Code:https://github.com/hauckwill/linconnect-client
Issue Tracker:https://github.com/hauckwill/linconnect-client/issues
Auto Name:LinConnect
Summary:Mirror notifications to desktop
Description:
Install the server on the desktop: see the source code page.
* Extremely simple setup
* Integrated with Linux desktop icon theme
* Uses LibNotify and Python for compatibility
Encryption isn't yet supported.
Status: Alpha
.
Repo Type:git
Repo:https://github.com/hauckwill/linconnect-client.git
Build:2.13,7
commit=0d2e7bd73564b6
subdir=LinConnectClient
srclibs=1:Changelog-cketti@v1.2.0
target=android-19
Build:2.20,220
commit=66e3aa62
subdir=LinConnectClient
srclibs=1:Changelog-cketti@v1.2.0
target=android-19
+ Build:2.21,221
+ commit=04deb2f350e522e527a595b537bf63b17cb77559
+ subdir=LinConnectClient
+ srclibs=1:Changelog-cketti@v1.2.2
+ target=android-21
+
Auto Update Mode:None
Update Check Mode:RepoManifest
- Current Version:2.20
? ^
+ Current Version:2.21
? ^
- Current Version Code:220
? ^
+ Current Version Code:221
? ^
| 10 | 0.25 | 8 | 2 |
f4972dd70f0d23c6c66533a077a19eaf8419a7a9 | tests/integration/components/bs-datetimepicker-test.js | tests/integration/components/bs-datetimepicker-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('bs-datetimepicker', 'Integration | Component | bs datetimepicker', {
integration: true
});
test('it renders iconClasses and iconText', function(assert) {
assert.expect(2);
this.render(hbs`{{bs-datetimepicker date='01/01/2016' classes='material-icons' iconText='date-range'}}`);
assert.equal(this.$('.input-group-addon i').attr('class'), 'material-icons');
// Slice off the zero-width-non-joiner character
assert.equal(this.$('.input-group-addon i').text().trim().slice(0, -1), 'date-range');
});
test('it renders with default icon classes', function(assert) {
assert.expect(1);
this.render(hbs`{{bs-datetimepicker date='01/01/2016'}}`);
assert.equal(this.$('.input-group-addon i').attr('class'), 'glyphicon glyphicon-calendar');
});
| import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('bs-datetimepicker', 'Integration | Component | bs datetimepicker', {
integration: true
});
test('it renders iconClasses and iconText', function(assert) {
assert.expect(2);
this.render(hbs`{{bs-datetimepicker date='01/01/2016' iconClasses='material-icons' iconText='date-range'}}`);
assert.equal(this.$('.input-group-addon i').attr('class'), 'material-icons');
assert.equal(this.$('.input-group-addon i').text().trim(), 'date-range');
});
test('it renders with default icon classes', function(assert) {
assert.expect(1);
this.render(hbs`{{bs-datetimepicker date='01/01/2016'}}`);
assert.equal(this.$('.input-group-addon i').attr('class'), 'glyphicon glyphicon-calendar');
});
| Fix `iconClasses` and `iconText` tests | Fix `iconClasses` and `iconText` tests
| JavaScript | mit | asux/ember-cli-bootstrap-datetimepicker,btecu/ember-cli-bootstrap-datetimepicker,asux/ember-cli-bootstrap-datetimepicker,btecu/ember-cli-bootstrap-datetimepicker | javascript | ## Code Before:
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('bs-datetimepicker', 'Integration | Component | bs datetimepicker', {
integration: true
});
test('it renders iconClasses and iconText', function(assert) {
assert.expect(2);
this.render(hbs`{{bs-datetimepicker date='01/01/2016' classes='material-icons' iconText='date-range'}}`);
assert.equal(this.$('.input-group-addon i').attr('class'), 'material-icons');
// Slice off the zero-width-non-joiner character
assert.equal(this.$('.input-group-addon i').text().trim().slice(0, -1), 'date-range');
});
test('it renders with default icon classes', function(assert) {
assert.expect(1);
this.render(hbs`{{bs-datetimepicker date='01/01/2016'}}`);
assert.equal(this.$('.input-group-addon i').attr('class'), 'glyphicon glyphicon-calendar');
});
## Instruction:
Fix `iconClasses` and `iconText` tests
## Code After:
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('bs-datetimepicker', 'Integration | Component | bs datetimepicker', {
integration: true
});
test('it renders iconClasses and iconText', function(assert) {
assert.expect(2);
this.render(hbs`{{bs-datetimepicker date='01/01/2016' iconClasses='material-icons' iconText='date-range'}}`);
assert.equal(this.$('.input-group-addon i').attr('class'), 'material-icons');
assert.equal(this.$('.input-group-addon i').text().trim(), 'date-range');
});
test('it renders with default icon classes', function(assert) {
assert.expect(1);
this.render(hbs`{{bs-datetimepicker date='01/01/2016'}}`);
assert.equal(this.$('.input-group-addon i').attr('class'), 'glyphicon glyphicon-calendar');
});
| import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('bs-datetimepicker', 'Integration | Component | bs datetimepicker', {
integration: true
});
test('it renders iconClasses and iconText', function(assert) {
assert.expect(2);
- this.render(hbs`{{bs-datetimepicker date='01/01/2016' classes='material-icons' iconText='date-range'}}`);
+ this.render(hbs`{{bs-datetimepicker date='01/01/2016' iconClasses='material-icons' iconText='date-range'}}`);
? + +++
assert.equal(this.$('.input-group-addon i').attr('class'), 'material-icons');
- // Slice off the zero-width-non-joiner character
- assert.equal(this.$('.input-group-addon i').text().trim().slice(0, -1), 'date-range');
? -------------
+ assert.equal(this.$('.input-group-addon i').text().trim(), 'date-range');
});
test('it renders with default icon classes', function(assert) {
assert.expect(1);
this.render(hbs`{{bs-datetimepicker date='01/01/2016'}}`);
assert.equal(this.$('.input-group-addon i').attr('class'), 'glyphicon glyphicon-calendar');
}); | 5 | 0.208333 | 2 | 3 |
fa14501694570c745c323e9537fb7947a70da783 | src/CMakeLists.txt | src/CMakeLists.txt | include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/src
${mosquitto_SOURCE_DIR}/lib)
add_executable(mosquitto
bridge.c
conf.c
context.c
database.c
logging.c
../lib/memory_mosq.c ../lib/memory_mosq.h
mosquitto.c
mqtt3.h
net.c
../lib/net_mosq.c ../lib/net_mosq.h
raw_send.c raw_send_client.c raw_send_server.c
read_handle.c read_handle_client.c read_handle_server.c
util.c
../lib/util_mosq.c ../lib/util_mosq.h)
add_definitions (-DWITH_BROKER)
target_link_libraries(mosquitto sqlite3)
set_target_properties(mosquitto PROPERTIES
VERSION ${VERSION})
install(TARGETS mosquitto RUNTIME DESTINATION ${BINDEST} LIBRARY DESTINATION ${LIBDEST})
if (UNIX)
install(CODE "EXEC_PROGRAM(/sbin/ldconfig)")
endif (UNIX)
| include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/src
${mosquitto_SOURCE_DIR}/lib)
add_executable(mosquitto
bridge.c
conf.c
context.c
database.c
logging.c
../lib/memory_mosq.c ../lib/memory_mosq.h
mosquitto.c
mqtt3.h
net.c
../lib/net_mosq.c ../lib/net_mosq.h
raw_send.c raw_send_client.c raw_send_server.c
read_handle.c read_handle_client.c read_handle_server.c
util.c
../lib/util_mosq.c ../lib/util_mosq.h)
option(USE_LIBWRAP
"Include tcp-wrappers support?" OFF)
option(INC_DB_UPGRADE
"Include database upgrade support? (recommended)" ON)
option(INC_REGEX
"Include topic regex matching support? (recommended)" ON)
option(INC_MEMTRACK
"Include memory tracking support?" ON)
add_definitions (-DWITH_BROKER)
target_link_libraries(mosquitto sqlite3)
set_target_properties(mosquitto PROPERTIES
VERSION ${VERSION})
install(TARGETS mosquitto RUNTIME DESTINATION ${BINDEST} LIBRARY DESTINATION ${LIBDEST})
if (UNIX)
install(CODE "EXEC_PROGRAM(/sbin/ldconfig)")
endif (UNIX)
| Add options list for compiling broker under CMake. | Add options list for compiling broker under CMake.
| Text | bsd-3-clause | zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto | text | ## Code Before:
include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/src
${mosquitto_SOURCE_DIR}/lib)
add_executable(mosquitto
bridge.c
conf.c
context.c
database.c
logging.c
../lib/memory_mosq.c ../lib/memory_mosq.h
mosquitto.c
mqtt3.h
net.c
../lib/net_mosq.c ../lib/net_mosq.h
raw_send.c raw_send_client.c raw_send_server.c
read_handle.c read_handle_client.c read_handle_server.c
util.c
../lib/util_mosq.c ../lib/util_mosq.h)
add_definitions (-DWITH_BROKER)
target_link_libraries(mosquitto sqlite3)
set_target_properties(mosquitto PROPERTIES
VERSION ${VERSION})
install(TARGETS mosquitto RUNTIME DESTINATION ${BINDEST} LIBRARY DESTINATION ${LIBDEST})
if (UNIX)
install(CODE "EXEC_PROGRAM(/sbin/ldconfig)")
endif (UNIX)
## Instruction:
Add options list for compiling broker under CMake.
## Code After:
include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/src
${mosquitto_SOURCE_DIR}/lib)
add_executable(mosquitto
bridge.c
conf.c
context.c
database.c
logging.c
../lib/memory_mosq.c ../lib/memory_mosq.h
mosquitto.c
mqtt3.h
net.c
../lib/net_mosq.c ../lib/net_mosq.h
raw_send.c raw_send_client.c raw_send_server.c
read_handle.c read_handle_client.c read_handle_server.c
util.c
../lib/util_mosq.c ../lib/util_mosq.h)
option(USE_LIBWRAP
"Include tcp-wrappers support?" OFF)
option(INC_DB_UPGRADE
"Include database upgrade support? (recommended)" ON)
option(INC_REGEX
"Include topic regex matching support? (recommended)" ON)
option(INC_MEMTRACK
"Include memory tracking support?" ON)
add_definitions (-DWITH_BROKER)
target_link_libraries(mosquitto sqlite3)
set_target_properties(mosquitto PROPERTIES
VERSION ${VERSION})
install(TARGETS mosquitto RUNTIME DESTINATION ${BINDEST} LIBRARY DESTINATION ${LIBDEST})
if (UNIX)
install(CODE "EXEC_PROGRAM(/sbin/ldconfig)")
endif (UNIX)
| include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/src
${mosquitto_SOURCE_DIR}/lib)
add_executable(mosquitto
bridge.c
conf.c
context.c
database.c
logging.c
../lib/memory_mosq.c ../lib/memory_mosq.h
mosquitto.c
mqtt3.h
net.c
../lib/net_mosq.c ../lib/net_mosq.h
raw_send.c raw_send_client.c raw_send_server.c
read_handle.c read_handle_client.c read_handle_server.c
util.c
../lib/util_mosq.c ../lib/util_mosq.h)
+ option(USE_LIBWRAP
+ "Include tcp-wrappers support?" OFF)
+ option(INC_DB_UPGRADE
+ "Include database upgrade support? (recommended)" ON)
+ option(INC_REGEX
+ "Include topic regex matching support? (recommended)" ON)
+ option(INC_MEMTRACK
+ "Include memory tracking support?" ON)
+
add_definitions (-DWITH_BROKER)
target_link_libraries(mosquitto sqlite3)
set_target_properties(mosquitto PROPERTIES
VERSION ${VERSION})
install(TARGETS mosquitto RUNTIME DESTINATION ${BINDEST} LIBRARY DESTINATION ${LIBDEST})
if (UNIX)
install(CODE "EXEC_PROGRAM(/sbin/ldconfig)")
endif (UNIX)
| 9 | 0.3 | 9 | 0 |
5e07e41c6e9f21a9ce204661fc22941127f4032c | .travis.yml | .travis.yml | sudo: false
language: java
jdk: oraclejdk8
cache:
directories:
- $HOME/.m2
env: DISPLAY=:99.0
addons:
apt:
packages:
- metacity
before_install:
# maven version is 3.2.5 by default on travis. Polyglot projects need Maven 3.3.1
- wget https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip
- unzip -qq apache-maven-3.3.9-bin.zip
- export M2_HOME=$PWD/apache-maven-3.3.9
- export PATH=$M2_HOME/bin:$PATH
install: true
before_script:
- sh -e /etc/init.d/xvfb start
- metacity --sm-disable --replace 2> metacity.err &
script:
- export
- mvn clean verify -P release-mesfavoris
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/ef692f2d5da17132be34
on_success: change
on_failure: always
on_start: never
| sudo: false
language: java
jdk: oraclejdk8
cache:
directories:
- $HOME/.m2
env: DISPLAY=:99.0
addons:
apt:
packages:
- metacity
- oracle-java8-installer
before_install:
# maven version is 3.2.5 by default on travis. Polyglot projects need Maven 3.3.1
- wget https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip
- unzip -qq apache-maven-3.3.9-bin.zip
- export M2_HOME=$PWD/apache-maven-3.3.9
- export PATH=$M2_HOME/bin:$PATH
install: true
before_script:
- sh -e /etc/init.d/xvfb start
- metacity --sm-disable --replace 2> metacity.err &
script:
- export
- mvn clean verify -P release-mesfavoris
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/ef692f2d5da17132be34
on_success: change
on_failure: always
on_start: never
| Include hack to run a newer JDK 8 | Include hack to run a newer JDK 8
see: travis-ci/travis-ci#3259 | YAML | epl-1.0 | cchabanois/mesfavoris,cchabanois/mesfavoris | yaml | ## Code Before:
sudo: false
language: java
jdk: oraclejdk8
cache:
directories:
- $HOME/.m2
env: DISPLAY=:99.0
addons:
apt:
packages:
- metacity
before_install:
# maven version is 3.2.5 by default on travis. Polyglot projects need Maven 3.3.1
- wget https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip
- unzip -qq apache-maven-3.3.9-bin.zip
- export M2_HOME=$PWD/apache-maven-3.3.9
- export PATH=$M2_HOME/bin:$PATH
install: true
before_script:
- sh -e /etc/init.d/xvfb start
- metacity --sm-disable --replace 2> metacity.err &
script:
- export
- mvn clean verify -P release-mesfavoris
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/ef692f2d5da17132be34
on_success: change
on_failure: always
on_start: never
## Instruction:
Include hack to run a newer JDK 8
see: travis-ci/travis-ci#3259
## Code After:
sudo: false
language: java
jdk: oraclejdk8
cache:
directories:
- $HOME/.m2
env: DISPLAY=:99.0
addons:
apt:
packages:
- metacity
- oracle-java8-installer
before_install:
# maven version is 3.2.5 by default on travis. Polyglot projects need Maven 3.3.1
- wget https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip
- unzip -qq apache-maven-3.3.9-bin.zip
- export M2_HOME=$PWD/apache-maven-3.3.9
- export PATH=$M2_HOME/bin:$PATH
install: true
before_script:
- sh -e /etc/init.d/xvfb start
- metacity --sm-disable --replace 2> metacity.err &
script:
- export
- mvn clean verify -P release-mesfavoris
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/ef692f2d5da17132be34
on_success: change
on_failure: always
on_start: never
| sudo: false
language: java
-
jdk: oraclejdk8
cache:
directories:
- $HOME/.m2
env: DISPLAY=:99.0
addons:
apt:
packages:
- metacity
+ - oracle-java8-installer
before_install:
# maven version is 3.2.5 by default on travis. Polyglot projects need Maven 3.3.1
- wget https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip
- unzip -qq apache-maven-3.3.9-bin.zip
- export M2_HOME=$PWD/apache-maven-3.3.9
- export PATH=$M2_HOME/bin:$PATH
install: true
before_script:
- sh -e /etc/init.d/xvfb start
- metacity --sm-disable --replace 2> metacity.err &
script:
- export
- mvn clean verify -P release-mesfavoris
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/ef692f2d5da17132be34
on_success: change
on_failure: always
on_start: never | 2 | 0.04878 | 1 | 1 |
ca223de9eafbf0442e1d7c00e30f5f5f1d5399a1 | README.md | README.md |

## Overview
RecordScreen-iOS9+ is a project which implements screen recording in iOS9 and above.
## Feature
a.A video recording your screen in your app with ReplayKit.
b.Red dots indicating user action.
c.A log file for user action locating in the /path-to-your-app's-document-directory/nkrecordscreen/log.txt.
### Usage
The code works automatically by observing notification and saves video timingly.So import the codes under RecordScreen into your project and it works!
### Flaws
Apple's ReplayKit seems to hide some content when recording, like the statusbar, UIActionSheet,etc. I guess it might due to their consideration to user's privacy.
On the other side, I did some kind of method swizzle in order to save the video automatically, that is to say, it might be rejected by the review team for use of private api.You can disable it by remove those method-swizzle-related category codes if needed.
#### License
RecordScreen-iOS9+ is released under the MIT license. See LICENSE for details.
|

## Overview
RecordScreen-iOS9+ is a project which implements screen recording in iOS9 and above.
## Feature
a.A video recording your screen in your app with ReplayKit.
b.Red dots indicating user action.
c.A log file for user action locating in the /path-to-your-app's-document-directory/nkrecordscreen/log.txt.
### How to Use
It started when your application become active and save the videos timely.If you want to use it manually,call like below:
StartRecording:[[NKRecordManager sharedInstance] startRecording];
StopRecording:[[NKRecordManager sharedInstance] stopRecording];
### Installation
####Using CocoaPods:
Just add this line to your Podfile:
pod 'RecordScreen-iOS9-', '~> 0.1.0'
####Manually:
Simply add those files .h and .m files to your project.
### Flaws
Apple's ReplayKit seems to hide some content when recording, like the statusbar, UIActionSheet,etc. I guess it might due to their consideration to user's privacy.
On the other side, I did some kind of method swizzle in order to save the video automatically, that is to say, it might be rejected by the review team for use of private api.You can disable it by remove those method-swizzle-related category codes if needed.
#### License
RecordScreen-iOS9+ is released under the MIT license. See LICENSE for details.
| Refactor for iOS9 below usage. | Refactor for iOS9 below usage.
| Markdown | mit | kangwang1988/RecordScreen-iOS9-,kangwang1988/RecordScreen-iOS9- | markdown | ## Code Before:

## Overview
RecordScreen-iOS9+ is a project which implements screen recording in iOS9 and above.
## Feature
a.A video recording your screen in your app with ReplayKit.
b.Red dots indicating user action.
c.A log file for user action locating in the /path-to-your-app's-document-directory/nkrecordscreen/log.txt.
### Usage
The code works automatically by observing notification and saves video timingly.So import the codes under RecordScreen into your project and it works!
### Flaws
Apple's ReplayKit seems to hide some content when recording, like the statusbar, UIActionSheet,etc. I guess it might due to their consideration to user's privacy.
On the other side, I did some kind of method swizzle in order to save the video automatically, that is to say, it might be rejected by the review team for use of private api.You can disable it by remove those method-swizzle-related category codes if needed.
#### License
RecordScreen-iOS9+ is released under the MIT license. See LICENSE for details.
## Instruction:
Refactor for iOS9 below usage.
## Code After:

## Overview
RecordScreen-iOS9+ is a project which implements screen recording in iOS9 and above.
## Feature
a.A video recording your screen in your app with ReplayKit.
b.Red dots indicating user action.
c.A log file for user action locating in the /path-to-your-app's-document-directory/nkrecordscreen/log.txt.
### How to Use
It started when your application become active and save the videos timely.If you want to use it manually,call like below:
StartRecording:[[NKRecordManager sharedInstance] startRecording];
StopRecording:[[NKRecordManager sharedInstance] stopRecording];
### Installation
####Using CocoaPods:
Just add this line to your Podfile:
pod 'RecordScreen-iOS9-', '~> 0.1.0'
####Manually:
Simply add those files .h and .m files to your project.
### Flaws
Apple's ReplayKit seems to hide some content when recording, like the statusbar, UIActionSheet,etc. I guess it might due to their consideration to user's privacy.
On the other side, I did some kind of method swizzle in order to save the video automatically, that is to say, it might be rejected by the review team for use of private api.You can disable it by remove those method-swizzle-related category codes if needed.
#### License
RecordScreen-iOS9+ is released under the MIT license. See LICENSE for details.
|

## Overview
RecordScreen-iOS9+ is a project which implements screen recording in iOS9 and above.
## Feature
a.A video recording your screen in your app with ReplayKit.
b.Red dots indicating user action.
c.A log file for user action locating in the /path-to-your-app's-document-directory/nkrecordscreen/log.txt.
+ ### How to Use
+ It started when your application become active and save the videos timely.If you want to use it manually,call like below:
- ### Usage
- The code works automatically by observing notification and saves video timingly.So import the codes under RecordScreen into your project and it works!
+ StartRecording:[[NKRecordManager sharedInstance] startRecording];
+ StopRecording:[[NKRecordManager sharedInstance] stopRecording];
+ ### Installation
+ ####Using CocoaPods:
+ Just add this line to your Podfile:
+ pod 'RecordScreen-iOS9-', '~> 0.1.0'
+ ####Manually:
+ Simply add those files .h and .m files to your project.
### Flaws
Apple's ReplayKit seems to hide some content when recording, like the statusbar, UIActionSheet,etc. I guess it might due to their consideration to user's privacy.
On the other side, I did some kind of method swizzle in order to save the video automatically, that is to say, it might be rejected by the review team for use of private api.You can disable it by remove those method-swizzle-related category codes if needed.
#### License
RecordScreen-iOS9+ is released under the MIT license. See LICENSE for details. | 12 | 0.631579 | 10 | 2 |
d4568f5bb20638b493ed336a64ef277107d45d06 | .travis.yml | .travis.yml | language: ruby
sudo: false
cache:
bundler: true
rvm:
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- jruby-9.1
- jruby
before_install:
# Keep track of which version of node and phantomjs we're running the specs against
- gem update --system
- node -v
- phantomjs -v
| language: ruby
sudo: false
cache:
bundler: true
rvm:
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- jruby-9.1
- jruby
matrix:
allow_failures:
- rvm: 2.6
before_install:
# Keep track of which version of node and phantomjs we're running the specs against
- gem update --system
- node -v
- phantomjs -v
| Allow build failures on MRI 2.6 | Allow build failures on MRI 2.6
| YAML | mit | clearwater-rb/clearwater,clearwater-rb/clearwater | yaml | ## Code Before:
language: ruby
sudo: false
cache:
bundler: true
rvm:
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- jruby-9.1
- jruby
before_install:
# Keep track of which version of node and phantomjs we're running the specs against
- gem update --system
- node -v
- phantomjs -v
## Instruction:
Allow build failures on MRI 2.6
## Code After:
language: ruby
sudo: false
cache:
bundler: true
rvm:
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- jruby-9.1
- jruby
matrix:
allow_failures:
- rvm: 2.6
before_install:
# Keep track of which version of node and phantomjs we're running the specs against
- gem update --system
- node -v
- phantomjs -v
| language: ruby
sudo: false
cache:
bundler: true
rvm:
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- jruby-9.1
- jruby
+ matrix:
+ allow_failures:
+ - rvm: 2.6
+
before_install:
# Keep track of which version of node and phantomjs we're running the specs against
- gem update --system
- node -v
- phantomjs -v | 4 | 0.190476 | 4 | 0 |
4fa157dbb0fc7323ca89b3e655469062935f84c1 | Main.py | Main.py | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
)
parser.add_argument(
'directory',
metavar='PATH',
type=str,
help='path to a directory'
)
def width_greater_than_height(page):
box = page.mediaBox
return box.getWidth() > box.getHeight()
if __name__ == '__main__':
args = parser.parse_args()
directory = args.directory
all_pdf_files = [os.path.join(directory, filename) for filename in all_pdf_files_in_directory(directory)]
opened_files = map(lambda path: open(path, 'rb'), all_pdf_files)
all_pages = concat_pdf_pages(opened_files)
for idx, pages in enumerate(split_on_condition(all_pages, predicate=width_greater_than_height), start=1):
pdf_writer = PdfFileWriter()
map(pdf_writer.addPage, pages)
output_filename = '{0:05}.pdf'.format(idx)
with open(output_filename, 'wb') as output_file:
pdf_writer.write(output_file)
output_file.flush()
os.fsync(output_file.fileno())
map(lambda f: f.close, opened_files)
| """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
)
parser.add_argument(
'directory',
metavar='PATH',
type=str,
help='path to a directory'
)
def main():
args = parser.parse_args()
directory = args.directory
all_pdf_files = [os.path.join(directory, filename) for filename in all_pdf_files_in_directory(directory)]
opened_files = map(lambda path: open(path, 'rb'), all_pdf_files)
all_pages = concat_pdf_pages(opened_files)
for idx, pages in enumerate(split_on_condition(all_pages, predicate=width_greater_than_height), start=1):
pdf_writer = PdfFileWriter()
map(pdf_writer.addPage, pages)
output_filename = '{0:05}.pdf'.format(idx)
with open(output_filename, 'wb') as output_file:
pdf_writer.write(output_file)
output_file.flush()
os.fsync(output_file.fileno())
map(lambda f: f.close, opened_files)
def width_greater_than_height(page):
box = page.mediaBox
return box.getWidth() > box.getHeight()
if __name__ == '__main__':
main()
| Refactor main as a separate function | Refactor main as a separate function
| Python | mit | shunghsiyu/pdf-processor | python | ## Code Before:
"""Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
)
parser.add_argument(
'directory',
metavar='PATH',
type=str,
help='path to a directory'
)
def width_greater_than_height(page):
box = page.mediaBox
return box.getWidth() > box.getHeight()
if __name__ == '__main__':
args = parser.parse_args()
directory = args.directory
all_pdf_files = [os.path.join(directory, filename) for filename in all_pdf_files_in_directory(directory)]
opened_files = map(lambda path: open(path, 'rb'), all_pdf_files)
all_pages = concat_pdf_pages(opened_files)
for idx, pages in enumerate(split_on_condition(all_pages, predicate=width_greater_than_height), start=1):
pdf_writer = PdfFileWriter()
map(pdf_writer.addPage, pages)
output_filename = '{0:05}.pdf'.format(idx)
with open(output_filename, 'wb') as output_file:
pdf_writer.write(output_file)
output_file.flush()
os.fsync(output_file.fileno())
map(lambda f: f.close, opened_files)
## Instruction:
Refactor main as a separate function
## Code After:
"""Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
)
parser.add_argument(
'directory',
metavar='PATH',
type=str,
help='path to a directory'
)
def main():
args = parser.parse_args()
directory = args.directory
all_pdf_files = [os.path.join(directory, filename) for filename in all_pdf_files_in_directory(directory)]
opened_files = map(lambda path: open(path, 'rb'), all_pdf_files)
all_pages = concat_pdf_pages(opened_files)
for idx, pages in enumerate(split_on_condition(all_pages, predicate=width_greater_than_height), start=1):
pdf_writer = PdfFileWriter()
map(pdf_writer.addPage, pages)
output_filename = '{0:05}.pdf'.format(idx)
with open(output_filename, 'wb') as output_file:
pdf_writer.write(output_file)
output_file.flush()
os.fsync(output_file.fileno())
map(lambda f: f.close, opened_files)
def width_greater_than_height(page):
box = page.mediaBox
return box.getWidth() > box.getHeight()
if __name__ == '__main__':
main()
| """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
)
parser.add_argument(
'directory',
metavar='PATH',
type=str,
help='path to a directory'
)
+ def main():
- def width_greater_than_height(page):
- box = page.mediaBox
- return box.getWidth() > box.getHeight()
-
-
- if __name__ == '__main__':
args = parser.parse_args()
directory = args.directory
all_pdf_files = [os.path.join(directory, filename) for filename in all_pdf_files_in_directory(directory)]
opened_files = map(lambda path: open(path, 'rb'), all_pdf_files)
all_pages = concat_pdf_pages(opened_files)
for idx, pages in enumerate(split_on_condition(all_pages, predicate=width_greater_than_height), start=1):
pdf_writer = PdfFileWriter()
map(pdf_writer.addPage, pages)
output_filename = '{0:05}.pdf'.format(idx)
with open(output_filename, 'wb') as output_file:
pdf_writer.write(output_file)
output_file.flush()
os.fsync(output_file.fileno())
map(lambda f: f.close, opened_files)
+
+
+ def width_greater_than_height(page):
+ box = page.mediaBox
+ return box.getWidth() > box.getHeight()
+
+
+ if __name__ == '__main__':
+ main() | 16 | 0.372093 | 10 | 6 |
06b5a93fe98887a51000184016cc3400f08647cc | system/blueprints/user/account.yaml | system/blueprints/user/account.yaml | title: Site
form:
validation: loose
fields:
content:
type: section
title: Account
fields:
username:
type: text
size: large
label: Username
disabled: true
readonly: true
email:
type: email
size: large
label: Email
validate:
type: email
message: Must be a valid email address
required: true
password:
type: password
size: large
label: Password
validate:
required: true
message: Password must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters
pattern: '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}'
fullname:
type: text
size: large
label: Full name
validate:
required: true
title:
type: text
size: large
label: Title
| title: Site
form:
validation: loose
fields:
content:
type: section
title: Account
fields:
username:
type: text
size: large
label: Username
disabled: true
readonly: true
email:
type: email
size: large
label: Email
validate:
type: email
message: Must be a valid email address
required: true
password:
type: password
size: large
label: Password
validate:
required: true
message: Password must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters
pattern: '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}'
fullname:
type: text
size: large
label: Full name
validate:
required: true
title:
type: text
size: large
label: Title
language:
type: text
size: large
label: Language
help: "Set the favorite language. E.g. 'it' or 'de'. Defaults to english"
| Add language to user blueprint | Add language to user blueprint
| YAML | mit | userfrosting/learn,Pumpapa/lucaswalters.nl,toovy/grav,DonLiborio/grav,TheHiddenHaku/alessiobottiroli-website-grav,stell/grav,tomzx/blog.tomrochette.com,beacloudgenius/grav,webuxr/iamrs,joeyhenricks/a-broke-vegan,iMoonThailand/grav,toovy/grav,tomzx/blog.tomrochette.com,JamesPan/gravbox,JamesPan/gravbox,sylvestrelucia/grav,joeyhenricks/a-broke-vegan,chkir/grav,Vivalldi/grav,gigago/grav,lennerd/grav,Pumpapa/chriswalters.nl,Pumpapa/lucaswalters.nl,attiks/grav,userfrosting/learn,Vivalldi/grav,undesign/undesign.github.io,getgrav/grav,nunull/grav,tomzx/blog.tomrochette.com,sylvestrelucia/grav,dimayakovlev/grav,JamesPan/gravbox,jinxboy13/grav,Pumpapa/lucaswalters.nl,sylvestrelucia/grav,JamesPan/gravbox,ccardinaux/grav-test,userfrosting/learn,userfrosting/learn,tomzx/blog.tomrochette.com,jeffam/grav,z3cka/grav,tcsizmadia/grav,Sommerregen/grav,sylvestrelucia/grav,notklaatu/grav,Silwereth/grav,dimayakovlev/grav,undesign/undesign.github.io,jeremykenedy/grav,notklaatu/grav,shortsofia/testesitegrav.github.io,Pumpapa/jacinthawalters.nl,getgrav/grav | yaml | ## Code Before:
title: Site
form:
validation: loose
fields:
content:
type: section
title: Account
fields:
username:
type: text
size: large
label: Username
disabled: true
readonly: true
email:
type: email
size: large
label: Email
validate:
type: email
message: Must be a valid email address
required: true
password:
type: password
size: large
label: Password
validate:
required: true
message: Password must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters
pattern: '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}'
fullname:
type: text
size: large
label: Full name
validate:
required: true
title:
type: text
size: large
label: Title
## Instruction:
Add language to user blueprint
## Code After:
title: Site
form:
validation: loose
fields:
content:
type: section
title: Account
fields:
username:
type: text
size: large
label: Username
disabled: true
readonly: true
email:
type: email
size: large
label: Email
validate:
type: email
message: Must be a valid email address
required: true
password:
type: password
size: large
label: Password
validate:
required: true
message: Password must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters
pattern: '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}'
fullname:
type: text
size: large
label: Full name
validate:
required: true
title:
type: text
size: large
label: Title
language:
type: text
size: large
label: Language
help: "Set the favorite language. E.g. 'it' or 'de'. Defaults to english"
| title: Site
form:
validation: loose
fields:
content:
type: section
title: Account
fields:
username:
type: text
size: large
label: Username
disabled: true
readonly: true
email:
type: email
size: large
label: Email
validate:
type: email
message: Must be a valid email address
required: true
password:
type: password
size: large
label: Password
validate:
required: true
message: Password must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters
pattern: '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}'
fullname:
type: text
size: large
label: Full name
validate:
required: true
title:
type: text
size: large
label: Title
+
+ language:
+ type: text
+ size: large
+ label: Language
+ help: "Set the favorite language. E.g. 'it' or 'de'. Defaults to english"
+ | 7 | 0.152174 | 7 | 0 |
ac0ac8962a82ad295faf11f7df66db4999e9fc4b | src/Tacit/Middleware/ContentTypes.php | src/Tacit/Middleware/ContentTypes.php | <?php
/*
* This file is part of the Tacit package.
*
* Copyright (c) Jason Coward <jason@opengeek.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tacit\Middleware;
class ContentTypes extends \Slim\Middleware\ContentTypes
{
public function call()
{
$env = $this->app->environment();
$env['slim.input_original'] = $env['slim.input'];
$mediaType = $this->app->request()->getMediaType();
if ($mediaType && isset($this->contentTypes[$mediaType])) {
$env['slim.request.form_hash'] = $env['slim.input'] = $this->parse($env['slim.input'], $mediaType);
}
$this->next->call();
}
}
| <?php
/*
* This file is part of the Tacit package.
*
* Copyright (c) Jason Coward <jason@opengeek.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tacit\Middleware;
class ContentTypes extends \Slim\Middleware\ContentTypes
{
public function call()
{
$env = $this->app->environment();
$env['slim.input_original'] = $env['slim.input'];
$mediaType = $this->app->request()->getMediaType();
if ($mediaType && isset($this->contentTypes[$mediaType])) {
$env['slim.request.form_hash'] = $env['slim.input'] = $this->parse($env['slim.input'], $mediaType);
}
$this->next->call();
}
/**
* Parse input
*
* This method will attempt to parse the request body
* based on its content type if available.
*
* @param string $input
* @param string $contentType
* @return mixed
*/
protected function parse ($input, $contentType)
{
if (isset($this->contentTypes[$contentType]) && is_callable($this->contentTypes[$contentType])) {
$result = call_user_func($this->contentTypes[$contentType], $input);
if ($result !== false) {
return $result;
}
}
return $input;
}
/**
* Parse JSON
*
* This method converts the raw JSON input
* into an associative array.
*
* @param string $input
* @return array|string
*/
protected function parseJson($input)
{
if (function_exists('json_decode')) {
$result = json_decode($input, true);
if(json_last_error() === JSON_ERROR_NONE) {
return !empty($result) ? $result : [];
}
}
}
}
| Fix ContentType middleware to return array for empty body | Fix ContentType middleware to return array for empty body
| PHP | mit | opengeek/tacit | php | ## Code Before:
<?php
/*
* This file is part of the Tacit package.
*
* Copyright (c) Jason Coward <jason@opengeek.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tacit\Middleware;
class ContentTypes extends \Slim\Middleware\ContentTypes
{
public function call()
{
$env = $this->app->environment();
$env['slim.input_original'] = $env['slim.input'];
$mediaType = $this->app->request()->getMediaType();
if ($mediaType && isset($this->contentTypes[$mediaType])) {
$env['slim.request.form_hash'] = $env['slim.input'] = $this->parse($env['slim.input'], $mediaType);
}
$this->next->call();
}
}
## Instruction:
Fix ContentType middleware to return array for empty body
## Code After:
<?php
/*
* This file is part of the Tacit package.
*
* Copyright (c) Jason Coward <jason@opengeek.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tacit\Middleware;
class ContentTypes extends \Slim\Middleware\ContentTypes
{
public function call()
{
$env = $this->app->environment();
$env['slim.input_original'] = $env['slim.input'];
$mediaType = $this->app->request()->getMediaType();
if ($mediaType && isset($this->contentTypes[$mediaType])) {
$env['slim.request.form_hash'] = $env['slim.input'] = $this->parse($env['slim.input'], $mediaType);
}
$this->next->call();
}
/**
* Parse input
*
* This method will attempt to parse the request body
* based on its content type if available.
*
* @param string $input
* @param string $contentType
* @return mixed
*/
protected function parse ($input, $contentType)
{
if (isset($this->contentTypes[$contentType]) && is_callable($this->contentTypes[$contentType])) {
$result = call_user_func($this->contentTypes[$contentType], $input);
if ($result !== false) {
return $result;
}
}
return $input;
}
/**
* Parse JSON
*
* This method converts the raw JSON input
* into an associative array.
*
* @param string $input
* @return array|string
*/
protected function parseJson($input)
{
if (function_exists('json_decode')) {
$result = json_decode($input, true);
if(json_last_error() === JSON_ERROR_NONE) {
return !empty($result) ? $result : [];
}
}
}
}
| <?php
/*
* This file is part of the Tacit package.
*
* Copyright (c) Jason Coward <jason@opengeek.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tacit\Middleware;
class ContentTypes extends \Slim\Middleware\ContentTypes
{
public function call()
{
$env = $this->app->environment();
$env['slim.input_original'] = $env['slim.input'];
$mediaType = $this->app->request()->getMediaType();
if ($mediaType && isset($this->contentTypes[$mediaType])) {
$env['slim.request.form_hash'] = $env['slim.input'] = $this->parse($env['slim.input'], $mediaType);
}
$this->next->call();
}
+
+ /**
+ * Parse input
+ *
+ * This method will attempt to parse the request body
+ * based on its content type if available.
+ *
+ * @param string $input
+ * @param string $contentType
+ * @return mixed
+ */
+ protected function parse ($input, $contentType)
+ {
+ if (isset($this->contentTypes[$contentType]) && is_callable($this->contentTypes[$contentType])) {
+ $result = call_user_func($this->contentTypes[$contentType], $input);
+ if ($result !== false) {
+ return $result;
+ }
+ }
+
+ return $input;
+ }
+
+ /**
+ * Parse JSON
+ *
+ * This method converts the raw JSON input
+ * into an associative array.
+ *
+ * @param string $input
+ * @return array|string
+ */
+ protected function parseJson($input)
+ {
+ if (function_exists('json_decode')) {
+ $result = json_decode($input, true);
+ if(json_last_error() === JSON_ERROR_NONE) {
+ return !empty($result) ? $result : [];
+ }
+ }
+ }
} | 41 | 1.518519 | 41 | 0 |
27a70dc0dd006e5898bf40c3ea4f36b6278ff3c3 | src/main/java/com/demigodsrpg/chitchat/command/CCMuteCommand.java | src/main/java/com/demigodsrpg/chitchat/command/CCMuteCommand.java | package com.demigodsrpg.chitchat.command;
import com.demigodsrpg.chitchat.Chitchat;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class CCMuteCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player && sender.hasPermission("chitchat.mute")) {
if (args.length > 0) {
if (command.getName().equals("ccmute")) {
Chitchat.getMuteSet().add(args[0]);
sender.sendMessage(ChatColor.YELLOW + "Muted " + args[0]);
} else {
Chitchat.getMuteSet().remove(args[0]);
sender.sendMessage(ChatColor.YELLOW + "Unmuted " + args[0]);
}
} else {
return false;
}
} else {
sender.sendMessage(ChatColor.RED + "You don't have permission to use that command.");
}
return true;
}
}
| package com.demigodsrpg.chitchat.command;
import com.demigodsrpg.chitchat.Chitchat;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class CCMuteCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player && sender.hasPermission("chitchat.mute")) {
if (args.length > 0) {
if (command.getName().equals("ccmute")) {
if ("list".equalsIgnoreCase(args[0])) {
sender.sendMessage(ChatColor.YELLOW + "// -- Currently Muted Players -- //");
for (String mutedName : Chitchat.getMuteSet()) {
sender.sendMessage(ChatColor.YELLOW + " - " + mutedName);
}
return true;
}
Chitchat.getMuteSet().add(args[0]);
sender.sendMessage(ChatColor.YELLOW + "Muted " + args[0]);
} else {
Chitchat.getMuteSet().remove(args[0]);
sender.sendMessage(ChatColor.YELLOW + "Unmuted " + args[0]);
}
} else {
return false;
}
} else {
sender.sendMessage(ChatColor.RED + "You don't have permission to use that command.");
}
return true;
}
}
| Add a quick and dirty mute list. | Add a quick and dirty mute list.
| Java | mit | DemigodsRPG/Chitchat | java | ## Code Before:
package com.demigodsrpg.chitchat.command;
import com.demigodsrpg.chitchat.Chitchat;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class CCMuteCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player && sender.hasPermission("chitchat.mute")) {
if (args.length > 0) {
if (command.getName().equals("ccmute")) {
Chitchat.getMuteSet().add(args[0]);
sender.sendMessage(ChatColor.YELLOW + "Muted " + args[0]);
} else {
Chitchat.getMuteSet().remove(args[0]);
sender.sendMessage(ChatColor.YELLOW + "Unmuted " + args[0]);
}
} else {
return false;
}
} else {
sender.sendMessage(ChatColor.RED + "You don't have permission to use that command.");
}
return true;
}
}
## Instruction:
Add a quick and dirty mute list.
## Code After:
package com.demigodsrpg.chitchat.command;
import com.demigodsrpg.chitchat.Chitchat;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class CCMuteCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player && sender.hasPermission("chitchat.mute")) {
if (args.length > 0) {
if (command.getName().equals("ccmute")) {
if ("list".equalsIgnoreCase(args[0])) {
sender.sendMessage(ChatColor.YELLOW + "// -- Currently Muted Players -- //");
for (String mutedName : Chitchat.getMuteSet()) {
sender.sendMessage(ChatColor.YELLOW + " - " + mutedName);
}
return true;
}
Chitchat.getMuteSet().add(args[0]);
sender.sendMessage(ChatColor.YELLOW + "Muted " + args[0]);
} else {
Chitchat.getMuteSet().remove(args[0]);
sender.sendMessage(ChatColor.YELLOW + "Unmuted " + args[0]);
}
} else {
return false;
}
} else {
sender.sendMessage(ChatColor.RED + "You don't have permission to use that command.");
}
return true;
}
}
| package com.demigodsrpg.chitchat.command;
import com.demigodsrpg.chitchat.Chitchat;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class CCMuteCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof Player && sender.hasPermission("chitchat.mute")) {
if (args.length > 0) {
if (command.getName().equals("ccmute")) {
+ if ("list".equalsIgnoreCase(args[0])) {
+ sender.sendMessage(ChatColor.YELLOW + "// -- Currently Muted Players -- //");
+ for (String mutedName : Chitchat.getMuteSet()) {
+ sender.sendMessage(ChatColor.YELLOW + " - " + mutedName);
+ }
+ return true;
+ }
Chitchat.getMuteSet().add(args[0]);
sender.sendMessage(ChatColor.YELLOW + "Muted " + args[0]);
} else {
Chitchat.getMuteSet().remove(args[0]);
sender.sendMessage(ChatColor.YELLOW + "Unmuted " + args[0]);
}
} else {
return false;
}
} else {
sender.sendMessage(ChatColor.RED + "You don't have permission to use that command.");
}
return true;
}
} | 7 | 0.233333 | 7 | 0 |
9cb05046c66f39575e1d38542a5dcf656209840a | src/main/java/org/hummingbirdlang/types/concrete/IntegerType.java | src/main/java/org/hummingbirdlang/types/concrete/IntegerType.java | package org.hummingbirdlang.types.concrete;
import org.hummingbirdlang.nodes.builtins.BuiltinNodes;
import org.hummingbirdlang.types.MethodProperty;
import org.hummingbirdlang.types.Property;
import org.hummingbirdlang.types.PropertyNotFoundException;
import org.hummingbirdlang.types.UnknownType;
import org.hummingbirdlang.types.realize.Index.Module;
public final class IntegerType extends BootstrappableConcreteType {
public static String BUILTIN_NAME = "Integer";
private MethodType toString;
@Override
public String getBootstrapName() {
return IntegerType.BUILTIN_NAME;
}
@Override
public void bootstrapBuiltins(BuiltinNodes builtins) {
this.toString = new MethodType(this, new UnknownType(), "toString", builtins.getCallTarget("Integer", "toString"));
}
@Override
public void bootstrapTypes(Module indexModule) {
this.toString = this.toString.cloneWithReturnType(indexModule.get(StringType.BUILTIN_NAME));
}
@Override
public Property getProperty(String name) throws PropertyNotFoundException {
switch (name) {
case "toString":
return MethodProperty.fromType(this.toString);
default:
throw new PropertyNotFoundException(this, name);
}
}
}
| package org.hummingbirdlang.types.concrete;
import org.hummingbirdlang.nodes.builtins.BuiltinNodes;
import org.hummingbirdlang.types.MethodProperty;
import org.hummingbirdlang.types.Property;
import org.hummingbirdlang.types.PropertyNotFoundException;
import org.hummingbirdlang.types.UnknownType;
import org.hummingbirdlang.types.realize.Index.Module;
public final class IntegerType extends BootstrappableConcreteType {
public static String BUILTIN_NAME = "Integer";
private MethodType toString;
@Override
public String getBootstrapName() {
return IntegerType.BUILTIN_NAME;
}
@Override
public void bootstrapBuiltins(BuiltinNodes builtins) {
this.toString = new MethodType(this, new UnknownType(), "toString", builtins.getCallTarget("Integer", "toString"));
}
@Override
public void bootstrapTypes(Module indexModule) {
this.toString = this.toString.cloneWithReturnType(indexModule.get(StringType.BUILTIN_NAME));
}
@Override
public Property getProperty(String name) throws PropertyNotFoundException {
switch (name) {
case "toString":
return MethodProperty.fromType(this.toString);
default:
throw new PropertyNotFoundException(this, name);
}
}
@Override
public String toString() {
return "$Integer";
}
}
| Add debug string representation of integer concrete type | Add debug string representation of integer concrete type
| Java | bsd-3-clause | dirk/hummingbird2,dirk/hummingbird2,dirk/hummingbird2 | java | ## Code Before:
package org.hummingbirdlang.types.concrete;
import org.hummingbirdlang.nodes.builtins.BuiltinNodes;
import org.hummingbirdlang.types.MethodProperty;
import org.hummingbirdlang.types.Property;
import org.hummingbirdlang.types.PropertyNotFoundException;
import org.hummingbirdlang.types.UnknownType;
import org.hummingbirdlang.types.realize.Index.Module;
public final class IntegerType extends BootstrappableConcreteType {
public static String BUILTIN_NAME = "Integer";
private MethodType toString;
@Override
public String getBootstrapName() {
return IntegerType.BUILTIN_NAME;
}
@Override
public void bootstrapBuiltins(BuiltinNodes builtins) {
this.toString = new MethodType(this, new UnknownType(), "toString", builtins.getCallTarget("Integer", "toString"));
}
@Override
public void bootstrapTypes(Module indexModule) {
this.toString = this.toString.cloneWithReturnType(indexModule.get(StringType.BUILTIN_NAME));
}
@Override
public Property getProperty(String name) throws PropertyNotFoundException {
switch (name) {
case "toString":
return MethodProperty.fromType(this.toString);
default:
throw new PropertyNotFoundException(this, name);
}
}
}
## Instruction:
Add debug string representation of integer concrete type
## Code After:
package org.hummingbirdlang.types.concrete;
import org.hummingbirdlang.nodes.builtins.BuiltinNodes;
import org.hummingbirdlang.types.MethodProperty;
import org.hummingbirdlang.types.Property;
import org.hummingbirdlang.types.PropertyNotFoundException;
import org.hummingbirdlang.types.UnknownType;
import org.hummingbirdlang.types.realize.Index.Module;
public final class IntegerType extends BootstrappableConcreteType {
public static String BUILTIN_NAME = "Integer";
private MethodType toString;
@Override
public String getBootstrapName() {
return IntegerType.BUILTIN_NAME;
}
@Override
public void bootstrapBuiltins(BuiltinNodes builtins) {
this.toString = new MethodType(this, new UnknownType(), "toString", builtins.getCallTarget("Integer", "toString"));
}
@Override
public void bootstrapTypes(Module indexModule) {
this.toString = this.toString.cloneWithReturnType(indexModule.get(StringType.BUILTIN_NAME));
}
@Override
public Property getProperty(String name) throws PropertyNotFoundException {
switch (name) {
case "toString":
return MethodProperty.fromType(this.toString);
default:
throw new PropertyNotFoundException(this, name);
}
}
@Override
public String toString() {
return "$Integer";
}
}
| package org.hummingbirdlang.types.concrete;
import org.hummingbirdlang.nodes.builtins.BuiltinNodes;
import org.hummingbirdlang.types.MethodProperty;
import org.hummingbirdlang.types.Property;
import org.hummingbirdlang.types.PropertyNotFoundException;
import org.hummingbirdlang.types.UnknownType;
import org.hummingbirdlang.types.realize.Index.Module;
public final class IntegerType extends BootstrappableConcreteType {
public static String BUILTIN_NAME = "Integer";
private MethodType toString;
@Override
public String getBootstrapName() {
return IntegerType.BUILTIN_NAME;
}
@Override
public void bootstrapBuiltins(BuiltinNodes builtins) {
this.toString = new MethodType(this, new UnknownType(), "toString", builtins.getCallTarget("Integer", "toString"));
}
@Override
public void bootstrapTypes(Module indexModule) {
this.toString = this.toString.cloneWithReturnType(indexModule.get(StringType.BUILTIN_NAME));
}
@Override
public Property getProperty(String name) throws PropertyNotFoundException {
switch (name) {
case "toString":
return MethodProperty.fromType(this.toString);
default:
throw new PropertyNotFoundException(this, name);
}
}
+
+ @Override
+ public String toString() {
+ return "$Integer";
+ }
} | 5 | 0.128205 | 5 | 0 |
577697928ed04a29803620c38a090a36e21dc73a | angular/core/components/poll/proposal/vote_form/poll_proposal_vote_form.haml | angular/core/components/poll/proposal/vote_form/poll_proposal_vote_form.haml | %form.poll-proposal-vote-form
%h3.lmo-card-subheading{translate: "poll_common.your_response"}
.poll-proposal-vote-form__option
%md-radio-group{ng-model: "stance.selectedOption"}
%md-radio-button.poll-common-vote-form__radio-button{class: "poll-common-vote-form__radio-button--{{option.name}}", ng-repeat: "option in stance.poll().pollOptions()", ng-value: "option", aria-label: "{{option.name}}"}
%img.poll-proposal-form__icon{ng-src: "/img/{{option.name}}.svg"}
%span.poll-proposal-vote-form__chosen-option--name{translate: "poll_proposal_options.{{option.name}}"}
.poll-common-vote-form__reason
%md-input-container.md-block
%label{translate: "poll_common.reason"}
%textarea.lmo-primary-form-input{placeholder: "{{reasonPlaceholder()}}", ng-model: "stance.reason", md-max-length: "250", rows: "2"}
%validation_errors{subject: "stance", field: "reason"}
%poll_common_participant_form{stance: "stance"}
.poll-common-form__actions
%md-button.md-primary.md-raised{ng-click: "submit()", translate: "poll_common.vote", aria-label: "{{ 'poll_proposal_vote_form.vote' | translate }}"}
| %form.poll-proposal-vote-form
%h3.lmo-card-subheading{translate: "poll_common.your_response"}
.poll-proposal-vote-form__option
%md-radio-group{ng-model: "stance.selectedOption"}
%md-radio-button.poll-common-vote-form__radio-button{class: "poll-common-vote-form__radio-button--{{option.name}}", ng-repeat: "option in stance.poll().pollOptions()", ng-value: "option", aria-label: "{{option.name}}"}
%img.poll-proposal-form__icon{ng-src: "/img/{{option.name}}.svg"}
%span.poll-proposal-vote-form__chosen-option--name{translate: "poll_proposal_options.{{option.name}}"}
.poll-common-vote-form__reason
%md-input-container.md-block
%label{translate: "poll_common.reason"}
%textarea.lmo-primary-form-input{placeholder: "{{reasonPlaceholder()}}", ng-model: "stance.reason", md-max-length: "250", rows: "2"}
%validation_errors{subject: "stance", field: "reason"}
%poll_common_participant_form{stance: "stance"}
.poll-common-form__actions
%md-button.md-primary.md-raised.poll-proposal-vote-form__submit{ng-click: "submit()", translate: "poll_common.vote", aria-label: "{{ 'poll_proposal_vote_form.vote' | translate }}"}
| Add selector to vote form | Add selector to vote form
| Haml | agpl-3.0 | piratas-ar/loomio,piratas-ar/loomio,loomio/loomio,piratas-ar/loomio,piratas-ar/loomio,loomio/loomio,loomio/loomio,loomio/loomio | haml | ## Code Before:
%form.poll-proposal-vote-form
%h3.lmo-card-subheading{translate: "poll_common.your_response"}
.poll-proposal-vote-form__option
%md-radio-group{ng-model: "stance.selectedOption"}
%md-radio-button.poll-common-vote-form__radio-button{class: "poll-common-vote-form__radio-button--{{option.name}}", ng-repeat: "option in stance.poll().pollOptions()", ng-value: "option", aria-label: "{{option.name}}"}
%img.poll-proposal-form__icon{ng-src: "/img/{{option.name}}.svg"}
%span.poll-proposal-vote-form__chosen-option--name{translate: "poll_proposal_options.{{option.name}}"}
.poll-common-vote-form__reason
%md-input-container.md-block
%label{translate: "poll_common.reason"}
%textarea.lmo-primary-form-input{placeholder: "{{reasonPlaceholder()}}", ng-model: "stance.reason", md-max-length: "250", rows: "2"}
%validation_errors{subject: "stance", field: "reason"}
%poll_common_participant_form{stance: "stance"}
.poll-common-form__actions
%md-button.md-primary.md-raised{ng-click: "submit()", translate: "poll_common.vote", aria-label: "{{ 'poll_proposal_vote_form.vote' | translate }}"}
## Instruction:
Add selector to vote form
## Code After:
%form.poll-proposal-vote-form
%h3.lmo-card-subheading{translate: "poll_common.your_response"}
.poll-proposal-vote-form__option
%md-radio-group{ng-model: "stance.selectedOption"}
%md-radio-button.poll-common-vote-form__radio-button{class: "poll-common-vote-form__radio-button--{{option.name}}", ng-repeat: "option in stance.poll().pollOptions()", ng-value: "option", aria-label: "{{option.name}}"}
%img.poll-proposal-form__icon{ng-src: "/img/{{option.name}}.svg"}
%span.poll-proposal-vote-form__chosen-option--name{translate: "poll_proposal_options.{{option.name}}"}
.poll-common-vote-form__reason
%md-input-container.md-block
%label{translate: "poll_common.reason"}
%textarea.lmo-primary-form-input{placeholder: "{{reasonPlaceholder()}}", ng-model: "stance.reason", md-max-length: "250", rows: "2"}
%validation_errors{subject: "stance", field: "reason"}
%poll_common_participant_form{stance: "stance"}
.poll-common-form__actions
%md-button.md-primary.md-raised.poll-proposal-vote-form__submit{ng-click: "submit()", translate: "poll_common.vote", aria-label: "{{ 'poll_proposal_vote_form.vote' | translate }}"}
| %form.poll-proposal-vote-form
%h3.lmo-card-subheading{translate: "poll_common.your_response"}
.poll-proposal-vote-form__option
%md-radio-group{ng-model: "stance.selectedOption"}
%md-radio-button.poll-common-vote-form__radio-button{class: "poll-common-vote-form__radio-button--{{option.name}}", ng-repeat: "option in stance.poll().pollOptions()", ng-value: "option", aria-label: "{{option.name}}"}
%img.poll-proposal-form__icon{ng-src: "/img/{{option.name}}.svg"}
%span.poll-proposal-vote-form__chosen-option--name{translate: "poll_proposal_options.{{option.name}}"}
.poll-common-vote-form__reason
%md-input-container.md-block
%label{translate: "poll_common.reason"}
%textarea.lmo-primary-form-input{placeholder: "{{reasonPlaceholder()}}", ng-model: "stance.reason", md-max-length: "250", rows: "2"}
%validation_errors{subject: "stance", field: "reason"}
%poll_common_participant_form{stance: "stance"}
.poll-common-form__actions
- %md-button.md-primary.md-raised{ng-click: "submit()", translate: "poll_common.vote", aria-label: "{{ 'poll_proposal_vote_form.vote' | translate }}"}
+ %md-button.md-primary.md-raised.poll-proposal-vote-form__submit{ng-click: "submit()", translate: "poll_common.vote", aria-label: "{{ 'poll_proposal_vote_form.vote' | translate }}"}
? ++++++++++++++++++++++++++++++++
| 2 | 0.111111 | 1 | 1 |
24d0638eca1854f298d2ead54afaa9dd3ce84deb | app/controllers/users_controller.rb | app/controllers/users_controller.rb |
class UsersController < ApplicationController
def edit
@user = current_user
@vouchers = current_user.vouchers.includes(:product, :claimed_by)
@private_server = PrivateServer.new if @user.has_private_server_option?
end
def update
if current_user.update_attributes(user_params)
flash[:notice] = 'Settings saved'
end
redirect_to root_path
end
private
def user_params
params.require(:user).permit(:logs_tf_api_key, :demos_tf_api_key, :time_zone)
end
end
|
class UsersController < ApplicationController
def edit
@user = current_user
@vouchers = current_user.vouchers.includes(:product, :claimed_by)
@private_server = PrivateServer.new if @user.has_private_server_option?
end
def update
if current_user.update(user_params)
flash[:notice] = 'Settings saved'
end
redirect_to root_path
end
private
def user_params
params.require(:user).permit(:logs_tf_api_key, :demos_tf_api_key, :time_zone)
end
end
| Fix Rails 6.1 deprecation warning | Fix Rails 6.1 deprecation warning
| Ruby | apache-2.0 | Arie/serveme,Arie/serveme,Arie/serveme,Arie/serveme | ruby | ## Code Before:
class UsersController < ApplicationController
def edit
@user = current_user
@vouchers = current_user.vouchers.includes(:product, :claimed_by)
@private_server = PrivateServer.new if @user.has_private_server_option?
end
def update
if current_user.update_attributes(user_params)
flash[:notice] = 'Settings saved'
end
redirect_to root_path
end
private
def user_params
params.require(:user).permit(:logs_tf_api_key, :demos_tf_api_key, :time_zone)
end
end
## Instruction:
Fix Rails 6.1 deprecation warning
## Code After:
class UsersController < ApplicationController
def edit
@user = current_user
@vouchers = current_user.vouchers.includes(:product, :claimed_by)
@private_server = PrivateServer.new if @user.has_private_server_option?
end
def update
if current_user.update(user_params)
flash[:notice] = 'Settings saved'
end
redirect_to root_path
end
private
def user_params
params.require(:user).permit(:logs_tf_api_key, :demos_tf_api_key, :time_zone)
end
end
|
class UsersController < ApplicationController
def edit
@user = current_user
@vouchers = current_user.vouchers.includes(:product, :claimed_by)
@private_server = PrivateServer.new if @user.has_private_server_option?
end
def update
- if current_user.update_attributes(user_params)
? -----------
+ if current_user.update(user_params)
flash[:notice] = 'Settings saved'
end
redirect_to root_path
end
private
def user_params
params.require(:user).permit(:logs_tf_api_key, :demos_tf_api_key, :time_zone)
end
end | 2 | 0.095238 | 1 | 1 |
a388cd35701e03319991fa5fa5f558c20b9fa2c9 | gattaca/Model/Session/MSessionStatus.swift | gattaca/Model/Session/MSessionStatus.swift | import Foundation
extension MSession
{
enum Status
{
case new
case loading
case loaded
}
}
| import Foundation
extension MSession
{
enum Status
{
case new
case loading
case sync
case loaded
}
}
| Add case sync to status | Add case sync to status
| Swift | mit | turingcorp/gattaca,turingcorp/gattaca | swift | ## Code Before:
import Foundation
extension MSession
{
enum Status
{
case new
case loading
case loaded
}
}
## Instruction:
Add case sync to status
## Code After:
import Foundation
extension MSession
{
enum Status
{
case new
case loading
case sync
case loaded
}
}
| import Foundation
extension MSession
{
enum Status
{
case new
case loading
+ case sync
case loaded
}
} | 1 | 0.090909 | 1 | 0 |
a4a9b9960504ea7ae642b912965b8438dc4eefa6 | TODO.md | TODO.md |
- Development
- Integrate `flake8-import-order` into ci
- Integrate flake8-docstrings (add 'docstring-convention = numpy' in [flake8]
section of .flake8 file)
- **Improve test coverage**
- Manifolds:
- Stiefel [@118](./pymanopt/manifolds/stiefel.py#L118): simplify expressions if possible
- Solvers
- nelder_mead [@31](./pymanopt/solvers/nelder_mead.py#L31): need to decide what to do about the TR iterations
- Solvers cast to np.array before returning
- Tools:
- autodiff theano and tensorflow: FixedRankEmbedded compatibility
- autodiff autograd: move type checking outside of compiled function
- autodiff/_theano [@82](./pymanopt/tools/autodiff/_theano.py#L82): fix theano's no Rop fallback for the product manifold/investigate whether this no Rop fallback is really necessary
- autodiff/_autograd: fix product manifold when one or more of the manifolds is FixedRankEmbedded
- Misc:
- always use "".format rather than "%s" % "bla"
- set up pre-commit hook to run flake8 tests (also add this to contrib.md)
- drop python 3.5 support so we can switch to f-strings
|
- Development
- Integrate flake8-docstrings (add 'docstring-convention = numpy' in [flake8]
section of .flake8 file)
- **Improve test coverage**
- Manifolds:
- Stiefel [@118](./pymanopt/manifolds/stiefel.py#L118): simplify expressions if possible
- Solvers
- nelder_mead [@31](./pymanopt/solvers/nelder_mead.py#L31): need to decide what to do about the TR iterations
- Solvers cast to np.array before returning
- Tools:
- autodiff autograd: move type checking outside of compiled function
- autodiff/_autograd: fix product manifold when one or more of the manifolds is FixedRankEmbedded
- Misc:
- always use "".format rather than "%s" % "bla"
| Update to-do list after recent changes | Update to-do list after recent changes
Signed-off-by: Niklas Koep <342d5290239d9c5264c8f98185afedb99596601a@gmail.com>
| Markdown | bsd-3-clause | pymanopt/pymanopt,pymanopt/pymanopt | markdown | ## Code Before:
- Development
- Integrate `flake8-import-order` into ci
- Integrate flake8-docstrings (add 'docstring-convention = numpy' in [flake8]
section of .flake8 file)
- **Improve test coverage**
- Manifolds:
- Stiefel [@118](./pymanopt/manifolds/stiefel.py#L118): simplify expressions if possible
- Solvers
- nelder_mead [@31](./pymanopt/solvers/nelder_mead.py#L31): need to decide what to do about the TR iterations
- Solvers cast to np.array before returning
- Tools:
- autodiff theano and tensorflow: FixedRankEmbedded compatibility
- autodiff autograd: move type checking outside of compiled function
- autodiff/_theano [@82](./pymanopt/tools/autodiff/_theano.py#L82): fix theano's no Rop fallback for the product manifold/investigate whether this no Rop fallback is really necessary
- autodiff/_autograd: fix product manifold when one or more of the manifolds is FixedRankEmbedded
- Misc:
- always use "".format rather than "%s" % "bla"
- set up pre-commit hook to run flake8 tests (also add this to contrib.md)
- drop python 3.5 support so we can switch to f-strings
## Instruction:
Update to-do list after recent changes
Signed-off-by: Niklas Koep <342d5290239d9c5264c8f98185afedb99596601a@gmail.com>
## Code After:
- Development
- Integrate flake8-docstrings (add 'docstring-convention = numpy' in [flake8]
section of .flake8 file)
- **Improve test coverage**
- Manifolds:
- Stiefel [@118](./pymanopt/manifolds/stiefel.py#L118): simplify expressions if possible
- Solvers
- nelder_mead [@31](./pymanopt/solvers/nelder_mead.py#L31): need to decide what to do about the TR iterations
- Solvers cast to np.array before returning
- Tools:
- autodiff autograd: move type checking outside of compiled function
- autodiff/_autograd: fix product manifold when one or more of the manifolds is FixedRankEmbedded
- Misc:
- always use "".format rather than "%s" % "bla"
|
- Development
- - Integrate `flake8-import-order` into ci
- Integrate flake8-docstrings (add 'docstring-convention = numpy' in [flake8]
section of .flake8 file)
- **Improve test coverage**
- Manifolds:
- Stiefel [@118](./pymanopt/manifolds/stiefel.py#L118): simplify expressions if possible
- Solvers
- nelder_mead [@31](./pymanopt/solvers/nelder_mead.py#L31): need to decide what to do about the TR iterations
- Solvers cast to np.array before returning
- Tools:
- - autodiff theano and tensorflow: FixedRankEmbedded compatibility
- autodiff autograd: move type checking outside of compiled function
- - autodiff/_theano [@82](./pymanopt/tools/autodiff/_theano.py#L82): fix theano's no Rop fallback for the product manifold/investigate whether this no Rop fallback is really necessary
- autodiff/_autograd: fix product manifold when one or more of the manifolds is FixedRankEmbedded
- Misc:
- always use "".format rather than "%s" % "bla"
- - set up pre-commit hook to run flake8 tests (also add this to contrib.md)
- - drop python 3.5 support so we can switch to f-strings | 5 | 0.2 | 0 | 5 |
b23e9cbb391ec2727a33523be298ac3952013764 | _includes/current-news.html | _includes/current-news.html | <div class="featured-section current-news-section post-content">
<div class="wrapper">
<h2>Most Recent Post</h2>
{% for post in site.posts limit:1 %}
<div class="v-wrap flex-container flex-column-on-palm">
{% if post.thumb %}
<div class="featured-section-image">
<img class="featured-section-thumbnail" src="{{ site.baseurl }}/assets/images/{{ post.thumb }}" alt="{{ post.title }}">
</div>
{% endif %}
<div class="flex-item">
<h3>
<a class="post-link" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</h3>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
{% if post.author %}
· <span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">{{ post.author['display_name'] }}</span>
</span>
{% endif %}
<p class="featured-section-summary">
{{ post.content | strip_html | truncate: 420 }}
{% if post.content.size > 60 %}
<a href="{{ site.baseurl }}{{ post.url }}">Read more</a>
{% endif %}
</p>
</div>
</div>
{% endfor %}
<h3 class="featured-section-more">
<a class="btn" href="/blog">More Posts</a>
</h3>
</div>
</div>
| <div class="featured-section current-news-section post-content">
<div class="wrapper">
<h2>Most Recent Post</h2>
{% for post in site.posts limit:1 %}
<div class="v-wrap flex-container flex-column-on-palm">
{% if post.thumb %}
<div class="featured-section-image">
<img class="featured-section-thumbnail" src="{{ site.baseurl }}/assets/images/{{ post.thumb }}" alt="{{ post.title }}">
</div>
{% endif %}
<div class="flex-item">
<h3>
<a class="post-link" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</h3>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
{% if post.author['first_name'] %}
• <span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">{{ post.author['first_name'] }} {{ post.author['last_name'] }}</span>
</span>
{% endif %}
<p class="featured-section-summary">
{{ post.content | strip_html | truncate: 420 }}
{% if post.content.size > 60 %}
<a href="{{ site.baseurl }}{{ post.url }}">Read more</a>
{% endif %}
</p>
</div>
</div>
{% endfor %}
<h3 class="featured-section-more">
<a class="btn" href="/blog">More Posts</a>
</h3>
</div>
</div>
| Fix blog author display name on homepage | Fix blog author display name on homepage
| HTML | unlicense | open-austin/open-austin.github.io,open-austin/open-austin.org,open-austin/open-austin.org,open-austin/open-austin.org,open-austin/open-austin.github.io,open-austin/open-austin.github.io | html | ## Code Before:
<div class="featured-section current-news-section post-content">
<div class="wrapper">
<h2>Most Recent Post</h2>
{% for post in site.posts limit:1 %}
<div class="v-wrap flex-container flex-column-on-palm">
{% if post.thumb %}
<div class="featured-section-image">
<img class="featured-section-thumbnail" src="{{ site.baseurl }}/assets/images/{{ post.thumb }}" alt="{{ post.title }}">
</div>
{% endif %}
<div class="flex-item">
<h3>
<a class="post-link" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</h3>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
{% if post.author %}
· <span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">{{ post.author['display_name'] }}</span>
</span>
{% endif %}
<p class="featured-section-summary">
{{ post.content | strip_html | truncate: 420 }}
{% if post.content.size > 60 %}
<a href="{{ site.baseurl }}{{ post.url }}">Read more</a>
{% endif %}
</p>
</div>
</div>
{% endfor %}
<h3 class="featured-section-more">
<a class="btn" href="/blog">More Posts</a>
</h3>
</div>
</div>
## Instruction:
Fix blog author display name on homepage
## Code After:
<div class="featured-section current-news-section post-content">
<div class="wrapper">
<h2>Most Recent Post</h2>
{% for post in site.posts limit:1 %}
<div class="v-wrap flex-container flex-column-on-palm">
{% if post.thumb %}
<div class="featured-section-image">
<img class="featured-section-thumbnail" src="{{ site.baseurl }}/assets/images/{{ post.thumb }}" alt="{{ post.title }}">
</div>
{% endif %}
<div class="flex-item">
<h3>
<a class="post-link" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</h3>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
{% if post.author['first_name'] %}
• <span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">{{ post.author['first_name'] }} {{ post.author['last_name'] }}</span>
</span>
{% endif %}
<p class="featured-section-summary">
{{ post.content | strip_html | truncate: 420 }}
{% if post.content.size > 60 %}
<a href="{{ site.baseurl }}{{ post.url }}">Read more</a>
{% endif %}
</p>
</div>
</div>
{% endfor %}
<h3 class="featured-section-more">
<a class="btn" href="/blog">More Posts</a>
</h3>
</div>
</div>
| <div class="featured-section current-news-section post-content">
<div class="wrapper">
<h2>Most Recent Post</h2>
{% for post in site.posts limit:1 %}
<div class="v-wrap flex-container flex-column-on-palm">
{% if post.thumb %}
<div class="featured-section-image">
<img class="featured-section-thumbnail" src="{{ site.baseurl }}/assets/images/{{ post.thumb }}" alt="{{ post.title }}">
</div>
{% endif %}
<div class="flex-item">
<h3>
<a class="post-link" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</h3>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
- {% if post.author %}
+ {% if post.author['first_name'] %}
? ++++++++++++++
- · <span itemprop="author" itemscope itemtype="http://schema.org/Person">
? ^^^^^^^^
+ • <span itemprop="author" itemscope itemtype="http://schema.org/Person">
? ^
- <span itemprop="name">{{ post.author['display_name'] }}</span>
? ^ ^
+ <span itemprop="name">{{ post.author['first_name'] }} {{ post.author['last_name'] }}</span>
? ^ + +++++++++++++++ ++++++++++++ ^^
</span>
{% endif %}
<p class="featured-section-summary">
{{ post.content | strip_html | truncate: 420 }}
{% if post.content.size > 60 %}
<a href="{{ site.baseurl }}{{ post.url }}">Read more</a>
{% endif %}
</p>
</div>
</div>
{% endfor %}
<h3 class="featured-section-more">
<a class="btn" href="/blog">More Posts</a>
</h3>
</div>
</div> | 6 | 0.176471 | 3 | 3 |
737002f11c454d94077d23f9c0ecad4f65739477 | scripts/jenkins/test-unit.sh | scripts/jenkins/test-unit.sh |
composer install
echo 'Running Unit tests'
./vendor/bin/phpunit
|
composer install
echo 'Running Unit tests'
phpunit
| Fix unit test script 2 | Fix unit test script 2
| Shell | apache-2.0 | olx-inc/octopush,olx-inc/octopush,olx-inc/octopush,olx-inc/octopush,olx-inc/octopush,olx-inc/octopush | shell | ## Code Before:
composer install
echo 'Running Unit tests'
./vendor/bin/phpunit
## Instruction:
Fix unit test script 2
## Code After:
composer install
echo 'Running Unit tests'
phpunit
|
composer install
echo 'Running Unit tests'
- ./vendor/bin/phpunit
+ phpunit | 2 | 0.333333 | 1 | 1 |
47bf8a8351b6a5bd4e4ad0b1943a329009cd7f87 | index.js | index.js | /* jshint node: true */
'use strict';
var path = require('path');
var mergeTrees = require('broccoli-merge-trees');
module.exports = {
name: 'lodash',
treeForAddon: function(tree) {
var lodashPath = path.join(this.project.root, 'node_modules', 'ember-lodash', 'node_modules', 'lodash-es');
if (this.app.name === 'dummy') {
lodashPath = path.join(this.project.root, 'node_modules', 'lodash-es');
}
var lodashTree = this.treeGenerator(lodashPath);
var trees = mergeTrees([lodashTree, tree], {
overwrite: true
});
return this._super.treeForAddon.call(this, trees);
},
};
| /* jshint node: true */
'use strict';
var path = require('path');
var mergeTrees = require('broccoli-merge-trees');
module.exports = {
name: 'lodash',
treeForAddon: function(tree) {
var lodashPath = path.join(this.project.addonPackages['ember-lodash'].path, 'node_modules', 'lodash-es');
var lodashTree = this.treeGenerator(lodashPath);
var trees = mergeTrees([lodashTree, tree], {
overwrite: true
});
return this._super.treeForAddon.call(this, trees);
}
};
| Use this.project.addonPackages to resolve head of addon path | Use this.project.addonPackages to resolve head of addon path
| JavaScript | mit | samselikoff/ember-lodash,levanto-financial/ember-lodash,levanto-financial/ember-lodash,jmccune/ember-jm-lodash,mike-north/ember-lodash,mike-north/ember-lodash,truenorth/ember-lodash,samselikoff/ember-lodash,truenorth/ember-lodash,jmccune/ember-jm-lodash | javascript | ## Code Before:
/* jshint node: true */
'use strict';
var path = require('path');
var mergeTrees = require('broccoli-merge-trees');
module.exports = {
name: 'lodash',
treeForAddon: function(tree) {
var lodashPath = path.join(this.project.root, 'node_modules', 'ember-lodash', 'node_modules', 'lodash-es');
if (this.app.name === 'dummy') {
lodashPath = path.join(this.project.root, 'node_modules', 'lodash-es');
}
var lodashTree = this.treeGenerator(lodashPath);
var trees = mergeTrees([lodashTree, tree], {
overwrite: true
});
return this._super.treeForAddon.call(this, trees);
},
};
## Instruction:
Use this.project.addonPackages to resolve head of addon path
## Code After:
/* jshint node: true */
'use strict';
var path = require('path');
var mergeTrees = require('broccoli-merge-trees');
module.exports = {
name: 'lodash',
treeForAddon: function(tree) {
var lodashPath = path.join(this.project.addonPackages['ember-lodash'].path, 'node_modules', 'lodash-es');
var lodashTree = this.treeGenerator(lodashPath);
var trees = mergeTrees([lodashTree, tree], {
overwrite: true
});
return this._super.treeForAddon.call(this, trees);
}
};
| /* jshint node: true */
'use strict';
var path = require('path');
var mergeTrees = require('broccoli-merge-trees');
module.exports = {
name: 'lodash',
treeForAddon: function(tree) {
- var lodashPath = path.join(this.project.root, 'node_modules', 'ember-lodash', 'node_modules', 'lodash-es');
? ^ ----- ^^^^^^^^^ ^^^
+ var lodashPath = path.join(this.project.addonPackages['ember-lodash'].path, 'node_modules', 'lodash-es');
? ^^^ ^^^^^^ ^ ++++++
-
- if (this.app.name === 'dummy') {
- lodashPath = path.join(this.project.root, 'node_modules', 'lodash-es');
- }
-
var lodashTree = this.treeGenerator(lodashPath);
var trees = mergeTrees([lodashTree, tree], {
overwrite: true
});
return this._super.treeForAddon.call(this, trees);
- },
? -
+ }
}; | 9 | 0.36 | 2 | 7 |
406dd5d9c16064484fdffbefe2c659fc577dc7c7 | _posts/2018-07-07-update-first-steam-release.md | _posts/2018-07-07-update-first-steam-release.md | ---
title: "Update - First game released on Steam"
date: 2018-07-07 20:00:00 +0200
tags: corpsemob
---
I haven't posted to this blog for quite a while, here's some update.
<!--more-->
Although I haven't been so active on this site lately that doesn't mean I was doing nothing gamedev related. On the contrary, I have been using my spare time to develop and release a game on Steam! Development took about 8 months (initially it had been planned as 6, oh well...). Corpse Mob is a zombie-killing top down shooter and you can check it out on [Steam](https://store.steampowered.com/app/828460/Corpse_Mob/). It is quite simple but I think it's OK for a start and this is my first full-fledged video game project ever (but not the last, hopefully).
Currently I'm creating prototypes for some new ideas, while working on patches, refactoring and some new content for Corpse Mob. I won't open source the whole code for this project but I'm planning to post some lessons learned/refactoring experiences to the site over the next few months.
Here's a release trailer:
<iframe width="560" height="315" src="https://www.youtube.com/embed/422ky0VJik4" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe> | ---
title: "Update - First game released on Steam"
date: 2018-07-07 20:00:00 +0200
tags: corpsemob
---
I haven't posted to this blog for quite a while, here's some update.
<!--more-->
Although I haven't been so active on this site lately that doesn't mean I was doing nothing gamedev related. On the contrary, I have been using my spare time to develop and release a game on Steam! Development took about 8 months (initially it had been planned as 6, oh well...). Corpse Mob is a zombie-killing top down shooter and you can check it out on [Steam](https://store.steampowered.com/app/828460/Corpse_Mob/). It is quite simple but I think it's OK for a start and this is my first full-fledged video game project ever (but not the last, hopefully).
Currently I'm creating prototypes for some new ideas, while working on patches, refactoring and some new content for Corpse Mob. I won't open source the whole code for this project but I'm planning to post some lessons learned/refactoring experiences to the site over the next few months.
Here's a release trailer:
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/rzpQCv7xlqQ?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe> | Fix Corpse Mob trailer link | Fix Corpse Mob trailer link
| Markdown | mit | mattsnippets1/mattsnippets1.github.io,mattsnippets1/mattsnippets1.github.io,mattsnippets1/mattsnippets1.github.io | markdown | ## Code Before:
---
title: "Update - First game released on Steam"
date: 2018-07-07 20:00:00 +0200
tags: corpsemob
---
I haven't posted to this blog for quite a while, here's some update.
<!--more-->
Although I haven't been so active on this site lately that doesn't mean I was doing nothing gamedev related. On the contrary, I have been using my spare time to develop and release a game on Steam! Development took about 8 months (initially it had been planned as 6, oh well...). Corpse Mob is a zombie-killing top down shooter and you can check it out on [Steam](https://store.steampowered.com/app/828460/Corpse_Mob/). It is quite simple but I think it's OK for a start and this is my first full-fledged video game project ever (but not the last, hopefully).
Currently I'm creating prototypes for some new ideas, while working on patches, refactoring and some new content for Corpse Mob. I won't open source the whole code for this project but I'm planning to post some lessons learned/refactoring experiences to the site over the next few months.
Here's a release trailer:
<iframe width="560" height="315" src="https://www.youtube.com/embed/422ky0VJik4" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
## Instruction:
Fix Corpse Mob trailer link
## Code After:
---
title: "Update - First game released on Steam"
date: 2018-07-07 20:00:00 +0200
tags: corpsemob
---
I haven't posted to this blog for quite a while, here's some update.
<!--more-->
Although I haven't been so active on this site lately that doesn't mean I was doing nothing gamedev related. On the contrary, I have been using my spare time to develop and release a game on Steam! Development took about 8 months (initially it had been planned as 6, oh well...). Corpse Mob is a zombie-killing top down shooter and you can check it out on [Steam](https://store.steampowered.com/app/828460/Corpse_Mob/). It is quite simple but I think it's OK for a start and this is my first full-fledged video game project ever (but not the last, hopefully).
Currently I'm creating prototypes for some new ideas, while working on patches, refactoring and some new content for Corpse Mob. I won't open source the whole code for this project but I'm planning to post some lessons learned/refactoring experiences to the site over the next few months.
Here's a release trailer:
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/rzpQCv7xlqQ?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe> | ---
title: "Update - First game released on Steam"
date: 2018-07-07 20:00:00 +0200
tags: corpsemob
---
I haven't posted to this blog for quite a while, here's some update.
<!--more-->
Although I haven't been so active on this site lately that doesn't mean I was doing nothing gamedev related. On the contrary, I have been using my spare time to develop and release a game on Steam! Development took about 8 months (initially it had been planned as 6, oh well...). Corpse Mob is a zombie-killing top down shooter and you can check it out on [Steam](https://store.steampowered.com/app/828460/Corpse_Mob/). It is quite simple but I think it's OK for a start and this is my first full-fledged video game project ever (but not the last, hopefully).
Currently I'm creating prototypes for some new ideas, while working on patches, refactoring and some new content for Corpse Mob. I won't open source the whole code for this project but I'm planning to post some lessons learned/refactoring experiences to the site over the next few months.
Here's a release trailer:
- <iframe width="560" height="315" src="https://www.youtube.com/embed/422ky0VJik4" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
? ^^^^^ -----
+ <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/rzpQCv7xlqQ?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
? +++++++++ ^^^^^^^^^^^^^^^^
| 2 | 0.142857 | 1 | 1 |
cc188cfcd7cf3df47643e1257203bb49b54e6656 | server/security.coffee | server/security.coffee | BrowserPolicy.content.allowImageOrigin '*'
BrowserPolicy.content.allowMediaOrigin '*'
BrowserPolicy.content.allowFontOrigin '*'
BrowserPolicy.content.allowStyleOrigin '*'
BrowserPolicy.content.allowConnectOrigin '*'
| BrowserPolicy.content.allowImageOrigin '*'
BrowserPolicy.content.allowMediaOrigin '*'
BrowserPolicy.content.allowFontOrigin '*'
BrowserPolicy.content.allowStyleOrigin '*'
BrowserPolicy.content.allowConnectOrigin '*'
## Allow blob source for images, as needed by pdf.js
BrowserPolicy.content.allowImageOrigin 'blob:'
| Fix PDFs with embedded images via BrowserPolicy | Fix PDFs with embedded images via BrowserPolicy
pdf.js embeds blob: objects into <img> tags (when the PDF has embedded
images), and we need to explicitly allow this.
| CoffeeScript | mit | edemaine/coauthor,edemaine/coauthor | coffeescript | ## Code Before:
BrowserPolicy.content.allowImageOrigin '*'
BrowserPolicy.content.allowMediaOrigin '*'
BrowserPolicy.content.allowFontOrigin '*'
BrowserPolicy.content.allowStyleOrigin '*'
BrowserPolicy.content.allowConnectOrigin '*'
## Instruction:
Fix PDFs with embedded images via BrowserPolicy
pdf.js embeds blob: objects into <img> tags (when the PDF has embedded
images), and we need to explicitly allow this.
## Code After:
BrowserPolicy.content.allowImageOrigin '*'
BrowserPolicy.content.allowMediaOrigin '*'
BrowserPolicy.content.allowFontOrigin '*'
BrowserPolicy.content.allowStyleOrigin '*'
BrowserPolicy.content.allowConnectOrigin '*'
## Allow blob source for images, as needed by pdf.js
BrowserPolicy.content.allowImageOrigin 'blob:'
| BrowserPolicy.content.allowImageOrigin '*'
BrowserPolicy.content.allowMediaOrigin '*'
BrowserPolicy.content.allowFontOrigin '*'
BrowserPolicy.content.allowStyleOrigin '*'
BrowserPolicy.content.allowConnectOrigin '*'
+
+ ## Allow blob source for images, as needed by pdf.js
+ BrowserPolicy.content.allowImageOrigin 'blob:' | 3 | 0.6 | 3 | 0 |
e27c288f8a50c1379cbfa22448e8ec4ca66d04ce | app/models/clusters/concerns/application_data.rb | app/models/clusters/concerns/application_data.rb |
module Clusters
module Concerns
module ApplicationData
extend ActiveSupport::Concern
included do
def uninstall_command
Gitlab::Kubernetes::Helm::DeleteCommand.new(
name: name,
rbac: cluster.platform_kubernetes_rbac?,
files: files
)
end
def repository
nil
end
def values
File.read(chart_values_file)
end
def files
@files ||= begin
files = { 'values.yaml': values }
files.merge!(certificate_files) if cluster.application_helm.has_ssl?
files
end
end
private
def certificate_files
{
'ca.pem': ca_cert,
'cert.pem': helm_cert.cert_string,
'key.pem': helm_cert.key_string
}
end
def ca_cert
cluster.application_helm.ca_cert
end
def helm_cert
@helm_cert ||= cluster.application_helm.issue_client_cert
end
def chart_values_file
"#{Rails.root}/vendor/#{name}/values.yaml"
end
end
end
end
end
|
module Clusters
module Concerns
module ApplicationData
def uninstall_command
Gitlab::Kubernetes::Helm::DeleteCommand.new(
name: name,
rbac: cluster.platform_kubernetes_rbac?,
files: files
)
end
def repository
nil
end
def values
File.read(chart_values_file)
end
def files
@files ||= begin
files = { 'values.yaml': values }
files.merge!(certificate_files) if cluster.application_helm.has_ssl?
files
end
end
private
def certificate_files
{
'ca.pem': ca_cert,
'cert.pem': helm_cert.cert_string,
'key.pem': helm_cert.key_string
}
end
def ca_cert
cluster.application_helm.ca_cert
end
def helm_cert
@helm_cert ||= cluster.application_helm.issue_client_cert
end
def chart_values_file
"#{Rails.root}/vendor/#{name}/values.yaml"
end
end
end
end
| Make ApplicationData a plain module include | Make ApplicationData a plain module include
| Ruby | mit | mmkassem/gitlabhq,stoplightio/gitlabhq,stoplightio/gitlabhq,stoplightio/gitlabhq,mmkassem/gitlabhq,mmkassem/gitlabhq,mmkassem/gitlabhq,stoplightio/gitlabhq | ruby | ## Code Before:
module Clusters
module Concerns
module ApplicationData
extend ActiveSupport::Concern
included do
def uninstall_command
Gitlab::Kubernetes::Helm::DeleteCommand.new(
name: name,
rbac: cluster.platform_kubernetes_rbac?,
files: files
)
end
def repository
nil
end
def values
File.read(chart_values_file)
end
def files
@files ||= begin
files = { 'values.yaml': values }
files.merge!(certificate_files) if cluster.application_helm.has_ssl?
files
end
end
private
def certificate_files
{
'ca.pem': ca_cert,
'cert.pem': helm_cert.cert_string,
'key.pem': helm_cert.key_string
}
end
def ca_cert
cluster.application_helm.ca_cert
end
def helm_cert
@helm_cert ||= cluster.application_helm.issue_client_cert
end
def chart_values_file
"#{Rails.root}/vendor/#{name}/values.yaml"
end
end
end
end
end
## Instruction:
Make ApplicationData a plain module include
## Code After:
module Clusters
module Concerns
module ApplicationData
def uninstall_command
Gitlab::Kubernetes::Helm::DeleteCommand.new(
name: name,
rbac: cluster.platform_kubernetes_rbac?,
files: files
)
end
def repository
nil
end
def values
File.read(chart_values_file)
end
def files
@files ||= begin
files = { 'values.yaml': values }
files.merge!(certificate_files) if cluster.application_helm.has_ssl?
files
end
end
private
def certificate_files
{
'ca.pem': ca_cert,
'cert.pem': helm_cert.cert_string,
'key.pem': helm_cert.key_string
}
end
def ca_cert
cluster.application_helm.ca_cert
end
def helm_cert
@helm_cert ||= cluster.application_helm.issue_client_cert
end
def chart_values_file
"#{Rails.root}/vendor/#{name}/values.yaml"
end
end
end
end
|
module Clusters
module Concerns
module ApplicationData
- extend ActiveSupport::Concern
+ def uninstall_command
+ Gitlab::Kubernetes::Helm::DeleteCommand.new(
+ name: name,
+ rbac: cluster.platform_kubernetes_rbac?,
+ files: files
+ )
+ end
- included do
- def uninstall_command
- Gitlab::Kubernetes::Helm::DeleteCommand.new(
- name: name,
- rbac: cluster.platform_kubernetes_rbac?,
+ def repository
+ nil
+ end
+
+ def values
+ File.read(chart_values_file)
+ end
+
+ def files
+ @files ||= begin
+ files = { 'values.yaml': values }
+
+ files.merge!(certificate_files) if cluster.application_helm.has_ssl?
+
- files: files
? -- -------
+ files
- )
end
+ end
+ private
- def repository
- nil
- end
- def values
- File.read(chart_values_file)
+ def certificate_files
+ {
+ 'ca.pem': ca_cert,
+ 'cert.pem': helm_cert.cert_string,
+ 'key.pem': helm_cert.key_string
+ }
- end
? --
+ end
- def files
- @files ||= begin
- files = { 'values.yaml': values }
+ def ca_cert
+ cluster.application_helm.ca_cert
+ end
- files.merge!(certificate_files) if cluster.application_helm.has_ssl?
+ def helm_cert
+ @helm_cert ||= cluster.application_helm.issue_client_cert
+ end
- files
- end
- end
-
- private
-
- def certificate_files
- {
- 'ca.pem': ca_cert,
- 'cert.pem': helm_cert.cert_string,
- 'key.pem': helm_cert.key_string
- }
- end
-
- def ca_cert
- cluster.application_helm.ca_cert
- end
-
- def helm_cert
- @helm_cert ||= cluster.application_helm.issue_client_cert
- end
-
- def chart_values_file
? --
+ def chart_values_file
- "#{Rails.root}/vendor/#{name}/values.yaml"
? --
+ "#{Rails.root}/vendor/#{name}/values.yaml"
- end
end
end
end
end | 82 | 1.413793 | 39 | 43 |
fe6862f8ab65e34b6b746fa950d0e92edd1c2f3e | pkgs/development/libraries/esdl/default.nix | pkgs/development/libraries/esdl/default.nix | {stdenv, fetchurl, SDL, mesa, erlang}:
stdenv.mkDerivation rec {
name = "esdl-1.2";
src = fetchurl {
url = "mirror://sourceforge/esdl/${name}.src.tar.gz";
sha256 = "0zbnwhy2diivrrs55n96y3sfnbs6lsgz91xjaq15sfi858k9ha29";
};
buildInputs = [ erlang ];
propagatedBuildInputs = [ SDL mesa ];
preBuild = ''
export makeFlags="INSTALLDIR=$out/lib/erlang/addons/${name}";
'';
meta = {
homepage = http://esdl.sourceforge.net/;
description = "Erlang binding to SDL that includes a binding to OpenGL";
license = "BSD";
};
}
| {stdenv, fetchurl, SDL, mesa, erlang}:
stdenv.mkDerivation rec {
name = "esdl-1.0.1";
src = fetchurl {
url = "mirror://sourceforge/esdl/${name}.src.tar.gz";
sha256 = "0zc7cmr44v10sb593dismdm5qc2v7sm3z9yh22g4r9g6asbg5z0n";
};
buildInputs = [ erlang ];
propagatedBuildInputs = [ SDL mesa ];
preBuild = ''
export makeFlags="INSTALLDIR=$out/lib/erlang/addons/${name}";
'';
meta = {
homepage = http://esdl.sourceforge.net/;
description = "Erlang binding to SDL that includes a binding to OpenGL";
license = "BSD";
};
}
| Revert "esdl: update from 1.0.1 to 1.2" | Revert "esdl: update from 1.0.1 to 1.2"
Api change breaks dependencies.
This reverts commit d3b47ef72575ccf2f1c885d325f2e3427e7abe2b.
| Nix | mit | SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,triton/triton,triton/triton,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs | nix | ## Code Before:
{stdenv, fetchurl, SDL, mesa, erlang}:
stdenv.mkDerivation rec {
name = "esdl-1.2";
src = fetchurl {
url = "mirror://sourceforge/esdl/${name}.src.tar.gz";
sha256 = "0zbnwhy2diivrrs55n96y3sfnbs6lsgz91xjaq15sfi858k9ha29";
};
buildInputs = [ erlang ];
propagatedBuildInputs = [ SDL mesa ];
preBuild = ''
export makeFlags="INSTALLDIR=$out/lib/erlang/addons/${name}";
'';
meta = {
homepage = http://esdl.sourceforge.net/;
description = "Erlang binding to SDL that includes a binding to OpenGL";
license = "BSD";
};
}
## Instruction:
Revert "esdl: update from 1.0.1 to 1.2"
Api change breaks dependencies.
This reverts commit d3b47ef72575ccf2f1c885d325f2e3427e7abe2b.
## Code After:
{stdenv, fetchurl, SDL, mesa, erlang}:
stdenv.mkDerivation rec {
name = "esdl-1.0.1";
src = fetchurl {
url = "mirror://sourceforge/esdl/${name}.src.tar.gz";
sha256 = "0zc7cmr44v10sb593dismdm5qc2v7sm3z9yh22g4r9g6asbg5z0n";
};
buildInputs = [ erlang ];
propagatedBuildInputs = [ SDL mesa ];
preBuild = ''
export makeFlags="INSTALLDIR=$out/lib/erlang/addons/${name}";
'';
meta = {
homepage = http://esdl.sourceforge.net/;
description = "Erlang binding to SDL that includes a binding to OpenGL";
license = "BSD";
};
}
| {stdenv, fetchurl, SDL, mesa, erlang}:
stdenv.mkDerivation rec {
- name = "esdl-1.2";
? ^
+ name = "esdl-1.0.1";
? ^^^
src = fetchurl {
url = "mirror://sourceforge/esdl/${name}.src.tar.gz";
- sha256 = "0zbnwhy2diivrrs55n96y3sfnbs6lsgz91xjaq15sfi858k9ha29";
+ sha256 = "0zc7cmr44v10sb593dismdm5qc2v7sm3z9yh22g4r9g6asbg5z0n";
};
buildInputs = [ erlang ];
propagatedBuildInputs = [ SDL mesa ];
preBuild = ''
export makeFlags="INSTALLDIR=$out/lib/erlang/addons/${name}";
'';
meta = {
homepage = http://esdl.sourceforge.net/;
description = "Erlang binding to SDL that includes a binding to OpenGL";
license = "BSD";
};
} | 4 | 0.173913 | 2 | 2 |
14fd2c4be7af5c247ec829eaab4bbe7b35027775 | test/e2e/scenarios.js | test/e2e/scenarios.js | 'use strict';
describe('my angular musicbrainz app', function () {
beforeEach(function () {
browser().navigateTo('app/index.html');
});
it('should automatically redirect to /search when location hash/fragment is empty', function () {
expect(browser().location().url()).toBe('/search');
});
describe('search', function () {
beforeEach(function () {
browser().navigateTo('#/search');
});
it('should render search when user navigates to /search', function () {
expect(element('#search-input-label').text()).
toContain('music');
});
it('U2 album search', function () {
input('searchText').enter('U2');
element(':button').click();
expect(element('#result-number').text()).
toContain('22');
});
});
describe('info', function () {
beforeEach(function () {
browser().navigateTo('#/info');
});
it('should render info when user navigates to /info', function () {
expect(element('[ng-view] p:first').text()).
toMatch(/Information/);
});
});
});
| 'use strict';
describe('my angular musicbrainz app', function () {
beforeEach(function () {
browser().navigateTo('app/index.html');
});
describe('search', function () {
beforeEach(function () {
browser().navigateTo('#/search');
});
it('should render search when user navigates to /search', function () {
expect(element('#search-input-label').text()).
toContain('music');
});
it('U2 album search', function () {
input('searchText').enter('U2');
element(':button').click();
expect(element('#result-number').text()).
toContain('22');
});
});
describe('info', function () {
beforeEach(function () {
browser().navigateTo('#/info');
});
it('should render info when user navigates to /info', function () {
expect(element('[ng-view] li:first').text()).
toMatch(/Application version/);
});
});
it('should automatically redirect to /search when location hash/fragment is empty', function () {
expect(browser().location().url()).toBe('/search');
});
});
| Fix assertion into info e2e-test | Fix assertion into info e2e-test
| JavaScript | mit | arey/angular-musicbrainz,arey/angular-musicbrainz,arey/angular-musicbrainz,arey/angular-musicbrainz,arey/angular-musicbrainz | javascript | ## Code Before:
'use strict';
describe('my angular musicbrainz app', function () {
beforeEach(function () {
browser().navigateTo('app/index.html');
});
it('should automatically redirect to /search when location hash/fragment is empty', function () {
expect(browser().location().url()).toBe('/search');
});
describe('search', function () {
beforeEach(function () {
browser().navigateTo('#/search');
});
it('should render search when user navigates to /search', function () {
expect(element('#search-input-label').text()).
toContain('music');
});
it('U2 album search', function () {
input('searchText').enter('U2');
element(':button').click();
expect(element('#result-number').text()).
toContain('22');
});
});
describe('info', function () {
beforeEach(function () {
browser().navigateTo('#/info');
});
it('should render info when user navigates to /info', function () {
expect(element('[ng-view] p:first').text()).
toMatch(/Information/);
});
});
});
## Instruction:
Fix assertion into info e2e-test
## Code After:
'use strict';
describe('my angular musicbrainz app', function () {
beforeEach(function () {
browser().navigateTo('app/index.html');
});
describe('search', function () {
beforeEach(function () {
browser().navigateTo('#/search');
});
it('should render search when user navigates to /search', function () {
expect(element('#search-input-label').text()).
toContain('music');
});
it('U2 album search', function () {
input('searchText').enter('U2');
element(':button').click();
expect(element('#result-number').text()).
toContain('22');
});
});
describe('info', function () {
beforeEach(function () {
browser().navigateTo('#/info');
});
it('should render info when user navigates to /info', function () {
expect(element('[ng-view] li:first').text()).
toMatch(/Application version/);
});
});
it('should automatically redirect to /search when location hash/fragment is empty', function () {
expect(browser().location().url()).toBe('/search');
});
});
| 'use strict';
describe('my angular musicbrainz app', function () {
beforeEach(function () {
browser().navigateTo('app/index.html');
});
-
- it('should automatically redirect to /search when location hash/fragment is empty', function () {
- expect(browser().location().url()).toBe('/search');
- });
-
-
describe('search', function () {
beforeEach(function () {
browser().navigateTo('#/search');
});
-
it('should render search when user navigates to /search', function () {
expect(element('#search-input-label').text()).
toContain('music');
});
it('U2 album search', function () {
input('searchText').enter('U2');
element(':button').click();
expect(element('#result-number').text()).
toContain('22');
});
});
-
describe('info', function () {
beforeEach(function () {
browser().navigateTo('#/info');
});
-
it('should render info when user navigates to /info', function () {
- expect(element('[ng-view] p:first').text()).
? ^
+ expect(element('[ng-view] li:first').text()).
? ^^
- toMatch(/Information/);
? ^^^^^^
+ toMatch(/Application version/);
? ^^^^^^ ++++++++
});
});
+
+ it('should automatically redirect to /search when location hash/fragment is empty', function () {
+ expect(browser().location().url()).toBe('/search');
+ });
+
}); | 18 | 0.352941 | 7 | 11 |
f26e3716c848bf548d99015da6fb1a26bd975823 | lambda-selenium-java/src/main/java/com/blackboard/testing/common/LambdaBaseTest.java | lambda-selenium-java/src/main/java/com/blackboard/testing/common/LambdaBaseTest.java | package com.blackboard.testing.common;
import com.blackboard.testing.driver.LambdaWebDriverThreadLocalContainer;
import com.blackboard.testing.testcontext.EnvironmentDetector;
import com.codeborne.selenide.Configuration;
import com.codeborne.selenide.WebDriverRunner;
import com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName;
import org.junit.BeforeClass;
public abstract class LambdaBaseTest {
@BeforeClass
public static void baseTestBeforeClass() {
Configuration.browser = BrowserName.CHROME.toString();
Configuration.reopenBrowserOnFail = false;
if (EnvironmentDetector.inLambda()) {
Configuration.reportsFolder = "/tmp/selenidereports";
WebDriverRunner.webdriverContainer = new LambdaWebDriverThreadLocalContainer();
}
}
}
| package com.blackboard.testing.common;
import com.blackboard.testing.driver.LambdaWebDriverThreadLocalContainer;
import com.blackboard.testing.lambda.LambdaTestHandler;
import com.blackboard.testing.testcontext.EnvironmentDetector;
import com.codeborne.selenide.Configuration;
import com.codeborne.selenide.Selenide;
import com.codeborne.selenide.WebDriverRunner;
import org.junit.BeforeClass;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
public abstract class LambdaBaseTest {
@BeforeClass
public static void baseTestBeforeClass() {
Configuration.browser = "chrome";
Configuration.reopenBrowserOnFail = false;
if (EnvironmentDetector.inLambda()) {
WebDriverRunner.webdriverContainer = new LambdaWebDriverThreadLocalContainer();
}
}
protected void screenshot(String description) {
if (EnvironmentDetector.inLambda()) {
LambdaTestHandler.addAttachment(description + ".png",
((TakesScreenshot) WebDriverRunner.getWebDriver())
.getScreenshotAs(OutputType.BYTES));
} else {
Selenide.screenshot(description);
}
}
}
| Add screenshot capability to base test | Add screenshot capability to base test
| Java | mit | blackboard/lambda-selenium,blackboard/lambda-selenium | java | ## Code Before:
package com.blackboard.testing.common;
import com.blackboard.testing.driver.LambdaWebDriverThreadLocalContainer;
import com.blackboard.testing.testcontext.EnvironmentDetector;
import com.codeborne.selenide.Configuration;
import com.codeborne.selenide.WebDriverRunner;
import com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName;
import org.junit.BeforeClass;
public abstract class LambdaBaseTest {
@BeforeClass
public static void baseTestBeforeClass() {
Configuration.browser = BrowserName.CHROME.toString();
Configuration.reopenBrowserOnFail = false;
if (EnvironmentDetector.inLambda()) {
Configuration.reportsFolder = "/tmp/selenidereports";
WebDriverRunner.webdriverContainer = new LambdaWebDriverThreadLocalContainer();
}
}
}
## Instruction:
Add screenshot capability to base test
## Code After:
package com.blackboard.testing.common;
import com.blackboard.testing.driver.LambdaWebDriverThreadLocalContainer;
import com.blackboard.testing.lambda.LambdaTestHandler;
import com.blackboard.testing.testcontext.EnvironmentDetector;
import com.codeborne.selenide.Configuration;
import com.codeborne.selenide.Selenide;
import com.codeborne.selenide.WebDriverRunner;
import org.junit.BeforeClass;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
public abstract class LambdaBaseTest {
@BeforeClass
public static void baseTestBeforeClass() {
Configuration.browser = "chrome";
Configuration.reopenBrowserOnFail = false;
if (EnvironmentDetector.inLambda()) {
WebDriverRunner.webdriverContainer = new LambdaWebDriverThreadLocalContainer();
}
}
protected void screenshot(String description) {
if (EnvironmentDetector.inLambda()) {
LambdaTestHandler.addAttachment(description + ".png",
((TakesScreenshot) WebDriverRunner.getWebDriver())
.getScreenshotAs(OutputType.BYTES));
} else {
Selenide.screenshot(description);
}
}
}
| package com.blackboard.testing.common;
import com.blackboard.testing.driver.LambdaWebDriverThreadLocalContainer;
+ import com.blackboard.testing.lambda.LambdaTestHandler;
import com.blackboard.testing.testcontext.EnvironmentDetector;
import com.codeborne.selenide.Configuration;
+ import com.codeborne.selenide.Selenide;
import com.codeborne.selenide.WebDriverRunner;
- import com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName;
import org.junit.BeforeClass;
+ import org.openqa.selenium.OutputType;
+ import org.openqa.selenium.TakesScreenshot;
public abstract class LambdaBaseTest {
@BeforeClass
public static void baseTestBeforeClass() {
- Configuration.browser = BrowserName.CHROME.toString();
+ Configuration.browser = "chrome";
Configuration.reopenBrowserOnFail = false;
if (EnvironmentDetector.inLambda()) {
- Configuration.reportsFolder = "/tmp/selenidereports";
WebDriverRunner.webdriverContainer = new LambdaWebDriverThreadLocalContainer();
}
}
+
+ protected void screenshot(String description) {
+ if (EnvironmentDetector.inLambda()) {
+ LambdaTestHandler.addAttachment(description + ".png",
+ ((TakesScreenshot) WebDriverRunner.getWebDriver())
+ .getScreenshotAs(OutputType.BYTES));
+ } else {
+ Selenide.screenshot(description);
+ }
+ }
} | 18 | 0.818182 | 15 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.