Skip to content

Instantly share code, notes, and snippets.

View snj33v's full-sized avatar
🏠
Working from home

Sanjeev snj33v

🏠
Working from home
  • Tamil Nadu, India
View GitHub Profile
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Update 7 Oct 2010:
# - This example does *not* appear to work with Chrome >=6.0. Apparently,
# the WebSocket protocol implementation in the cramp gem does not work
# well with Chrome's (newer) WebSocket implementation.
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
@michiakig
michiakig / ants.clj
Created July 19, 2011 22:37
Clojure ant sim from Rich Hickey
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
; which can be found in the file CPL.TXT at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
;dimensions of square world
@stran12
stran12 / gist:1394757
Created November 26, 2011 00:43
Step-by-step installation of cGit with Nginx

How to install cGit on Nginx (Ubuntu server)

Step-by-step installtion of cGit on nginx without funky rewrite rules.

Pre-requisites

This is for :

@xenomuta
xenomuta / httpd.asm
Last active January 4, 2024 13:53
httpd.asm: Arguably the world smallest web server. ( for GNU/Linux i386. Compile with nasm )
section .text
global _start
_start:
xor eax, eax
xor ebx, ebx
xor esi, esi
jmp _socket
_socket_call:
@bakercp
bakercp / sgx_build_modules.sh
Created May 22, 2013 04:04
Building / Installing / Running SGX modules on the Beagle Bone Black
#!/bin/bash -e
#
# Copyright (c) 2012-2013 Robert Nelson <robertcnelson@gmail.com>
#
# 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:
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@admalledd
admalledd / obs_deps.sh
Last active September 20, 2016 10:03
Helper script to compile obs-studio. Gets the needed depenancies for you!
#!/bin/bash
set -e #quit on error stuff!
#This script was only testing on linux mint 16, with a large pile of custom tweaking.
#This file should be used more as a "guide line" than anything else...
# PLEASE edit certain settings before going around and running this! to make sure of that I
# have the next line kill the script unless commented out!
echo "You forgot to set up this file! Edit it with correct paths to use!" && exit 0
@castano
castano / hemicube.cpp
Created June 20, 2014 09:46
Hemicube Integrator
#include "hemicube.h"
#define PACK_HEMICUBES 1
static void get_hemicube_face_normal(int index, Vector3 *forward, Vector3 *left, Vector3 *up) {
// Unwrapped hemicube with positive-Z in the middle.
switch (index) {
case 0: *forward = Vector3(+1, 0, 0); *left = Vector3( 0, 1, 0); break;
/**
* dualshock4.h - DualShock 4 USB HID Report Helper
*
* NOTE: Do not use this for production purposes, it's far from complete and is my
* initial attempt at working with USB HID. If it doesn't work, too bad.
* (Hoping to put this into content/browser/gamepad someday. If I ever finish.)
**
* Copyright (c) 2014 Sangwhan Moon
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@kgaughan
kgaughan / hlm2-dewad
Created March 15, 2015 06:33
Extracts resources from Hotline Miami 2 WAD files
#!/usr/bin/env python
"""\
Extract files from Hotline Miami 2 WAD files.
Usage:
hlm2-dewad --help
hlm2-dewad [--flatten] <wad-path> [<path>]
hlm2-dewad --list <wad-path>
Options: