Skip to content

Instantly share code, notes, and snippets.

View blasterpistol's full-sized avatar
🦜

BlasterPistol blasterpistol

🦜
View GitHub Profile
@dhoko
dhoko / templateSettings.js
Created February 18, 2014 14:37
Lodash/underscore custom template settings with {{ }}
_.templateSettings = {
evaluate: /{{([\s\S]+?)}}/g,
interpolate: /{{=([\s\S]+?)}}/g,
escape: /{{-([\s\S]+?)}}/g
};
@Adizbek
Adizbek / treeToHtml.js
Created August 14, 2020 04:15
Tree structure to html table, automatic colspan, rowspan
class Tree {
/** @type String */
val;
/** @type Tree[] */
children;
/**
* @param {String} val
@ljosa
ljosa / karabiner.json
Created July 16, 2018 07:25
SpaceFN is working, except that autorepeat is not disabled for space
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {

Ten seconds to ponder if a thread is worth it

recording

A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.

.subtext {
  display: inline-block;
 background: linear-gradient(to left, transparent 50%, #f60 50%) right;
@JSchrtke
JSchrtke / init.vim
Created February 8, 2022 14:13
which-key.nvim mappings
" ### Configure which-key.nvim/mappings ###
" quickly navigate quickfix entries
nnoremap <C-n> :cnext<CR>
nnoremap <C-p> :cprevious<CR>
nnoremap <C-e> :lua require("telescope").extensions.file_browser.file_browser(require("telescope.themes").get_ivy())<CR>
lua << EOF
local wk = require("which-key")
# Clean the database
DROP TABLE IF EXISTS _orders CASCADE;
DROP TABLE IF EXISTS _users CASCADE;
DROP TABLE IF EXISTS orders CASCADE;
DROP TABLE IF EXISTS users CASCADE;
# Build the database (for hard deletion)
CREATE TABLE users (
id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
name text NOT NULL
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@ibLeDy
ibLeDy / desktop_chromium_flags.md
Last active April 3, 2024 21:56
Chromium flags
Updated: Jun 17, 2022
Chromium: 102.0.5005.115 (Official Build) (64-bit) (cohort: Stable)
OS: Windows 10 Version 21H2 (Build 19044.1766)

Override software rendering list - Enabled

Overrides the built-in software rendering list and enables GPU-acceleration on unsupported system configurations. – Mac, Windows, Linux, Chrome OS, Android

@FradSer
FradSer / iterm2_switch_automatic.md
Last active May 3, 2024 19:58
Switch iTerm2 color preset automatic base on macOS dark mode.

The latest beta (3.5) includes separate color settings for light & dark mode. Toggling dark mode automatically switches colors.

Vist iTerm2 homepage or use brew install iterm2-beta to download the beta. Thanks @stefanwascoding.


  1. Add switch_automatic.py to ~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch with:
@tshu-w
tshu-w / SpaceFn.json
Last active May 10, 2024 05:50
Karabiner Elements config to simulate SpaceLauncher (https://ke-complex-modifications.pqrs.org/?q=spacefn%20plus)
{
"title": "SpaceFN",
"rules": [
{
"description": "SpaceFN: Space enables SpaceFN mode (see: https://geekhack.org/index.php?topic=51069.0 & https://spacelauncherapp.com)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "spacebar"