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
<!DOCTYPE HTML> | |
<html><body> | |
<canvas id="myCanvas" width="300" height="300" style="border:1px solid #c3c3c3;"></canvas> | |
<script type="text/javascript"> | |
var c=document.getElementById("myCanvas"); | |
var cxt=c.getContext("2d"); | |
var centerX = 150; | |
var centerY = 150; | |
cxt.moveTo(centerX, centerY); | |
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
func decrypter(crypto string, keyString string) string { | |
paddedKey := fmt.Sprintf("%-16s", keyString) // 16 bytes | |
key := []byte(paddedKey) | |
bc, err := aes.NewCipher(key) | |
if err != nil { | |
fmt.Println(err) | |
} | |
src, _ := hex.DecodeString(crypto) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<link rel="icon" href="favicon.ico"> |
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 ( | |
"encoding/json" | |
"fmt" | |
"gopkg.in/mgo.v2" | |
"gopkg.in/mgo.v2/bson" | |
"log" | |
) |
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 net.bubblemix.cardcheck; | |
/** | |
* Validator for credit card numbers | |
* Checks validity and returns card type | |
* | |
* @author ian.chen | |
*/ | |
public class RegexCardValidator { | |
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 static org.hamcrest.Matchers.equalTo; | |
import static org.junit.Assert.assertThat; | |
import static org.mockito.Mockito.when; | |
import java.io.IOException; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.mockito.Mockito; | |
import org.springframework.http.HttpStatus; |
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 net.bubblemix.test; | |
import org.cassandraunit.spring.CassandraDataSet; | |
import org.cassandraunit.spring.CassandraUnitTestExecutionListener; | |
import org.cassandraunit.spring.EmbeddedCassandra; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.slf4j.Logger; |
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
<html> | |
<head> | |
<style> | |
#ian { | |
position: absolute; | |
bottom: 0px; | |
height: 400px; | |
} | |
body { | |
background: #eef; |
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" | |
"golang.org/x/crypto/ripemd160" | |
) | |
func main() { | |
hasher := ripemd160.New() | |
hasher.Write([]byte("The quick brown fox jumps over the lazy dog")) |
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 net.bubblemix; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.UnsupportedEncodingException; | |
import java.util.Enumeration; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; |
OlderNewer