Skip to content

Instantly share code, notes, and snippets.

Vishal Telangre vishaltelangre

Block or report user

Report or block vishaltelangre

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
vishaltelangre / gist:e60095d257d38cd1a51c302d1a8d8118
Created Jun 4, 2016
#mac #osx recursively delete all #exe files
View gist:e60095d257d38cd1a51c302d1a8d8118
find . -name '*exe' -exec rm -rf {} \;
vishaltelangre /
Last active Mar 5, 2018
Tools I Use #tools_i_use



vishaltelangre /
Last active Feb 22, 2017
ePub book links from (Total 337 books, net size around 1.7 GiB)
cat links.txt | parallel --gnu "wget {}" --no-check-certificate
vishaltelangre / emacs_keybindings
Last active Jan 1, 2016
Fundamental Emacs Keybindings #emacs
View emacs_keybindings
* Movement
C-v Move next screen
M-v Move backwords one screen
C-f Move forward a character
C-b Move backward a character
M-f Move forward a word
vishaltelangre / hello.asm
Last active Aug 29, 2015
Hello NASM on x86_64 Mac OSX
View hello.asm
; nasm -f macho64 -o hello.o 1.asm && ld -macosx_version_min 10.7.0 -lSystem -o hello hello.o && ./hello
; ^ ^ ^
; [generate object file from assembly] [link object file] [execute]
%define SYSCALL_WRITE 0x2000004
%define SYSCALL_EXIT 0x2000001
;; initialised data section
section .data
vishaltelangre / slack_rss
Created Jun 18, 2015
Slack is a deveoper's slave, abusing it to this extent! Subscribe to engineering blogs of popular companies.
View slack_rss
/feed subscribe
/feed subscribe
/feed subscribe
/feed subscribe
/feed subscribe
/feed subscribe
/feed subscribe
/feed subscribe
/feed subscribe
/feed subscribe
View gist:3c810b20cb82cc267781
Count All Open File Handles
lsof | wc -l
List File Descriptors in Kernel Memory
sysctl fs.file-nr
  • Create /etc/logrotate.d/my-crazy-app file with following snippet:
/var/log/my-crazy-app/*.log {
        size 500M
        rotate 10
View storm_kafka_word_split_count.clj
(ns storm.starter.clj.word-count-kafka
(:import ;[backtype.storm StormSubmitter LocalCluster]
[storm.kafka KafkaConfig HostPort KafkaSpout SpoutConfig StringScheme])
(:use [backtype.storm clojure config])
(def ^{:private true}
host (list "localhost:9092"))
(def ^{:private true
vishaltelangre /
Last active Aug 29, 2015
bit manipulation technique

^ is the XOR operator - given two numbers it "lines up" their places and flips the place only if only one of the two numbers has that place:

// All of these are binary
111 ^ 111 === 000
110 ^ 111 === 001
110 ^ 110 === 000

This means that changed will be a number with only those places set that are set in prev_state or state but not both.

You can’t perform that action at this time.