Skip to content

Instantly share code, notes, and snippets.

View paxan's full-sized avatar

Pavel Repin paxan

  • aws.amazon.com
  • Seattle, WA
View GitHub Profile
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

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

@mingfang
mingfang / convert id_rsa to pem
Last active March 3, 2024 08:46
Convert id_rsa to pem file
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem
chmod 600 id_rsa.pem
@igrigorik
igrigorik / github.bash
Last active December 22, 2023 23:55
Open GitHub URL for current directory/repo...
alias gh="open \`git remote -v | grep git@github.com | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`"
@paxan
paxan / tornado_force_https.py
Last active August 15, 2023 01:24
A hack to make Tornado web server redirect http requests to https for Heroku or similar reverse-proxied deployments
from __future__ import absolute_import, print_function
import os
import tornado.httpserver
import tornado.ioloop
import tornado.web
def create_server(*args, **kwargs):
'''
@hgomez
hgomez / oracledownload
Last active October 6, 2021 09:58
Oracle JVM download using curl/wget
# Downloading Oracle JVM without browser
Oracle requires you to accept its licence agreement before downloading its JVM.
It's a pain for those of us who do automation, native packages, Jenkins JVM deployment on slave...
I used Firefox and Firebug to sniff network exchanges.
## HTTP Request :
GET /otn-pub/java/jdk/6u39-b04/jdk-6u39-linux-i586.bin?AuthParam=1359814101_9685f919f8b3113a89574ec4570d47b2 HTTP/1.1
#!/bin/bash
# Like the 'aws' cli except caches results
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'
#set -x
@marksim
marksim / README.md
Last active September 28, 2018 15:56
Pair Sessions Script Adding more security (automatically timeout sudo, append the command to each ssh key

My script for pair sessions on my box.

What it does

  • downloads the appropriate ssh keys from github
  • copies the appropriate 'ssh pair@your-external-ip' command to your clipboard (see Note #1)
  • sets up the tmux session
  • cleans up the session, and the keys after it's done

How to use

@cgbystrom
cgbystrom / node.js vs Python
Created December 1, 2010 20:56
node.js vs Python with Greenlets
/*
node.js vs Python with Greenlets (say gevent)
I don't get why node.js is being so hyped.
Sure, the idea of writing things in JavaScript both on the client and server-side is really nice.
And JavaScript really fit an event-driven environment with its browser heritage.
But why on earth is boomerang code so appealing to write? I don't get. Am I missing something obvious?
All examples of node.js I see are littered with callbacks yet Ryan Dahl thinks coroutines suck. It doesn't add up for me.
@lepture
lepture / emoji.py
Created March 10, 2012 15:54
emoji support in python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012, lepture.com
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright