Skip to content

Instantly share code, notes, and snippets.


Christian Meunier tlvenn

View GitHub Profile
View zshrc.zsh
# Executes commands at the start of an interactive session.
# Authors:
# Sorin Ionescu <>
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
View gist:88b4f377cdddf0aa0118
| The CASC (Content Addressable Storage Container) Filesystem |
| Warlords of Draenor Alpha, Build |
| Written April 14th, 2014 by Caali |
| Version 1.2 |
Distribution and reproduction of this specification are allowed without
limitation, as long as it is not altered. Quotation in other works is
freely allowed, as long as the source and author of the quote are stated.
tlvenn / App.js
Last active Sep 12, 2015 — forked from mnelson/App.js
CSS Reset for a React App using Radium
View App.js
import React from 'react'
import Reset from './styles/Reset'
let styles = React.renderToStaticMarkup(<Reset />);
document.head.insertAdjacentHTML('beforeEnd', styles);
// start the app
import Router from './components/Router'
tlvenn /
Created Dec 10, 2015 — forked from fire/
Git lab install on smartos

Gitlabs on Smartos

Note this script is not executable. Please read through and manually apply each command.

Install necessary packages

  pkgin up
  pkgin -y in \
        bash \
        coreutils \
        curl \
        gcc47 \
tlvenn / BridgeManager.h
Created Jan 4, 2016 — forked from nickhudkins/BridgeManager.h
View BridgeManager.h
// BridgeManager.h
// Created by Nick Hudkins on 12/13/15.
#import <Foundation/Foundation.h>
#import "RCTBridgeModule.h"
@interface BridgeManager : NSObject <RCTBridgeModule>
View gist:0f9dab8bf6ded9170af8b4cb2f7c11fe
From 2012Q1 to 2012Q2, assuming 32-bit dataset (i386)
# Update repositories.conf for pkgin, and set $PKG_PATH for pkg_add
echo ${REPO} >/opt/local/etc/pkgin/repositories.conf
export PKG_PATH=${REPO}
# Update core packages manually
pkg_add -u bootstrap-mk-files bmake
tlvenn / gist:bce2f06f8bdc7e6c1d6521c7e6cfa138
Created May 3, 2016 — forked from mattconnolly/gist:7804176
Upgrading pkgin repository for a SmartOS zone.
View gist:bce2f06f8bdc7e6c1d6521c7e6cfa138

Upgrading SmartOS zone

Make a snapshot first! Upgrading from 2013Q1 to 2013Q3 because I needed newer nginx.

Update pkgin repository

edit the files at:

tlvenn / get_random_bytes.js
Created May 5, 2016 — forked from alexdiliberto/get_random_bytes.js
Get random bytes in Javascript (Browser/Node)
View get_random_bytes.js
let getRandomBytes = (
(typeof self !== 'undefined' && (self.crypto || self.msCrypto))
? function() { // Browsers
var crypto = (self.crypto || self.msCrypto), QUOTA = 65536;
return function(n) {
var a = new Uint8Array(n);
for (var i = 0; i < n; i += QUOTA) {
crypto.getRandomValues(a.subarray(i, i + Math.min(n - i, QUOTA)));
return a;
tlvenn /
Created May 24, 2016 — forked from dboskovic/
KeystoneJS: Cloudinary Cache => Amazon S3

I had a client who I built a site for (ecommerce) that had a lot of high resolution images. (running about 500gb/mo). Cloudinary charges $500/mo for this usage and Amazon charges about $40. I wrote some middleware that I used to wrap my cloudinary urls with in order to enable caching. This is entirely transparent and still enables you to use all the cool cloudinary effect and resizing functions. Hopefully this is useful to someone!

I think using deasync() here is janky but I couldn't think of another way to do it that allowed for quite as easy a fix.

tlvenn / mobxLogger.js
Created May 31, 2016 — forked from mmazzarolo/mobxLogger.js
While waiting for React-Native MobX devtools...
View mobxLogger.js
import mobx from 'mobx'
const DEFAULT_STYLE = 'color: #006d92; font-weight:bold;'
// Just call this function after MobX initialization
// As argument you can pass an object with:
// - collapsed: true -> shows the log collapsed
// - style -> the style applied to the action description
export const startLogging = ({ collapsed, style } = {}) => {
mobx.spy(event => {