Skip to content

Instantly share code, notes, and snippets.

View phoenix24's full-sized avatar
🎯
Focusing

Chaitanya Sharma phoenix24

🎯
Focusing
View GitHub Profile
@phoenix24
phoenix24 / zsh-stats-26.05.2013
Last active December 17, 2015 18:18
zsh-stats-26.05.2013
➜ ~ date
Sun May 26 13:16:39 IST 2013
➜ ~ zsh_stats
1 2355 23.5524% git
2 526 5.26053% cd
3 516 5.16052% rm
4 457 4.57046% ll
5 451 4.51045% cat
6 419 4.19042% mvn
#!/usr/bin/env python
import os
import sys
import argparse
try:
from boto.ec2.connection import EC2Connection
except ImportError:
sys.stderr.write('Please install boto ( http://docs.pythonboto.org/en/latest/getting_started.html )\n')
sys.exit(1)

Backend Architectures

ARCHITECTURES

ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats

@phoenix24
phoenix24 / sample-cluster-client
Last active May 19, 2022 18:12
sample akka cluster client.
package spikes.cluster
import akka.actor._
import com.typesafe.config.ConfigFactory
import akka.contrib.pattern.{ClusterClient, ClusterReceptionistExtension}
object DemoMaster {
def main(args: Array[String]): Unit = {
package typedactorrefs
import akka.actor._
import akka.pattern.AskSupport
import akka.util.Timeout
import scala.concurrent.Future
import typedactorrefs.Server.ServerMessage
import scala.concurrent.duration._
import typedactorrefs.Server.GetModule
import typedactorrefs.Server.Module
➜ ~ date
Thu Sep 5 15:25:29 IST 2013
➜ ~ zsh_stats
1 2551 25.5126% git
2 547 5.47055% cd
3 517 5.17052% rm
4 489 4.89049% cat
5 432 4.32043% ll
6 310 3.10031% curl
@phoenix24
phoenix24 / crunchy-code
Created December 28, 2013 07:22
some books with crunchy code
http://abecedarius.tumblr.com/post/71370089924/some-books-with-crunchy-code
Abelson and di Sessa, Turtle Geometry
Abelson and Sussman, Structure and Interpretation of Computer Programs
Aho and Weinberger and Kernighan, The AWK Programming Language
Andrew Appel, Compiling With Continuations
Mark Jason Dominus, Higher Order Perl
Fraser and Hanson, A Retargetable C Compiler: Design and Implementation
Friedman and Felleisen, The Little Schemer
@phoenix24
phoenix24 / gist:9948041
Created April 3, 2014 03:53
scala regex, awesomeness!
scala> val date = "11/01/20101"
date: String = 11/01/20101
scala> val date = "11/01/2010"
date: String = 11/01/2010
scala> val Date = """(\d\d)/(\d\d)/(\d\d\d\d)"""
Date: String = (\d\d)/(\d\d)/(\d\d\d\d)
scala> val Date = """(\d\d)/(\d\d)/(\d\d\d\d)""".r
@phoenix24
phoenix24 / gist:9948057
Created April 3, 2014 03:55
scala range awesomeness
scala> val a :: tail = (1 to 10).toList
a: Int = 1
tail: List[Int] = List(2, 3, 4, 5, 6, 7, 8, 9, 10)