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
// ==UserScript== | |
// @name texts2playlist | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Given @playlistName (name of playlist in YouTube) and @playlist (array of song names), add the first search result of each song into that playlist. | |
// @author Fabricator | |
// @match https://www.youtube.com/results?search_query=* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// @grant none | |
// ==/UserScript== |
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
$('.first').each( | |
function(i,v) { | |
var song = $(v).text(); | |
var artist = $(v).parent().parent().find('p a:first').text(); | |
console.log(song+' by '+artist); | |
} | |
) |
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
{ | |
"columns": [ | |
{"name": "a", "friendly_name": "A", "type": "integer"}, | |
{"name": "b", "friendly_name": "B", "type": "string"} | |
], | |
"rows": [ | |
{"a": 1, "b": "1"}, | |
{"b": 2, "b": "2"} | |
] | |
} |
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
" Vim syntax file | |
" Language: Jack | |
" (http://www.nand2tetris.org/lectures/PDF/lecture%2009%20high%20level%20language.pdf) | |
" Maintainer: Fabricator | |
" Latest Revision: 21 Jan 2016 | |
" | |
if exists("b:current_syntax") | |
finish | |
endif |
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
input { | |
file { | |
type => "nginx-access" | |
path => ["/var/log/nginx/access.log"] | |
} | |
} | |
filter { | |
if [type] == "nginx-access" { | |
grok { | |
match => [ "message", "%{COMBINEDAPACHELOG}" ] |
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
// ==UserScript== | |
// @name Tubeplus.me no ad | |
// @namespace fabricator | |
// @include http://www.tubeplus.me/* | |
// @version 2 | |
// @grant none | |
// ==/UserScript== | |
// allow pasting | |
console.log('Removing ads...'); | |
document.querySelector('#right').remove(); |
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 | |
#---------------------------------------------------- | |
# Derivative of | |
# a simple mysql database backup script by Alvin Alexander | |
# see http://alvinalexander.com/mysql/mysql-database-backup-dump-shell-script-crontab | |
# by Chief Fabricator | |
#---------------------------------------------------- | |
# This work is licensed under a Creative Commons | |
# Attribution-ShareAlike 3.0 Unported License; |
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
// ==UserScript== | |
// @name Remove Gmail gadgets | |
// @namespace chiefFrabricator | |
// @include https://mail.google.com/mail/u/0/* | |
// @version 5 | |
// @grant none | |
// @updateURL https://gist.githubusercontent.com/go717franciswang/9585565ece0b3c0d435f/raw/greaseMonkyGmailGadgetRemoval.js | |
// @downloadURL https://gist.githubusercontent.com/go717franciswang/9585565ece0b3c0d435f/raw/greaseMonkyGmailGadgetRemoval.js | |
// ==/UserScript== |
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 | |
# split audio file into multiple piece using avconv | |
# (might work for video file too) | |
input_file=$1 | |
output_file_prefix=$2 | |
batch_duration=$3 | |
extension="${input_file##*.}" |