Skip to content

Instantly share code, notes, and snippets.

View MrEliptik's full-sized avatar
🎯
Focusing

Victor Meunier (MrEliptik) MrEliptik

🎯
Focusing
View GitHub Profile
@MrEliptik
MrEliptik / fisheyeeffect.shader
Last active March 31, 2020 11:42 — forked from henriquelalves/fisheyeeffect
Godot Shader for FishEye 2D effect
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){
attaaaggtt tataccttcc caggtaacaa accaaccaac tttcgatctc ttgtagatct
gttctctaaa cgaactttaa aatctgtgtg gctgtcactc ggctgcatgc ttagtgcact
cacgcagtat aattaataac taattactgt cgttgacagg acacgagtaa ctcgtctatc
ttctgcaggc tgcttacggt ttcgtccgtg ttgcagccga tcatcagcac atctaggttt
cgtccgggtg tgaccgaaag gtaagatgga gagccttgtc cctggtttca acgagaaaac
acacgtccaa ctcagtttgc ctgttttaca ggttcgcgac gtgctcgtac gtggctttgg
agactccgtg gaggaggtct tatcagaggc acgtcaacat cttaaagatg gcacttgtgg
cttagtagaa gttgaaaaag gcgttttgcc tcaacttgaa cagccctatg tgttcatcaa
acgttcggat gctcgaactg cacctcatgg tcatgttatg gttgagctgg tagcagaact
cgaaggcatt cagtacggtc gtagtggtga gacacttggt gtccttgtcc ctcatgtggg
#!/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 \
@MrEliptik
MrEliptik / index.html
Created April 30, 2019 12:44
Someone's writing dots animation
<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>

Using Git to Manage a Live Web Site

Overview

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.

Contents

#!/usr/bin/env bash
# 5s
sleep 5s
# Screen compositor (no tearing)
compton --config ~/.config/compton.conf -b
google-drive-ocamlfuse ~/gdrive/
@MrEliptik
MrEliptik / natural_scrolling.sh
Created February 2, 2019 09:53
Bash script to configure scrolling with xinput
#!/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')
@MrEliptik
MrEliptik / text_preprocessing.py
Created January 14, 2019 12:01
A python script to preprocess text (remove URL, lowercase, tokenize, etc..)
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"""