This file contains hidden or 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
;; dabbrev-expand | |
;; chrome のタブから補完 | |
;; require clome-cli (https://github.com/prasmussen/chrome-cli) | |
(defadvice dabbrev-expand (around dabbrev-expand-chrome) | |
"Expand abbreviations from the content of active tab on Google Chrome" | |
(setq buf (get-buffer-create "*chrome-active-tab-content*")) | |
(with-current-buffer buf | |
(erase-buffer) | |
(call-process "chrome-cli" nil buf nil "execute" "document.body.innerText")) | |
ad-do-it) |
This file contains hidden or 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
# require RubyCocoa | |
%w/ubygems grope pit terminal-notifier/.each {|g| require g } | |
def name(item) | |
elem = item.querySelector('.actorName') || item.querySelector('.passiveName') | |
elem.innerText.strip | |
end | |
def main |
This file contains hidden or 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
### Eclipse Workspace Patch 1.0 | |
#P JDownloader | |
Index: src/jd/plugins/hoster/BandCampCom.java | |
=================================================================== | |
--- src/jd/plugins/hoster/BandCampCom.java (revision 20104) | |
+++ src/jd/plugins/hoster/BandCampCom.java (working copy) | |
@@ -67,7 +67,8 @@ | |
br.getPage(downloadLink.getDownloadURL()); | |
if (br.containsHTML("(>Sorry, that something isn\\'t here|>start at the beginning</a> and you\\'ll certainly find what)")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND); | |
Regex filenameRegex = br.getRegex("<title>(.*?) \\| (.*?)</title>"); |
This file contains hidden or 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
require 'coremidi' | |
class MIDIX | |
def initialize | |
@destinations = CoreMIDI::Destination.all | |
end | |
def program_change(program_number, channel = 0) | |
puts(0b11000000 | channel, program_number) | |
end |
This file contains hidden or 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
// RIP aaron | |
var script = $('<script />'). | |
attr('src', 'https://raw.github.com/fatlab/RIP_Aaron/master/RIP_aaron.js'); | |
$('head').append(script); |
This file contains hidden or 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
map m previousTab | |
map n nextTab | |
map [ goBack | |
map ] goForward | |
unmap t | |
map t Vomnibar.activateInNewTab |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
require 'scissor' | |
# https://github.com/youpy/chapter | |
require 'chapter' | |
duraton = 60 | |
outfile = '/Users/youpy/Desktop/chapters.m4a' |
This file contains hidden or 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 ruby | |
# -*- coding: utf-8; ruby -*- | |
# http://d.hatena.ne.jp/okinaka/20111010/1318211550 | |
require 'shellwords' | |
def main | |
old = File.expand_path(ARGV[0]) | |
new = File.expand_path(ARGV[1]) | |
branch_name = Time.now.to_i.to_s |
This file contains hidden or 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
# inspired by https://github.com/negipo/ainote | |
require 'scissor/echonest' | |
def ainote(dir) | |
Scissor(dir + '/%i.m4a' % rand(5)) | |
end | |
def main | |
ainote_dir, source_file = ARGV |
This file contains hidden or 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
require 'scissor_utils' | |
include ScissorUtils | |
filename = ARGV.shift | |
num = 400 | |
src = Scissor(filename) | |
pitch = ((src.duration * (num - 1)) / (src.duration * num)) * 100 | |
save( |