Skip to content

Instantly share code, notes, and snippets.

View clarkwang's full-sized avatar
🙂

Clark Wang clarkwang

🙂
View GitHub Profile
#!/usr/bin/env bash
#
# Setup automatic sync from a Github upstream repository to a fork
# - a branch "actions" will be created (or re-used) to hold the Github action to run
# - sync is done each hour
# - branch 'actions' needs to be the default branch of your fork (=> settings)
# - the script is able to both create and update and rewrite the sync script if you modify this script file
#
# Author: Mathiue Carbou
@jdthorpe
jdthorpe / JSON and YAML to Python NameSpaces.md
Last active February 7, 2023 02:34
JSON and YAML Encoders / Decoders for use with SimpleNamespaces

Load and Dump JSON and YAML to / From NamesSpaces

Why

Typed Namespaces ensure object typing is correct in the IDE!

Usage

import yaml
@fnky
fnky / ANSI.md
Last active May 21, 2024 17:06
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@nerdius
nerdius / vimium-arc-dark.css
Last active September 28, 2023 20:19
Arc Dark theme for styling Vimium link hints
/*
Arc Dark theme for styling Vimium link hints
By Giorgi Gzirishvili (@giogziro95). This code is in the public domain.
To use:
1. Copy the code.
2. Go to the Vimium options.
3. Click Show Advanced Options.
@kaleksandrov
kaleksandrov / global-protect.sh
Last active April 19, 2024 03:46
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)
@arulrajnet
arulrajnet / ChromeAppDownloader.py
Last active February 15, 2024 01:06
Python Script to download the Chrome Extensions (CRX) file directly from the google chrome web store.
# -*- coding: utf-8 -*-
"""
Python Script to download the Chrome Extensions (CRX) file directly from the google chrome web store.
Referred from http://chrome-extension-downloader.com/how-does-it-work.php
"""
from __future__ import division
import argparse
import requests
@jasonlong
jasonlong / vimium-styling.md
Last active January 29, 2024 21:37
Nicer Vimium link hint styling. What's Vimium? See http://vimium.github.io. This awesome yellow is courtesy of @mrmrs colors: http://clrs.cc.

bind-key C-b send-prefix
bind-key C-o rotate-window
bind-key C-z suspend-client
bind-key Space next-layout
bind-key ! break-pane
bind-key " split-window
bind-key # list-buffers
bind-key $ command-prompt -I #S "rename-session '%%'"
bind-key % split-window -h
bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@tylerneylon
tylerneylon / learn.lua
Last active May 16, 2024 05:47
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------