Skip to content

Instantly share code, notes, and snippets.

View soulcyon's full-sized avatar

Sashank Tadepalli soulcyon

View GitHub Profile
@soulcyon
soulcyon / gist:6092030
Created July 26, 2013 20:36
DECAF v3 Server Setup for Windows
@echo off
@soulcyon
soulcyon / resume.tex
Last active May 12, 2016 20:27
My latest resume
\documentclass[11pt]{article}
\usepackage{ifthen}
\usepackage{xcolor}
\usepackage{multicol}
\usepackage[left=1cm,top=0.7cm,right=1cm,bottom=1cm,nohead,nofoot]{geometry}
\usepackage{enumitem}
\usepackage[hidelinks]{hyperref}
\setitemize{itemsep=-0.3em}
var http = require("http"),
vs = require("vid-streamer");
http.createServer(vs.settings({
rootFolder: "/path/to/videos/folder/",
rootPath: ""
})).listen(3000);
@soulcyon
soulcyon / nodejs.sh
Last active December 10, 2015 02:28
NodeJS on CentOS
curl http://dijjit.com/nodejs_centos.sh | sh
@soulcyon
soulcyon / lazyloadwebfonts.js
Last active October 25, 2015 13:58
Google Webfonts - Lazy Loader
WebFontConfig = {
/* Add your desired font family here, its a simple Javascript array */
google: { families: [ 'Ubuntu' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
@soulcyon
soulcyon / njitScraper.php
Created November 22, 2012 22:48
NJIT Course Schedule Scraper
<?php
/**
* NJIT Course Schedule Scraper (11/21/2012)
*
* Using http://courseschedules.njit.edu/, this PHP scraper utilizes CURL to build a large
* associative array for all courses. The user may specify options through onlySubject and
* onlyCourse methods to scrape the respective subjects and/or courses. The resulting array only
* has the section data. Course data is not stored, but may easily be captured with small changes
* to the scraper.
*
@soulcyon
soulcyon / decodeCDKey.php
Created November 22, 2012 20:55
Halo Decoding CD Key
<?php
/**
* decodeCDKey (11/21/2012)
*
* Taking the registry entry from Halo, this function can decode the entry back into the original
* CD Key. One must procure this entry through an alternative program, such as regedit or a batch
* script. Navigate to registry folder "HKLM\SOFTWARE\Microsoft\Microsoft Games\Halo"
* Open the key "DigitalProductID" and copy the 72nd byte to 96th byte. Make sure there are zeroes
* surrounding this section of bytes. Reverse the bytes and send to decodeCDKey($in).
*
@soulcyon
soulcyon / njitLogin.php
Created November 22, 2012 20:53
NJIT Login via PHP
<?php
/**
* NJIT Login Script (11/20/2012)
*
* This simulates a real NJIT login transaction using CURL requests. You can port this to any
* SunGard Luminis Platform, such as Middlesex County College and others. The basic transaction
* requires a user, password and uuid fields to be sent via POST request. The validation mechanism
* simply checks for the string "loginok.html" within the result HTML. Beware, other login systems
* will require a different type of validation.
*
@soulcyon
soulcyon / toQueryString.js
Created November 22, 2012 20:24
Arbitrary JSON to PHP QueryString
/**
* @author Sashank Tadepalli <[email protected]>
* @license Creative Commons Attribution 3.0 Unported License.
* @version 1.0
* @link http://dijjit.com/js/arbitrary-json-to-php-querystring/
*/
function toQueryString(obj,inner){
var build = "";
for( t in obj ){
if( !obj.hasOwnProperty(t) ) continue;