Skip to content

Instantly share code, notes, and snippets.

@robmiller
robmiller / play-wordle.rb
Last active February 15, 2022 19:40
A command-line, offline version of Wordle. A new word every time you run it.
#!/usr/bin/env ruby
#
# Play a command-line version of Wordle
#
# Original game by Josh Wardle: https://www.powerlanguage.co.uk/wordle/
#
# Installation and usage:
#
# 1. Save this file somewhere as play-wordle.rb
# 2. Run `ruby play-wordle.rb`
@mvark
mvark / Bookmarker
Last active January 6, 2022 16:54
Browser Bookmarklet to record an open web page's URL & its title as a row in Google Sheets
//Following code can be used within Google App Script editor & deployed
//Original code - https://stackoverflow.com/q/15592094/325251
function doGet(request) {
var ss = SpreadsheetApp.openByUrl( "https://docs.google.com/spreadsheet/ccc?key=<YOUR-SPREADSHEET-ID>");
var sheet = ss.getSheets()[0];
//just this line was tweaked to include the web page's title
var headers = ["Timestamp", "url","title"];
@tranquan
tranquan / xcode-keybindings-as-vscode.md
Last active July 31, 2025 03:08
Xcode KeyBindings as VSCode
# This script will parse a json response from randomuser.me and convert it to the xml
# format required to import into Salesforce Demandware
#
# It fetches 500 random users from Canada. Just modify the URL parameters to modify these conditions.
import json
import os, sys
import codecs
from datetime import datetime
from xml.etree.ElementTree import ElementTree, Element, SubElement, Comment, tostring
@tlberglund
tlberglund / git-loglive
Last active September 26, 2024 20:40
Log Live Git Command
#!/bin/bash
while :
do
clear
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $*
sleep 1
done