Skip to content

Instantly share code, notes, and snippets.

View learosema's full-sized avatar
👋
Hello World!

Lea Rosema learosema

👋
Hello World!
View GitHub Profile
@aemkei
aemkei / Readme.md
Last active August 29, 2015 14:12
A Snow Animation in 90 Bytes of HTML and JavaScript
@cgcardona
cgcardona / gist:4536514
Created January 15, 2013 05:49
Web Audio Context API

Web Audio Context API

The Web Audio Context API surprised me in how fully featured it is. Most of the docs and tutorials I found on it are from late 2011 so it shows that I'm late getting to the party. Despite the time passing it appears to only have great support in Chrome (This life best viewed in Chrome :p ).

The following constructor creates a shiny new AudioContext Object:

var audioContext = new webkitAudioContext();

@LeaVerou
LeaVerou / dabblet.css
Created March 30, 2017 20:28
Test multi-position color stops
/**
* Test multi-position color stops
*/
background: red;
background: linear-gradient(45deg, green 0 50%, lime 50% 100%);
min-height: 100%;
@PAEz
PAEz / multilineString.js
Last active April 4, 2017 22:38
Doing a multi line string
var string=(function () {
/*
Bleh Bleh
Meh
Huh
Works in FF and Chrome atleast, havent tried anywhere else
*/
}).toString().split('\n').slice(2,-2).join('\n').trim();
@tomlane
tomlane / gist:3725600
Created September 14, 2012 23:32
Play "push it" by salt n pepa when pushing with Git, BECAUSE WHO DOESN'T WANT THAT?!
#Linux GNOME
alias git-push="gnome-open 'http://www.youtube.com/watch?v=YleXlgHI1oM' && git push"
#OS X
alias git-push="open 'http://www.youtube.com/watch?v=YleXlgHI1oM' && git push"
@koistya
koistya / Web.config
Created November 27, 2013 09:47
Microsoft ASP.NET Web Pages configuration file
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
float getBPMVis(float bpm){
// this function can be found graphed out here :https://www.desmos.com/calculator/rx86e6ymw7
float bps = 60./bpm; // beats per second
float bpmVis = tan((time*PI)/bps);
// multiply it by PI so that tan has a regular spike every 1 instead of PI
// divide by the beat per second so there are that many spikes per second
bpmVis = clamp(bpmVis,0.,10.);
// tan goes to infinity so lets clamp it at 10
bpmVis = abs(bpmVis)/20.;
library(magick)
library(reshape2)
library(dplyr)
library(tidygraph)
library(particles)
library(animation)
plot_fun <- function(sim) {
df <- as_tibble(sim)
plot(df$x, df$y, col = df$color, pch = '.', axes = FALSE, xlim = c(-100, 317), ylim = c(-268, 100), xlab = NA, ylab = NA)
In einem kleinen Dorf wohnte einst ein Mädchen mit dem Namen Barbara.
Barbara war in der ganzen Gegend für Ihren ausgezeichneten Rhabarberkuchen bekannt.
Weil jeder so gerne Barbaras Rhabarberkuchen aß, nannte man sie Rhabarberbarbara.
Rhabarberbarbara merkte bald, dass sie mit ihrem Rhabarberkuchen Geld verdienen könnte.
Daher eröffnete sie eine Bar: Die Rhabarberbarbarabar.
@suzck
suzck / ifYouPreferSass
Last active June 27, 2021 06:28
CSS only fix for select with rounded corners on OSX
.select-list {
position: relative;
&:after{
content: "▼";
position: absolute;
top: 0;
right: 0;
bottom: 0;
font-size: 60%;