Skip to content

Instantly share code, notes, and snippets.

@waiteb3
waiteb3 / gist:3c60ae7d3d63c1f2d0836c71e0a2e330
Created September 23, 2020 14:07
Dockerfile.Godot-HTML5
FROM ubuntu:18.04 AS builder
RUN apt update && apt install -yq unzip wget
RUN wget -q https://downloads.tuxfamily.org/godotengine/3.2.3/Godot_v3.2.3-stable_linux_headless.64.zip
RUN wget -q https://downloads.tuxfamily.org/godotengine/3.2.3/Godot_v3.2.3-stable_export_templates.tpz
RUN unzip Godot_v3.2.3-stable_linux_headless.64.zip && mv /Godot_v3.2.3-stable_linux_headless.64 /bin/Godot && rm Godot_v3.2.3-stable_linux_headless.64.zip
@waiteb3
waiteb3 / gist:525788bbfd5c64b963bfa96ad7b8b6d4
Created September 20, 2020 16:26
ssh-push-service-microk8s.yaml
apiVersion: v1
kind: Service
metadata:
name: ssh-remote
namespace: kube-system
spec:
type: NodePort
ports:
- nodePort: 32222
port: 32222
function name1() {
return 1
}
const name2 = new Function(`return function name2() {
return 1
}`)()
let start1 = 0, end1 = 0;
let start2 = 0, end2 = 0;
// JavaScript has 6 falsy values (that evaluate to false when coerced to a boolean)
// false
// 0
// ""
// null
// undefined
// NaN
// Using != null, we can safely check against null and undefined rather than multiple underscore functions, typeofs, etc
@waiteb3
waiteb3 / install-hooks.sh
Last active December 15, 2015 02:27
Install my recommended git-hooks with `curl ... | sh`
#!/bin/sh
# TODO
# findGitDir() {
# }
install() {
set +x
curl https://gist.github.com/waiteb3/b694eea1e9b470bee1ee -o .git/hooks/pre-push
chmod +x .git/hooks/pre-push
#!/bin/bash
#
# INSTALL:
# chmod +x pre-push
# mv -i pre-push .git/hooks/pre-push
warning=false
alias grep='grep --color=auto'
LINTS="TODO
(while [[ -f $FILE ]]; do sleep 1; done; for i in {1..10}; do echo -en '\a'; sleep .1; done)
@waiteb3
waiteb3 / PS1.bash
Last active December 3, 2015 01:22
export PS1="\[\e[35;1m\]\u\[\e[0m\]@\[\e[32;1m\]\h\[\e[0m\]:\[\e[37m\][\w]\[\e[35;1m\] \n\[\e[31;1m\]\\$ \[\e[0m\]"
#!/bin/bash
set -x
# only for ubuntu 14.04 LTS
start_install() {
SCALA_VERSION=${SCALA_VERSION:-2.11.4}
ACTIVATOR_VERSION=${ACTIVATOR_VERSION:-1.3.6}
CLANG_VERSION=${CLANG_VERSION:-3.6}
GO_VERSION=${GO_VERSION:-1.5.1}
@waiteb3
waiteb3 / vimrc.vim
Last active December 5, 2015 02:57
call plug#begin('~/.vim/plugged')
Plug 'vim-scripts/CycleColor'
Plug 'flazz/vim-colorschemes'
Plug 'fatih/vim-go', { 'for': 'go' }
Plug 'derekwyatt/vim-scala', { 'for': 'scala' }
Plug 'jimenezrick/vimerl', { 'for': 'erlang' }
Plug 'leafgarland/typescript-vim', { 'for': 'typescript' }