Skip to content

Instantly share code, notes, and snippets.

Bryan Forbes bryanforbes

Block or report user

Report or block bryanforbes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .jscsrc
{
"requireCurlyBraces": [
"if", "else", "for", "while", "do", "try",
"catch"
],
"requireSpaceAfterKeywords": [
"if", "else", "for", "while", "do", "switch",
"return", "try", "catch"
],
"requireSpaceBeforeBlockStatements": true,
View shared-state.js
define([
'intern!object',
'intern/chai!assert'
], function (registerSuite, assert) {
var one = 0;
registerSuite({
// If this test were to run more than once (which functional
// tests do), it would fail because it is keeping its state
// in the module's closure
View fails.js
define([
'./_base',
'./AdapterRegistry',
'./colors',
'./io-query',
'./promise',
'./request',
'./store',
'./string',
'./regexp',
View Gruntfile.js
module.exports = function (grunt) {
grunt.loadNpmTasks('intern-geezer');
var req = (function () {
this.dojoConfig = {
async: true,
baseUrl: __dirname,
packages: [
{ name: 'intern', location: 'node_modules/intern-geezer' },
{ name: 'when', location: 'node_modules/when', main: 'when' },
View module2.js
/**
* @module my/module2
*/
define([], function () {
/**
* @alias module:my/module2
*/
var module2 = {
/**
* A description of the following function
View module2.js
/**
* @module my/module2
*/
define([], function () {
/**
* @alias module:my/module2
*/
return {
/**
* A description of the following function
View .jscsrc
{
"requireCurlyBraces": [
"if", "else", "for", "while", "do", "try",
"catch"
],
"requireSpaceAfterKeywords": [
"if", "else", "for", "while", "do", "switch",
"return", "try", "catch"
],
"requireSpaceBeforeBlockStatements": true,
View solution.js
require([
'dojo/request',
], function (request) {
request.post('http://whocares.com/payment', {
data: JSON.stringify({
cardNumber: 111111111111,
expirationDate: Infinity,
transferAmount: '11000000000.00'
})
});
View gitlab.md

GitLab CE Omnibus installation using system nginx

Requirements

  • Ubuntu 14.04 LTS
  • Root or sudo access

Steps

  • Install git and nginx:
View gulpfile.js
var gulp = require('gulp');
var filter = require('gulp-filter');
var vinylPaths = require('vinyl-paths');
var fs = require('fs');
gulp.task('clean', function (cb) {
var vp = vinylPaths();
gulp.src([ '**/{*.js,*.js.map}', '!node_modules/**/*' ], { read: false })
.pipe(filter(function (file) {
var jsName = file.path.match(/(.*\.js)(?:\.map)?$/)[1];
You can’t perform that action at this time.