Skip to content

Instantly share code, notes, and snippets.

View paulomcnally's full-sized avatar
:octocat:
JS

Paulo McNally paulomcnally

:octocat:
JS
View GitHub Profile
➜ v0.12 git:(v0.12.0-release) ✗ diff -urN out/doc/api /tmp/api
diff -urN out/doc/api/_toc.html /tmp/api/_toc.html
--- out/doc/api/_toc.html 2015-02-24 14:18:33.000000000 -0800
+++ /tmp/api/_toc.html 2015-02-24 14:13:09.000000000 -0800
@@ -85,6 +85,7 @@
<li><a href="string_decoder.html">String Decoder</a></li>
<li><a href="timers.html">Timers</a></li>
<li><a href="tls.html">TLS/SSL</a></li>
+<li><a href="tracing.html">Tracing</a></li>
<li><a href="tty.html">TTY</a></li>
@amosrivera
amosrivera / cd-alias.sh
Last active August 29, 2015 14:18
Cd && ls every time you cd into a directory.
# source: http://unix.stackexchange.com/a/20413
# prevent loading the alias if it's not an interactive shell
[ -z "$PS1" ] && return
function cd {
builtin cd "$@" && ls -F
}
var http = require('http');
exports.query = function(cb) {
var cbCalled = false;
http.get({ host: 'jsonip.com' }, function(res) {
var buffer = '';
res.setEncoding('utf8');
res.on('data', function(d) {
buffer += d;
@pulkitsinghal
pulkitsinghal / common_models_MyModel.js
Last active January 5, 2016 13:57
Fetch user for remote methods in loopback v2.8.5
var loopback = require('loopback');
module.exports = function(MyModel) {
//remote method
MyModel.importProducts = function(storeConfigId, storeId, cb) {
//cb(null, sound + ' ' + sound + ' ' + sound);
var ctx = loopback.getCurrentContext();
console.log(loopback.getCurrentContext());
@edasque
edasque / gist:bd8aa4087c843e31e38d
Created August 30, 2014 22:31
Phonegap / Cordova Logcat - filtering
adb logcat CordovaActivity:V CordovaWebView:V CordovaWebViewClient:V IceCreamCordovaWebViewClient:V CordovaLog:V *:S
@diegok
diegok / mercadopago.rb
Created January 8, 2012 19:34
Small ruby object to interact with MercadoPago API
class MercadoPago
require 'rubygems'
require 'json/add/core'
require 'uri'
require 'net/https'
attr_accessor :client, :secret, :currency
def initialize(options={})
@client = options[:client_id]
@ry
ry / fib.js
Created March 12, 2012 00:17
a proper fibonacci server in node. it will light up all your cores.
var http = require('http')
var fork = require('child_process').fork;
function fib(n) {
if (n < 2) {
return 1;
} else {
return fib(n - 2) + fib(n - 1);
}
}
@hendrikswan
hendrikswan / .eslintrc
Last active September 29, 2020 09:18
Packages and build config for Build Cross Platform React Native Apps with Exponent and Redux
{
"extends": "airbnb/base",
"plugins": [
"react"
],
"env": {
"node": true,
"jasmine": true,
},
"rules": {
// Answer to http://github.com/ry/http-parser/issues/#issue/1
// UNTESTED
struct line {
char *field;
size_t field_len;
char *value;
size_t value_len;
};
@23maverick23
23maverick23 / font_awesome.rb
Last active January 30, 2022 11:38
Jekyll: Font Awesome icons Liquid tag
##
# The MIT License (MIT)
#
# Copyright (c) 2014 Ryan Morrissey
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is