Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am dunstontc on github.
  • I am dunstontc (https://keybase.io/dunstontc) on keybase.
  • I have a public key ASCyIQTAxBZuYVaNLnT6YEYA-AyZLJT6MLd4Qg_8M2LRygo

To claim this, I am signing this object:

@dunstontc
dunstontc / hello.go
Last active May 23, 2018 18:42
hello.go v2
package greetings
import (
"fmt"
)
// Hello prints out a sentence.
func Hello(sentence string) {
fmt.Printf("%s\n", sentence)
}
package main
import (
"fmt"
)
// Hello prints out a sentence.
func Hello(sentence string) {
fmt.Printf("%s\n", sentence)
}
@dunstontc
dunstontc / JSON-tmLanguage.json
Last active April 3, 2018 23:51
JSON Schema for VSCode syntax definitions written in JSON.
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$id": "https://gist.github.com/dunstontc/1e30c3a454b252123d8101c8059855c3",
"description": "See: https://github.com/Microsoft/vscode/tree/master/extensions",
"type": "object",
"required": [
"name",
"scopeName",
"patterns"
],
@dunstontc
dunstontc / truecolortest.sh
Created November 25, 2017 20:23
Just copy/paste lines 5-17 in your shell to run this
# If truecolor is enabled, this will return a full color spectrum
# If not, it'll just print 16 colors
# function kuler() {
awk 'BEGIN{
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
for (colnum = 0; colnum<77; colnum++) {
r = 255-(colnum*255/76);
g = (colnum*510/76);
b = (colnum*255/76);
@dunstontc
dunstontc / .vimrc
Created November 21, 2017 16:56
Using plug.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
" Make sure you use single quotes
Plug 'raimondi/delimitmate'
" Initialize plugin system
@dunstontc
dunstontc / unicode.md
Last active April 30, 2018 15:58
Cool Unicode Characters

Misc

Character Name Code Mac Shortcut
Two Joined Squares 29C9
🗔 Desktop Window 1F5D4
Integral Around a Point Operator 2A15
Circulation Function 2A10
Quarter Note 2669
Eighth Note 266A
@dunstontc
dunstontc / webpack.readme.md
Created September 4, 2017 17:31
Webpack's stylish readme file


[![npm][npm]][npm-url]

[![node][node]][node-url]

@dunstontc
dunstontc / 0_reuse_code.js
Created July 29, 2017 17:46
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
@dunstontc
dunstontc / wrap-text.js
Created June 25, 2017 23:28
wrap some text
function wrapText (text, token) {
const length = token.length
if ((text.substr(0, length) === token) && (text.substr(-length) === token)) {
return text.substr(length, text.length - length * 2)
} else {
return token + text + token
}
}