Skip to content

Instantly share code, notes, and snippets.

View pravj's full-sized avatar
📖

Pravendra Singh pravj

📖
View GitHub Profile
@pravj
pravj / leaderboard.coffee
Created July 11, 2014 07:28
partychat like chat-score/leaderboard script built at 'SDSLabs'
# Description:
# partychat like chat-score/leaderboard script built at 'SDSLabs'
# we developed this to use in our 'Slack' team instance
#
# Commands:
# listen for keyword++ or keyword-- in chat text and updates score for each
# bot score keyword : returns current score of 'keyword'
#
# Examples:
# : will update score for each, accordingly :
@pravj
pravj / 99BottlesOfBeer.swift
Last active July 30, 2019 00:20
99 Bottles of Beer in Swift Language
var i = 99
while i > 0
println(i + " bottles of beer on the wall, " + i + "bottles of beer.")
var num = i - 1
if i == 1 {
var num = "no more"
}
println("Take one down and pass it around, " + num + "bottles of beer on the wall.")
println("No more bottles of beer on the wall, no more bottles of beer.")
println("Go to the store and buy some more, 99 bottles of beer on the wall.")
@pravj
pravj / treegen.sh
Last active September 8, 2021 09:43
bash script to generate tree structure of a directory
#!/usr/bin/env bash
# bash script to generate tree structure of a directory
# Pravendra Singh (@hackpravj)
pwd=$(pwd)
find $pwd -print | sed -e "s;$pwd;\.;g;s;[^/]*\/;|__;g;s;__|; |;g"
@pravj
pravj / HelpNet.md
Last active August 29, 2015 14:00
HelpNet will contain resources for different topics/problems over internet, that I have met. I hope, I'll change it in shape of a more useful tool, one day.