Skip to content

Instantly share code, notes, and snippets.

View deepredsky's full-sized avatar

Rajesh Sharma deepredsky

View GitHub Profile
import http.server
import socketserver
import urllib.request
import shutil
import os
import hashlib
import sys
class CacheHandler(http.server.CGIHTTPRequestHandler):
def do_OPTIONS(self):
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure

NumberToPhrase

Simple ruby script to convert numbers to phrases. This serves as example script to teach basics of ruby.

#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];
log/
logs/
images/
tmp/
vendor/
fonts/
*.sql
*.tags*
*.gemtags*
*.csv
@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.
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 ->
#!/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"]} ]}'
@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['*']
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 \