Skip to content

Instantly share code, notes, and snippets.

@mrvicadai
mrvicadai / 00.howto_install_phantomjs.md
Created November 29, 2015 17:14 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@mrvicadai
mrvicadai / hosted_example.txt
Created December 3, 2015 19:33 — forked from makevoid/hosted_example.txt
JQuery DOM HighLighter (it's a basic "Inspect element" simple implementation to mimic what webkit inspector and firebug do)
http://uploads.makevoid.com/jquery_dom_highlighter.html
@mrvicadai
mrvicadai / gist:bcf754facbbdc1518c91
Created December 14, 2015 02:37 — forked from StephanHoyer/gist:de107b794c43f28ffd75
SVG Icons with mithril.js

Icons have been part of applications since ages. Also most websites rely on icons. There were several ways to use them. First we used plain files then image sprites to reduce requests. Nowadays everyone uses icon fonts like font-awesome or glyphicons.

They are infinetly scaleable and styleable with css. The downside is they use pseudo elements for displaying. This is not only difficult to handle but also non-optimal for accessibilty.

A famous CSS-Tricks post brings SVG icons into play. The are also scalable and they behave like normal images. But we also want to have a sprite to not load any images seperatly and kill our servers and our sites performance. The proposed version is to create sprites with grunt or gulp using the symbol-trick. It's basically add every icon to a hidden sprite-image and give every icon an id-property.

<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
  
  <symbol id="beaker" viewBox="214.7 0 182.6 792">
@mrvicadai
mrvicadai / grid.js
Created December 29, 2015 19:39 — forked from barneycarroll/grid.js
A grid vm for Mithril
'use strict';
function grid( axis ){
var items = [];
var pending;
var container;
function queue(){
if( pending ) ( window.cancelAnimationFrame || window.clearTimeout )( pending );
@mrvicadai
mrvicadai / browserify_for_webpack_users.markdown
Created January 21, 2016 02:02
browserify for webpack users

browserify for webpack users

There's been a strange explosion in misinformation about browserify recently, particularly in comparisons to webpack.

Generally speaking, most of this confusion stems from how webpack is more willing to pull features into its core to ease discoverability while browserify is more likely to push features out to userland instead.

I think that longer-term, separability has more benefits from a maintenance and

@mrvicadai
mrvicadai / boot2docker-nfs.rb
Created March 11, 2016 02:03 — forked from mattes/boot2docker-nfs.rb
docker-machine/ boot2docker with NFS instead of vboxsf
#!/usr/bin/env ruby
# Usage
# $ docker-machine create my-machine123 -d virtualbox
# $ ruby <(curl -L https://git.io/vvvco) my-machine123
# https://gist.github.com/mattes/4d7f435d759ca2581347
require 'erb'
bootlocalsh = %Q(#/bin/bash
@mrvicadai
mrvicadai / 0_reuse_code.js
Created March 28, 2016 03:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mrvicadai
mrvicadai / gist:aac48bb41a70dedc32844cf6aeeb714e
Created July 3, 2016 02:53 — forked from dgieselaar/gist:8b20e9d593e1806a098b
Code splitting, lazy-loading, import statements, Angular + newNgRouter + ocLazyLoad + webpack
import _ from 'lodash';
import angular from 'angular';
import 'angular-new-router';
import 'oclazyload';
function AppController ( ) {
}
AppController.$routeConfig = [];
@mrvicadai
mrvicadai / pull-request-template.md
Created August 9, 2016 23:14 — forked from Lordnibbler/pull-request-template.md
Sample Pull Request Template

Status

READY/IN DEVELOPMENT/HOLD

Migrations

YES | NO

Description

A few sentences describing the overall goals of the pull request's commits.

Related PRs

@mrvicadai
mrvicadai / introrx.md
Created August 11, 2016 17:01 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing