Skip to content

Instantly share code, notes, and snippets.

Most of my friends know I practice Immigration law. As such, I have worked with the refugee community for over two decades. This post is long, but if you want actual information about the process, keep reading.

I can not tell you how frustrating it is to see the misinformation and outright lies that are being perpetuated about the refugee process and the Syrian refugees. So, here is a bit of information from the real world of someone who actually works and deals with this issue. The refugee screening process is multi-layered and is very difficult to get through. Most people languish in temporary camps for months to years while their story is evaluated and checked.

First, you do not get to choose what country you might be resettled into. If you already have family (legal) in a country, that makes it more likely that you will go there to be with family, but other than that it is random. So, you can not simply walk into a refugee camp, show a document, and say, I want to go to America. Instead, the UNHCR (Unit

Notes on Docker.

Starting a Docker machine

docker-machine start :name: && eval "$(docker-machine env :name:)"

Where :name: is the name of the machine you want to start, e.g. to start default:

@swinton
swinton / Code.gs
Created October 1, 2015 21:48
No big deal. Just some code for a Google Spreadsheet to list events from a Google Calendar, to help track + report time. If you like it, you can use it!
var settings = getSettings();
function updateTimesheet() {
/**
* Export Google Calendar Events to a Google Spreadsheet.
*
* Reference Websites:
* https://developers.google.com/apps-script/reference/calendar/calendar
* https://developers.google.com/apps-script/reference/calendar/calendar-event

Version numbers in npm follow a standard called "SemVer". This stands for "Semantic Version". The specification for this standard can be found at http://semver.org.

The tl;dr version is that for a version like this:

  1.2.3
  ^ ^ ^
  | | `-- Patch version. Update for every change.
@swinton
swinton / s3cmd.md
Last active September 8, 2015 16:05
HOWTO: S3cmd

HOWTO: S3cmd

Recursively copy everything in S3 bucket to pwd

s3cmd get --recursive s3://my-awesome-bucket/

Recursively copy everything in pwd to a bucket and make it public

E.g. great for publishing a website to S3!

Advanced Query Search

Use Advanced Query Search (AQS), to refine your search results. In the search box, type a keyword from the table below, followed by a colon and what to search for. For example, to find messages with a subject that contains “report”, enter subject:report in the search box.

CREATE TABLE person (
id INTEGER PRIMARY KEY,
first_name TEXT,
last_name TEXT,
age INTEGER
);
CREATE TABLE pet (
id INTEGER PRIMARY KEY,
owner_id INTEGER,
@swinton
swinton / SQL.md
Last active October 9, 2015 19:23

Exercises

  • What is the schema below trying to model?
  • Write a query that lists all the pets owned by Zed.
  • Write a query that finds all pets older than 10 years.
  • Write a query that shows what the most popular breed of pet is.
  • How would you ensure this query performed well?
  • Insert yourself and your pets (or imaginary pets) into the database.
  • Sadly, Fluffy the Unicorn just died, write a query that updates the data to show this.
  • How would you change this schema so that a pet can be owned by multiple people?
@swinton
swinton / autossh.plist
Created February 12, 2015 20:20
launchd plist for running a SOCKS proxy with an autossh tunnel wotsit.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>swinton.autossh</string>
<key>KeepAlive</key>
<dict>
<key>NetworkState</key>
<true/>
@swinton
swinton / proxy.pac
Created February 11, 2015 02:26
Example proxy.pac, using a SOCKS proxy for certain hosts.
function FindProxyForURL(url, host) {
var useSocks = ["imgur.com"];
for (var i= 0; i < useSocks.length; i++) {
if (shExpMatch(host, useSocks[i])) {
return "SOCKS localhost:9999";
}
}
return "DIRECT";