Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tafsiri's full-sized avatar

Yannick Assogba tafsiri

View GitHub Profile
@tafsiri
tafsiri / .block
Last active September 7, 2016 00:14
tangram-test
license: mit
response := URL with("http://example.com/") @fetch
#returns immediately and response is a future
#you can do whatever you want here.
response println #if the http request is not complete, this coroutine will yield until is completes.
@tafsiri
tafsiri / index.html
Last active January 29, 2024 07:21
<html lang="en">
<head>
<meta charset="utf-8">
<title>2D Picking with canvas</title>
<meta name="description" content="">
<meta name="author" content="Yannick Assogba">
<script src="https://cdnjs.cloudflare.com/ajax/libs/stats.js/r14/Stats.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.5/dat.gui.js"></script>
@tafsiri
tafsiri / index.html
Last active September 16, 2015 16:51
<html lang="en">
<head>
<meta charset="utf-8">
<title>2D Picking with SVG</title>
<meta name="description" content="">
<meta name="author" content="Yannick Assogba">
<script src="https://cdnjs.cloudflare.com/ajax/libs/stats.js/r14/Stats.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.5/dat.gui.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
@tafsiri
tafsiri / index.html
Last active December 11, 2020 13:18
2D Picking with canvas
<html lang="en">
<head>
<meta charset="utf-8">
<title>2D Picking with canvas</title>
<meta name="description" content="">
<meta name="author" content="Yannick Assogba">
<script src="//rawgit.com/mrdoob/stats.js/master/build/stats.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.5/dat.gui.js"></script>
@tafsiri
tafsiri / us-states.json
Created April 30, 2015 03:23
US States GeoJSON
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
biggest = {
:name => "",
:population => 0
}
lines_skipped = 0
File.foreach("data/allCountries.txt") do |line|
row = line.split("\t")
begin
if row.length == 19
package main
import (
"os"
"io"
"log"
"fmt"
"strconv"
"strings"
"bufio"
func main() {
startTime := time.Now()
//Load our name databases in a goroutine
namesChannel := make(chan map[string]bool)
go func() {
fmt.Println("Start loading name database")
//send the result back over then channel
namesChannel <- loadNames("male.names")
namesChannel <- loadNames("female.names")