Skip to content

Instantly share code, notes, and snippets.

View goromlagche's full-sized avatar
😴

Mrinmoy Das goromlagche

😴
View GitHub Profile
#include <iostream>
#include <vector>
using namespace std;
typedef vector<int> vi ;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
vvvi qs;
import Data.Text (Text, map,
toLower, words, pack)
import Data.Text.IO (readFile)
import Data.Char (isLetter)
import Prelude hiding (map, words, readFile)
import Data.Map.Strict (toList, fromListWith)
import GHC.Exts (sortWith)
import Control.DeepSeq
import Control.Parallel.Strategies hiding(parMap)
@goromlagche
goromlagche / nvm.sh
Created May 11, 2015 08:01
nvm setup
curl https://raw.githubusercontent.com/creationix/nvm/v0.12.1/install.sh | bash
nvm install 0.12.2
nvm use 0.12.2
wget -N http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip -P ~/Downloads
unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads
chmod +x ~/Downloads/chromedriver
sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
#!/bin/bash
# Check if user is root
if [ $(id -u) != "0" ]; then
echo "Error: You must be root to run this script, please use root to install the software."
exit 1
fi
apt-get remove libtidy-0.99-0 tidy
apt-get install git-core automake libtool checkinstall

How to install latest GHC 7.8.4 + cabal 1.22 from source on ubuntu

ghc

ubuntu prerequisites

# Multiprecision arithmetic library developers tools, zlib  
sudo apt-get install libgmp-dev zlib1g-dev -y  
sudo -K
@goromlagche
goromlagche / sublime_pref_file
Created February 26, 2015 11:25
my sublime preferences
{
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS"
],
"font_size": 11,
"ignored_packages":
@goromlagche
goromlagche / sublime_key_ bindings
Created February 26, 2015 11:23
my sublime key bindings
[
{ "keys": ["ctrl+shift+alt+s"], "command": "save_all" },
{ "keys": ["ctrl+shift+."], "command": "erb" },
{ "keys": ["f5"], "command": "refresh_folder_list" },
{ "keys": ["ctrl+alt+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}},
{ "keys": ["ctrl+shift+o"], "command": "prompt_open_folder" },
{ "keys": ["ctrl+shift+alt+s"], "command": "expand_tabs" },
{ "keys": ["ctrl+shift+alt+t"], "command": "unexpand_tabs" },
{ "keys": ["ctrl+shift+alt+4"],"command": "set_setting", "args": {"setting": "tab_size", "value": 4}, "caption": "Tab Width: 4", "checkbox": true },
{ "keys": ["ctrl+shift+alt+2"],"command": "set_setting", "args": {"setting": "tab_size", "value": 2}, "caption": "Tab Width: 2", "checkbox": true }
@goromlagche
goromlagche / gi.sh
Created September 29, 2014 11:23
git improved
IFS='
'
if [ "$1" = "-b" ]; then
if [ "$2" = "-t" ]; then
git for-each-ref --sort=-committerdate refs/heads/
fi
elif [ "$1" = "-c" ];then
if [ "$2" = "-p" ];then
git checkout -
elif [ "$2" = "-f" ]; then
@goromlagche
goromlagche / string.rb
Last active August 29, 2015 14:06
Better String
class String
def black; "\033[30m#{self}\033[0m" end
def red; "\033[31m#{self}\033[0m" end
def green; "\033[32m#{self}\033[0m" end
def brown; "\033[33m#{self}\033[0m" end
def blue; "\033[34m#{self}\033[0m" end
def magenta; "\033[35m#{self}\033[0m" end
def cyan; "\033[36m#{self}\033[0m" end
def gray; "\033[37m#{self}\033[0m" end
def bg_black; "\033[40m#{self}\033[0m" end