Skip to content

Instantly share code, notes, and snippets.

View shauvik's full-sized avatar

Shauvik RC shauvik

View GitHub Profile
@kirpit
kirpit / bash.py
Last active March 17, 2023 06:29
Enables to run subprocess commands in a different thread with TIMEOUT option!
#! /usr/bin/env python
import threading
import subprocess
import traceback
import shlex
class Command(object):
"""
Enables to run subprocess commands in a different thread with TIMEOUT option.
@sidwarkd
sidwarkd / .gitignore
Created November 27, 2011 03:35
Very basic Node.js app using MongoLab and Heroku
node_modules

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@doridori
doridori / DaggerHelper.java
Last active May 14, 2022 10:01
Testing with Dagger, Retrofit & MockWebServer gists
/**
* Allows easy swapping of production and test modules to satisfy Dagger dependencies
*/
public class DaggerHelper
{
//DAGGER
private static ObjectGraph sObjectGraph;
private static final List<Object> productionModules;

There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.

All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@dotspencer
dotspencer / google-wifi-setup-centurylink.md
Last active October 3, 2023 01:53
How to use Google WiFi with CenturyLink Internet (ZyXEL C3000Z, 80mbps, modem bridge)