Skip to content

Instantly share code, notes, and snippets.

View corasaurus-hex's full-sized avatar

Cora Sutton corasaurus-hex

View GitHub Profile
@ykarikos
ykarikos / png2svg.sh
Created June 7, 2012 22:17
Convert png to svg using imagemagick and potrace
#!/bin/bash
if [ "$1" == "" ]; then
echo Usage: $0 pngfile
exit 0;
fi
FILE=`basename $1 .png`
if [ ! -e $FILE.png ]; then
@telent
telent / gist:9742059
Last active May 8, 2024 11:36
12 factor app configuration vs leaking environment variables
App configuration in environment variables: for and against
For (some of these as per the 12 factor principles)
1) they are are easy to change between deploys without changing any code
2) unlike config files, there is little chance of them being checked
into the code repo accidentally
3) unlike custom config files, or other config mechanisms such as Java
// Cascading and Mutability cause pain
// and all sorts of trouble for your brain
// so quit being pedantic
// those styles are gigantic
// and Functional CSS is quite sane
// http://mrmrs.io/writing/2016/03/24/scalable-css/
// https://marcelosomers.com/writing/rationalizing-functional-css/
// https://blog.colepeters.com/building-and-shipping-functional-css/
@mpeuster
mpeuster / orgmode.gcemode
Created August 2, 2017 14:19
Highlights headings, TODOs, checkboxes, and links in Emacs Orgmode files
{
// GoCoEdit demo mode - visit http://gocoedit.com/docs/custommodes for more information
"name": "orgfile", // The name of the Mode
"ext":[
// An Array of file extensions to associate with your mode
"org", "ORG", "Org",
],
"dash_docsets": "", // Docsets to search if you are using the dash app
"tokenizer":[
@maxim
maxim / docker-compose.yml
Created August 7, 2017 23:07
Getting started with docker
version: '3'
services:
postgres:
image: postgres:9.6
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
@melotusme
melotusme / one-liners.md
Created March 29, 2018 03:59 — forked from KL-7/one-liners.md
Ruby one-liners

One-liners

Reverse every line:

Input file:

$ cat foo
qwe
123

bar

@fnky
fnky / ANSI.md
Last active May 26, 2024 08:58
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@kiennq
kiennq / build_emacs.sh
Last active January 29, 2023 20:32
Build emacs-snapshot on Ubuntu 18.04
git clone --single-branch --depth=1 https://github.com/emacs-mirror/emacs.git
cd emacs/
sudo apt install -y autoconf make gcc texinfo libxpm-dev \
libjpeg-dev libgif-dev libtiff-dev libpng-dev libgnutls28-dev \
libncurses5-dev libjansson-dev libharfbuzz-dev
./autogen.sh
./configure --with-json --with-modules --with-harfbuzz --with-compress-install \
--with-threads --with-included-regex --with-zlib --with-cairo --without-rsvg\
--without-sound --without-imagemagick --without-toolkit-scroll-bars \
--without-gpm --without-dbus --without-makeinfo --without-pop \
@sogaiu
sogaiu / peg-exercises.janet
Last active November 11, 2022 00:27
janet peg exercises
# find * and + to be confusing, trying to use sequence and choice instead
(def peg-simple
~{:main (capture (some :S))})
(peg/match peg-simple "hello") # => @["hello"]
# from:
# https://janet-lang.org/docs/peg.html
(defn finder