Skip to content

Instantly share code, notes, and snippets.

View indradhanush's full-sized avatar
Out playing

Indradhanush Gupta indradhanush

Out playing
View GitHub Profile
#!/bin/sh
set -e
# sudo for install may not be necessary, depending on permissions in /usr/local
curl -L -O http://download.zeromq.org/zeromq-4.0.4.tar.gz
tar -xzf zeromq-4.0.4.tar.gz
cd zeromq-4.0.4
./configure
@hiway
hiway / ohgodno.lua
Created February 27, 2015 10:11
Here's a script to punch a big hole thru your VPS's security and access your shell over Telegram chat… don't try this on production.
-- To use: telegram-cli -k tg-server.pub -s ohgodno.lua
--
-- Remember to watch for your telegram ID in telegram-cli, update it below.
-- This script will let you message yourself, and will ignore messages from others.
telegram_id = 1234567
message_echo = ""
function on_msg_receive (msg)
if msg.to.id == telegram_id and msg.from.id == telegram_id and msg.text ~= message_echo then
@lucaspiller
lucaspiller / gist:7371780
Created November 8, 2013 14:29
GitHub.app git and Homebrew git conflict
$ brew install git
zsh: correct 'git' to '.git' [nyae]? n
Warning: A newer Command Line Tools release is available
Update them from Software Update in the App Store.
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/git-1.8.4.2.mavericks.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/git-1.8.4.2.mavericks.bottle.tar.gz
==> Pouring git-1.8.4.2.mavericks.bottle.tar.gz
==> Caveats
The OS X keychain credential helper has been installed to:
/usr/local/bin/git-credential-osxkeychain
@mbork
mbork / smart-yank.el
Last active July 4, 2018 18:02
Smart yanking for Emacs. See http://mbork.pl/2018-07-02_Smart_yanking for details.
(defun has-space-at-boundary-p (string)
"Check whether STRING has any whitespace on the boundary.
Return 'left, 'right, 'both or nil."
(let ((result nil))
(when (string-match-p "^[[:space:]]+" string)
(setq result 'left))
(when (string-match-p "[[:space:]]+$" string)
(if (eq result 'left)
(setq result 'both)
(setq result 'right)))
@k-bx
k-bx / sublime-text-2.el
Created June 10, 2012 22:02
sublime text 2 like theme for emacs
(defun sublime-text-2 ()
(interactive)
(color-theme-install
'(sublime-text-2
((background-color . "#171717")
(background-mode . light)
(border-color . "#1a1a1a")
(cursor-color . "#fce94f")
(foreground-color . "#cfbfad")
(mouse-color . "black"))
fc-glyph - display all fonts which contain specified glyphs
@panuta
panuta / gist:1852087
Last active April 8, 2020 16:46
How to setup Django/Postgresql on OS X Mountain Lion using Homebrew

Command Line Tools for Xcode

Command line tools comes bundle with Xcode prior to 4.3 version. After 4.3, you need to install a separated command line tools yourself.

First, go to this url and login using Apple Developer account (Free to register)

https://developer.apple.com/downloads/index.action
anonymous
anonymous / emacs.memory.leak.aka.distnoted.patch.diff
Created January 22, 2014 03:45
This is a patch (with commentary) that fixes a memory leak in 24.3 for OSX Mavericks (10.9) users who experience excessive resource consumption by distnoted.
From 8ab91751069e391a95151c6716a546b1732ade92 Mon Sep 17 00:00:00 2001
From: JP <twitter:canoeberry>
Date: Sun, 19 Jan 2014 11:58:54 +0000
Subject: [PATCH] partial memleak fix
This patch was created by JP (twitter: @canoeberry) based on a memleak fix by Dirk (emacs committer) below:
https://github.com/mirrors/emacs/commit/57ae6509a3b6a274f89b9caea0284c6156470625
This memory leak is fixed in the trunk as of now and will be in the next official release: 24.4.
@magujs
magujs / i3-config-move_workspace
Last active February 24, 2022 18:43
i3 move a worksapce to another monitor (multi monitor setup)
# i3 move a workspace to another monitor (multi monitor setup)
mode "move_workspace" {
bindsym Up move workspace to output up
bindsym Down move workspace to output down
bindsym Left move workspace to output left
bindsym Up move workspace to output up
bindsym Escape mode "default"
}
@F21
F21 / gist:08bfc2e3592bed1e931ec40b8d2ab6f5
Last active October 23, 2022 12:36
Minikube RBAC Quick Start
minikube start --kubernetes-version=v1.7.0 --extra-config=apiserver.Authorization.Mode=RBAC
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
minikube dashboard