Skip to content

Instantly share code, notes, and snippets.

View santigimeno's full-sized avatar

Santiago Gimeno santigimeno

View GitHub Profile
@totherik
totherik / npmjs.ini
Last active August 29, 2015 13:56
npmjs.org registry install script
; CouchDB Config
; Drop in PREFIX/local.d/npmjs.ini
[couch_httpd_auth]
public_fields = appdotnet, avatar, avatarMedium, avatarLarge, date, email, fields, freenode, fullname, github, homepage, name, roles, twitter, type, _id, _rev
users_db_public = true
[httpd]
secure_rewrites = false
@gitaarik
gitaarik / git_submodules.md
Last active November 6, 2025 22:10
Git Submodules basic explanation

Git Submodules - Basic Explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a sub-repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@julianscheel
julianscheel / build.sh
Created October 23, 2013 13:54
cross compile helper scripts for vlc
#!/bin/sh
export SYSROOT=/home/julian/dev/rpi/rpi-buildroot/output/rootfs-debug/staging
export PATH=/home/julian/dev/rpi/ct-ng/host/bin/:$PATH
echo "Build"
make -j9 V=1 || exit 0
echo "Install"
make DESTDIR=$(pwd)/install/ install
@bodokaiser
bodokaiser / Makefile
Last active April 2, 2025 12:39
Example of how to use libuv`s QUEUE.
build:
$(CC) -o queue.o queue.c
var cluster = require('cluster');
var PORT = +process.env.PORT || 1337;
if (cluster.isMaster) {
// In real life, you'd probably use more than just 2 workers,
// and perhaps not put the master and worker in the same file.
cluster.fork();
cluster.fork();
cluster.on('disconnect', function(worker) {
@wheeyls
wheeyls / example.js
Last active December 14, 2015 20:40
Export a library for commonjs, nodejs, and browser.
function myLib() {
return {
code: function () {}
, goes: function () {}
, here: function () {}
}
}
exporter('myLib', myLib);
// you can omit DI for _light_ dependencies
var async = require('async');
module.exports.inject = function( dependencies ){
// no direct require of _heavy_ dependencies
var mysql = dependencies.mysql;
var redis = dependencies.redis;
// do whatever
@barrysteyn
barrysteyn / Base64Decode.c
Last active May 13, 2024 07:45
Base64 Encoding/Decoding with the OpenSSL c api
//Decodes Base64
#include <openssl/bio.h>
#include <openssl/evp.h>
#include <string.h>
#include <stdio.h>
int calcDecodeLength(const char* b64input) { //Calculates the length of a decoded base64 string
int len = strlen(b64input);
int padding = 0;
@tj
tj / foo.js
Created October 30, 2012 05:08
Stream example
var fs = require('fs')
function cat(file) {
var stream = fs.createReadStream(file)
stream.setEncoding('utf8')
return function(write){
stream.on('error', write)
stream.on('data', function(d){ write(null, d) })
stream.on('end', write)
@AndreasMadsen
AndreasMadsen / WhatIHaveDone.md
Last active February 13, 2022 16:15
Playing with smartos