Skip to content

Instantly share code, notes, and snippets.

View jalcine's full-sized avatar
💭
Decentralize and democratize the Web.

Jacky Alciné jalcine

💭
Decentralize and democratize the Web.
View GitHub Profile
'use strict'
const initializerNames = ['config', 'db', 'auth']
const Hapi = require('hapi')
let server = new Hapi.Server()
function applyInitializerToServer (initializerName) {
const functor = require('./server/' + initializerName + '.js')
const modifiedServer = functor(server)
server.log('Setting up initializer for ' + initializerName + '...')
@jalcine
jalcine / controller_spec.rb
Last active August 30, 2015 17:10 — forked from tonycoco/controller_spec.rb
The Greatest Hits of Rspec Testing: Volume 1
require "spec_helper"
describe ExampleController do
context "GET #index" do
let(:resources) { FactoryGirl.create_list(:resource) }
before do
get :index
end
@jalcine
jalcine / rnb.erb
Last active September 10, 2015 03:23 — forked from romainl/_rnb.md
RNB, a Vim colorscheme template
<%
# RNB, A VIM COLORSCHEME TEMPLATE
# Author: Romain Lafourcade (https://github.com/romainl)
# Canonical URL: https://gist.github.com/romainl/5cd2f4ec222805f49eca
# This template is designed to help vimmers create their own colorschemes
# without much effort.
#
# You will need Ruby to generate your colorscheme but Ruby knowledge is
# not needed at all.
@jalcine
jalcine / about.md
Created August 9, 2011 20:41 — forked from Quebecisnice/about.md
Programming Achievements: How to Level Up as a Developer
@jalcine
jalcine / adaptor_init.cpp
Created October 12, 2011 16:06
The intialization code for WntrData, WntrNtwk, and WntrLing as needed for each of the plugin's init methods.
else if ( s_appMod == "ling" ) {
l_objectName = "Linguistics";
Linguistics::SystemAdaptor* l_adpt = new Linguistics::SystemAdaptor;
registerObject ("/System", l_adpt);
s_adapt = l_adpt;
} else if ( s_appMod == "data" ) {
l_objectName = "Data";
Data::Linguistics::System::setLocale ( Core::arguments ()->value ("locale").toString () );
@jalcine
jalcine / WintermutePlugin.cmake
Created October 14, 2011 04:52
Represents development information for Wintermute's SDK (i.e.: plug-ins, app integration, DE merging, etc)
# Provides a means of creating a plugin for
# Wintermute.
set(WINTER_PLUGIN_INSTALL_DIR "${WINTER_LIB_INSTALL_DIR}/wntr" CACHE PATH "Plugin installation path.")
set(WINTER_PLUGIN_INCLUDE_INSTALL_DIR "${WINTER_INCLUDE_INSTALL_DIR}/plugins" CACHE PATH "Plugin header installation path.")
set(WINTER_PLUGIN_DATA_INSTALL_DIR "${WINTER_DATA_INSTALL_DIR}/plugins" CACHE PATH "Plugin data installation path.")
set(WINTER_PLUGINSPEC_INSTALL_DIR "${WINTER_DATA_INSTALL_DIR}/specs" CACHE PATH "Plugin specification installation path.")
@jalcine
jalcine / plugin.spec
Created October 15, 2011 21:05
Represents a plugin definition file.
# Represents a plugin defiintion file used by Wintermute
# to assist the means of loading settings, plugin arguments
# and etc.
# Plugin namespace
# This namespace holds most of the descriptive information of the plugin.
# @todo We need a place to hold all of the UUIDs that we use for plug-ins, so that we can refer to them.
[Plugin]
Name=PLUGIN_NAME
@jalcine
jalcine / mockup.py
Created November 12, 2011 20:42
Represents the mock-up for Wintermute
#!/usr/bin/python
import time
import cmd
print("Wintermute 1.0 (pid 9860) :: Artificial intelligence for common Man. (Licensed under the GPL3+)\n(core) [Factory] Started.\n ")
time.sleep(0.5)
class winty(cmd.Cmd):
def do_events(self,line):
print("It's almost time until your scheduled event with Wintermute Developers at 19:00 EST on Freenode (##sii-dev).")
@jalcine
jalcine / dart.txt
Created November 24, 2011 07:22 — forked from paulmillr/dart.md
Leaked internal google dart email
---------- Forwarded message ----------
From: Mark S. Miller <erights@google.com>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: javascript-standard@google.com
On November 10th and 11th, a number of Google teams representing a variety
of viewpoints on client-side languages met to agree on a common vision for
the future of Javascript.
@jalcine
jalcine / latency.txt
Created June 1, 2012 06:01 — forked from jboner/latency.txt
Latency numbers every programmer should know
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns
Mutex lock/unlock 25 ns
Main memory reference 100 ns
Compress 1K bytes with Zippy 3,000 ns
Send 2K bytes over 1 Gbps network 20,000 ns
Read 1 MB sequentially from memory 250,000 ns
Round trip within same datacenter 500,000 ns
Disk seek 10,000,000 ns