Skip to content

Instantly share code, notes, and snippets.

View larsenwork's full-sized avatar
🦁

Andreas Larsen larsenwork

🦁
View GitHub Profile
#!/bin/sh
# Requires sketch and Sketchtool
# Q: How to enable it?
# A: Add it to your repo pre-commit hook
# Q: What does it do?
# A: It creates a .exportArtboards folder with all artboards as PNGs,
# so you easily can see changes in GIT 🎊.
@alexey-m-ukolov
alexey-m-ukolov / gulpfile.js
Created June 9, 2016 07:39
Add pug/jade global helpers
gulp.task('pug', function () {
global._ = require('lodash');
global.helpers = require('./' + paths.src.root + '/pug-helpers');
global.mocks = require('./' + paths.dest.root + '/mocks.json');
return gulp.src(paths.src.html + '/**/!(_)*.pug')
.pipe(plumber())
.pipe(pug({
doctype: 'html',
pretty: true,
@ksmandersen
ksmandersen / RemoteImage.swift
Last active January 20, 2016 14:56
Loading a UIImage into a UIImageView from a NSURL using Forbind
import UIKit
import Forbind
import ForbindExtensions
enum LoadingState {
case NotSet
case Loading
case Loaded
}
@larsenwork
larsenwork / MonoidAtom.scss
Last active July 15, 2021 14:47
The code below enables contextual alternates and ligatures but disables them on your `cursor-line` so you don't sacrifice "editability".
* {
-webkit-font-smoothing: antialiased;
-webkit-font-feature-settings: "liga" on, "calt" on;
}
atom-text-editor .cursor-line {
-webkit-font-feature-settings: "liga" off, "calt" off;
}
@derhuerst
derhuerst / intro.md
Last active May 13, 2023 17:56
Installing the Z Shell (zsh) on Linux, Mac OS X and Windows

Installing zsh – the easy way

The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.

Z shell – Wikipedia

Read more about ZSH at An Introduction to the Z Shell.

Choose one of the following options.

@larsenwork
larsenwork / AsciiGlobe.md
Last active August 29, 2015 14:17
Pixelated globe

As used on gidole.github.io

                                           
                ···········                
             @@···············             
           @@@·········@@@@@@···           
         @@@·@@·······@@@·@@@·@@··         
        @@@··········@@@@·@@@@@@@@@        
       ·@@········@···@@@··@@@@@@@@@       
@larsenwork
larsenwork / CustomSkrollrEasing.md
Last active August 29, 2015 14:17
How to convert Tim Groleau's easing functions into Skrollr easing functions

Use this generator

Insert the polynomial coeficients given by the generator instead of t, t2, t3, t4 and t5

t5*(p*p*p*p*p) + t4*(p*p*p*p) + t3*(p*p*p) + t2*(p*p) + t*p

Example shown for easeOutElasticBig

<div data-0="opacity[easeOutElasticBig]:0"></div>
<script>
 $(function() { var s = skrollr.init({ 
@razwan
razwan / _baseline.scss
Created April 14, 2014 16:20
Aligning type to baseline the right way with SASS
$base-font-size: 16px;
$base-line-height: 1.5;
// this value may vary for each font
// unitless value relative to 1em
$cap-height: 0.68;
@mixin baseline($font-size, $scale: 2) {
@travismillerweb
travismillerweb / scroll-shadow.css
Created September 23, 2013 18:57
CSS - Google Scroll Shadow
/*
Gmail/Google Reader Sidebar Scroll Shadows
-------------------------------------------
Neat effect that mimics the scroll shadows that appear in the GOogle sitde bar and visually cues users to scroll up or down depending on their position.
Credit goes to Lea Verou for this awesome find.
Source:
Lea's Talk: http://www.youtube.com/watch?v=3ikye7Qc7Ak
Code Source: http://lea.verou.me/more-css-secrets/#slide9
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 5, 2024 13:30
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx