Skip to content

Instantly share code, notes, and snippets.

View d-Pixie's full-sized avatar

Jonas Schubert Erlandsson d-Pixie

View GitHub Profile
@d-Pixie
d-Pixie / browserconfig.xml
Last active August 28, 2018 11:26
Imagemagick convert, resize to all favicon and app icon formats.
<?xml version="1.0" encoding="utf-8"?>
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
@d-Pixie
d-Pixie / json_benchmark.rb
Created May 14, 2018 12:35
Ruby code for benchmarking JSON generation from Rails models. You need to install these gems before running: `gem install rails rabl jbuilder roar ffaker`. Based on https://gist.github.com/mimosa/ac14b3527c33bf767dc11875ce3964b8
require 'bundler'
require 'active_model_serializers'
require 'roar/decorator'
require 'roar/json'
require 'rabl'
require 'jbuilder'
require 'benchmark'
require 'ffaker'
class Post
@d-Pixie
d-Pixie / Pure CSS mime type icon, using fontawesome.
Last active July 3, 2017 09:38
Pure css and glyph font implementation of a mime type / file type icon. Using font awesome and Source Code Pro. I wanted to replace the small single glyphs used in one of my projects. My initial thought was to go for a simple image sprite, but since we just moved from glyphicons to font awesome for the other icons I figured there must be a way t…
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600,700,900' rel='stylesheet' type='text/css'>
<style>
.icon-file-alt {
@d-Pixie
d-Pixie / gist:3369824
Created August 16, 2012 12:29
Spinner.js options
http://fgnass.github.com/spin.js
var opts = {
lines: 17, // The number of lines to draw
length: 2, // The length of each line
width: 5, // The line thickness
radius: 19, // The radius of the inner circle
corners: 1, // Corner roundness (0..1)
rotate: 42, // The rotation offset
color: '#000', // #rgb or #rrggbb