Skip to content

Instantly share code, notes, and snippets.

View changemewtf's full-sized avatar

Max C changemewtf

View GitHub Profile
@changemewtf
changemewtf / GetSynInfo.vim
Last active April 11, 2017 16:52
A utility function for debugging syntax highlight "situations".
" Produces output like:
" vimOption (PreProc fg=225 bg=) < vimSet (fg= bg=) < vimFuncBody (fg= bg=)
nnoremap g<C-h> :echo GetSynInfo()<CR>
function! GetSynInfo()
let stack = synstack(line("."), col("."))
let info = ""
for synid in reverse(stack)
if strlen(info)
@changemewtf
changemewtf / CycleLineNumberDisplay.vim
Last active March 31, 2017 21:17
Twiddle options to make the line number feature more accessible
" Cycle Line Number Display: serialized by Max Cantor
" Twiddle options to make the line number feature more accessible
"
" Notes:
" for a list of useful arguments to :hilight
" :help highlight-args
"
" example highlight customization
" :highlight LineNr cterm=NONE ctermbg=black ctermfg=cyan
1: ~/.vimrc
2: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/syntax/syntax.vim
3: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/syntax/synload.vim
4: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/syntax/syncolor.vim
5: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/filetype.vim
6: ~/.common-public/vim/.vim/colors/hhdgray.vim
7: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/plugin/getscriptPlugin.vim
8: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/plugin/gzip.vim
9: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/plugin/logiPat.vim
10: /usr/local/Cellar/vim/8.0.0495/share/vim/vim80/plugin/manpager.vim
BASIC_BIND = <<-YAML.strip
First Name: Max
Last Name: Cantor
Display Name: !bind First Name
YAML
RSpec.describe Yuby do
it "performs basic binding" do
hash = Yuby.load BASIC_BIND
expect(hash["Display Name"]).to(
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
const LEFT_MOUSE = 0,
DRAG_CLASS = "being-dragged";
function Draggable(el, handle) {
handle.addEventListener("mousedown", event => {
if (event.button != LEFT_MOUSE) { return false; }
event.preventDefault();
new Drag(this, event.clientY);
});
@changemewtf
changemewtf / what_now.md
Last active November 16, 2016 22:52
What now?

What now?

  1. Am I able to focus?
    1. Are there distractions I can get rid of? a. Silence phone a. Close irrelevant browser tabs and windows
    2. In the last 30 minutes, have I... a. Stepped away from the screen
    3. In the last two hours, have I... a. Drank some water
SELECT
state,
COUNT(state)
FROM users
GROUP BY state
-- BONUS 2: Only get states with more than 10 users
HAVING COUNT(state) > 10
-- BONUS 1: Order from lowest to highest user count
ORDER BY COUNT(state)
Fantasy Colors
--------------
[BLACK_R:0]
[BLACK_G:0]
[BLACK_B:0]
[BLUE_R:46]
[BLUE_G:27]
[BLUE_B:148]
@changemewtf
changemewtf / defense.md
Last active December 8, 2015 23:19
Defending against online abuse and identity theft

Speak Up & Stay Safe on FeministFrequency is another good resource.

STEP ONE: PASSWORDS

These steps will prevent people from breaking into your accounts by exploiting weak passwords or weak storage.

Remember that even if you have good passwords, most people re-use passwords. So if you use the same password for your e-mail and some random website, and the random website gets hacked, the hacker now has your e-mail and the password.

  1. Download 1Password or something like it
  2. Come up with a good master pass-phrase that can be typed like an English sentence (like "This is my password.")