Skip to content

Instantly share code, notes, and snippets.

View pcbulai's full-sized avatar
👨‍💻
Coding

Paul Bulai pcbulai

👨‍💻
Coding
View GitHub Profile
{
"node-path" : ":/usr/local/bin",
"config": {
"always-semicolon": true,
"block-indent": 2,
"color-case": "lower",
"color-shorthand": true,
"element-case": "lower",
"eof-newline": true,
"leading-zero": false,
@pcbulai
pcbulai / multiple_ssh_setting.md
Created November 19, 2015 07:50 — 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"
@pcbulai
pcbulai / guilty.js
Created October 26, 2015 10:58
Detect failing function on a minified Angular JS script.
Object.defineProperty(Function.prototype, '$inject', {
configurable: true,
get: function() {
return this.$injectHooked;
},
set: function (arr) {
if (arr.length && arr[0].length < 3) {
console.error('missing @ngInject:', this);
}
return this.$injectHooked = arr;
@pcbulai
pcbulai / hn_search.js
Last active October 1, 2015 16:30 — forked from kristopolous/hn_seach.js
hn job query search
function query() {
var
total = 0, shown = 0,
// HN is done with very unsemantic classes.
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')),
query_list = Array.prototype.slice.call(arguments);
// This traverses up the dom stack trying to find a match of a specific class
function up_to(node, klass) {
if (node.className === klass) {
@pcbulai
pcbulai / g:commit.sh
Created July 29, 2015 12:38
Stop fucking my CodeShip builds!
g:commit() {
message="${1}"
if [ $# -gt 1 ]; then
case "$1" in
-s)
message="${2} --skip-ci"
;;
esac
fi
git commit -m "${message}"
Stash this hunk [y,n,q,a,d,/,K,g,s,e,?]? :q
y - stash this hunk
n - do not stash this hunk
q - quit; do not stash this hunk or any of the remaining ones
a - stash this hunk and all later hunks in the file
d - do not stash this hunk or any of the later hunks in the file
g - select a hunk to go to
/ - search for a hunk matching the given regex
j - leave this hunk undecided, see next undecided hunk
J - leave this hunk undecided, see next hunk
{
"bold_folder_labels": true,
"caret_extra_bottom": 0,
"caret_extra_top": 0,
"caret_extra_width": 1,
"caret_style": "phase",
"color_scheme": "Packages/Colorcoder/Seti_orig (Colorcoded).tmTheme",
"default_line_ending": "unix",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
@pcbulai
pcbulai / config.json
Last active August 29, 2015 14:22 — forked from anonymous/config.json
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@pcbulai
pcbulai / csscomb.conf
Created May 19, 2015 09:24
csscomb.conf
{
// If plugin has trouble finding Node.js, replace this string with path
// to your `node` bin
"node-path" : ":/usr/local/bin",
// Full list of supported options and acceptable values can be found here:
// https://github.com/csscomb/csscomb.js/blob/master/doc/options.md
"config": {
// Whether to add a semicolon after the last value/mixin.
@pcbulai
pcbulai / objSize.js
Created April 22, 2015 13:32
Get JS object size
function objectSize (obj) {
var key,
size = 0;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
size++;
}
}
return size;
}