Skip to content

Instantly share code, notes, and snippets.

View fearphage's full-sized avatar
⌨️
Cache rules everything around me.

Phred Lane fearphage

⌨️
Cache rules everything around me.
View GitHub Profile
@mfikes
mfikes / polyglot.md
Created April 30, 2018 03:02
Polyglot Graal from ClojureScript

You need to first install GraalVM, and then set your PATH so that you get the GraalVM binaries (incluing the GraalVM version of node).

You can then install R and Ruby via

gu -c install org.graalvm.r
gu -c install org.graalvm.ruby
@steven2358
steven2358 / ffmpeg.md
Last active May 5, 2024 12:45
FFmpeg cheat sheet
@ruario
ruario / README.md
Last active May 11, 2022 00:16
HTML5 MP4 (H.264/AAC) video issues with Vivaldi for Linux snapshots
@tomwwright
tomwwright / gist:f88e2ddb344cf99f299935e1312da880
Last active November 22, 2022 14:06
Dell XPS 15 9560: Ubuntu 17.10 + Nvidia 384.90 + Nvidia Prime (No Bumblebee) https://medium.com/@tomwwright/better-battery-life-on-ubuntu-17-10-4588b7f72def
# perform a fresh install of Ubuntu 17.10
# upgrade the kernel to v4.13.10
mkdir ~/kernel-v4.13.10
cd ~/kernel-v4.13.10
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310_4.13.10-041310.201710270531_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-image-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb
sudo dpkg -i *.deb
@Integralist
Integralist / hugo-build.sh
Created August 28, 2017 06:51
[Hugo build script for User page] #github #hugo #build
#!/usr/bin/env bash
function contains {
local e match="$1"
shift
for e; do [[ "$e" == "$match" ]] && return 0; done
return 1
}
function remove_toplevel {
@piedpiperRichard
piedpiperRichard / content.js
Last active August 26, 2023 13:03
Web developer 0.4.9 tools hacked and installing adware Decode
function md5cycle(x, k) {
var a = x[0], b = x[1], c = x[2], d = x[3];
a = ff(a, b, c, d, k[0], 7, -680876936);
d = ff(d, a, b, c, k[1], 12, -389564586);
c = ff(c, d, a, b, k[2], 17, 606105819);
b = ff(b, c, d, a, k[3], 22, -1044525330);
a = ff(a, b, c, d, k[4], 7, -176418897);
d = ff(d, a, b, c, k[5], 12, 1200080426);
c = ff(c, d, a, b, k[6], 17, -1473231341);
@NeoTheFox
NeoTheFox / kitty.conf
Last active August 6, 2021 05:47
kitty config with solarized dark theme
# vim:fileencoding=utf-8:ft=conf
# Font family. You can also specify different fonts for the
# bold/italic/bold-italic variants. By default they are derived automatically,
# by the OSes font system. Setting them manually is useful for font families
# that have many weight variants like Book, Medium, Thick, etc. For example:
# font_family Operator Mono Book
# bold_font Operator Mono Thick
# bold_italic_font Operator Mono Medium
font_family Hack
@getify
getify / 1.js
Last active December 6, 2017 14:07
comparing single recursion vs binary recursion
function reverseStr(str) {
if (str.length <= 1) return str;
var firstChar = str[0];
var restStr = str.substr(1);
return (restStr.length > 1 ? reverseStr(restStr) : restStr) +
firstChar;
}
// Lazy (=on-demand) zip()
for (const [i, x] of zip(naturalNumbers(), naturalNumbers())) {
console.log(i, x);
if (i >= 2) break;
}
// Output:
// 0 0
// 1 1
// 2 2
@Integralist
Integralist / vim debugging.vim
Last active August 21, 2019 07:55
[vim debugging] #vim #debugging
vim -D # starts vim in a step-debugger mode
:h map-listing # show information about key bindings that have been mapped by either your .vimrc or other scripts
:scriptnames # shows list of sourced script names, in the order they were sourced
:set runtimepath? # shows list of directories which will be searched for runtime files
:verbose set <option>? # shows where <option> was last set (e.g. :verbose set history?)
:set rtp+=<path> # allows appending <path> to the runtimepath variable
# example mappings I use, and last item demonstrates a bug...
:map \\\ # mapped to a Commentary plugin command