Skip to content

Instantly share code, notes, and snippets.

View kirankulkarni's full-sized avatar

Kiran kirankulkarni

View GitHub Profile
@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active November 16, 2024 16:01
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); 
@jsmestad
jsmestad / smartparens-cheatsheet.md
Created September 9, 2018 00:19 — forked from pvik/smartparens-cheatsheet.md
A Cheatsheet for Emacs Smarparens example configuration

An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.

Traversal

C-M-f sp-forward-sexp
C-M-b sp-backward-sexp
@deepak365
deepak365 / How to install redash in mac.
Last active May 27, 2022 05:38
How to install redash in mac.
What is redash?
Redash is database viewer included BI tool inside. Redash has support for querying multiple databases, including: Redshift, Google BigQuery, PostgreSQL, MySQL, Graphite, Presto, Google Spreadsheets, Cloudera Impala, Hive and custom scripts.
Prerequisite :
1. Install docker
2. Install git
git clone https://github.com/getredash/redash.git
docker-compose -f docker-compose.production.yml run --rm server create_db
docker-compose -f docker-compose.production.yml up
@bosky101
bosky101 / benchmark.sh
Last active August 29, 2015 13:58 — forked from emersonmoretto/benchmark.sh
benchmark a bunch of urls with POST and plot them in the same graph as points
#!/bin/bash
echo -e "\nbenchmark.sh <title> -n<number of requests> -c<number of concurrency> <URL1> <URL2> ..."
echo -e "\nEx: benchmark.sh example -n100 -c10 http://www.google.com/ http://www.bing.com/ will create benchmar-example-n100-c10.png\n"
## Gnuplot settings
echo "set terminal png
set output 'benchmark-${1}${2}${3}.png'
set title 'Benchmark: ${1} with ab ${2} ${3}'
@kirankulkarni
kirankulkarni / frequency.clj
Created August 18, 2011 16:17
Get top 10 frequent words from file
(ns freq.core
(:import (java.io BufferedReader FileReader))
(:require [clojure.string :as string]))
(defn read-file-lazy
"Opens a file and creates a lazy-sequence to read each line"
[file-name]
(with-open [reader (BufferedReader. (FileReader. file-name))]
(line-seq reader)))