Skip to content

Instantly share code, notes, and snippets.

View apparition47's full-sized avatar
📱
(╯°□°)╯︵ ┻━┻

Aaron Lee apparition47

📱
(╯°□°)╯︵ ┻━┻
View GitHub Profile
@apparition47
apparition47 / cloudflare-dyndns-a-aaaa-record-update.sh
Last active February 3, 2023 11:28 — forked from Ciantic/cloudflare-dyndns-a-aaaa-record-update.sh
cloudflare dyndns script / update a A and AAAA record using bash script
#!/bin/bash
# Author: Jari Pennanen
# Url: https://gist.github.com/Ciantic/4e543f2d878a87a38c25032d5c727bf2
# create your API Key at https://dash.cloudflare.com/profile/api-tokens
# Required permissions: Zone Settings:Read, Zone:Read, DNS:Edit (all under zone)
AUTH_KEY="" # Get this from My profile -> API Keys -> View
DOMAIN="example.com" # main domain
SUBDOMAIN="home.example.com" # set A and AAAA-record of this subdomain
@apparition47
apparition47 / outlook-mailto.sh
Last active October 17, 2022 22:11
Make macOS Outlook your default mailto Application
#!/bin/bash
swift <(echo 'import Foundation;import CoreServices;LSSetDefaultHandlerForURLScheme("mailto" as NSString as CFString, "com.microsoft.Outlook" as NSString as CFString)')
@apparition47
apparition47 / README.md
Last active September 7, 2021 12:10
Setup Local Discourse on macOS

How to setup Discourse 2.8.0 locally on macOS

Prereqs

Setup

git clone https://github.com/discourse/discourse.git
@apparition47
apparition47 / dev_jobs_in_japan.md
Last active April 8, 2021 22:53 — forked from anonymous/dev_jobs_in_japan.md
Software dev jobs in Japan

Companies

  • Abeja - Start-up that does analysis of people's shopping patterns in stores using cameras and stuff, sounds interesting; might not require Japanese
  • Amazon - I THINK they now hire some developers
  • Barclays - Self-explanatory; nice Mori Tower office
  • Cookpad - Insanely popular recipe sharing service; I've heard it's kind of black from multiple Japanese people, but there are definitely good positions for foreigners; sweet Ebisu Garden Place office
  • Crowdworks - Crowdsourcing, kind of like Japanese MechanicalTurk; very profitable
  • CyberAgent (and CyberZ) - Big company; rich as hell; lots of foreigners; considered one of the best mid-sized Japanese tech companies to work for
  • Degica - eCommerce plat
@apparition47
apparition47 / answer.js
Created December 7, 2019 13:19
LeetCode 418 Sentence Screen Fitting
function * sent(sentence) {
while (1) {
for (i=0; i<sentence.length; i++) {
yield sentence[i]
}
}
}
const fits = (rows, cols, sentence) => {
let placements = 0
@apparition47
apparition47 / shinseibank.user.js
Last active June 14, 2018 14:24
Shinsei Bank Userscript - Login helper with optional Security Card auto-fill
// ==UserScript==
// @name Shinsei Bank Helper
// @namespace https://gist.github.com/apparition47/e8671954c614385b78ed9e8b2cde98e6
// @version 0.6
// @description Disable Security Keyboard & Optional account/Security Card Login Auto-Fill
// @author apparition47
// @match https://*.shinseibank.com/FLEXCUBEAt/LiveConnect.dll*
// @match http://www.shinseibank.com/*
// @grant none
// ==/UserScript==
@apparition47
apparition47 / .vimrc
Created March 5, 2018 03:20
vim config
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Original author:
" Amir Salihefendic
" http://amix.dk - amix@amix.dk
" http://amix.dk/vim/vimrc.html
"
" Sections:
" -> General
" -> VIM user interface
" -> Colors and Fonts
@apparition47
apparition47 / cloudflare_dyn_dns.sh
Last active March 4, 2018 02:23 — forked from chappy84/cloudflare_dyn_dns.sh
CloudFlare Dynamic DNS Shell Script
#!/bin/sh
#
# CloudFlare Dynamic DNS
#
# Updates CloudFlare records with the current public IP address
#
# Takes the same basic arguments as A/CNAME updates in the CloudFlare v4 API
# https://www.cloudflare.com/docs/client-api.html#s5.2
#
# Use with cron jobs etc.
@apparition47
apparition47 / ncix_rewards.js
Last active April 3, 2017 03:01
NCIX.com Newsletter Rewards Claimer
/**
* CasperJS script to claim NCIX.com newsletter points by batch of emails.
* Takes newsletter email URL as CLI argument.
* All emails filled in below must be registered to NCIX.com.
*
* For demo purposes only.
*/
var emails = [
'ncix_registerd@example.net',
@apparition47
apparition47 / randomWord.swift
Last active January 16, 2017 21:41 — forked from emersonbroga/randomWord.swift
Swift Random Word Generator
//Inspired by: http://planetozh.com/blog/2012/10/generate-random-pronouceable-words/
func randomWord(wordLength: Int = 6) -> String {
let kCons = 1
let kVows = 2
var cons: [String] = [
// single consonants. Beware of Q, it"s often awkward in words
"b", "c", "d", "f", "g", "h", "j", "k", "l", "m",
"n", "p", "r", "s", "t", "v", "w", "x", "z",