Skip to content

Instantly share code, notes, and snippets.

@XVilka
XVilka / TrueColour.md
Last active October 9, 2025 17:55
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!

@hofmannsven
hofmannsven / README.md
Last active October 2, 2025 20:17
Git CLI Cheatsheet
@willurd
willurd / web-servers.md
Last active October 30, 2025 23:18
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@lukas-vlcek
lukas-vlcek / gist:5143799
Last active February 7, 2023 21:50
Adding a new analyzer into existing index in Elasticsearch (requires close/open the index). Tested with Elasticsearch 0.19.12.
// create an index with an analyzer "myindex"
curl -X PUT localhost:9200/myindex -d '
{
"settings" : {`
"index":{
"number_of_replicas":0,
"number_of_shards":1,
"analysis":{
"analyzer":{
"first":{
@awidegreen
awidegreen / vim_cheatsheet.md
Last active September 14, 2025 23:40
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@davidreynolds
davidreynolds / boggle.c
Created June 4, 2012 00:00
Boggle Backtracking Algorithm
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#define BIN_SEARCH(dict, size, needle, res, prefix) \
do { \
assert((dict) != NULL); \
assert((size) > 0); \
int l = 0, r = (size)-1; \
@mahdibh
mahdibh / git_code_churn.py
Created May 29, 2012 22:50 — forked from wesm/git_code_churn.py
Little script to get a time series of code churn (insertions, deletions) on a git repo
from dateutil import parser
import subprocess
import os
import re
import sys
import tempfile
import numpy as np
from pandas import *
@saghul
saghul / pydmesg
Created August 21, 2010 20:00
pydmesg: dmesg with human readable timestamps
#!/usr/bin/env python
# coding=utf8
# Copyright (C) 2010 Saúl ibarra Corretgé <[email protected]>
#
"""
pydmesg: dmesg with human-readable timestamps
"""