Skip to content

Instantly share code, notes, and snippets.

View arun057's full-sized avatar

Arunram Kalaiselvan arun057

  • PlaceIQ
  • New York, NY
View GitHub Profile
@arun057
arun057 / web-servers.md
Created August 28, 2017 16:32 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@arun057
arun057 / index.js
Last active August 29, 2015 14:17
requirebin sketch
var playAudio = require('play-audio'),
songs = [
'https://krosskastassets.s3.amazonaws.com/uploads/song/file/file-e1148650-a548-0132-0909-12ba921920f5.mp3',
'https://krosskastassets.s3.amazonaws.com/uploads/song/file/file-ea761b90-a548-0132-f957-12ba921920f5.mp3',
'https://krosskastassets.s3.amazonaws.com/uploads/song/file/file-ba6495e0-a548-0132-4f0b-12ba921920f5.mp3',
'https://krosskastassets.s3.amazonaws.com/uploads/song/file/file-9c305750-a548-0132-2908-12ba921920f5.mp3',
'https://krosskastassets.s3.amazonaws.com/uploads/song/file/file-60d93110-a546-0132-f31c-12ba921920f5.mp3'
];
var playing = playAudio(songs[0]).autoplay().controls().on('ended', function(){
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
# please only interesting methods!
class Object
# return only the methods not present on basic objects
def interesting_methods
(self.methods - Object.new.methods).sort
end
end