Skip to content

Instantly share code, notes, and snippets.

Responsive Codepen Glitch

Minimal responsive glitch effect with the codepen logo.

A Pen by moklick on CodePen.

License.

@moklick
moklick / Money-Over-Everything.markdown
Created February 14, 2014 16:21
A Pen by moklick.

Money Over Everything

Move the mouse to let them follow their desire! (paper.js experiment)

A Pen by moklick on CodePen.

License.

@moklick
moklick / SVG-Dom-Visualization.markdown
Created February 14, 2014 16:22
A Pen by moklick.

SVG Dom Visualization

This visualization represents the DOM of twitter. The great library d3js.org helps me to visualize the data in form of a tree layout. You can hover the nodes to check the type of tag. I added the python script I wrote, to produce the json

A Pen by moklick on CodePen.

License.

@moklick
moklick / normalize.css
Created August 15, 2014 10:30
Mini CSS Reset
* {
margin: 0;
padding: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*:after, *:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
@moklick
moklick / gist:57344345e94885c6482f
Created March 9, 2015 20:10
street-extraction
osmfilter uk-latest.osm --keep="addr:country= and addr:city= and addr:street=" --ignore-dependencies --drop-relations --drop-ways | osmconverter - --csv="@oname @id @lon @lat addr:country addr:city addr:street" >> streets.csv
@moklick
moklick / geojson-streaming.js
Last active August 29, 2015 14:20
Boilerplate for processing (read and write) large geojson/json files with streams
// boilerplate for processing large geojson/json files..
// npm install --save through2 JSONStream
var through = require('through2');
var JSONStream = require('JSONStream');
var fs = require('fs');
var inputStream = fs.createReadStream('./test.geojson');
var outputStream = fs.createWriteStream('./cleaned-geojson.json');
@moklick
moklick / twitter-stars.js
Last active November 4, 2015 13:52
Changes Twitter Hearts To Stars Again
/*
* Get the good old favorite ★ back.
*
* Copy the few lines below into the console of your browser and press enter.
* Chrome: https://developer.chrome.com/devtools#access
* Firefox: https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Opening_the_Web_Console
*/
// updated version (this also works for new pulled tweets):
var style = document.createElement('style');
@moklick
moklick / osmb-testdata.geo.json
Created November 9, 2015 14:56
Test geojson dataset for OSMBuildings.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@moklick
moklick / website2synth.js
Last active December 15, 2015 20:00
website2synth.js creates a super lightweight synthesizer of a website (webkit only :/ ) Use this JS stuff as a bookmark to start the synthesizer. Press an element on the page to play. Enjoy.
javascript: (
function() {
var elms = document.getElementsByTagName('*');
var b = document.body;
var box = document.createElement('div');
box.id = "element-chooser-container";
var buttonContainer = document.createElement('div');
buttonContainer.id = "sound-change-button-bar";
@moklick
moklick / fusionhelper.js
Created October 10, 2013 13:12
Litte Fusiontable-Query Helper
var FusionHelper = {
query: function(params) {
var base = 'https://www.googleapis.com/fusiontables/v1/query?',
url = base + $.param({
sql: params.sql,
key: '***'
});
$.ajax({
url: url,
type: 'POST',