Skip to content

Instantly share code, notes, and snippets.

View icidasset's full-sized avatar
🪴

Steven Vandevelde icidasset

🪴
View GitHub Profile
@icidasset
icidasset / web_audio_api_guide.md
Created July 8, 2012 11:36
Web Audio API guide

Web Audio API Guide

Where to start, what to use, what to do, etc.

Audio Context

The main object for the API.

var AC = new webkitAudioContext();
@icidasset
icidasset / icon-fonts.md
Last active December 15, 2015 00:19
Icon fonts

Icon Fonts

Ordered by awesomeness.

note:
Some of these are just svg files, but you can
turn them into a font by using, for example, Icomoon.

Free

@icidasset
icidasset / loading-pages-via-ajax-into-overlay.md
Last active August 29, 2015 14:04
Loading Pages Via AJAX Into An Overlay

Loading Pages Via AJAX Into An Overlay

In order to do this we need a few things. These will be explained in detail later on.

  • The default content (the content which is there when closing the overlay)
  • The overlay content
  • A return path, i.e. the desired path when closing the overlay

TODO:

@icidasset
icidasset / example.json
Created January 17, 2015 22:03
Keymaps associations
{
"quotes": [
{
"quote": "No great thing is created suddenly.",
"author_cid": 1
}
],
"authors": [
@icidasset
icidasset / audio_metadata.md
Last active November 5, 2015 15:18
A rough idea of how a audio-metadata scanner, using http requests, should work in Javascript.

(1) Make a HEAD request to retrieve the size of the file

  • Use the Content-Length header
  • If this is 0, then exit.

(2) Make an instance of HTTPBinaryFile.

HTTPBinaryFile is a class which extends BinaryFile.
BinaryFile being a generic class which handles binary file data.

@icidasset
icidasset / graphql__helpers.ex
Last active February 15, 2016 20:09
Ecto + GraphQL example
defmodule App.GraphQL.Helpers do
alias GraphQL.Type.{ID, List}
def build_definition(model, :single) do
%{
type: build_type(model),
args: %{ id: %{ type: ID }},
resolve: &model.resolve/3,
}
end
const iconPlugin = {
iconPlugin: {
type: 'perItem',
fn: item => {
if (item.elem) {
item.eachAttr(attr => {
if ([ 'fill', 'stroke' ].indexOf(attr.name) > -1) {
// if (attr.value === '#000') {
// attr.value = 'currentColor';
// } else if (attr.value === '#F00') {

Monads

  • Value, object.
  • Data constructor, a box or a ghost box.
  • Type constructor, a set of boxes.
  • Type classes, classes of people who have a certain set of skills.

Clarification of ghost boxes:
They look like boxes, but actually you can directly touch the object inside them.
That is, the box is an illusion.

@icidasset
icidasset / blockstack.txt
Last active July 11, 2017 16:17
Blockstack Proof
Verifying that "icidasset.id" is my Blockstack ID. https://onename.com/icidasset
@icidasset
icidasset / instructions.md
Last active August 6, 2017 11:45
Ongaku Ryoho Instructions

CORS

Configuration necessary in order to add these to Ongaku Ryoho.

IPFS

# API
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'