Skip to content

Instantly share code, notes, and snippets.

View nealrs's full-sized avatar
💭
code monster

Neal Shyam nealrs

💭
code monster
View GitHub Profile
@nealrs
nealrs / zd.py
Created November 19, 2015 15:36
delete ziggeo videos
from Ziggeo import Ziggeo
ziggeo = Ziggeo("APP_TOKEN", "PRIVATE_KEY", "ENC_KEY")
print ziggeo.videos().delete("VIDEO_TOKEN")
@nealrs
nealrs / index.js
Created October 23, 2015 21:17
Devpost -> image
var request = require('request');
var handlebars = require('handlebars');
var project = 'distractedness';
var url = 'http://devpost.com/software/' + project;
var api = 'https://iii3mdppm7.execute-api.us-east-1.amazonaws.com/prod/ProjectEndpoint/' + project;
var source = "<h2>{{title}}</h2><p>{{tagline}}</p><ul>{{#collaborators}}<li> <img src='{{avatar_url}}'> {{name}}</li>{{/collaborators}}</ul><ul>{{#built_with}}<li> #{{name}}</li>{{/built_with}}</ul>";
request({url: api, json: true}, function(err, res, json) {
if (err) {throw err;}
@nealrs
nealrs / p0.txt
Created October 8, 2015 03:11
create animation with Rayito & ImageMagick
# (optional, default 320 240) size = size of the final image
size 1024 768
nbounces 5
# (optional, default 1) oversampling=1 no oversampling
oversampling 2
# (optional, default 60) vision = size of the visual field
vision 60
@nealrs
nealrs / demo.html
Created September 30, 2015 20:23
Devpost Hackathon Button
<html>
<body>
<a href target="_blank" class="devpostButton" data-slug="artik" data-begin="2014-09-27 10:00 EST" data-deadline="2014-10-01 10:00 EST" data-defcss="true" >Submit your hack on Devpost</a>
<script src="devpostButton.js"></script>
</body>
</html>
@nealrs
nealrs / convert.md
Created September 21, 2015 17:24
Convert XML data to JSON in Python

I recommend using the xml2json python package to convert back and forth from XML/JSON.

  1. Install it with pip: pip install xml2json

  2. Convert a file: xml2json -t xml2json -o output.json input.xml --strip_text

The output JSON won't be pretty printed (as in the attached file, but it will be valid!!)

@nealrs
nealrs / devpost-icon-black.svg
Created July 31, 2015 17:58
Devpost social icon
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nealrs
nealrs / contractions.py
Created May 31, 2015 01:33
Expand common (and some very uncommon) english contractions
"""
this code is not mine! i shamelessly copied it from http://stackoverflow.com/questions/19790188/expanding-english-language-contractions-in-python
all credits go to alko and arturomp @ stack overflow.
basically, it's a big find/replace.
"""
import re
cList = {
"ain't": "am not",
@nealrs
nealrs / 5_28_15.md
Created May 28, 2015 15:06
great CP projects
  • Created by a team Led by Todd Semple, ceator of Plants vs. Zombies
  • VR Puzzle Game using GearVR
  • excellent blackless color pallette inspired by impressionist exhibit at the deYoung museum in SF
  • ride a magic carpet, collect items, avoid danger, get lost
  • looking up to the sky lets you access inventory / navigate / other tasks - pretty innovative!
  • created for Oculus VR Jam
@nealrs
nealrs / ys.zsh-theme
Created February 9, 2015 14:19
my edits to the ys theme for oh-my-zsh
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background and the font Inconsolata.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
#
# http://ysmood.org/wp/2013/03/my-ys-terminal-theme/
# Mar 2013 ys
# Machine name.
function box_name {
@nealrs
nealrs / .zshrc
Last active July 25, 2021 04:50
my oh-my-zsh config
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
#autoenv
source /usr/local/opt/autoenv/activate.sh
source ~/.autoenv/activate.sh
#tmpdir
if [ -f $(which tmpdir-tab) ]; then
. $(which tmpdir-tab)