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
extern crate zip; | |
use zip::write::FileOptions; | |
fn main() { | |
let path = std::path::Path::new("dummy.zip"); | |
let file = std::fs::File::create(&path).unwrap(); | |
let mut zip = zip::ZipWriter::new(file); |
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
module Main | |
open System | |
open System.Security.Cryptography | |
open System.Text.RegularExpressions | |
let fromHex (s:string) = | |
s | |
|> Seq.windowed 2 | |
|> Seq.mapi (fun i j -> (i,j)) |
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
import java.io._ | |
import com.googlecode.sardine.SardineFactory | |
import scala.util.control.Exception._ | |
object Main extends App { | |
val log = new PrintWriter("output", "UTF-8") |
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/sh | |
kill `cat /var/run/udhcpc.eth0.pid` | |
ifconfig eth0 192.168.0.100 netmask 255.255.255.0 up | |
ip route add default via 172.168.0.1 dev eth0 | |
echo nameserver 8.8.8.8 >> /etc/resolv.conf | |
#/mnt/sda1/var/lib/boot2docker/bootlocal.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
// Place your settings in this file to overwrite the default settings | |
{ | |
"editor.fontFamily": "Source Han Code JP M, Consolas, 'Courier New', monospace", | |
"editor.fontSize": 13, | |
"window.zoomLevel": 1, | |
"terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\6.0.0.14\\powershell.exe", | |
"workbench.colorTheme": "Quiet Light", | |
"typescript.referencesCodeLens.enabled": false, | |
"workbench.editor.enablePreview": false | |
} |
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
(import java.awt.GraphicsEnvironment) | |
(def ge (GraphicsEnvironment/getLocalGraphicsEnvironment)) | |
;;(def fs (.getAllFonts ge)) | |
;;(dorun (->> fs (map #(.getName %)) sort (map println))) | |
(dorun (->> ge .getAvailableFontFamilyNames sort (map println))) |
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
(apply 'concat (mapcar 'capitalize (split-string (or \2 "") "_"))) |
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
get-eventlog system | ? { $_.EventID -eq 13 } | select -first 3 | fl |
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
javascript:if(location.href.match(/\/(dp|product|ASIN)\/([^\/]+)/)){location.href=%22http://www.amazon.co.jp/dp/%22+RegExp.$2} |
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
cd ~/.emacs.d/elpa | |
/Applications/Emacs.app/Contents/MacOS/Emacs *(/P:-L:) -q -batch --eval '(progn (load "package") (setq byte-compile-verbose t) (batch-byte-recompile-directory 0))' |