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
function ignore -d 'gitignore file from github/ignore' | |
set command $argv[1] | |
switch $command | |
case list | |
__ignore_list | |
case '*' | |
__ignore_get $argv[2] | |
end | |
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
# -*- coding: utf-8 -*- | |
M = 1000 | |
C = 100 | |
X = 10 | |
I = 1 | |
def num_to_roman(number=2015): | |
num_M = number / M | |
number = number % M |
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
require 'csv' | |
data = [1,2,3,4,5] | |
CSV.open("data.csv", "w") do |csv| | |
csv << data | |
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
# using Pkg; Pkg.add('WAV'); Pkg.add('MFCC') | |
using WAV | |
using MFCC | |
y, _ = wavread("path/to/wavfile") | |
mfcc(y) |
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
javascript: var text= "[" + document.title + " " + document.URL + "]"; var textBox = document.createElement("textarea"); textBox.setAttribute("id", "target"); textBox.setAttribute("type", "hidden"); textBox.textContent = text; textBox.contentEditable = true; textBox.readOnly =false; document.body.appendChild(textBox); textBox.setSelectionRange(0, 999999); document.execCommand('copy'); document.body.removeChild(textBox); alert(text); |
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
javascript: var text= "[" + document.title + " " + document.URL + "]"; var textBox = document.createElement("textarea"); textBox.setAttribute("id", "target"); textBox.setAttribute("type", "hidden"); textBox.textContent = text; document.body.appendChild(textBox); textBox.select(); document.execCommand('copy'); document.body.removeChild(textBox); alert(text); |
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
FROM i386/centos:7 | |
WORKDIR /work | |
RUN yum update -y && yum install -y wget gcc java-1.8.0-openjdk && yum clean all | |
RUN wget http://www.loveruby.net/archive/cbc/cbc-1.0.tar.gz | |
RUN tar xzf cbc-1.0.tar.gz | |
RUN cd cbc-1.0; ./install.sh |
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
require 'json' | |
filenames = Dir.glob('docs/*') | |
result = {pages: []} | |
filenames.each do |filename| | |
File.open(filename, 'r') do |file| | |
title = filename.gsub(/docs\//, '').gsub(/\.md/, '') | |
lines = [] | |
file.each_line do |line| |
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
function tab_color --description "set iterm tab color" | |
set red $argv[1] | |
set green $argv[2] | |
set blue $argv[3] | |
echo -ne "\033]6;1;bg;red;brightness;$red\a" | |
echo -ne "\033]6;1;bg;green;brightness;$green\a" | |
echo -ne "\033]6;1;bg;blue;brightness;$blue\a" | |
end |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder