Skip to content

Instantly share code, notes, and snippets.

Avatar

Marius Hauken mhauken

View GitHub Profile
@eiriklv
eiriklv / data-modeling-stepwise-form.js
Created Apr 7, 2017
Data Modeling Stepwise Form Example
View data-modeling-stepwise-form.js
/**
* Modeling a step-wise form with data
*
* NOTE: The important thing is to be able to
* describe any requirement with the chosen data model
*
* NOTE: Another important thing is conventional interfaces
* and impedance matching. Data should just flow through the
* functions without needing to conform to many different interfaces
*/
@mhauken
mhauken / svgo.json
Last active Apr 16, 2018 — forked from bendc/svgo.json
Sketch's SVGO Compressor settings
View svgo.json
{
"comment": "A modified svgo compression-settings for SVGO-compresspor by Marius Hauken. For more info, please check <https://github.com/BohemianCoding/svgo-compressor>",
"pretty": false,
"indent": 0,
"plugins": [
{
"name": "cleanupAttrs"
},
{
"name": "cleanupEnableBackground"
View how to screencapture and make animated gifs or whathaveyou.md

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

@sergejmueller
sergejmueller / ttf2woff2.md
Last active Jul 7, 2020
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
View ttf2woff2.md
@mhauken
mhauken / __Useful.html
Last active Apr 6, 2018
Useful HTML snippets
View __Useful.html
<!--
&shy; = Soft hyphen. To break text where you want
-->
Onelongword&shy;thatwewant&shy;tobreak
@miguelmota
miguelmota / getdates.js
Last active Sep 17, 2020
Get dates in between two dates with JavaScript.
View getdates.js
// Returns an array of dates between the two dates
var getDates = function(startDate, endDate) {
var dates = [],
currentDate = startDate,
addDays = function(days) {
var date = new Date(this.valueOf());
date.setDate(date.getDate() + days);
return date;
};
while (currentDate <= endDate) {
@zachleat
zachleat / reading_time.rb
Last active Nov 5, 2019
Read this in X minutes Liquid Filter Plugin (for Jekyll)
View reading_time.rb
# Outputs the reading time
# Read this in “about 4 minutes”
# Put into your _plugins dir in your Jekyll site
# Usage: Read this in about {{ page.content | reading_time }}
module ReadingTimeFilter
def reading_time( input )
words_per_minute = 180
@h3h
h3h / 0-resume-template.md
Last active Jul 28, 2016
Ideal Resume Format for a Software Engineer
View 0-resume-template.md

https://github.com/[yourname]

Ambition

[Describe ambitions: type of work, attributes of team, what you want to learn & teach]

Experience

[in reverse chronological order, list at most 5 positions or 10 years back, whichever is fewer]

@technopagan
technopagan / style.css
Created Dec 5, 2012 — forked from iansoper/dabblet.css
Progressive Enahncement to use SVG sprites with PNG fallback for IE6+7
View style.css
/**
* Progressive Enahncement to use SVG sprites with PNG fallback for IE6+7
*
* The trick:
* Legacy IE does not support rgba values.
* By defining a rgba background color together with the
* SVG background image for all modern browsers, legacy IE
* will ignore the SVG and use the
* first background definition containing the fallback PNG
*
You can’t perform that action at this time.