Skip to content

Instantly share code, notes, and snippets.

F:\Tom\Code\tepez\server>npm install --save bcrypt --verbose
npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
npm verb cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli 'install',
npm verb cli '--save',
npm verb cli 'bcrypt',
npm verb cli '--verbose' ]
npm info using npm@1.4.3
npm info using node@v0.10.26
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@tomyam1
tomyam1 / gridVariables.less
Created November 13, 2014 16:48
ui-grid bootstrap
@import "../../../../vendor/angular-ui-grid-src/src/less/grid";
@import "../../../../vendor/angular-ui-grid-src/src/less/header";
@import "../../../../vendor/angular-ui-grid-src/src/less/body";
@import "../../../../vendor/angular-ui-grid-src/src/less/cell";
@import "../../../../vendor/angular-ui-grid-src/src/less/native-scrollbar";
@import "../../../../vendor/angular-ui-grid-src/src/less/footer";
@import "../../../../vendor/angular-ui-grid-src/src/less/menu";
@import "../../../../vendor/angular-ui-grid-src/src/less/sorting";
@import "../../../../vendor/angular-ui-grid-src/src/less/icons";
@import "../../../../vendor/angular-ui-grid-src/src/less/rtl";
@tomyam1
tomyam1 / matchers.js
Last active April 9, 2020 15:02
Custom matchers for Protractor and Jasmine 2
'use strict';
const _ = require('lodash');
const Tinycolor2 = require('tinycolor2');
/**
* Custom matchers for protractor and jasmine 2
*
* expect(el).toBePresent();
* expect(el).toBeDisplayed();
@tomyam1
tomyam1 / readme.md
Created August 30, 2015 10:48
Build and run iText RUPS

How to build and run iText RUPS

svn checkout svn://svn.code.sf.net/p/itextrups/code/tags/rups-5.5.6 itextrups-code
cd itextrups-code
mvn package
java -jar target/itext-rups-5.5.6-jar-with-dependencies.jar

Source: comment by lilalinda on http://sourceforge.net/projects/itextrups/

@tomyam1
tomyam1 / .gitignore
Created December 3, 2015 17:46 — forked from mathiasbynens/.gitignore
Generating a regular expression to match valid JavaScript identifiers (like https://mathiasbynens.be/demo/javascript-identifier-regex) in Node.js
node_modules
@tomyam1
tomyam1 / logz.io.js
Last active March 4, 2016 14:36
Data extraction scripts
// Prints the s3 buckets defiend as log sources in a tab delimited format you can paste in excel
// https://app.logz.io/#/dashboard/data-sources/
var settings = [];
$('.s3-settings-section').each(function() {
var sectionEl = $(this);
var bucket = sectionEl.find('[ng-model="settings.bucket"]').val();
var prefix = sectionEl.find('[ng-model="settings.prefix"]').val();
settings.push(bucket + '\t' + prefix);
});
@tomyam1
tomyam1 / lodash.custom.js
Last active June 30, 2016 17:06
lodash-cli issue
/**
* @license
* lodash 4.11.1 (Custom Build) <https://lodash.com/>
* Build: `lodash core --development plus="add,assign,capitalize,cloneDeep,deburr,findIndex,forIn,intersection,isError,isPlainObject,merge,method,pickBy,property,range,remove,times,uniq,values,String,maxBy,isNil,chunk"`
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
;(function() {
@tomyam1
tomyam1 / lodash.custom.js
Last active June 30, 2016 17:08
lodash-issue
/**
* @license
* lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core --development plus="add,assign,capitalize,cloneDeep,deburr,findIndex,forIn,intersection,isError,isPlainObject,merge,method,pickBy,property,range,remove,times,uniq,values,String,maxBy,isNil,chunk"`
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
;(function() {
@tomyam1
tomyam1 / include.md
Created August 20, 2017 15:42
Update Serverless Package

Update includes in serverless.yml

Determine which modules are needed to be included:

On Windows with cygwin:

npm ls --production | grep -i '\-\-' | sed 's/.*-- \(.*\)@.*/- node_modules\\/\1\\/**/g'

You'll get an output like