This file contains 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
-- 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 |
This file contains 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
--[[ | |
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) |
This file contains 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
[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 |
This file contains 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 | |
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) |
This file contains 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
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 |
This file contains 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
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 () { |
This file contains 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
"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"), |
This file contains 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
// 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; |
This file contains 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
# 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 ../ &&\ |
This file contains 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/node | |
// settings | |
var project_files_obj = { | |
src : [ | |
// "foo.js", | |
// "bar.js" | |
], | |
dest : "scripts.js", | |
compiled : "dist/scripts.min.js" |
NewerOlder