Skip to content

Instantly share code, notes, and snippets.

View iamtew's full-sized avatar
🤯
My status? I just found the User Status function!

Mikael 'tew' iamtew

🤯
My status? I just found the User Status function!
View GitHub Profile
@mhausenblas
mhausenblas / README.md
Last active January 30, 2017 19:50
Installs VAMP 0.9 incl. dependencies on DC/OS 1.8

Install VAMP and dependencies on DC/OS 1.8

Make sure the DC/OS CLI is installed. I'm using httpie here but curl also works ;)

Note that all you'll need locally is install-job.json, a DC/OS Jobs definition. So, to install VAMP 0.9 and dependencies, do the following:

# download the install job
$ http --download https://gist.githubusercontent.com/mhausenblas/bb967625088902874d631eaa502573cb/raw/ece1c702dede66693b4873985ef317c568384436/install-job.json
@HaleTom
HaleTom / print256colours.sh
Last active May 2, 2024 14:43
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
@vasanthk
vasanthk / System Design.md
Last active May 6, 2024 20:21
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
$ salt '*' pillar.items|grep -A1 worked
worked:
True
--
worked:
True
--
worked:
True
--
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@mojavelinux
mojavelinux / atom-fedora-20.adoc
Last active September 26, 2022 18:21
Instructions for building and launching the Atom text editor on Fedora 20.

Using Atom on Fedora 20

This guide walks you through the steps of building and launching the Atom text editor on Fedora 20.

Building Atom

  1. Install prerequisite packages

@keithwyland
keithwyland / Spritz-Speed-Reading-V2.markdown
Created March 10, 2014 15:26
A Pen by Charlotte Dann.

Spritz Speed Reading V2

Use Spritz right now! Options for speed, localStorage saving, jog forward/backward, text size and dark/light theme, also with keyboard controls and progress bar. You'll never need to read conventionally again.

localStorage implementation by Keith Wyland, thanks Keith!

A Pen by Charlotte Dann on CodePen.

License.

@pascalpoitras
pascalpoitras / config.md
Last active May 7, 2024 14:03
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@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!

Displaying images in the terminal with tput and echo

output

Requires ImageMagick, easily available from your favorite package manager. Tested on Linux and OSX
convert image.png -resize 40 txt:-|sed -E 's/://;s/\( ? ?//;s/, ? ?/,/g;s/\)//;s/([0-9]+,[0-9]+,[0-9]+),[0-9]+/\1/g;s/255/254/g;/mage/d'|awk '{print $1,$2}'|sed -E 's/^0,[0-9]+ /print "echo;tput setaf "\;/;s/^[0-9]+,[0-9]+ /print "tput setaf ";/;s/(.+),(.+),(.+)/\1\/42.5*36+\2\/42.5*6+\3\/42.5+16/'|bc|sed 's/$/;echo -n "  ";/'|tr '\n' ' '|sed 's/^/tput rev;/;s/; /;/g;s/$/tput sgr0;echo/'|bash