Skip to content

Instantly share code, notes, and snippets.

View EddyF's full-sized avatar

Eddy Ferreira EddyF

View GitHub Profile
@jarvys
jarvys / run-multiple-redis-instances.md
Last active September 27, 2022 13:02
run multiple redis instances on the same server for centos
  • create a new redis .conf file
$ cp /etc/redis.conf /etc/redis-xxx.conf
  • edit /etc/redis-xxx.conf, illustrated as below
...
@plentz
plentz / nginx.conf
Last active May 17, 2024 09:08
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@gashtio
gashtio / facebook.js
Created February 22, 2013 08:34
The whole JavaScript file for the Unity3D Facebook integration with Coherent UI sample
var appID = '344764665598630';
var appURL = 'http://www.coherent-labs.com/sample.html';
var userID;
var userToken;
function SetPortrait(fbAvatar) {
var url = fbAvatar.picture.data.url;
$('#fbButton').css("background-image", "url(" + url + ")");
}
@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@mikeyk
mikeyk / gist:1329319
Created October 31, 2011 22:56
Testing storage of millions of keys in Redis
#! /usr/bin/env python
import redis
import random
import pylibmc
import sys
r = redis.Redis(host = 'localhost', port = 6389)
mc = pylibmc.Client(['localhost:11222'])