Skip to content

Instantly share code, notes, and snippets.

View resize
tell application "Google Chrome" to set the bounds of the front window to {1376, 0, 3440, 1440}
tell application "iTerm" to set the bounds of the front window to {1376, 0, 3440, 1440}
tell application "Slack" to set the bounds of the front window to {0, 0, 1376, 1440}
tell application "System Events" to tell application process "WhatsApp"
tell window 1
set {size, position} to {{1376, 1440}, {0, 0}}
end tell
phstc /
Last active Sep 15, 2019
K6 GitHub action

Run k6 for all branches prefixed with k6/, i.e. k6/my-test

phstc /
Last active May 20, 2019
Browse a GitHub pull request based on the branch name
  1. download gpr into ~/bin
  2. change org and repo in the script
  3. chmod +x ~/bin/gpr
  4. edit ~/.zshrc adding export PATH="$HOME/bin:$PATH"
  5. cd your-cloned-dir then gpr
phstc / create-users.ts
Last active May 3, 2021
aws-cdk script for provisioning users + s3 buckets
View create-users.ts
For deploying it:
Install aws-cdk: then
npm run build
cdk deploy
import cdk = require('@aws-cdk/cdk')
View putsbox-reset-password.html
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en" lang="en">
<head profile="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<table cellpadding="1" cellspacing="1" border="1">
View index.html
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
ga('create', 'UA-3914566-6', 'auto');
ga('send', 'pageview');
View Gemfile
source ''
gem 'sinatra'
gem 'active_support'
View query.go
package main
import (
phstc / scan.rb
Last active Aug 29, 2015
DynamoDB Parallel Scan
View scan.rb
require 'aws-sdk'
require 'pry-byebug'
class MobyEvent
class << self
def client
@dynamodb ||=
region: 'us-east-1',
View gist:418119705b569fb2f9a5
# lib/liquid_i18n_rails.rb
module LiquidI18nRails
def t(string)
# config/initializers/liquid.rb
require 'liquid_i18n_rails'
Liquid::Template.register_filter LiquidI18nRails