Skip to content

Instantly share code, notes, and snippets.

View bash's full-sized avatar

Tau Gärtli bash

View GitHub Profile
@anthrotype
anthrotype / svg2glif.py
Created September 8, 2017 13:02
svg2glif: convert SVG paths to UFO glyphs
#!/usr/bin/env python
""" Convert SVG paths to UFO glyphs.
"""
# Author: Cosimo Lupo
# Email: cosimo@anthrotype.com
# License: Apache Software License 2.0
from __future__ import print_function, absolute_import
__requires__ = ["svg.path", "ufoLib", "FontTools"]
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active July 20, 2024 23:50
Hyperlinks in Terminal Emulators
@HaleTom
HaleTom / print256colours.sh
Last active June 29, 2024 16:16
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@vi
vi / formatunicode.pl
Last active February 21, 2024 16:55
Simple converter from markdown-style _annotations_ to Unicode combining characters.
#!/usr/bin/perl -C63
# Converts
# The -quick- _brown_ =fox= ^jumps^ +over+ ~the~ @lazy@ dog.
# into
# The q̶u̶i̶c̶k̶ b̲r̲o̲w̲n̲ f̳o̳x̳ j̅u̅m̅p̅s̅ o̱v̱e̱ṟ t̴h̴e̴ l̿a̿z̿y̿ dog.
#
# Implemented by Vitaly "_Vi" Shukela in 2016. Public domain / CC-0.
use strict;
@KonradIT
KonradIT / readme.md
Last active July 11, 2024 20:46
GoPro Studio for Linux
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@iamnewton
iamnewton / bash-colors.md
Last active July 25, 2024 19:33
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@laser
laser / concurrent_sync.js
Last active June 10, 2016 23:56
Modifying "sync" to do parallel stuff
function sync(gen) {
var iterable, resume, check, vals, ops;
vals = [];
ops = 0;
check = function() {
if (vals.length == ops) {
if (ops == 1) {
iterable.next(vals[0]);
@parshap
parshap / Vagrantfile
Created December 8, 2013 23:49
Vagrant hooks
class Plugin < ::Vagrant.plugin("2")
name "build"
action_hook('build') do |hook|
hook.after(Vagrant::Action::Builtin::Provision, 2) do
system("bash build.sh")
end
end
end
@kozo002
kozo002 / jquery.brightness.js
Created October 3, 2013 07:38
Get brightness from background color with jQuery
jQuery.fn.brightness = function() {
var bg_color, rgba, y;
bg_color = this.css('background-color');
if ((bg_color != null) && bg_color.length) {
rgba = bg_color.match(/^rgb(?:a)?\(([0-9]{1,3}),\s([0-9]{1,3}),\s([0-9]{1,3})(?:,\s)?([0-9]{1,3})?\)$/);
if (rgba != null) {
if (rgba[4] === '0') {
if (this.parent().length) return this.parent().brightness();
} else {
y = 2.99 * rgba[1] + 5.87 * rgba[2] + 1.14 * rgba[3];