Skip to content

Instantly share code, notes, and snippets.

View sts10's full-sized avatar

Sam Schlinkert sts10

View GitHub Profile
@twosixcode
twosixcode / gist:1988097
Created March 6, 2012 18:40
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
#include "keymap_common.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP( /* Charlie workman */
ESC, Q, D, R, W, B, J, F, U, P, SCLN, BSLS,
LCTL, A, S, H, T, G, Y, N, E, O, I, BSPC,
LSFT, Z, X, M, C, V, K, L, COMM, DOT, SLSH, ENT,
RSFT, LALT, LGUI, RCTL, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT),
[1] = KEYMAP( /* Charlie RAISE */
TAB, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,
@ndarville
ndarville / README.md
Last active September 21, 2023 21:34
How to export and rehost your Tumblr site

How to export and rehost your Tumblr site

(Update: Version 3.2.0 of Jekyll looks like it's breaking a few things, so I've changed the guide to make you specifically install the version I was using, 3.1.3. I believe this is the issue: jekyll/jekyll#5145.)

You will be using jekyll-import to export your Tumblr site, Jekyll to (re)create it, and Surge to rehost it.

Update: You can also use Tumblr's native export feature in your blogs' individual settings. But rehosting that might be tricky. Read my comments below this post for how that works.

Setup and installation

@lcpz
lcpz / sp.py
Last active November 11, 2023 23:31
Sardinas-Patterson algorithm
#! /usr/bin/env python
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@romainl
romainl / environment.vim
Last active August 11, 2023 00:27
Do things differently depending on the environment
" MIT License
" Copyright (c) 2017 romain Lafourcade
" Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to deal
" in the Software without restriction, including without limitation the rights
" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
" copies of the Software, and to permit persons to whom the Software is
" furnished to do so, subject to the following conditions:
@joyeusenoelle
joyeusenoelle / Mastodon.md
Last active September 3, 2024 17:59
An increasingly less-brief introduction to Mastodon
@atoponce
atoponce / README.md
Last active June 20, 2024 01:30
Proposed improvements to EFF's FANDOM wordlists

Proposed EFF Fandom Improvements

Contact

If there are any problems with the word lists, please reach out to me on Fosstodon [@atoponce][0].

Non-license

These word lists are released to the public domain. Enjoy.

Original Word List Problems

@timmc
timmc / pwned-passwords-sqlite-build.py
Last active October 4, 2024 14:00
Building a sqlite DB for the Pwned Passwords data
#!/usr/bin/env python3
# Build a SQLite3 DB for looking up SHA-1 hashes of leaked passwords.
#
# This can be fed the txt file from one of Have I Been Pwned's hash
# lists available from https://haveibeenpwned.com/Passwords -- but any
# text file with line format ``hash-hex:count`` will work.
#
# When run on the v5 hash-ordered SHA-1 file, expect the build to take
# about 35 minutes and produce a 15.7 GiB file (~30.5 bytes per record).
#
@yinleon
yinleon / requirements.txt
Created January 3, 2022 21:32
Tesseract ORC in Python
numpy
tqdm
pdf2image
opencv-python
pytesseract
Pillow