Skip to content

Instantly share code, notes, and snippets.

View jonlaing's full-sized avatar

Jon Laing jonlaing

  • Mutty Inc
  • Brooklyn
View GitHub Profile
// [[1,4,7],[2,5,8],[3,6,9]]
const transpose = (arr) => {
let ret = [];
for (let i = 0; i < arr.length; i++) {
ret.push([]);
for (let j = 0; j < arr[i].length; j++) {
ret[i].push(arr[j][i]);
}
}

How would you classify your experience level as a developer? What are your development strengths?

I've been programming since I was a kid. I started by learning how to hack the hex codes in Rollercoaster Tycoon to cheat, and then made GUI for it in Visual Basic, and then wanted to share it with the world, so I had to learn how to build a website, and it went from there.

I got my first programming job in high school at a small company doing mostly Flash, Actionscript, and Javascript. From there I learned PHP, went freelance bulding Wordpress sites in college, then Ruby on Rails, etc etc.

So that's about 15 years of professional experience. I'm completely self-taught. That's a strength because it reflects that I can adapt to any situation. I didn't know Actionscript at all when I got that first job, but I learned on the job. I've learned dozens of languages, libraries, and paradigms throughout my career, so not only am I not intimidated by new challenges, I revel in learning new things.

As far as develo

@jonlaing
jonlaing / selectable.res
Last active May 24, 2022 22:30
rescript-reanimated example
open ReactNative
let styles = {
open Style
StyleSheet.create({
"container": viewStyle(
~alignItems=#center,
~justifyContent=#center,
~borderRadius=4.0,
@jonlaing
jonlaing / brightness.sh
Last active December 21, 2019 15:10
i3wm config
#!/bin/sh
# NOTE: This isn't the most portable script in the world. For instance, 937 is a magic number. It is just the
# max brightness I found when looking in /sys/class/backlight/intel_backlight/max_brightness. I was too
# lazy to make the script go and look everytime I invoked the script.
# You need to have read and write permissions for this file.
# I just used `sudo chown $(whoami) /sys/class/backlight/intel_backlight/brightness`
# That might not be the most elegant solution, but it worked.
FILE=/sys/class/backlight/intel_backlight/brightness
@jonlaing
jonlaing / peano.hs
Last active March 2, 2018 04:49
Demonstrating Peano's axioms as explained in PBS Infinite Series https://www.youtube.com/watch?v=3gBoP8jZ1Is
-- All natural numbers (N) are defined as a starting point (Zero), and outputs of a successor function (S)
data N = Zero | Succ N
-- Convenience functions so you can play in GCHI
-- These aren't important to the mathematics...
toInt_ :: Int -> N -> Int
toInt_ n Zero = n
@jonlaing
jonlaing / notification_handler.go
Last active October 1, 2015 02:46
Notification websocket
import (
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
"net/http"
// ..
)
// not actually sure what this is, but I saw it in a tutorial, haha
var wsupgrader = websocket.Upgrader{
ReadBufferSize: 1024,