Skip to content

Instantly share code, notes, and snippets.

View xbeta's full-sized avatar
🏠
Working from home

Sam Xiao xbeta

🏠
Working from home
  • Monte Carlo Data
  • San Francisco, CA
  • 13:37 (UTC -07:00)
  • LinkedIn in/samxsxiao
View GitHub Profile
@cmackenzie1
cmackenzie1 / config.ssh
Created August 13, 2019 21:13
SSH Tunnel / Bastion Hop config example
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
# Helps prevent timeout of connections due to inactivity
ServerAliveInterval 30
TCPKeepAlive yes
# Use key forwarding so I don't have to put my private key on the servers
@yokada
yokada / aws-cli-stepfunctions-commands-starter.md
Created July 6, 2019 19:09
AWS Cli StepFunctions commands starter in local with docker

@see For running aws stepfunctions local in docker https://gist.github.com/yokada/5e7ff39b91caff0eb6446a3e41465c3d

Create State Machine

$ aws stepfunctions create-state-machine \
  --endpoint http://localhost:18083 \
  --definition "$(gist -r 799bc111ce4ea7801b2f251e21177aec)" \
  --name WaitExecution \
  --role-arn arn:aws:iam::012345678901:role/DummyRole \
@export-mike
export-mike / mcc.json
Last active April 21, 2023 10:45
Stripe MCC.json - https://stripe.com/docs/connect/setting-mcc collected using pup, jq and some manual replacements.
[{
"code": "ac_refrigeration_repair",
"value": "7623",
"name": "A/C Refrigeration Repair"
},
{
"code": "accounting_bookkeeping_services",
"value": "8931",
"name": "Accounting/Bookkeeping Services"
},
@lmakarov
lmakarov / lambda-basic-auth.js
Created August 30, 2017 19:15
Basic HTTP Authentication for CloudFront with Lambda@Edge
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';
@xbeta
xbeta / encoding-video.md
Created March 31, 2017 05:43 — forked from Vestride/encoding-video.md
Encoding Video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aacc --with-opus
@yefim
yefim / Dockerrun.aws.json
Last active April 7, 2023 16:11
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "443"
}
@bricker
bricker / amznymous.md
Last active April 23, 2024 11:14
An Amazon Programmer's Perspective (http://pastebin.com/BjD84BQ3)

Originally posted at http://pastebin.com/BjD84BQ3

Trigger warning: mention of suicidal ideation

tl;dr: I burned out as a developer at Amazon at the end of my second year. I’ve since found a healthy and sustainable work-life balance and enjoy work again. I write this to A) raise awareness, especially for new-hires and their families, and B) help give hope and advice to people going through the same at Amazon or other companies.

Hello, world

There’s been no shortage of anecdotes, opinions, and rebuttals regarding Amazon’s corporate culture as of late. I write this not to capitalize on the latest news-feed fad, but to share what I had already written and promptly deleted. I didn’t think anyone would want to hear my story, but it’s apparent people are going through a similar experience and don’t have a voice.

I’m a Software Development Engineer II at Amazon; SDE II basically means a software developer with at least 2–3 years of industry experience. I started at Amazon as an SDE I.

@JohnnySlagle
JohnnySlagle / osx-for-hackers.sh
Last active June 8, 2016 05:40 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@Khoulaiz
Khoulaiz / gist:41b387883a208d6e914b
Last active June 10, 2024 15:36
Checking ports without telnet

Here are several different ways to test a TCP port without telnet.

$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C

$ cat &lt; /dev/tcp/127.0.0.1/23
@dnozay
dnozay / _Jenkins+Script+Console.md
Last active June 5, 2024 17:43
jenkins groovy scripts collection.