Skip to content

Instantly share code, notes, and snippets.

View refack's full-sized avatar
🕺
status

Refael Ackermann refack

🕺
status
View GitHub Profile
This file has been truncated, but you can view the full file.
{
"_id" : ObjectId("533a91e3eff97524e41ff8b2"),
"ID" : 202,
"post_author" : 17,
"post_date" : new Date("30/3/2012 19:07:28"),
"post_date_gmt" : new Date("30/3/2012 16:07:28"),
"post_content" : "",
"post_title" : "לאון פלדמן",
"post_excerpt" : "",
"post_status" : "publish",
var assert = require('assert');
var crypto = require('crypto');
var EXTERN_APEX = 0xFBEE9;
var ucs2_control = 'a\u0000';
while (ucs2_control.length <= EXTERN_APEX) {
ucs2_control += ucs2_control;
}
var b1 = new Buffer(ucs2_control, 'ucs2').slice(900000);
$(function() {
var x, y;
var items = [].slice.call(document.querySelectorAll('*')).filter(function(el) {
if (el.getClientRects().length == 0)
return false;
var ret = !(el.dataset['noMove'] === '');
if (!ret)
console.log(el.dataset);
return ret;
}).map(function(el) {
@refack
refack / gist:ad5cf566d5a477e20838
Created September 29, 2014 12:34
2014-09-29 - node 0.11.15-pre based on v8 3.29
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/root/node/out'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/node/out'
ln -fs out/Release/node node
/usr/bin/python tools/test.py --mode=release simple message
[00:00|% 0|+ 0|- 0]: release test-abort-fatal-error
src/cares_wrap.cc:348: You don't need a ; after a } [readability/braces] [4]
src/cares_wrap.cc:352: You don't need a ; after a } [readability/braces] [4]
src/node_contextify.cc:651: Is this a non-const reference? If so, make const or use a pointer: TryCatch& try_catch [runtime/references] [2]
src/node_crypto.cc:202: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/node_crypto.cc:462: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/node_crypto.cc:524: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/node_crypto.cc:603: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/node_crypto.cc:795: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/node_crypto.cc:918: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
src/node_crypto.cc:1623: Use int16/int64/etc, rather than the C type long [runtime/int] [4]
@refack
refack / full_warnings
Created October 8, 2014 07:43
MSVS compilation of the `node` target with all warnings enabled
fs_event_wrap.cc
cares_wrap.cc
handle_wrap.cc
node.cc
node_buffer.cc
node_constants.cc
node_contextify.cc
src\node.cc(860): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
src\node.cc(1646): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
src\node.cc(1996): warning C4267: 'argument' : conversion from 'size_t' to 'uint32_t', possible loss of data
@refack
refack / gist:4144214
Created November 25, 2012 16:18
View for static files in Django
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
urlpatterns = patterns('',
('^about/$', direct_to_template, {
'template': 'about.html'
})
)
// bookmarklet to reverse order of log entries in logentries:
javascript:((function(){$('.events-panel .logentry').each(function(i, e) {$('.events-panel > div').prepend(e);})})())
@refack
refack / gist:5454879
Created April 24, 2013 19:31
Home to let node.js bind port 80 without sudo
sudo setcap 'cap_net_bind_service=+ep' `which nodejs`
@refack
refack / nodestrum.js
Last active December 21, 2015 05:28
single file nodestrum
/**package
{
"name": "nodestrum",
"description": "Some cross cutting utils",
"version": "0.10.1",
"author": "Refael Ackermann<refael@empeeric.com>(http://node.org.il)",
"homepage": "https://gist.github.com/refack/6256990/",
"repository": "https://gist.githubusercontent.com/refack/6256990/raw/nodestrum.js",
"license": "MIT",
"readme": "Some crosscutting node.js utils"