Skip to content

Instantly share code, notes, and snippets.

@sihorton
sihorton / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.rawgit.com/knsv/mermaid/master/dist/mermaid.full.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="mermaid">
@sihorton
sihorton / index.html
Created December 23, 2014 14:11
XCOM Enemy Unknown Tech Tree // source http://jsbin.com/mizazo
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="XCOM Enemy Unknown Tech Tree" />
<script src="https://cdn.rawgit.com/knsv/mermaid/master/dist/mermaid.full.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style>
body { overflow:auto;}
</style>
@sihorton
sihorton / readme.md
Last active September 6, 2017 10:15
Adding Upstream to a github fork

1. In github for example fork the original repository

2. Clone the repository locally

git clone https://github.com/YOUR-USERNAME/YOUR-FORKED-REPO.git

3. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream https://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git

git fetch upstream

@sihorton
sihorton / typescript.ts
Created October 9, 2017 12:14
Remove property does not exist on xxx warning for jQuery and others
//remove warnings for any object in a readable way that does not affect generated js.
($("div.printArea") as any).printArea();
@sihorton
sihorton / upgrade.sh
Last active August 31, 2018 20:32
odroid upgrade to 1806
loadkeys se
#fix issues with ports.ubuntu.com not resolving
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
sudo apt-get install update-manager-core
sudo do-release-upgrade
#fix broken package state after upgrade
sudo apt install python3-aptdaemon
#then do further upgrades
@sihorton
sihorton / odroid-upgrade-1804.sh
Last active September 1, 2018 14:28
odroid u2 kernel upgrade
# Ubuntu16.04 with kernel 4.16 - https://forum.odroid.com/viewtopic.php?f=77&t=30654
# win32 disk imager, burn "ubuntu-odroidu3-4.16" to sd card, gives you kernel4.16
login root/odroid
#attempt to fix network problems after upgrade (random mac address on reboot)
nano /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
@sihorton
sihorton / odroid-1804-kernel-compile.sh
Last active November 15, 2020 22:07
odroid u2 mainline kernel compilation
#!/bin/bash
if [ "$1" = "" ]; then
echo "$0: please specify $0 (kernelv) (optional kernel-config)"
echo "e.g. $0 4.18.5 or $0 4.18.5 u3_docker_config"
else
KERNELV="$1"
KERNEL_CONFIG="u3_docker_config"
BOARD_DRIVER="exynos4412-odroidu3"
TARGETD="/media/boot/"
@sihorton
sihorton / compile-kernel.sh
Created September 1, 2018 23:41
compile odroid u2
#!/bin/bash
if [ "$1" = "" ]; then
echo "$0: please specify $0 (kernelv) (optional kernel-config)"
echo "e.g. $0 4.18.5 or $0 4.18.5 u3_docker_config"
else
KERNELV="$1"
KERNEL_CONFIG="u3_docker_config"
BOARD_DRIVER="exynos4412-odroidu3"
TARGETD="/media/boot/"
#!/bin/bash
if [ "$1" = "" ]; then
echo "$0: please specify $0 (kernelv) (optional kernel-config)"
echo "e.g. $0 4.18.5 or $0 4.18.5 u3_docker_config"
else
KERNELV="$1"
KERNEL_CONFIG="/media/boot/u3_docker_config"
BOARD_DRIVER="exynos4412-odroidu3"
TARGETD="/media/boot/"