Skip to content

Instantly share code, notes, and snippets.

View wtrocki's full-sized avatar
🚀
Making API Backends an Better Place!

Wojciech Trocki wtrocki

🚀
Making API Backends an Better Place!
View GitHub Profile
@wtrocki
wtrocki / multiple_ssh_setting.md
Created November 12, 2015 12:48 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
alias ndebug="node-inspector -cli --web-port 4444 --web-host 192.168.33.10 --debug-port 5050 --debug-brk --save-live-edit &"
alias ndebug-bind="kill -s USR1 "
# Number of connections (max 8000)
ulimit -n 8000
# Memory limit for V8 (in MB)
node --max-old-space-size=1024
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
DocumentRoot /dev/null
ProxyRequests off
ProxyPreserveHost On
ServerName npm.skunkhenry.com
<Location />
ProxyPass http://localhost:4873/
// Common JQuery helper methods
// Author wtrocki@gmail.com
/**
* Mark element as disabled.
* Note: this method is not removing custom events connected to element.
*
* @param disabled boolean - true if element should be disabled
* @returns {$}
*/
@wtrocki
wtrocki / Mongo drop collections
Created January 22, 2016 11:15
Drop collections basing on specified pattern - pattern name.js
var namePattern=/fh_testing/;
var names = db.getCollectionNames().filter(function (collection) { return namePattern.test(collection) });
for(var i = 0; i < names.length; i++) {
db.getCollection(names[i]).drop();
}
cd ~/Workspace/apiman/
mvn clean install -Dmaven.javadoc.skip=true -DskipTests=true -P \!java8
cd ~/Workspace/apiman/tools/server-all
#mvn clean install -Pinstall-all-wildfly9
./target/wildfly-9.0.2.Final/bin/standalone.sh
cd ~/Workspace/apiman/manager/ui/war
gulp
@wtrocki
wtrocki / templateSettings.js
Created May 23, 2016 20:27 — forked from dhoko/templateSettings.js
Lodash/underscore custom template settings with {{ }}
_.templateSettings = {
evaluate: /{{+([\s\S]+?)}}/g,
interpolate: /{{([\s\S]+?)}}/g,
escape: /{{-([\s\S]+?)}}/g
};
@wtrocki
wtrocki / create-persisten-volumes.sh
Created June 2, 2016 13:48
Helper script to create number of persistent volumes for openshift
#!/bin/bash
# Helper to create persistent volumes.
set -o errexit
set -o nounset
set -o pipefail
# The first argument to this script sets the number of persistent volumes to be
# created, default 1.
readonly N=${1:-1}
@wtrocki
wtrocki / create-secrets.sh
Created June 22, 2016 16:05
Openshift ssh key secrets generator
## Secrets generator for RHMAP
TEMP_KEY_STORE=/tmp/kubernetes-secrets
mkdir -p $TEMP_KEY_STORE
## Generate keys
ssh-keygen -b 1024 -N '' -f $TEMP_KEY_STORE/id_rsa
# Create secrets
oc secrets new gitlab-keys repo-prv=$TEMP_KEY_STORE/id_rsa \