Skip to content

Instantly share code, notes, and snippets.

View lucianonooijen's full-sized avatar
☁️
In the cloud

Luciano Nooijen lucianonooijen

☁️
In the cloud
View GitHub Profile
@lucianonooijen
lucianonooijen / install_xelatex_on_mac.txt
Created February 20, 2022 15:00 — forked from peterhurford/install_xelatex_on_mac.txt
How to install latex and xelatex on Mac so that Jupyter "Download as PDF" will work
brew install pandoc
brew tap homebrew/cask
brew install basictex --cask
eval "$(/usr/libexec/path_helper)"
# Update $PATH to include `/usr/local/texlive/2020basic/bin/x86_64-darwin`
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install xelatex
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
@lucianonooijen
lucianonooijen / ts-json-check-example.ts
Last active August 21, 2020 13:55
Runtime JSON type-checking with Typescript interfaces
import { Decoder } from "decoders/types";
import { guard } from "decoders";
interface APIResultSuccess<T> { data: T; error?: undefined; }
interface APIResultFailure { data?: undefined; error: string; }
type APIResult<T> = APIResultSuccess<T> | APIResultFailure;
const throwOrReturn = <T>(result: APIResult<T>, decoder: Decoder<T>): T => {
if (result.error) {
throw new Error(result.error);
@lucianonooijen
lucianonooijen / SMBDIS.ASM
Created October 22, 2019 21:33 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@lucianonooijen
lucianonooijen / main.js
Created November 2, 2018 15:45
Clockify create screenshotable page
// Simulate Click
const simulateClick = function (elem) {
// Create our event (with options)
const evt = new MouseEvent('click', {
bubbles: true,
cancelable: true,
view: window
});
// If cancelled, don't dispatch our event
const canceled = !elem.dispatchEvent(evt);
@lucianonooijen
lucianonooijen / five_minutes.yml
Created August 14, 2018 21:24 — forked from ryane/five_minutes.yml
five_minutes.yml
---
- hosts: all
vars:
UBUNTU_COMMON_ROOT_PASSWORD: 'xxxxx'
UBUNTU_COMMON_DEPLOY_PASSWORD: 'xxxxx'
UBUNTU_COMMON_LOGWATCH_EMAIL: user@example.com
ubuntu_common_deploy_user_name: deploy
ubuntu_common_deploy_public_keys:
- ~/.ssh/id_rsa.pub
@lucianonooijen
lucianonooijen / webdev_online_resources.md
Created July 19, 2018 12:17 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@lucianonooijen
lucianonooijen / main.yaml
Created May 18, 2018 15:10 — forked from kbariotis/main.yaml
Ansible playbook for deploying a Node.js app to DigitalOcean
- name: DO
hosts: localhost
vars:
project_name: "PUT A NAME FOR YOUR PROJECT HERE"
do_token: "PUT YOUR DIGITAL OCEAN API KEY HERE ==> https://cloud.digitalocean.com/settings/api/tokens"
repository: "PUT YOUR REPOSITORY URL HERE"
tasks:
- name: LOCAL | Generate SSH key
shell: ssh-keygen -b 2048 -t rsa -f ~/.ssh/{{project_name}} -q -N ""