Skip to content

Instantly share code, notes, and snippets.

View gregory's full-sized avatar
🎯
Focusing

Grégory Horion gregory

🎯
Focusing
View GitHub Profile
@bradvogel
bradvogel / client_errorlogging.js
Created September 19, 2014 17:46
Meteor JS and Sentry / Raven logging integration
// Setting up Raven and Meteor on the CLIENT side.
var clientDSN = 'https://<key>@app.getsentry.com/30405';
Raven.config(clientDSN, {}).install();
// Set the user automatically.
Meteor.autorun(function() {
var user = Meteor.user();
if (!user) Raven.setUser( /* Unset */ );
else {
@charlesmarshall
charlesmarshall / etcd-to-docker-env
Created September 3, 2014 10:22
Bash script to parse elements of etcd into -e docker params
#!/bin/bash
# create global ENVS associated array
declare -A ENVS
# string for the -e vars
environmentVariables=""
##
# set a a bunch of test data
generateTestEnvData(){
echo "Setting test data"
@KensoDev
KensoDev / .tmux.conf
Created August 31, 2014 09:03
my tmux configuration
# use UTF8
set -g utf8
set-window-option -g utf8 on
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
set -g default-terminal "screen-256color"
# set scrollback history to 10000 (10k)
set -g history-limit 10000
@staltz
staltz / introrx.md
Last active April 29, 2025 08:33
The introduction to Reactive Programming you've been missing
# using VirtualBox version $VBOX_VERSION
FROM boot2docker/boot2docker
RUN apt-get install p7zip-full
RUN mkdir -p /vboxguest && \
cd /vboxguest && \
curl -L -o vboxguest.iso http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso && \
7z x vboxguest.iso -ir'!VBoxLinuxAdditions.run' && \
sh VBoxLinuxAdditions.run --noexec --target . && \
# A little Meteor CheatSheet about Iron-Router. (updated on a weekly basis)
# Check our Studio: https://gentlenode.com/
meteor add iron:router
meteor update iron:router
# Iron Router > Configuration
@dnprock
dnprock / nginx.conf
Last active June 25, 2019 18:19
meteor nginx load balance with sticky session, used by vida.io
# Sticky session module for nginx
# https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/
# nginx configure command: ./configure --with-http_ssl_module --add-module=../nginx-sticky-module-ng/ --sbin-path=/usr/local/sbin --with-http_gzip_static_module
upstream vida_node_server {
sticky path=/;
server 127.0.0.1:3000 max_fails=3 fail_timeout=30s;
server [server2]:3000 max_fails=3 fail_timeout=30s;
}
@ismasan
ismasan / sse.go
Last active February 27, 2025 00:15
Example SSE server in Golang
// Copyright (c) 2017 Ismael Celis
// 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
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
@jszmajda
jszmajda / 1readme.md
Last active September 3, 2022 18:33
Data Serialization: JSON, MsgPack, ProtoBufs
@noteed
noteed / docker-tinc.md
Last active April 17, 2019 06:22
Docker - Tinc setup