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
| #!/bin/bash | |
| # Golfed. 813 chars. | |
| # Original: https://github.com/Qwertylex/bash-kanatrainer | |
| # License: CC BY-SA 3.0. | |
| l="a;i;u;e;o;ka;ki;ku;ke;ko;sa;shi;su;se;so;ta;chi;tsu;te;to;na;ni;nu;ne;no;ha;hi;fu;he;ho;ma;mi;mu;me;mo;ya;yu;yo;ra;ri;ru;re;ro;wa;wo;n" | |
| hira="あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをん" | |
| kata="アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマモムメモヤユヨラリルレロワヲン" | |
| read -ep "hira or kata: " c;a=$(eval echo $`echo ${c}`) | |
| n=0;r=0;t=${#a};IFS=';' read -ra l <<< "$l" |
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 'formula' | |
| class Hotot < Formula | |
| homepage 'https://github.com/lyricat/Hotot' | |
| url 'https://github.com/lyricat/Hotot/archive/0.9.8.10.tar.gz' | |
| sha1 '09e1aae05546b99abc593df0c55d664a04336c43' | |
| head 'https://github.com/lyricat/Hotot.git' | |
| depends_on 'cmake' => :build |
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
| #!/bin/bash | |
| if [[ -z "$1" ]]; then | |
| echo " => Usage: $0 user:branch" | |
| exit 64 | |
| fi | |
| user=$(cut -d ":" -f1 <(echo "$1")) | |
| repo="homebrew-cask" | |
| branch=$(cut -d ":" -f2 <(echo "$1")) |
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
| function fastfib(n){ | |
| var i=0, fibs = [0,1]; | |
| for (; i < n; i += 1) { | |
| fibs.push(fibs[0] + fibs[1]); | |
| fibs.shift(); | |
| } | |
| return fibs[0]; | |
| } | |
| var n = 0, last = 0; |
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
| function rarr (n) { | |
| var arr = []; | |
| for (var i = n; i >= 0; i--) { | |
| arr.push(i); | |
| } | |
| arr.sort(); | |
| return arr; | |
| } | |
| var total = 0; |
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
| function fib(n) { | |
| return n < 2 ? n : fib(n-1) + fib(n-2); | |
| } | |
| print(fib(35)); |
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
| #!/bin/bash | |
| echo "Tmux !!!" | |
| tmux new-session -d /home/mc/launch.sh |
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
| toSource2 = (data) -> | |
| typ = typeof data | |
| if typ == "number" and isNaN data | |
| "NaN" | |
| else if ["string", "number", "boolean"].indexOf(typ) != -1 | |
| JSON.stringify data | |
| else if typ == "function" | |
| "(#{data.toString()})" | |
| else if data instanceof Array | |
| "[#{data.map(toSource2).join(", ")}]" |
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
| console.log("Hello from thesides!"); | |
| function fib(n) { | |
| return n < 2 ? n : fib(n-1) + fib(n-2); | |
| } | |
| console.log("Fib(5): " + fib( 5)); | |
| console.log("Fib(15): " + fib(15)); | |
| console.log("Fib(25): " + fib(25)); | |
| console.log("Fib(35): " + fib(35)); |
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
| <script type="text/javascript" src="jquery.min.js"></script> | |
| <script type="text/javascript" src="script.js"></script> | |
| <style> | |
| nav#main a[data-current] { color: red; } | |
| </style> | |
| <nav id="main"> | |
| <a href="#!/">A</a> | |
| <a href="#!/derp">B</a> |