Skip to content

Instantly share code, notes, and snippets.

@henrahmagix
henrahmagix / no-break-space.md
Last active August 29, 2015 14:13
No-break spaces don't work in Markdown titles in GitHub comments

See comment below. (It renders fine here but shows an indentation.)

Screenshot:

image

In the atom editor, a no-break space (alt+space on OSX) is shown as a small dot.

image

@henrahmagix
henrahmagix / nested-counter-reset.html
Last active August 29, 2015 14:10
How counter-reset works through nested lists.
<html>
<head>
<title>Nested counter-reset styles</title>
<style type="text/css">
ol,
ul {
list-style: none;
counter-reset: listStyle;
margin: 1em 0;
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
// Parse the value returned by $.css('-webkit-transform')
var parseTranslationValue = function (value, suffix, axis) {
if (angular.isUndefined(value) || value === '') {
// return early if value isn't passed.
return 0;
} else {
// Default suffix value.
if (angular.isUndefined(suffix)) {
suffix = '';
@henrahmagix
henrahmagix / Gruntfile.js
Last active August 29, 2015 14:06
Test font awesome in grunt-webfont
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-webfont');
grunt.initConfig({
webfont: {
icons: {
src: 'black/svg/file-{audio,image,movie,pdf,excel,archive,word}-o.svg',
dest: 'icons',
destCss: 'css/',
@henrahmagix
henrahmagix / nesting.js
Last active December 25, 2015 19:29
Nesting FTW
// ( none ) ( of ) ( this ) ( please )
(function (none) {return none;})((function (of) {return of;})(function () {return this.toString();}.bind('please')))();
// -> please

How To Be An Instrumental
Open Source Contributor

By Henry Blyth

![incuna logo][]

Front-ender at [Incuna][]

@henrahmagix
henrahmagix / git-stash-find-dropped.sh
Created August 29, 2013 10:01
Find your dropped stashes.
# Altered from example at the bottom of the git-stash man page.
# Run `git gc` to remove them completely.
git fsck --unreachable | grep commit | cut -d' ' -f3 | xargs git log --merges --no-walk --grep=WIP --grep=On
@henrahmagix
henrahmagix / git-push-set-upstream.sh
Last active December 21, 2015 01:48
Automatically push current branch to remote and track at the same time.
# Call `git push --set-upstream` with current branch to a remote, defaulting to origin.
# Pass the remote as the first argument after the alias.
# Ensure confirm.sh is in your path.
# Usage: git psu [remote]
# Example:
# git remote add new-remote git@url...
# git checkout -b my-branch
# git psu new-remote
@henrahmagix
henrahmagix / ogn-gists.md
Last active December 20, 2015 22:39
Using Gists For More - Oxford Geek Nights 30

Using Gists For More

By Henry Blyth

![incuna logo][]

[@henrahmagix][]