Skip to content

Instantly share code, notes, and snippets.

View KoStard's full-sized avatar
👾

Ruben Kostandyan KoStard

👾
View GitHub Profile
@jamesmacfie
jamesmacfie / README.md
Created October 22, 2019 02:53
iTerm 2 - script to change theme depending on Mac OS dark mode

How to use

In iTerm2, in the menu bar go to Scripts > Manage > New Python Script

Select Basic. Select Long-Running Daemon

Give the script a decent name (I chose auto_dark_mode.py)

Save and open the script in your editor of choice.

@jmshal
jmshal / atob.js
Last active April 27, 2024 04:12
Node.js ponyfill for atob and btoa encoding functions
module.exports = function atob(a) {
return new Buffer(a, 'base64').toString('binary');
};
@tomysmile
tomysmile / mac-setup-redis.md
Last active October 31, 2024 21:46
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@dovideh
dovideh / paramiko-proxy.py
Last active July 16, 2024 15:42
Paramiko Connect via proxy
#!/usr/bin/env python
#-*- coding:utf8 -*-
# sources
# 1. https://gist.github.com/tell-k/4943359#file-paramiko_proxycommand_sample-py-L11
# 2. https://github.com/paramiko/paramiko/pull/97
# info: http://bitprophet.org/blog/2012/11/05/gateway-solutions/
# local -> proxy-server -> dest-server
# ~/.ssh/config
#
# Host proxy-server
@deanishe
deanishe / youtube-to-quicktime.sh
Created March 2, 2015 20:00
Open Current YouTube Video in QuickTime Player (or whatever)
#!/bin/bash -e
# Instead of watching YouTube videos in your browser, stream them in
# QuickTime Player (or VLC/MPlayer etc.)
#
# youtube-dl supports hundreds of websites, so it will probably work
# for a lot of video sites.
# See https://rg3.github.io/youtube-dl/
# Get URL of current tab in browser