Skip to content

Instantly share code, notes, and snippets.

View hkalexling's full-sized avatar
👻
:(){ :|: & };:

Alex Ling hkalexling

👻
:(){ :|: & };:
View GitHub Profile
JavaScript 3 hrs 6 mins ███████████░░░░░░░░░░ 52.8%
TypeScript 1 hr 11 mins ████▎░░░░░░░░░░░░░░░░ 20.4%
Terraform 59 mins ███▌░░░░░░░░░░░░░░░░░ 16.9%
JSON 16 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.7%
Bash 8 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.5%
Xft.dpi: 320
Xft.lcdfilter: lcddefault
Xft.antialias: 1
Xft.autohint: 0
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.rgba: rgb
*faceName: "Monospace"
*faceSize: 12

Keybase proof

I hereby claim:

  • I am hkalexling on github.
  • I am hkalexling (https://keybase.io/hkalexling) on keybase.
  • I have a public key ASCXs-Hr3pUcBh6hRCtaFxpbgg7fHU_i_5i5SPQTu25Odgo

To claim this, I am signing this object:

@hkalexling
hkalexling / lollipops.js
Last active August 22, 2019 11:42
Sample script for creating games in NemoBot
'use strict';
const lollipopStr = (num) => {
return (new Array(num)).fill('🍭').join('');
};
const ranInt = (min, max) => {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min)) + min;
};
@hkalexling
hkalexling / em.py
Created October 8, 2017 04:59
CS5487 Problem Set 4.5
import numpy as np
import math
import scipy.special
l = [229, 211, 93, 35, 7, 1]
a = [325, 115, 67, 30, 18, 21]
n = 576
k = 0
threshole = 1e-6
//
// TypedLabel.swift
// TypedLabel
//
// Created by Alex Ling on 30/4/2017.
// Copyright © 2017 Alex Ling. All rights reserved.
//
import UIKit
from twython import Twython
import webbrowser
APP_KEY = '...'
APP_SECRET = '...'
twitter = Twython(APP_KEY, APP_SECRET)
auth = twitter.get_authentication_tokens()
@hkalexling
hkalexling / ViewController.h
Last active January 12, 2024 06:07
iOS Bonjour Browse and Resolve Services
#import <UIKit/UIKit.h>
@interface ViewController<NSNetServiceBrowserDelegate, NSNetServiceDelegate>
@end
@hkalexling
hkalexling / word.js
Created December 29, 2016 12:07
NodeJs script to search word/phase in macOS system dictionary
var spawn = require('child_process').spawn;
var arg = process.argv[2];
if (!arg) throw 'usage: node word.js hello or node word.js "hello world"';
var search = spawn('open', [`dict://${arg}`]);
search.stdout.on('data', (data) => {
console.log(`result: ${data}`);
});
@hkalexling
hkalexling / ios_link_header.md
Last active August 23, 2016 11:03
Getting and parsing Link field in response header on iOS