Skip to content

Instantly share code, notes, and snippets.

Martin Kleppe aemkei

Block or report user

Report or block aemkei

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aemkei
aemkei / Readme.md
Last active Aug 29, 2015
A Snow Animation in 90 Bytes of HTML and JavaScript
View Readme.md
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
"use strict";
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Thiemo Mättig <http://maettig.com/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
View tdd-bin.js
// Item: Unit price Special Price
// it should return the price for a single item
// it shold fail it item does not exist
// it should sum up all prices
// it should apply special price (3 for 130) for A
// it should apply special price (2 for 45) for B
describe('cart should accept products', () => {
let cart;
View Remove DS_Store files
find . -name *.DS_Store -type f -exec rm {} \;
find . -name ".svn" -exec rm -rf {} \;
View Count Your Commits
git shortlog -s -n
135 Tom Preston-Werner
15 Jack Danger Canty
10 Chris Van Pelt
7 Mark Reid
6 remi
3 Mikael Lind
3 Toby DiPasquale
2 Aristotle Pagaltzis
View Git Status in Promt
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
PS1='\[\e[0;36m\]\h: \e[0;32m\]\W\e[0;35m\]$(parse_git_branch)\[\e[m\] $ '
View text-based graph
git log --graph --pretty=oneline --abbrev-commit
View Git Status in Promt
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
PS1='\[\e[0;36m\]\h: \e[0;32m\]\W\e[0;35m\]$(parse_git_branch)\[\e[m\] $ '
You can’t perform that action at this time.