Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 16, 2024 14:02
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@m-radzikowski
m-radzikowski / script-template.sh
Last active April 8, 2024 03:04
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@broofa
broofa / checkForUndefinedCSSClasses.js
Last active January 21, 2024 17:22
ES module for detecting undefined CSS classes (uses mutation observer to monitor DOM changes). `console.warn()`s undefined classes.
/**
* Sets up a DOM MutationObserver that watches for elements using undefined CSS
* class names. Performance should be pretty good, but it's probably best to
* avoid using this in production.
*
* Usage:
*
* import cssCheck from './checkForUndefinedCSSClasses.js'
*
* // Call before DOM renders (e.g. in <HEAD> or prior to React.render())
@pavelbinar
pavelbinar / extract-subtitles-from-mkv.md
Last active December 24, 2023 12:10 — forked from bmaeser/subtitle-extract.txt
Extract subtitles from .mkv files on Mac OS X
@RickCarlino
RickCarlino / gforth_cheat_sheet.md
Last active November 16, 2023 21:05
gforth cheat sheet

Math

  • .s - Show the stack
  • +, -, *, mod - Math operators
  • /mod - performs both / and mod

Stack manipulation

  • drop and 2drop - drop a stack item (once / twice)
  • dup - duplicate a stack item
  • rot - rotate the stack
@mhawksey
mhawksey / gist:1276293
Last active October 23, 2023 09:00
Google App Script to insert data to a google spreadsheet via POST or GET - updated version as per https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@Jamesits
Jamesits / MacType-James.ini
Last active March 27, 2023 10:15
My MacType profile, optimized for Telegram UWP and something else.
; Please see https://gist.github.com/Jamesits/6a58a1b08d5cd09a94a02f30ddaf0e13#gistcomment-2081294
; for instruction.
; Author: James Swineson <mactype@public.swineson.me>
[General]
Name=James Profile
; 【启用 DirectWrite 支持】
; [0:Disable] 1:Enable
DirectWrite=1
@zmwangx
zmwangx / markdown-latex-etc.md
Last active March 5, 2023 09:47
An incomplete guide to Markdown, LaTeX, and more, initially written for Jiawen Li.

Markdown, LaTeX, etc.

Caution

  • (10/30/2016) I am not sure when and how this gist gained quite a few stars... But as stated in the v1.13 change log (from 06/16/2015): some content may be outdated, and I am not going to fix them. Moreover, having learned much myself, I do not necessarily agree with every point made in this document from 2.5 years ago. Therefore, please take views from this document with a grain of salt, and do further research as you see fit.

  • This document was initally written for a friend of mine, Jiawen Li, so it might reflect some personal tastes here and there. For instance, some discussions are geared towards Windows, though *nix is obviously superior. For another example, when I say "you seem to love Sublime Text a lot," I'm certainly not expecting most people to love Sublime (in fact I never used it for more than three minutes in a row).

  • This document is written in Markdown. The Markdown rendering engine on GitHub Gist is somewhat limited a

@tpai
tpai / instructions.md
Last active September 22, 2022 11:20
use both Tor and Privoxy with Mac OSX

1. install

brew install tor
brew install privoxy

2. copy and modify config file

@alexbevi
alexbevi / redmine_view_hooks.md
Last active November 1, 2021 10:09
A list of the view hooks that are registered in Redmine

Redmine View Hooks

The following is a list of the registered view hooks available in Redmine, as of version 2.3.3.

These have been listed in the form of

:name_of_hook
path/to/file: { :param_1, :param_2, ... :param_n}