This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ``` | |
// sequenceKeyBinding('hello', () => { console.log('world') }) | |
// ``` | |
const sequenceKeyBinding = (seq, action, timeoutMs=3000) => { | |
let curr = 0 | |
let timeout = null | |
document.body.addEventListener('keydown', (e) => { | |
if (seq[curr] == e.key) { | |
if (!timeout) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Obtained with the code written in next file | |
emoji_grinning_face=😀 | |
emoji_grinning_face_with_big_eyes=😃 | |
emoji_grinning_face_with_smiling_eyes=😄 | |
emoji_beaming_face_with_smiling_eyes=😁 | |
emoji_grinning_squinting_face=😆 | |
emoji_grinning_face_with_sweat=😅 | |
emoji_rolling_on_the_floor_laughing=🤣 | |
emoji_face_with_tears_of_joy=😂 | |
emoji_slightly_smiling_face=🙂 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
show_cursor() { | |
tput cnorm | |
exit | |
} | |
hide_cursor() { | |
tput civis | |
} | |
trap show_cursor INT TERM | |
hide_cursor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[color "blame"] | |
highlightRecent = 234, 23 month ago, 235, 22 month ago, 236, 21 month ago, 237, 20 month ago, 238, 19 month ago, 239, 18 month ago, 240, 17 month ago, 241, 16 month ago, 242, 15 month ago, 243, 14 month ago, 244, 13 month ago, 245, 12 month ago, 246, 11 month ago, 247, 10 month ago, 248, 9 month ago, 249, 8 month ago, 250, 7 month ago, 251, 6 month ago, 252, 5 month ago, 253, 4 month ago, 254, 3 month ago, 231, 2 month ago, 230, 1 month ago, 229, 3 weeks ago, 228, 2 weeks ago, 227, 1 week ago, 226 | |
[blame] | |
coloring = highlightRecent | |
date = human |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile(true, quiet: 1) do | |
source "https://rubygems.org" | |
gem "editorconfig" | |
end | |
require "json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See also https://silverhammermba.github.io/emberb/embed/ | |
ruby-gcc-flags() { | |
[[ "$(rbenv version)" = "system" ]] && return 1 | |
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(rbenv prefix)/lib/pkgconfig" \ | |
pkg-config --cflags --libs ruby-$(rbenv version | cut -d. -f1-2) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Change definition of the screen on line 6. | |
file=$(mktemp /tmp/wallpaper.XXX.jpg) | |
curl --output $file 'https://unsplash.it/1920/1080/?random' | |
gsettings set org.gnome.desktop.background picture-uri file://$file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# I'm using jq to parse json. I really suggest using it. | |
# I'm using parallel for faster results, you could use xargs or a for loop if you don't have parallel. | |
main() ( | |
set -eux | |
local options="--profile some-profile" | |
local key='id' | |
local table='table' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Copyright (c) 2019 Ulysse Buonomo <buonomo.ulysse@gmail.com> (MIT license) | |
# | |
# 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: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<opml version="1.0"> | |
<head> | |
<title>Feeds from Stringer</title> | |
</head> | |
<body> | |
<outline text="Without boats, dreams dry up" title="Without boats, dreams dry up" type="rss" xmlUrl="https://without.boats/index.xml"/> | |
<outline text="Vanguard Consulting Ltd" title="Vanguard Consulting Ltd" type="rss" xmlUrl="https://beyondcommandandcontrol.com/feed/"/> | |
<outline text="Paul Ramsey" title="Paul Ramsey" type="rss" xmlUrl="http://blog.cleverelephant.ca/atom.xml"/> | |
<outline text="Tags from geos" title="Tags from geos" type="rss" xmlUrl="https://github.com/libgeos/geos/releases.atom"/> |
NewerOlder