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 | |
export USER=hoge | |
export PASSWORD=fuga | |
export URLBASE=ftp://ftp.example.com | |
function download() { | |
wget --ftp-user $USER --ftp-password $PASSWORD $URLBASE/$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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>MD5 calculator</title> | |
<script type="text/javascript" src="js/md5.js"></script> | |
<script type="text/javascript"> | |
function handleFileSelect(evt) { | |
let files = evt.target.files; | |
let output = document.getElementById("list"); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Fahrenheit / Celsius converter</title> | |
<script type="text/javascript"> | |
function convert() { | |
let deg = document.getElementById("degree").value; | |
let dest = document.getElementById("answer"); | |
let elements = document.getElementsByName("temperature"); |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"flag" | |
"strconv" | |
"strings" | |
) |
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
/* | |
* | |
* Readig bitmap image informations. | |
* | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
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 where | |
import System.Environment (getArgs) | |
mValue :: [[a]] -> Int -> Int -> a | |
mValue m i j = (m !! 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
#!/usr/bin/env node | |
function levenshtein_distance(a, b) { | |
var m = []; | |
var i, j, x; | |
for (i = 0; i <= a.length; i++) { | |
m[i] = []; | |
} |
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
#! ruby | |
# | |
# Shorten URL by p.tl | |
# | |
require 'rubygems' | |
require 'uri' | |
require 'open-uri' | |
require 'json' |
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
# encoding: utf-8 | |
def make_similar_html(db, orig, idx) | |
html = "s#{idx.to_s}.html" | |
$stderr.puts html | |
system("simimg search --html #{db} #{orig} > #{html}") | |
html | |
end | |
def make_index_html(index) |
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:(function(){var l=location;i=l.href.match(new RegExp('http://lohas.nicoseiga.jp/priv/(\\d+)[^/]+$'))[1];l.href='http://seiga.nicovideo.jp/seiga/im'+i;})() |
NewerOlder