Skip to content

Instantly share code, notes, and snippets.

View elundmark's full-sized avatar
💭
I may be slow to respond.

elundmark

💭
I may be slow to respond.
View GitHub Profile
-- autosave.lua
--
-- Periodically saves "watch later" data during playback, rather than only saving on quit.
-- This lets you easily recover your position in the case of an ungraceful shutdown of mpv (crash, power failure, etc.).
--
-- You can configure the save period by creating a "lua-settings" directory inside your mpv configuration directory.
-- Inside the "lua-settings" directory, create a file named "autosave.conf".
-- The save period can be set like so:
--
-- save_period=60
@elundmark
elundmark / equalizer.lua
Created September 17, 2017 13:17 — forked from avih/equalizer.lua
Visual equalizer script for mpv
--[[
mpv 5-bands equalizer with visual feedback.
Copyright 2016 Avi Halachmi ( https://github.com/avih )
License: public domain
Default config:
- Enter/exit equilizer keys mode: ctrl+e
- Equalizer keys: 2/w control bass ... 6/y control treble, and middles in between
- Toggle equalizer without changing its values: ctrl+E (ctrl+shift+e)
[Scheme]
Name=Gruxbox
ColorForeground=#f2f2e5e5bcbc
ColorBackground=#323230302f2f
ColorCursor=#d65bc4cd8ca1
ColorPalette=#323230302f2f;#cccc24241d1d;#989897971a1a;#d7d799992121;#454585858888;#b1b162628686;#68689d9d6a6a;#929283837474;#1d1d20202121;#fbfb49493434;#b8b8bbbb2626;#fafabdbd2f2f;#8383a5a59898;#d3d386869b9b;#8e8ec0c07c7c;#b9b9a6a69393
#!/bin/bash
install_pkgs() {
sudo apt-get install "$@"
}
install_go_engine() {
local prefix=http://googleappengine.googlecode.com/files/go_appengine_sdk
local os=linux
local -A arches=([x86_64]=amd64 [i386]=386)
@elundmark
elundmark / mpv-build_libc6-amd64_fix.sh
Last active August 29, 2015 14:20 — forked from dz0ny/gist:b9e3fce83d0c52e16857
Fix for mpv-build broken dep libc6-amd64 libc6:amd64
mkdir -p mpv-fix
dpkg-deb -R mpv_0.9.0_amd64.deb mpv-fix
sed -i "s/libc6-amd64/libc6:amd64/" mpv-fix/DEBIAN/control
dpkg-deb -b mpv-fix mpv_0.9.0_fixed_amd64.deb
rm -rf mpv-fix
sudo dpkg -i mpv_0.9.0_fixed_amd64.deb
var Benchmark = require('benchmark');
var microtime = require('microtime');
var suite = new Benchmark.Suite();
suite
.add('Date.now()', function () {
var diff1 = Date.now() - Date.now();
})
.add('microtime.now()', function () {
"use strict";
// var server = require("./static_server.js");
// server.actions.start("dir", 8080);
// // server.actions.stop();
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs"),
// jshint devel: true
// make a copy of each `console` methods and adds them
// to the global object so that you can call `log('foobar')`
// instead of the verbose `console.log('foobar')`
// DO NOT USE IT IN PRODUCTION MODE
// @623HS
(function(global) {
'use strict';
var name, value;
# Paste into ~/.bash_aliases
upgrade_dropbox () {
if [ -f "$1" ] && [[ "$1" =~ tar\.gz$ ]]; then
dropbox stop
sleep 1
STATUS="$(dropbox status)"
# Should be: Dropbox isn't running!
if [[ "$STATUS" =~ isn\'t.running ]]; then
cd "/home/$(whoami)/.dropbox-dist" && cd ../ &&\
#!/usr/bin/node
// settings
var project_files_obj = {
src : [
// "foo.js",
// "bar.js"
],
dest : "scripts.js",
compiled : "dist/scripts.min.js"