Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Rank Type Prefix/Suffix Length
1 Prefix my+ 2
2 Suffix +online 6
3 Prefix the+ 3
4 Suffix +web 3
5 Suffix +media 5
6 Prefix web+ 3
7 Suffix +world 5
8 Suffix +net 3
9 Prefix go+ 2
@frobichaud
frobichaud / hello_sign_download.rb
Last active December 7, 2022 18:54
HelloSign - Download all documents
API_KEY = 'YOUR_API_KEY_HERE'
def get_total_pages(client)
list = client.get_signature_requests(page_size: 100)
list.data["list_info"]["num_pages"]
end
def get_all_requests(client)
signature_requests = []
page = 1
@caobug
caobug / UninstallShadowsocks.sh
Last active October 10, 2023 06:09
Uninstall shadowsocks from macOS
#/bin/bash
launchctl stop com.qiuyuzhou.shadowsocksX-NG.local
launchctl stop com.qiuyuzhou.shadowsocksX-NG.http
launchctl stop com.qiuyuzhou.shadowsocksX-NG.kcptun
sudo rm -rf /Applications/ShadowsocksX-NG*.app
sudo rm -rf /Library/Application\ Support/ShadowsocksX-NG
sudo rm -rf ~/Library/Application\ Support/ShadowsocksX-NG
sudo rm -rf ~/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.*
Elastic Load Balancer, CloudFront and Let's Encrypt
@wolever
wolever / test_tsquery_escape.py
Last active October 3, 2022 09:47
Parse and escape a query string so it's safe to use with Postgres' `to_tsquery(…)`
import re
from nose.tools import assert_equal
from nose_parameterized import parameterized
from tsquery_escape import tsquery_escape
@parameterized([
("1 OR 2", "1 | 2"),
("(1) 2", "( 1 ) & 2"),
("&", "'&':*"),
@RobertoSchneiders
RobertoSchneiders / elasticbeanstalk_deploy_iam_policy.md
Last active October 11, 2023 11:35
IAM Policy for deploy on Elastic Beanstalk

I am deploying with this IAM using Codeship and Circle CI to Elastic Beanstalk. I had a lot of trouble with this config. I talked to the aws support for about 6 hours until this worked properly, so, I guess it is worth to share.

UPDATE: In the end, I have to use the AWSElasticBeanstalkFullAccess policy. My custom policy keep breaking every week with some new added permission or some EB internal change. Anyway, the IAM I was using is below.

This works for me with CircleCI and EB Cli.

{
    "Version": "2012-10-17",
    "Statement": [
        {
@stormchasing
stormchasing / Auto Check-In to Southwest Flights.user.js
Last active April 17, 2024 00:04
Auto Check-In to Southwest Flights.user.js
// ==UserScript==
// @name Auto Check-In to Southwest Flights
// @namespace http://www.ryanizzo.com/southwest-auto-check-in/
// @version 1.8
// @author Nicholas Buroojy (http://userscripts.org/users/83813)
// @contributor Ryan Izzo (http://www.ryanizzo.com)
// @contributor JR Hehnly (http://www.okstorms.com @stormchasing)
// @contributor Trevor McClellan (github.com/trevormcclellan)
// @description Automatically check in to Southwest Airline flights at the appropriate time.
// @include https://www.southwest.com/air/check-in/index.html*
@phughes
phughes / image.py
Last active March 5, 2023 21:58
An Xcode precompilation script to turn your images into auto-completeable, type-checkable symbols.
import os.path as path
import string
import argparse
import glob
import re
def basename(filename):
base = filename
if filename.find('@2x') > 0:
base = filename[:filename.find('@2x')]
dispatch_block_t RecursiveBlock(void (^block)(dispatch_block_t recurse))
{
// assuming ARC, so no explicit copy
return ^{ block(RecursiveBlock(block)); };
}
typedef void (^OneParameterBlock)(id parameter);
OneParameterBlock RecursiveBlock1(void (^block)(OneParameterBlock recurse, id parameter))
{
@shiki
shiki / beanstalkd
Created August 9, 2010 13:41
For CentOS, a modified /etc/init.d/beanstlkd file which creates a pid file in /var/run/beanstalkd.pid
#!/bin/sh
#
# beanstalkd - a simple, fast workqueue service
#
# chkconfig: - 57 47
# description: a simple, fast workqueue service
# processname: beanstalkd
# config: /etc/sysconfig/beanstalkd
#