Skip to content

Instantly share code, notes, and snippets.

View sbliven's full-sized avatar
💻
Typing...

Spencer Bliven sbliven

💻
Typing...
View GitHub Profile
@dupuy
dupuy / README.rst
Last active April 23, 2024 23:38
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@michaelxor
michaelxor / pymordial.sh
Last active January 10, 2017 10:30
A clean virtualenv with pip and setuptools (formerly distribute). Only requirement is a local python install. Adapted from http://stackoverflow.com/a/5177027
# Name your first "bootstrap" environment:
INITIAL_ENV=pymordial
# Options for your first environment:
ENV_OPTS=''
# Set to whatever python interpreter you want for your first environment:
PYTHON=$(type -P python)
# Latest virtualenv from pypa
@nolanlawson
nolanlawson / protips.js
Last active February 4, 2024 18:06
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@sephamorr
sephamorr / wmfix
Last active September 16, 2020 18:49
#!/usr/bin/python
#You may have to change some of these values to match display/dock/menubar sizes
xscr=1920
yscr=1080
yd=5
xd=80
xstart=0
ystart=44
xmax=xscr-xd
@msepcot
msepcot / TheFatedSky.rb
Created December 7, 2018 20:40
The Fated Sky: A Lady Astronaut Novel, Chapter 16 cypher text.
PLAINTEXT = %w(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
CRYPTTEXT = %w(E L P H A N T B C D F G I J K M O Q R S U V W X Y Z)
input = "Cj qarmkjra sk ykuq gers gassaq, C ei waeqcjt iy ngctbs rucs lus hk jks beva e lqe kj. Cn yku waqa baqa, C wkugh sefa yku cjsk sba teqhaj ikhuga ejh gaej kvaq sba skiesk lahr rk sbes er yku skkf ia nqki labcjh, iy nepa wkugh la mqarrah cjsk sba nqetqejs tqaaj gaevar wcsb aepb sbqurs.".upcase
input.split("").each do |character|
if position = CRYPTTEXT.find_index(character)
print PLAINTEXT[position]
else
print character
@Dan-Q
Dan-Q / google-authenticator.rb
Last active March 8, 2019 16:09
Command-line Google Authenticator (TOTP)
#!/usr/bin/env ruby
# frozen_string_literal: true
# encoding: utf-8
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'rotp'
gem 'thor'
end
@upgundecha
upgundecha / Brewfile
Last active October 7, 2022 06:40
Brewfile for tools listed in https://github.com/ibraheemdev/modern-unix
# tools from https://github.com/ibraheemdev/modern-unix
tap "cantino/mcfly"
tap "clementtsang/bottom"
brew "bat"
brew "exa"
brew "lsd"
brew "git-delta"
brew "dust"
brew "duf"
brew "broot"