Skip to content

Instantly share code, notes, and snippets.

View prayagupa's full-sized avatar
💭
Dada

Prayag prayagupa

💭
Dada
View GitHub Profile
@webdizz
webdizz / Install_tmux
Created January 16, 2013 09:20 — forked from simme/Install_tmux
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@cgoldberg
cgoldberg / matrix_terminal_python.py
Last active April 18, 2025 00:44
Create "The Matrix" of binary numbers scrolling vertically in your terminal
""""Create "The Matrix" of binary numbers scrolling vertically in your terminal.
original code adapted from juancarlospaco:
- http://ubuntuforums.org/showpost.php?p=10306676
Inspired by the movie: The Matrix
- Corey Goldberg (2013)
Requires:
@tzach
tzach / live.clj
Last active February 7, 2017 02:20
example of ring, compojure and hiccup
(use 'ring.util.response
'ring.adapter.jetty)
;;;;; handler
(defn hello-handler [req]
(->
(response "Hello")
(content-type "text/html")))
anonymous
anonymous / filename_elaticsearch
Created December 20, 2012 16:01
Filename elasticsearch
{
"settings" : {
"number_of_shards" : 2,
"analysis" : {
"filter" : {
"filename_ngrams_front" : {
"side" : "front",
"max_gram" : 20,
"min_gram" : 2,
"type" : "edgeNGram"
package com.fmpwizard.xyz.code
package lib
package search
import net.liftweb.common.{Loggable, Full, Box, Logger}
import com.twitter.finagle.ServiceFactory
import org.jboss.netty.handler.codec.http._
import com.twitter.finagle.builder.ClientBuilder
import com.twitter.finagle.http.Http
@dru89
dru89 / prose.zsh
Created November 28, 2012 21:58
My ZSH Theme
# proze.zsh-theme
# Most of this was taken from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
# Determine what character to use in place of the '$' for my prompt.
function repo_char {
git branch >/dev/null 2>/dev/null && echo '☿' && return
echo '○'
}
# Display any virtual env stuff with python.
@anastasop
anastasop / IncreasingBlabla.java
Created November 20, 2012 14:30
A toy program that generates sentences in english where the first word in one letter long, the second word 2 letters and so on.
/*
An Amazing sentence in English from
https://plus.google.com/photos/117176908342196183611/albums/5812811361700087857/5812811362489240738
> I do not know where family doctors acquired illegibly
> perplexing handwriting; nevertheless, extraordinary
> pharmaceutical intellectuality counterbalancing
> indecipherability transendentalizes intercommunication's
> incomprehensibleness
@danveloper
danveloper / urlshortener.groovy
Created November 8, 2012 21:55
The 48-Line Volatile URL Shortener
import java.net.ServerSocket
def socket = 8281, password = "danrulz"
enum Database {
INSTANCE;
def table = [:]
def shortCodeTable = [:]
def insert = { String url ->
Sequence.INSTANCE.counter++
def id = Sequence.INSTANCE.counter
def shortCode = new BigInteger(id).toString(36)+BigInteger.valueOf(Math.round(Math.random()*1000)).toString(36)
@Miuler
Miuler / notify_hg.sh
Created November 7, 2012 18:36
Script para notificar de nuevos cambios en un repositorio hg
#!/bin/bash
verificar_hg() {
cd /home/miuler/aep-dsm/$1
#mensaje=`hg -q in --template '{author|user} :: {desc|firstline|strip}\n------------------------------------------------------------\n'`
#mensaje=`hg in | tail -n +2`
mensaje=`hg in | tail -n +2|sed -r s/revision/---------------------------------------------\\\nrevision/`
if [ -n "$mensaje" ]
then
@minikomi
minikomi / yo.sh
Created October 30, 2012 10:27
bash twitter search
curl http://search.twitter.com/search.json?q=yo |
grep -Po '"from_user":.*?[^\\]"|"text":.*?[^\\]"' |
awk -F\" '{$1=$2=$3="";print}' |
perl -pe '$_ = "\e[1;31m$_\e[m:" if($. % 2); s/[\n]// if($. % 2)'