This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define('$MODEULE_NAME$',function(require, exports){ | |
var $NAME$ = require('$NAME$') | |
exports = $END$; | |
return exports; | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Linux x64 Debian Jessie + KDE | |
# nano | |
nano /etc/apt/sources.list | |
# add 'contrib non-free' | |
# disable src repos | |
# add new repos | |
apt-get install -y python-software-properties software-properties-common apt-transport-https | |
apt-add-repository 'deb http://manpages.ylsoftware.com/debian/ all main' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
DATE=`date +%Y-%m-%d--%H-%M-%S` | |
MAINDIR=`pwd` | |
THIS_SHELL_FILE_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | |
function simLink() { | |
local destFile=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function dump($var, $showFullData = false, $escapeTags = false, $cover = true){ | |
if (!defined('DEBUG') || !DEBUG) { | |
return $var; | |
} | |
if (!defined('DUMP_WAS_ADDED')) { | |
define('DUMP_WAS_ADDED', true); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ide and os files | |
.idea/ | |
*.DS_Store | |
*.kate-swp | |
*.desktop | |
*.thumb | |
*.sublime* | |
.~* | |
~* | |
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: node_js | |
node_js: | |
- "stable" | |
- "unstable" | |
- "iojs" | |
before_script: | |
- npm i jscoverage coveralls grunt-cli nodeunit | |
script: "./node_modules/.bin/grunt test" | |
after_script: | |
- ./node_modules/.bin/jscoverage lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var glob = require('glob'); | |
var path = require('path'); | |
var _ = require('lodash'); | |
var fs = require('fs'); | |
var chalk = require('chalk'); | |
glob.sync(path.resolve(__dirname, 'app/components/**/*.js')).forEach(function (f) { | |
var content = fs.readFileSync(f, { encoding: 'utf8' }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseModel { | |
constructor (data, options = {}) { | |
if (options.$parse == null || options.$parse) { | |
data = this.$parse(data, options); | |
} | |
this.$$data = _.cloneDeep(data); | |
_.extend(this, data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onErrorNotice = function (func) { | |
'use strict'; | |
var onerror = function(e) { | |
func({ | |
title: e.title || 'JavaScript error', | |
message: e.error && e.error.name && 'number' in e.error ? e.error.name + ': ' + e.message : e.message, | |
file: (e.filename && e.filename.search(/^https?:|file:/) !== -1 ? e.filename + ':::' : '') + (e.filename ? e.filename + ':' + (e.lineno == null ? '' : e.lineno) + ':' + (e.colno == null ? '' : e.colno) : ''), | |
stack: (e.error && e.error.stack) || e.stack || '' | |
}); |
OlderNewer