Skip to content

Instantly share code, notes, and snippets.

@aizatto
aizatto / controls.md
Last active June 27, 2020 04:42
Worms W.M.D. Controls
@aizatto
aizatto / gist:8af0f1565ab171e2df9087882b37f27b
Created May 8, 2020 09:05
Wake transition timed out after 180 seconds while entering fullwake from darkwake. Suspected bundle: com.apple.iokit.IOGraphicsFamily
panic(cpu 0 caller 0xffffff8016691b2c): Wake transition timed out after 180 seconds while entering fullwake from darkwake. Suspected bundle: com.apple.iokit.IOGraphicsFamily. Thread 0x74.
Backtracing specified thread
Backtrace (CPU 0), Frame : Return Address
0xffffff923b103900 : 0xffffff80160471e8
0xffffff923b90b9b0 : 0xffffff8015f433f1
0xffffff923b90ba20 : 0xffffff8015f41c2f
0xffffff923b90ba70 : 0xffffff80160442e9
0xffffff923b90bab0 : 0xffffff8016043b4b
0xffffff923b90bae0 : 0xffffff7f99afcced
0xffffff923b90bb10 : 0xffffff7f99b15f75
@aizatto
aizatto / build.md
Created April 12, 2020 06:36
Docker build errors with ubuntu:19.10 and s6-overlay
@aizatto
aizatto / gocd-agent.yaml
Last active April 7, 2020 03:37
gocd agent
apiVersion: v1
kind: Pod
metadata:
name: gocd-agent-{{ POD_POSTFIX }}
labels:
app: web
spec:
serviceAccountName: default
containers:
- name: gocd-agent-container-{{ CONTAINER_POSTFIX }}
{
"id": 7697719,
"name": "Ladang Lothian",
"country": "MY",
"coord": {
"lon": 101.723503,
"lat": 2.7379
}
--
--
https://openweathermap.org/weather-conditions
{ id: 201,
main: 'Thunderstorm',
description: 'thunderstorm with rain',
icon: '11d' },
[ { id: 500, main: 'Rain', description: 'light rain', icon: '10d' } ]
[ { id: 501,
main: 'Rain',
description: 'moderate rain',
@aizatto
aizatto / amazon.md
Last active October 19, 2019 12:55
List custom domains in all regions

Trying to delete a certificate I keep getting the error:

Certificate is in use The certificate * (*) is in use (associated with other AWS resources) and cannot be deleted. Disassociate the certificate from each resource in the list and try again.

But I can't seem to find where the certificate is in use by, so I thought of listing all the regions, but none of it helped.

Hopefully this will be useful to someone.

@aizatto
aizatto / iterm2workspace.py
Created August 20, 2019 13:14
How I setup my iterm2 workspace for working on deep thought
#!/usr/bin/env python3
# https://www.iterm2.com/python-api/
# https://www.iterm2.com/documentation-variables.html
# https://github.com/gnachman/iTerm2/tree/master/api/library/python/iterm2/iterm2
# https://github.com/gnachman/iTerm2/blob/master/api/library/python/iterm2/docs/examples/set_title_forever.rst
# https://github.com/gnachman/iTerm2/blob/master/api/library/python/iterm2/docs/examples/movetab.rst
import iterm2
import time
async def async_split_pane_send_text(first_session, name, text):
@aizatto
aizatto / doy.txt
Created June 5, 2019 11:29
Days of Year
Day 1: Jan 1st
Day 2: Jan 2nd
Day 3: Jan 3rd
Day 4: Jan 4th
Day 5: Jan 5th
Day 6: Jan 6th
Day 7: Jan 7th
Day 8: Jan 8th
Day 9: Jan 9th
Day 10: Jan 10th
@aizatto
aizatto / mysql-to-postgres.ts
Created May 18, 2019 05:35
knex: Migrate from MySQL to PostgreSQL
const pg = require('pg');
pg.defaults.ssl = true;
const configs = require("config/knexfile.js");
const mysql = require("knex")(configs["mysql"]);
const postgres = require("knex")(configs["postgres"]);
async function migrate(table) {
const results = await mysql.from(table);
await postgres(table).insert(results);