Skip to content

Instantly share code, notes, and snippets.

View dethe's full-sized avatar

Dethe Elza dethe

View GitHub Profile
@dethe
dethe / square.html
Created September 1, 2013 19:40
HTML Blue Square
<html>
<style>
.square{
width: 50px;
height: 50px;
background-color: blue;
</style>
<div class="square"></div>
</html>
@dethe
dethe / gist:b39f24d08e14554e5bb3
Last active August 25, 2017 04:58
Are there any social meetups for women in tech in Vancouver?
After asking this on Twitter, this is what we've come up with so far.
Women's Tech Meetups in Vancouver
Girls Raising http://www.meetup.com/Vancouver-Tech-Co-Founders/events/193432902/
Code & Coffee (mixed gender but open and inclusive) http://www.meetup.com/Code-Coffee-Vancouver/
Ladies Learning Code (http://ladieslearningcode.com/ no Vancouver-specific link I could find)
Girl Dev Meetup (defunct?)
Society for Canadian Women in Science and Technology (http://www.meetup.com/Society-for-Canadian-Women-in-Science-and-Technology/)
Vancouver Female Python dev/code (Couldn't find)
@dethe
dethe / DemoNoise.elm
Created November 6, 2016 07:19
Elm example: Canvas, Noise, AnimationFrame
import Html exposing (Html)
import Html.App as App
import AnimationFrame exposing (times, diffs)
import Time exposing (Time)
import Collage exposing (..)
import Color exposing (Color)
import Element exposing (toHtml)
import Array
import Noise exposing (PermutationTable, permutationTable, noise3d)
import Random exposing (initialSeed)
@dethe
dethe / waterbear.md
Last active December 29, 2015 12:29
Waterbear Project Description

Waterbear Project Description

Waterbear (http://waterbearlang.com/) is a toolkit for creating visual block-based programming languages for the web. Its blocks are inspired by Scratch (http://scratch.mit.edu/), but where Scratch is a full-fledged language, Waterbear is a family of languages and the tool for making them. Waterbear has been used to create visual languages which produce code for Javascript, Java, Arduino, Minecraft, and Processing. Where the code can be compiled and run in the browser it has capabilities for doing that safely.

Waterbear is primarily a learning environment where coding can be guided without having to worry about syntax errors. The goal is for it to be useful for casual programming by non-programmers in a variety of domains. We still have a ways to go before it is easy and intuitive to start coding with Waterbear, especially in guiding new users through their first scripts.

Overview

There are several components to Waterbear

[
{"value":"950","label":"Global pharma market","description":"Global drugs market","source_name":"Forbes","source_link":"http://www.forbes.com/sites/matthewherper/2012/07/12/the-global-drug-market-will-swell-to-1-2-trillion-while-big-pharma-treads-water/"},
{"value":"901","label":"US budget deficit","description":"2013","source_name":"BBC News","source_link":"http://www.bbc.co.uk/news/world-us-canada-17014744"},
{"value":"89.8","label":"China","description":"China defence, 2011","source_name":"IISS","source_link":"http://www.iiss.org/publications/military-balance/the-military-balance-2012/press-statement/figure-comparative-defence-statistics/"},
{"value":"740","label":"Tobacco","description":"Global tobacco industry revenue, 2011","source_name":"Euromonitor","source_link":"http://blog.euromonitor.com/2012/06/new-tobacco-research-what-is-it-telling-us.html"},
{"value":"739.3","label":"US","description":"US defence, 2011","source_name":"IISS","source_link":"http://www.iiss.org/publications/military-balance/the
@dethe
dethe / gist:7224448
Created October 29, 2013 23:17
Rough heuristic for determining whether a site was loaded by the user (first party vs. third party)
Heuristic for determining first party-ness
1. Does the request have a referrer?
2. Ignore requests that cannot be associated with a window (tab)
3. Is this request part of resolving the page (not Ajax)?
4. Are we able to resolve a host domain for referrer and tab URIs?
5. Are they the same?
6. Are they *not* 'about:blank'?
7. Ignore requests that come from within the add-on
8. Ignore requests that don't have a valid target or source
@dethe
dethe / gist:6945741
Created October 12, 2013 04:11
Mozilla limerick
A browser that came from Mozilla
Let me download so fast it was killa
With standards so fine
The whole web felt like mine
So I built some apps with no filla
var global = new Global();
(function(){
var local = new Local();
local.canvas = document.createElement("canvas");
local.canvas.setAttribute("width", global.stage_width);
local.canvas.setAttribute("height", global.stage_height);
global.stage.appendChild(local.canvas);
local.ctx = local.canvas.getContext("2d");
local.ctx.textAlign = "center";
var main = function(){
{
"title": "Blacklight Worms",
"description": "Nice, but simple, use of sprites",
"date": 1371022449674,
"waterbearVersion": "2.0",
"blocks": [
{
"blocktype": "context",
"group": "scripts_workspace",
"id": "c7540554-a5d3-4dbf-bc62-f948b68b0d65",
@dethe
dethe / random_circles..js
Last active December 18, 2015 07:28
New examples for Waterbear
local.count_201 = 0;
(function() {
setInterval(function() {
local.count_201++;
var point_202 = {
x: randint(0, global.stage_width),
y: randint(0, global.stage_height)
};
var radius_202 = 30;
var color_202 = "rgb(" + randint(0, 255) + "," + randint(0, 255) + "," + randint(0, 255) + ")";