start new:
tmux
start new with session name:
tmux new -s myname
--- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb <A-S-G> | |
$SelectAll <M-A> | |
$Undo <M-Z> |
void function(global){ | |
if ('DataView' in global && 'ArrayBuffer' in global) { | |
return; | |
} | |
var hide = (function(){ | |
// check if we're in ES5 | |
if (typeof Object.getOwnPropertyNames === 'function' && !('prototype' in Object.getOwnPropertyNames)) { | |
var hidden = { enumerable: false }; |
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
var BASE64_MARKER = ';base64,'; | |
function convertDataURIToBinary(dataURI) { | |
var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length; | |
var base64 = dataURI.substring(base64Index); | |
var raw = window.atob(base64); | |
var rawLength = raw.length; | |
var array = new Uint8Array(new ArrayBuffer(rawLength)); | |
for(i = 0; i < rawLength; i++) { |
/* | |
Can load easier and more indepth with https://github.com/Hydroque/DDSLoader | |
Because a lot of crappy, weird DDS file loader files were found online. The resources are actually VERY VERY limited. | |
Written in C, can very easily port to C++ through casting mallocs (ensure your imports are correct), goto can be replaced. | |
https://www.gamedev.net/forums/topic/637377-loading-dds-textures-in-opengl-black-texture-showing/ | |
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-5-a-textured-cube/ | |
^ Two examples of terrible code |
#!/usr/bin/env bash | |
# Prerequisites | |
# | |
# Download the 1Password CLI tool | |
# | |
# brew cask install 1password-cli | |
# | |
# Before using this script, you'll need to authenticate the 1Password | |
# CLI for the first time. Use the following command, replacing |
#!/bin/bash | |
### | |
### my-script — does one thing well | |
### | |
### Usage: | |
### my-script <input> <output> | |
### | |
### Options: | |
### <input> Input file to read. | |
### <output> Output file to write. Use '-' for stdout. |
!function(Object, getPropertyDescriptor, getPropertyNames){ | |
// (C) WebReflection - Mit Style License | |
if (!(getPropertyDescriptor in Object)) { | |
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | |
Object[getPropertyDescriptor] = function getPropertyDescriptor(o, name) { | |
var proto = o, descriptor; | |
while (proto && !( | |
descriptor = getOwnPropertyDescriptor(proto, name)) | |
) proto = proto.__proto__; | |
return descriptor; |