Skip to content

Instantly share code, notes, and snippets.

@yogin
yogin / gist:4120029
Created November 20, 2012 18:41
Generate SQL to DROP all databases
pager sed 's/,/ /g'
SELECT GROUP_CONCAT(CONCAT('DROP DATABASE ',SCHEMA_NAME,';')) FROM information_schema.schemata WHERE schema_name NOT IN ('mysql', 'information_schema');
nopager
@yogin
yogin / Environment Setup
Last active December 14, 2015 23:39
Environment setup
# installing Homebrew, and some common packages
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
$ brew update
$ brew tap homebrew/dupes
$ brew install apple-gcc42 wget curl git ack ctags-exuberant
# installing rvm and ruby
$ curl -L get.rvm.io | bash -s stable
@yogin
yogin / gist:9985254
Created April 4, 2014 23:44
get a single file from a git repo (except github)
git archive --remote=ssh://host/pathto/repo.git HEAD README.md

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

1:1 questions

Always end with an assignment

What can I hold you accountable for next time we talk?

What can I be accountable to you for the next time we talk?

Short term

How is [project] going? What could we do to make it better?

Is there anything blocking you from getting your work done?

Are there any projects you’d really like to work on if you were given the opportunity?

@yogin
yogin / ladder.md
Created January 19, 2017 03:43 — forked from jamtur01/ladder.md
Kickstarter Engineering Ladder
@yogin
yogin / keybase.md
Created February 8, 2017 20:41
keybase.md

Keybase proof

I hereby claim:

  • I am yogin on github.
  • I am yogin (https://keybase.io/yogin) on keybase.
  • I have a public key ASBl6kYpShP6pnDIBCqnHgSCW0BRxZwaSbyEA_NDFBBZ9go

To claim this, I am signing this object:

@yogin
yogin / installation.txt
Created March 9, 2017 01:57 — forked from teeebs/installation.txt
Script to mute or unmute and resolve a Datadog monitor
vagrant@kratos:~$ chmod +x manage_monitor.sh
vagrant@kratos:~$ sudo cp manage_monitor.sh /etc/init.d/manage_monitor
vagrant@kratos:~$ sudo update-rc.d manage_monitor defaults
@yogin
yogin / route53-asg-rrdns.sh
Created October 2, 2017 08:38 — forked from ambakshi/route53-asg-rrdns.sh
Add all instances in an autoscaling group to an equivalently named dns entry.
#!/bin/bash
#
# Get all IPs from an autoscale group and update set the local ip as
# equal weight A entries (round robin dns). Takes autoscale group as
# parameter.
#
# Amit Bakshi
# 10/21/2014
#
@yogin
yogin / CryptoKitties.sol
Created January 28, 2018 19:06
CryptoKitties
// Copied from: https://ethfiddle.com/09YbyJRfiI
// CryptoKitties Source code
// Copied from: https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code
pragma solidity ^0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control