Skip to content

Instantly share code, notes, and snippets.

View papaver's full-sized avatar

Moiz Merchant papaver

View GitHub Profile
@papaver
papaver / unshred.rb
Created November 15, 2011 07:28
Instagram Engineering Challenge: The Unshredder
#!/usr/bin/env ruby -w
#------------------------------------------------------------------------------
# requires
#------------------------------------------------------------------------------
require 'RMagick'
require 'prime'
#------------------------------------------------------------------------------
@papaver
papaver / emberly.rb
Created February 10, 2012 21:19
Embedly Programming Challenge
#!/usr/bin/env ruby -w
#------------------------------------------------------------------------------
# requires
#------------------------------------------------------------------------------
require 'open-uri'
#------------------------------------------------------------------------------
# Problem #1
@papaver
papaver / apn_pusher.rb
Created February 13, 2012 18:09
Apple Push Notification Tester
#!/usr/bin/env ruby -w
#------------------------------------------------------------------------------
# requires
#------------------------------------------------------------------------------
require 'json'
require 'openssl'
require 'socket'
require 'yaml'
@papaver
papaver / Gemfile
Last active December 15, 2015 20:19
SSC Group Engineering Challenge: A Content Releaser
source 'http://rubygems.org'
gem 'activerecord'
gem 'fastercsv'
gem 'sqlite3'
@papaver
papaver / filmscribeCutList.py
Created October 20, 2013 20:10
Avid Filmscribe Cutlist (.ctl) parser
#------------------------------------------------------------------------------
# filmscribeCutList.py - avid filmscribe cutlist (.ctl) parser
#------------------------------------------------------------------------------
import collections
import itertools
import logging
import os
import os.path
import re
@papaver
papaver / mp3.py
Last active December 28, 2015 09:19
MPEG-1 / MPEG-2 Audio Layer III (.mp3) parser
#------------------------------------------------------------------------------
# mp3.py - MPEG-1 / MPEG-2 Audio Layer III (.mp3) parser
#------------------------------------------------------------------------------
import collections
import itertools
import os.path
import struct
#------------------------------------------------------------------------------
@papaver
papaver / setup_passless_login.sh
Created December 12, 2013 20:11
Setup Passless Login For SSH
#!/bin/tcsh
# validate command-line args
if ($# != 2) then
echo "Example usage: $0 ssh.codeisart.com 22"
exit 1
endif
# set script variables
set remotehost = $1
@papaver
papaver / decode.py
Last active August 2, 2017 07:27
Curbside Programming Challenge
#!/usr/bin/env python
#
# Curbside Programming Challenge
# by Moiz Merchant
#
#------------------------------------------------------------------------------
# imports
#------------------------------------------------------------------------------
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1500000,RESOLUTION=640x960
http://res.cloudinary.com/talenthouse/video/upload/ac_aac,af_44100,br_1500000,c_limit,h_640,vc_h264:main:3.1,w_960/v1455843532/user-469666/profile/lxiyurogzyy2qen16zde.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=600000,RESOLUTION=320x480
http://res.cloudinary.com/talenthouse/video/upload/ac_aac,af_44100,br_600000,c_limit,h_320,vc_h264:baseline:3.0,w_480/v1455843532/user-469666/profile/lxiyurogzyy2qen16zde.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=4000000,RESOLUTION=720x1280
http://res.cloudinary.com/talenthouse/video/upload/ac_aac,af_44100,br_4000000,c_limit,h_720,vc_h264:high:4.0,w_1280/v1455843532/user-469666/profile/lxiyurogzyy2qen16zde.m3u8
# Vertices: 8
# Points: 0
# Lines: 0
# Faces: 6
# Materials: 1
o 1
# Vertex list