Skip to content

Instantly share code, notes, and snippets.

View stelabouras's full-sized avatar
😎

Stelios Petrakis stelabouras

😎
View GitHub Profile
@ReK42
ReK42 / README.md
Last active August 29, 2015 13:57
xkcd #1335

Animating xkcd #1335 with HTML5

The result: [http://xkcd.reknet.ca][1]

Idea

After seeing a nice [HTML/JS version][2] of [xkcd #1340][3] and a comment wondering if the same was possible for the world clock in [xkcd #1335][4] I decided to try my hand at it. The original is loaded from a set of static images, one for every 15 minutes, and refreshed via javascript. Let's see if I can do something similar dynamically.

var f = function() {
var v = speechSynthesis.getVoices().filter(function(v) { return v.name == 'Hysterical'; })[0],
s = ["ahahahaha", "stop it", "don't tickle me"],
t = new SpeechSynthesisUtterance(s[~~(Math.random()*s.length)]);
t.voice = v; speechSynthesis.speak(t);
};
Array.prototype.slice.call(document.querySelectorAll('a')).forEach(function(a) {
a.addEventListener('mouseover', f);
});
anonymous
anonymous / Trie.swift
Created June 7, 2014 07:23
//
// Trie.swift
// SceneTest
//
// Created by Greg Titus on 6/7/14.
// Copyright (c) 2014 The Omni Group. All rights reserved.
//
// This is essentially the same data structure as OFTrie in OmniFoundation, except that the OmniFoundation version is mutable and ephemeral,
// and this version is immutable and persistent. Every time you add a string to the trie, it replaces all the nodes along the string's path
@Ellzord
Ellzord / LearnProgrammingRedditPost.md
Last active August 29, 2015 14:21
Doing open source right in 2015

I designed and prototyped an artificial life framework for simulation (or games) in Java 8. When I was happy with what I had made and how it could be used the first thing I thought about was making it open source. Actually getting to the point where anyone can use or contribute to it was a right nightmare (had no doc at all)!

I think my open source framework would be really useful to students or to anyone going open source. Here is why:

  • JALSE is on GitHub: this means you really have to learn git (I'd like to know why any new project wouldn't use git). Source control systems seem like a unnecessary thing when you're working solo but as a team its 101. GitHub makes it easy by having everything visually available to you (and it's pretty). JALSE GitHub
  • JALSE is built by gradle: It really doesn't matter what you use to build as long as it makes your life easier (and for me that's gradle). It's clean and easy to read what's happening and it's the best parts of Ant,
@guybrush
guybrush / nodeconf_2011.md
Created May 6, 2011 07:22
a list of slides from nodeconf 2011
@adomado
adomado / mapreduce.js
Created May 8, 2011 06:39
Simple MapReduce with Javascript
var Job = {
data : [
"We are glad to see you here. This site is dedicated to",
"poetry and to the people who make poetry possible",
"poets and their readers. FamousPoetsAndPoems.com is",
"a free poetry site. On our site you can find a large",
"collection of poems and quotes from over 631 poets",
"Read and Enjoy Poetry",
"I, too, sing America",
@mattpodwysocki
mattpodwysocki / jsconf-eu-2011.md
Created October 1, 2011 13:40
JSConf.EU Slides
@InitoryDad
InitoryDad / Unity2Dframeworks.txt
Created August 12, 2012 22:30 — forked from prime31/Unity2Dframeworks.txt
Unity 2D framework comparison
Key:
"-" negative point
"+" positive point
"+-" could go either way depending on your opinion or if it functions or not
Background Info: the last project we worked on needed basic 2D functionality (sprites and animations) and SpriteKit was born to fill this need (http://www.youtube.com/watch?v=cabAr2CdLmc). It has no fancy editors and was really made to fit a specific need and as of yet it has not been extended much further than the video shows. Something a bit more full featured is required for a new prototype and instead of spending a bunch of time extending SpriteKit we went on a search for alternatives. None of the below frameworks are perfect and they all have pluses and minuses. One thing SpriteKit had that none of the others do is automatic texture selection based on screen resolution. That is one thing I would like to see incorporated in every 2D framework and it kind of surprises me that it isn't one of the first features added when making a 2D framework.
@spilliams
spilliams / 1_iOS_bootstrap.md
Last active December 14, 2015 17:09
steps for bootstrapping an iOS project

#Bootstrapping An iOS App

Note: If you're bootstrapping a static lib project, read this gist instead.

##Project Setup

  1. New xcode project (including save to directory).
  2. Set devices and iOS target
  3. decide if you're going to use Autolayout (set in the Storyboard > File inspector > Interface Builder Document section)
  4. Create Constants.h, and #import "Constants.h" in the PCH
@r-lyeh-archived
r-lyeh-archived / grid.hpp
Last active December 14, 2015 22:48
A 2D/3D collision grid
// A 2D/3D collision grid. MIT licensed
// - rlyeh, 2012
#pragma once
#include <map>
#include <set>
#include <cassert>
#include <tuple>