Skip to content

Instantly share code, notes, and snippets.

View deepredsky's full-sized avatar

Rajesh Sharma deepredsky

View GitHub Profile
@deepredsky
deepredsky / todobackend-benchmarks.md
Last active December 19, 2015 13:35
TodoBackend Benchmarks
@deepredsky
deepredsky / gist:0373740b4a7d3a455616
Created January 26, 2016 12:14
basic nginx reverse proxy for rails
upstream my_app {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name _;
# An alias to your upstream app
location @my_app {
@deepredsky
deepredsky / clone-all-twitter-github-repos.sh
Created August 22, 2016 17:09 — forked from caniszczyk/clone-all-twitter-github-repos.sh
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
hg clone https://bitbucket.org/ZyX_I/vim
cd vim
hg update 24-bit-xterm
cd src && make autoconf && cd ..
./configure \
--enable-gui=no \
--without-x \
--enable-multibyte \
--with-tlib=ncurses \
@deepredsky
deepredsky / pngout.rb
Last active August 27, 2016 11:06 — forked from paulredmond/pngout.rb
pngout homebrew formula
require 'formula'
class Pngout < Formula
url 'http://static.jonof.id.au/dl/kenutils/pngout-20110722-darwin.tar.gz'
homepage 'http://www.jonof.id.au/kenutils'
sha256 '45f27bb4a76f1ed1d93734d5fe2a601ef9d21eafbe7ad230fa60c00315b09167'
version '20110722'
def install
prefix.install Dir['*']
#!/bin/sh
set -e
curl -u deepredsky -s https://api.github.com/orgs/$1/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
defmodule KNN do
defmodule LabeLWithFeatures do
defstruct label: [], pixels: []
end
def slurp_file(file) do
File.read!(file)
|> String.split("\n")
|> Stream.drop(1)
|> Stream.map(fn row ->
@deepredsky
deepredsky / email-reply-template.txt
Created January 12, 2017 10:41
Email Reply Template for Marketing Folks
Nice of you to reach out.
However, we are happy with what we have, so please don't call us.
I have noted your contact details, and we will get back to you if we need to.
log/
logs/
images/
tmp/
vendor/
fonts/
*.sql
*.tags*
*.gemtags*
*.csv
#import <objc/runtime.h>
#import <Foundation/Foundation.h>
int main () {
NSBundle *bundle = [NSBundle bundleWithPath:@"/Applications/Utilities/Keychain Access.app/Contents/Resources/Keychain.menu"];
Class principalClass = [bundle principalClass];
id instance = [[principalClass alloc] init];