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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
type Stream chan string |
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
def bonjovi:Unit = { | |
import util.Random.nextInt | |
val elements = List("ボ", "ン", "ジョ", "ヴィ") | |
val badname = "ジョンボンジョヴィ" | |
Stream.continually(elements(nextInt(elements.length))).grouped(6).toStream.takeWhile(_.mkString != badname).foreach(name => println(name.mkString)) | |
println(s"$badname, You Give Love A Bad Name!!") | |
} |
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
#include <stdio.h> | |
#include <string.h> | |
#include "md5.h" | |
#define MD5_DIGEST_LENGTH 16 | |
int main(int argc, char* argv[]) | |
{ | |
char origin[256]; | |
char hex[3]; |
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
import java.security.{MessageDigest => MD} | |
object MD5FindPassword_Single_WithFormatter { | |
def findPassword(salt:String, pw:String):Option[Int] = { | |
def hexdigest(s:String):String = { | |
val digester = MD.getInstance("MD5") | |
digester.update(s.getBytes) | |
digester.digest.toList.map(_&0xff).map("%02x".format(_)).mkString | |
} | |
(0 to 1000000) |
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
#define R_PIN 8 | |
#define G_PIN 3 | |
#define B_PIN 2 | |
#define F_R_PIN 11 | |
#define F_G_PIN 9 | |
#define F_B_PIN 10 | |
#define F_C_PIN 12 | |
#define F_R_TH 180 | |
#define F_G_TH 230 |
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
#!/usr/bin/env ruby | |
require 'serialport' | |
port = "/dev/tty.usbmodemfa131" | |
sp = SerialPort.new(port, 9600, 8, 1, SerialPort::NONE) | |
loop do | |
c = gets.chomp | |
break if c == "Q" | |
sp.putc c.to_i.chr |