Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / introrx.md
Last active May 20, 2024 14:59
The introduction to Reactive Programming you've been missing
@wvengen
wvengen / extend.sh
Last active April 22, 2024 14:02
Extend non-HiDPI external display above HiDPI internal display
#!/bin/sh
# extend non-HiDPI external display on DP* above HiDPI internal display eDP*
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1`
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
@joaocunha
joaocunha / How To Hide The Select Arrow On Firefox.md
Last active December 10, 2023 13:05
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Font
:set guifont=Source\ Code\ Pro:h14
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Hide pointless junk at the bottom, doesn't work in .vimrc for some reason?
:set laststatus=0
:set noshowmode "don't show --INSERT--
:set noruler "don't show line numbers/column/% junk
@yhuard
yhuard / package.json
Created February 16, 2017 10:32
Browsersync proxy example
{
"name": "browsersync-proxy-example",
"version": "1.0.0",
"description": "",
"main": "proxy.js",
"scripts": {
"start": "node ./proxy.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active March 6, 2023 00:10
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@oliverdoetsch
oliverdoetsch / AND_OR_NOT
Last active January 22, 2023 17:03
Blogger: Globally conditional data tags for all page types
#AND
<b:if cond='data:blog.pageType == "index"'>
<b:if cond='data:blog.searchQuery'>
<!--search_page AND index_page-->
</b:if>
</b:if>
#OR
@JUNNETWORKS
JUNNETWORKS / libinput-gestures.conf
Created May 5, 2018 21:42
Cinnamon touchpad gestures like windows10 for libinput-gestures
# show all windows in workspace
gesture swipe up 3 xdotool key alt+control+Down
# show Desktop
gesture swipe down 3 xdotool key super+d
# move current workspace for left
gesture swipe left 4 xdotool key alt+control+Right
# move current workspace for right

Visual mode

  • v: character
  • Shift + v: whole line
  • Ctrl + v: cursor, multiple lines

Navigation

  • h,j,k,l
  • f{c}: move to c character (useful for characters which would otherwise mess with / regex search: .,,,;,:, etc.)