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
" Base configuration { | |
set mouse=a " enable mouse | |
set mousehide " hide when characters are typed | |
set history=1000 " number of command lines to remember | |
set ttyfast " assume fast terminal connection | |
set viewoptions=folds,options,cursor,unix,slash " unix/windows compatibility | |
set encoding=utf-8 " set encoding for text | |
if exists('$TMUX') | |
set clipboard= | |
else |
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
type fn func(string) | |
func compose(fns ...fn) fn { | |
return func(s string) string { | |
f := fns[0] | |
fs := fns[1:] | |
if len(fns) == 1 { | |
return f(s) | |
} |
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
SELECT GROUP_CONCAT(CONCAT('KILL ',id,';') SEPARATOR ' ') 'command' FROM information_schema.processlist WHERE db = 'letras' |
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
find *.gz | xargs -n 1 -P 4 -I{} bash -c 'f={}; mkfifo ${f%*.gz}; zip -9 -v -FI ${f%*.gz}.zip ${f%*.gz} & gunzip -cd $f > ${f%*.gz} && rm ${f%*.gz}' |
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
const fs = require("fs"); | |
fs.readFile("./manifest.json", (err, file) => { | |
const parsed = JSON.parse(file.toString()); | |
const dependencies = parsed.dependencies; | |
Object.keys(dependencies).forEach(d => { | |
console.log(""); | |
console.log("[[dependencies]]"); | |
console.log(` name = "${d}"`); | |
const info = dependencies[d]; |
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
N=29; for f in *.mp4; do printf -v prefix_str '%02d' "$((N--))"; mv "$f" "$prefix_str-${f%-*.mp4}"; done | |
N=9; for f in $(find -type f -name '*.mp4' -exec stat --printf='%W %n\n' {} \; | sort -r | awk '{ print $2 }' | sed 's,\./,,'); do printf -v prefix_str '%02d' "$((N--))"; mv "$f" "$prefix_str-${f%-*.mp4}"; done |
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
--[[! | |
-- @return The current time in UTC | |
--]] | |
function gmtime() | |
return os.time(os.date("!*t")); | |
end |
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/env sh | |
files=$(git diff --cached --name-only --diff-filter=ACM | grep ".js$") | |
if [ "$files" = "" ]; then | |
exit 0 | |
fi | |
# Beautify Files | |
for file in $files; do js-beautify -r $file > /dev/null && git add $file; done |
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
;;; Load color theme | |
(require-package 'ujelly-theme) | |
(load-theme 'ujelly t) | |
(require 'init-php-mode) | |
(require 'key-chord) | |
(key-chord-mode 1) |
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
ps -p <pid> -o %cpu,%mem,cmd |