Skip to content

Instantly share code, notes, and snippets.

@spicyjack
spicyjack / vim_plugins.yaml
Created April 21, 2021 00:21
Ansible vars file with VIM setup info
---
# VIM directories
vim_subdirs_list:
- ~/.config/coc
- ~/.vim/autoload
- ~/.vim/backup
- ~/.vim/pack/plugs/start
- ~/.vim/pack/syns/start
- ~/.vim/swapfiles
- ~/.vim/undo
@spicyjack
spicyjack / user-setup_vim_and_friends.yaml
Last active April 21, 2021 00:22
Set up VIM via an Ansible playbook task
---
# this task list should be called via 'import_tasks'
- name: "Set a variable with a timestamp"
set_fact:
timestamp: "{{lookup('pipe', 'date \"+%Y-%m-%d.%H%M\"')}}"
### SET UP VIM
- name: "Copying '~/.vimrc' to '~/.vimrc.{{ timestamp }}'"
copy:
src: "~/.vimrc"
@spicyjack
spicyjack / multiline.pl
Last active February 6, 2021 07:22
Multi-line regex
my $projs_regex = qr/
([a-zA-Z0-9_'\-\x20\/\!]+) # a bunch of words with punctuation,
# possibly separated by spaces
(:)* # with a colon possible
(\x20)+ # followed by one or more spaces
(Status|Start|Day) # and then one of these three words...
.* # maybe
/x;
@spicyjack
spicyjack / featherwing_ascii.txt
Created October 18, 2019 18:15
FeatherWing ASCII Art Diagram
+--------------------+
|O oooooooooooo O|
| |
| |
| |
| |
| |
|O oooooooooooooooo O|
+--------------------+
MMRTG
@spicyjack
spicyjack / rustwasm_workflow.md
Created September 13, 2018 23:15
RustWASM workflow example
cd $WASM_GOL`
  • wasm-pack init
    • This creates a directory called ${WASM_GOL}/pkg, with the correct JavaScript bits needed to interact with a Rust WASM application
    • The JavaScript bits will need to be regenerated via wasm-pack init every time you make changes to the Rust code
  • Create the web app from a template
    • cd $WASM_GOL
    • npm init wasm-app www
@spicyjack
spicyjack / rustwasm_setup.md
Created September 13, 2018 22:31
RustWASM setup steps
  • Setup for the Rust WASM "Game of Life" demo
    • cargo install wasm-pack
    • cargo install cargo-generate
    • npm should already be installed
  • Cloning the "Game of Life" demo
    • cargo generate --git https://github.com/rustwasm/wasm-pack-template
      • You'll be prompted for the target output directory name
        • wasm-game-of-life; this will be called $WASM_GOL below
  • Set up the wasm-bindgen workflow
    • cd $WASM_GOL
define hook-quit
set confirm off
end
target remote :3333
load
break led_roulette::main
continue
@spicyjack
spicyjack / gist:242ec58707c770028189ad86d8921bba
Created November 9, 2017 18:28
Put VIM swap/undo/backup files in a central place
" Put plugins and other things (dictionaries) in this dir (also on Windows)
" https://stackoverflow.com/questions/5700389
" http://vim.wikia.com/wiki/Automatically_create_tmp_or_backup_directories
" https://coderwall.com/p/sdhfug/vim-swap-backup-and-undo-files
let vimDir = '$HOME/.vim'
let &runtimepath.=','.vimDir
" backup: backups are for wimps ;-)
let myBackupDir = expand(vimDir . '/backup')
if isdirectory(myBackupDir)
@spicyjack
spicyjack / fun_with_spam.txt
Created June 13, 2017 22:12
Assure TRANSITION AND TURNING Point of Human Civilization
From: Hari Kotadia <[email protected]>
Envelope Recipient: [email protected]
To: [email protected]
Subject: TRYING to Build Sustainable Planetary FUTURE but with NO FOUNDATION - (UNO/GOVs/ EDUs /IGOs /NGOs /MNCs).
Date: 13 Jun 2017 06:43 (GMT -07:00)
@spicyjack
spicyjack / outbrain_stylist_rules.css
Created June 6, 2017 15:18
Outbrain Stylist rules
.ob_container {display: none !important;}
.ob_holder {display: none !important;}
.ob_org_header {display: none !important;}
.ob-pixels {display: none !important;}
.ob_strip_container {display: none !important;}
.ob_what {display: none !important;}
.ob-widget {display: none !important;}
.ob-widget-header {display: none !important;}
.ob-widget-section {display: none !important;}
.ob-widget-items-container {display: none !important;}