Skip to content

Instantly share code, notes, and snippets.

View snehesht's full-sized avatar

Snehesh snehesht

View GitHub Profile
@snehesht
snehesht / docker-init.bat
Last active September 17, 2015 05:48
Automates the process of switching the docker-machine environments
:: Author: Snehesh Thalapaneni
:: Description: Automates the process of switching the docker-machine environments. Just type in the machine name the script will setup the environment for you.
:: Compatable with Windows x86, x64 systems
@echo off
if [%1]==[] goto help
echo @echo off >> temp_config.bat
#!/usr/bin/env python
import os
import shlex
import struct
import platform
import subprocess
def get_terminal_size():
""" getTerminalSize()
@snehesht
snehesht / nginx-non-transparent-ssl-proxy.md
Created October 27, 2015 15:15 — forked from dannvix/nginx-non-transparent-ssl-proxy.md
Guide to set up nginx as non-transparent SSL proxy, which subsitutes strings in the server responses

Use nginx as Non-Transparent SSL Proxy

Introduction

Many mobile apps have back-end API servers. They usually rely on the API replies to determine whether certain information is supposed to be shown. If the API responses could be manipulated on the fly, we may easily fool an unmodified app to expose some private data.

This manual guides you to set up nginx as non-transparent SSL proxy, which just subsitutes strings in the server responses (i.e. man-in-the-middle attack ourself). For both server-side (their API servers) and client-side (your device), the whole process is almost transparent.

@snehesht
snehesht / tmux-cheatsheet.markdown
Created January 25, 2016 15:34 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Keybase proof

I hereby claim:

  • I am snehesht on github.
  • I am snehesh (https://keybase.io/snehesh) on keybase.
  • I have a public key ASAy2umB9JZX0WQkACwKQWiUW6ET8LSQs3VWduQvnhj5lAo

To claim this, I am signing this object:

body {
color: red;
}
@snehesht
snehesht / backup.sh
Last active September 6, 2016 00:05
System backup and restore with rsync
#!/usr/bin/env bash
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","lost+found"} --delete /* /backup/$(date -I)
@snehesht
snehesht / mit.md
Created September 26, 2016 14:33
The MIT License, Line by Line

https://writing.kemitchell.com/2016/09/21/MIT-License-Line-by-Line.html

The MIT License, Line by Line 171 words every programmer should understand The MIT License is the most popular open-source software license. Here’s one read of it, line by line. Read the License If you’re involved in open-source software and haven’t taken the time to read the license from top to bottom—it’s only 171 words—you need to do so now. Especially if licenses aren’t your day-to-day. Make a mental note of anything that seems off or unclear, and keep trucking. I’ll repeat every word again, in chunks and in order, with context and commentary. But it’s important to have the whole in mind. The MIT License (MIT) Copyright (c) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublic

https://www.gnome-look.org/content/show.php/Arc-OSX-themes?content=175536
@snehesht
snehesht / fix-infinality.md
Created February 6, 2017 22:25 — forked from cryzed/fix-infinality.md
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08: