Skip to content

Instantly share code, notes, and snippets.

View JKirchartz's full-sized avatar
🤖

Joel Kirchartz JKirchartz

🤖
View GitHub Profile
@wiseman
wiseman / markov2tracery.py
Last active February 24, 2017 22:03
Generates tracery grammars from examples.
#!/usr/bin/env python
# A small modification of enkiv2's code: https://github.com/enkiv2/misc/blob/master/markov2tracery.py
import collections
import json
import re
import sys
@romainl
romainl / Vim_pushing_built-in_features_beyond_their_limits.markdown
Last active September 19, 2023 08:16
Vim: pushing built-in features beyond their limits

Vim: pushing built-in features beyond their limits

The situation

Searching can be an efficient way to navigate the current buffer.

The first search commands we learn are usually / and ?. These are seriously cool, especially with the incsearch option enabled which lets us keep typing to refine our search pattern. / and ? really shine when all we want is to jump to something we already have our eyeballs on but they are not fit for every situation:

  • when we want to search something that's not directly there, those two commands can make us lose context very quickly,
  • when we need to compare the matches.
{
"0": 48, "1": 49, "2": 50, "3": 51, "4": 52, "5": 53, "6": 54, "7": 55,
"8": 56, "9": 57, "☺": 9786, "☻": 9787, "•": 8226, "◘": 9688, "○": 9675, "◙": 9689,
"♂": 9794, "♀": 9792, "♪": 9834, "♫": 9835, "☼": 9788, "►": 9658, "◄": 9668, "‼": 8252,
"▬": 9644, "↨": 8616, "↑": 8593, "↓": 8595, "→": 8594, "←": 8592, "∟": 8735, "▲": 9650,
"▼": 9660, "!": 33, "\"": 34, "#": 35, "$": 36, "%": 37, "&": 38, "(": 40,
")": 41, "*": 42, "+": 43, ",": 44, "-": 45, ".": 46, "/": 47, "⌂": 8962,
"░": 9617, "▒": 9618, "▓": 9619, ":": 58, ";": 59, "<": 60, "=": 61, ">": 62,
"?": 63, "@": 64, "A": 65, "B": 66, "C": 67, "D": 68, "E": 69, "F": 70,
"G": 71, "H": 72, "I": 73, "J": 74, "K": 75, "L": 76, "M": 77, "N": 78,
@psychemedia
psychemedia / Dockerfile
Last active October 1, 2022 22:16
Example of setting up a Docker image containing a suite of applications on a related theme for use over the command line: audiogrep, videogreop and youtube_dl.
#Based on https://github.com/kevinhughes27/audiogrep-docker
# DOCKER-VERSION 1.4.0
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -y software-properties-common
# FFMPEG
#The repository needs updating from the original
#Note that ffmpeg not standardly available for Ubuntu 14.04: http://www.faqforge.com/linux/how-to-install-ffmpeg-on-ubuntu-14-04/
@andypiper
andypiper / basic-recipes.md
Last active September 5, 2022 14:53
Twitter API recipes for twurl +jq, and other useful Twitter code snippets and tools
We can't make this file beautiful and searchable because it's too large.
aries Good vibes in the air will help make today's Full Moon pleasant. You feel genuinely sympathetic and sensitive to the needs of partners and close friends. Gosh, golly, gee!
taurus Today, the only Full Moon in your sign all year takes place. Fortunately for you, other planetary aspects nicely smooth everything over. (Looking good!)
gemini This is an interesting day for love affairs, romance and sweet flirtations. Similarly, the arts and sports also are pleasantly blessed. Enjoy good times with children.
cancer Even though there is some tension with today's Full Moon, it's still a very pleasant day with family members. People are gentle and kind to each other.
leo Your communications with siblings and relatives are particularly warm and caring today because you appreciate where the other person is coming from and what he or she is going through. This is a good thing.
virgo You might be tempted to spend too much money on elegance and luxury today. Just keep this in mind. Don't be rash with your hard-earned
@plugnburn
plugnburn / README.md
Last active January 14, 2021 09:38
Zen.js - reactive nano-framework in 50 lines of JS

Zen.js

It seems that perfection is attained not when there is nothing more to add, but when there is nothing more to take away.

Antoine de Saint Exupéry

Zen.js is tiny attempt to create the Zen of reactive in-memory storage on the JS client-side environment.

How to obtain

@mondain
mondain / public-stun-list.txt
Last active June 9, 2024 04:39
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active June 4, 2024 20:50
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
import nltk
import functools
def memoize_anagrams(obj):
cache = obj.cache = {}
jumbled_args_index = 0
@functools.wraps(obj)
def memoizer(*args, **kwargs):
if args[jumbled_args_index] not in cache:
cache[args[jumbled_args_index]] = obj(*args, **kwargs)