Skip to content

Instantly share code, notes, and snippets.

View xiel's full-sized avatar
🖖

Felix Leupold xiel

🖖
View GitHub Profile
@xiel
xiel / Moving Line Buttons.markdown
Created August 27, 2015 16:41
Moving Line Buttons
@xiel
xiel / index.html
Created September 24, 2014 08:56
FileReader Error // source http://jsbin.com/yucavaxiyufi/6
<!DOCTYPE html>
<html>
<head>
<title>FileReader Error</title>
</head>
<body>
<form>
<input id="fileInput" type="file" accept-"image/*">
</form>
<div id="output"></div>
@xiel
xiel / dabblet.css
Created November 8, 2012 22:06
Centered Element by xiel
/**
* Centered Element by xiel
*/
body{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
}
@xiel
xiel / dabblet.css
Created November 13, 2012 09:44
Pseudo-Element Transition Webkit Bug
/*
Pseudo-Element Transition Webkit Bug
*/
a {
transition: 500ms;
position: relative;
border: 0 none;
border-radius: 5px;
padding: 10px 20px;
@xiel
xiel / dabblet.css
Created November 14, 2012 23:17
Pseudo-Element Transition Webkit Bug
/*
Pseudo-Element Transition Webkit Bug
*/
a,
a:after {
transition: 500ms; /* transition for both */
}
a {
position: relative;
@xiel
xiel / dabblet.css
Created November 14, 2012 23:24
Pseudo-Element Transition Webkit Bug Fix
/*
Pseudo-Element Transition Webkit Bug Fix
*/
a {
transition: 500ms; /* only the parent element needs the transition */
}
a {
position: relative;
border: 0 none;
@xiel
xiel / initial-value.js
Created November 13, 2015 11:06
initialValue attribute directive for angular
/** Get and Render initial value from HTML attr (data from BackEnd)
* license: MIT
*/
angular.module('bra.global.directive')
.directive('initialValue', ['$parse', function($parse) {
'use strict';
//trim input values (eg. textareas)
var removeIndent = function (str) {
@xiel
xiel / JSDateForDateFormatter.swift
Last active December 16, 2015 13:38
Transform JS Date String to NSDate or localizedString | supports JavaScript/ECMAScript Date Time String Format (simplification of the ISO 8601)
//
// NSDateFormatter extension
// Transform JS Date String to NSDate or localizedString
//
// Created by Felix Leupold on 16.12.15 © 2015 XIEL development.
// License: WTFPL / MIT
//
// Usage Examples:
// NSDateFormatter.dateFromJsDateString("2015-11-22T16:09:19.000Z");
// NSDateFormatter.localizedStringFromJsDateString("2015-11-22T16:09:19.000Z");
@xiel
xiel / delete-folders-with-name.sh
Created February 18, 2019 22:36
Delete all folders with a specific name recursively (including their contents)
Delete all folders with given name, example “.svn” etc.
find . -type d -name '.svn' -print -exec rm -rf {} \;
find . -type d -name '.idea' -print -exec rm -rf {} \;
find . -type d -name '.sass-cache' -print -exec rm -rf {} \;
find . -type d -name 'node_modules' -print -exec rm -rf {} \;