As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re, string, unicodedata | |
import nltk | |
import contractions | |
import inflect | |
from nltk import word_tokenize, sent_tokenize | |
from nltk.corpus import stopwords | |
from nltk.stem import LancasterStemmer, WordNetLemmatizer | |
def replace_contractions(text): | |
"""Replace contractions in string of text""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Enable "natural scrolling" (reverse mouse wheel) in Linux | |
# to debug | |
# set -x | |
# get the mouseid by filtering output of xinput --list | |
# matches id of first device with word "mouse" | |
mouseid=$(xinput --list | sed -E '/mouse/I!d;s/.*?mouse.*?id=([0-9]+).*/\1/i;q') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# 5s | |
sleep 5s | |
# Screen compositor (no tearing) | |
compton --config ~/.config/compton.conf -b | |
google-drive-ocamlfuse ~/gdrive/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<p> | |
Someone's writing animation, by <a href="https://codepen.io/clemens/pen/kXZWOK">Clemens</a> | |
</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RELEASES_BETA="https://api.github.com/repos/zadam/trilium/releases" | |
RELEASES_STABLE="https://api.github.com/repos/zadam/trilium/releases/latest" | |
TRILIUM_DIR="/home/mreliptik/trilium/" | |
# fetch the latest release URL (non beta) | |
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \ | |
| grep "browser_download_url.*deb" \ | |
| cut -d : -f 2,3 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shader_type canvas_item; | |
// Based on http://www.geeks3d.com/20140213/glsl-shader-library-fish-eye-and-dome-and-barrel-distortion-post-processing-filters/2/ | |
const float PI = 3.1415926535; | |
uniform float BarrelPower; | |
vec2 distort(vec2 p) { | |
if(p.x > 0.0){ |