Skip to content

Instantly share code, notes, and snippets.

@schnell18
schnell18 / macosx_remove_java9.sh
Created October 8, 2016 13:26
MacOS X remove Java 9
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
@darth-veitcher
darth-veitcher / proxmox.md
Last active January 5, 2024 00:10
Proxmox setup and notes (Community Edition)

Install instruction and notes for setting up a homelab proxmox cluster

Updated as at June 2016 for Proxmox Virtual Environment 4.2-11/2c626aa1

Allow use of community packages

Change the apt sources to point to the community repo. Thanks to niccolox.org

# disable the enterprise repo
sed -i.bak s'/deb/# deb/' /etc/apt/sources.list.d/pve-enterprise.list
REPO="$HOME/src/dotfiles.git"
GITHUB_REPO_URL="git@github.com:fornellas/dotfiles.git"
mkdir -p "$REPO"
cd "$REPO"
git init --bare
cd -
alias dotfiles='git --git-dir="$REPO" --work-tree="$HOME"'
dotfiles remote add origin $GITHUB_REPO_URL
dotfiles pull origin
@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
@nospoone
nospoone / nodebb_backup.js
Created March 12, 2016 17:28
HaxeFlixel's NodeBB forums backup
// incredibly simple backup script
// based off http://nodebb.readthedocs.org/en/latest/upgrading/index.html#upgrade-steps and
// https://github.com/jongarrison/nodebb-backup/blob/master/index.js
// by nospoone - romeo@q-bit.ca
const path = require('path');
const fs = require('fs-extra');
const tar = require('tar-fs');
const moment = require('moment');
@bguiz
bguiz / mocha-async-sequence.spec.js
Last active January 12, 2016 05:25
Proving that mocha executes async tests in sequence (and also shows how to use with generator functions)
'use strict';
let co = require('co');
let chai = require('chai');
let expect = chai.expect;
function waitFor(duration) {
return new Promise(function(resolve) {
setTimeout(resolve, duration);
});
@paulirish
paulirish / what-forces-layout.md
Last active May 31, 2024 22:37
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@ebidel
ebidel / app.html
Last active May 1, 2021 15:42
Fast Polymer app loading - optimized for first render, progressively enhanced lazy loading
<!DOCTYPE html>
<html>
<head>
<style>
body.loading #splash {
opacity: 1;
}
#splash {
position: absolute;
top: 0;
@simonsdave
simonsdave / docker_remote_api
Created May 31, 2015 15:25
enabling docker remote API on Ubuntu 14.04 on GCE
* spin up a VM on GCE and
install docker (based on [these](https://docs.docker.com/installation/ubuntulinux/) instructions)
```bash
gcloud compute instances create dave --machine-type n1-standard-1 --image ubuntu-14-04
gcloud compute ssh dave
wget -qO- https://get.docker.com/ | sh
```
* to verify install is working