- Spacegray Ocean Dark: Default
- Spacegray Light: If I'm outside
- .zshrc: Zsh config file
- .vimrc: Vim config file
- .tmux.conf: Tmux config file
- Preferences.sublime-settings: Sublime config
//Include our Libraries! | |
var request = require('request'); | |
var cheerio = require('cheerio'); | |
//Request will send our web request to Hacker News | |
request('https://news.ycombinator.com', function (error, response, body) { | |
//continue with our scraper if there's no errors | |
if (!error && response.statusCode == 200) { | |
<!-- This is the screen that pops up when you try to make a snippet --> | |
<!-- replace "yourtext" with whatever you want your expanded text to be --> | |
<!-- replace "yourkey" with the keyword you want to use to trigger it --> | |
<snippet> | |
<content><![CDATA[yourtext]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>yourkey</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> |
// Declare our dependencies. | |
var http = require('http'); | |
var url = require('url'); | |
var path = require('path'); | |
var fs = require('fs'); | |
// The function we run on every incoming message | |
var serverCallback = function(incomingMessage, response) { | |
// Get the location of our file |
var express = require('express'); | |
var app = express(); | |
app.use(express.static(__dirname + '/public')); | |
app.listen(process.env.PORT || 3000); |
# https://johnnydecimal.com/ | |
cjd() { | |
if [ $# -eq 0 ]; then | |
cd ~/Documents | |
elif [ $1 =~ ['.'] ]; then | |
cd ~/Documents/*/*/${1}*/ | |
elif [ $1 =~ ['-'] ]; then | |
cd ~/Documents/${1}*/ | |
else | |
cd ~/Documents/*/${1}*/ |
// Deno version of Wordle | |
// Loosely inspired by https://gist.github.com/huytd/6a1a6a7b34a0d0abcac00b47e3d01513 | |
// | |
// Run this script: deno run --allow-read wordle.ts | |
// Install this script: deno install --name=wordle --allow-read https://gist.githubusercontent.com/ivebencrazy/ac3c700f7d7800113c0d5d5251b0bdd8/raw/3cbf169aa7b5e59f6da033b53775085fe5d863ee/wordle.ts | |
import { | |
bgGreen, | |
bgWhite, | |
bgYellow, |
A basic file server, adapted from
https://deno.land/std@0.125.0/http/file_server.ts The only difference is this
one attempts to serve .html
if there is no file extension.
Can install same as deno file_server. I like to rename to be serve
:
deno install -f --allow-net --allow-read --name=serve https://gist.githubusercontent.com/ivebencrazy/de2f30bda961aeac9444de5345f68db4/raw/ff486c1206b1ee3f92514c2f8a578a8e7bbc6b45/file_server.ts
A small script I used to bruteforce my ethereum password for a really old wallet from list of possible passphrase combinations. It did the job at that time (phew)! Originally built in node.js, I rejiggered to be a deno app so I wouldn't need to push package.json, and to make importing json files look cleaner. Replace example json files with actual files to use.
keystore.json
is the wallet keystore
// Builds obj from unicode emoji-test text | |
// https://unicode.org/Public/emoji/14.0/emoji-test.txt | |
// http://www.unicode.org/reports/tr51/ | |
// Usage: | |
// deno run --allow-net fetch-emoji.ts | |
type Qualification = "fully-qualified" | "minimally-qualified" | "unqualified"; | |
interface EmojiObj { |