Skip to content

Instantly share code, notes, and snippets.

View vogler's full-sized avatar

Ralf Vogler vogler

  • Munich, Germany
  • 17:14 (UTC +02:00)
View GitHub Profile
@quickshiftin
quickshiftin / osx-brew-gnu-coreutils-man.sh
Created February 21, 2014 07:25
Running GNU coreutils via Homebrew on your Mac? Here's a one-liner to get the manpages working!
# Short of learning how to actually configure OSX, here's a hacky way to use
# GNU manpages for programs that are GNU ones, and fallback to OSX manpages otherwise
alias man='_() { echo $1; man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1 1>/dev/null 2>&1; if [ "$?" -eq 0 ]; then man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1; else man $1; fi }; _'
@kamikat
kamikat / cookie-chrome.sh
Last active March 25, 2023 18:38
export curl cookie text from firefox and chrome on linux
@squarism
squarism / iterm2.md
Last active July 7, 2024 05:11
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
module Natl =struct
type z = Nil_z
type 'a succ = Nil_succ
end
open Natl
type _ t =
| Nil: <f:'a; t:'a; dim:z > t
| Cons:
'elt * <f:'ty; t:'ret; dim:'d > t -> <f: 'elt -> 'ty; t:'ret; dim:'d succ> t
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active July 2, 2024 16:16
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@mugifly
mugifly / switchbot-cmd.md
Last active February 10, 2022 23:58
Simplest Switchbot Command

switchbot-cmd.py

Simplest Switchbot Command

Installation

It tested on Raspberry Pi Zero W with Raspbian Stretch.

$ sudo apt-get install python-pip libglib2.0-dev bluez-tools
$ sudo pip install bluepy
@sguillia
sguillia / adblock-filter.txt
Created October 18, 2018 15:45
Hide annoying "Welcome back" message from Stack exchange sites with Adblock Plus
3dprinting.meta.stackexchange.com###overlay-header
3dprinting.stackexchange.com###overlay-header
academia.meta.stackexchange.com###overlay-header
academia.stackexchange.com###overlay-header
academics.stackexchange.com###overlay-header
ai.meta.stackexchange.com###overlay-header
ai.stackexchange.com###overlay-header
alcohol.meta.stackexchange.com###overlay-header
alcohol.stackexchange.com###overlay-header
android.meta.stackexchange.com###overlay-header
@taskylizard
taskylizard / fmhy.md
Last active July 7, 2024 07:13
/r/freemediaheckyeah, in one single file (view raw)
@milnak
milnak / garlic-os-tips.md
Last active July 4, 2024 01:27
My set of GarlicOS tips #rg35xx

Garlic OS Tips (Windows-based)

GarlicOS Cookbook

Follow these instructions for an easy way to get up and going quickly! These are complete instructions, and will be the easiest way to get started on a new RG35XX.

Set up SD Card

Get a high quality SD (e.g. SanDisk Extreme) card, 128GB or larger, 256GB is recommended. Don't skimp here, they're cheap, and don't use the card that comes with the RG35XX as it's crap.

@ssalbdivad
ssalbdivad / ArkTypeVsZod.md
Last active March 20, 2024 19:24
ArkType/Zod Comparison

Here's a comparison between how the same simple user definition would be defined using ArkType and Zod:

image

ArkType's definition syntax is more concise (definitions are about 50% shorter on average) as well as making it more visually obvious what the inferred TypeScript type will be. The ability to infer TypeScript definitions directly is the same, but ArkType's syntax is again more concise by allowing you to use typeof on a property of arkUser directly instead of using an extra "infer" helper.

In general, we also have taken significant steps to optimize and clarify our type hints when hovering over validators. For example, in the case above, this is what you see when you mouse over "zodUser":

image