This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extracts colors with CSS, sort and remove duplicates. | |
egrep -o 'rgba\([[:digit:],\.\s\ ]+\)|#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})' style.css | sed 's/ *//g' | xargs -n1 | sort -u |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
AUTHOR=$(git config user.name) | |
DATE=$(date +%F) | |
git log --no-merges --format="%cd" --date=short --no-merges --author="$AUTHOR" --all | sort -u -r | while read DATE ; do | |
if [ $NEXT != "" ] | |
then | |
echo | |
echo [$NEXT] | |
fi | |
GIT_PAGER=cat git log --no-merges --format=" %s" --since=$DATE --until=$NEXT --author="$AUTHOR" --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"title":"test video","description":"hsjfav","screen":"http://amway.apide.com/de/media/screen/2-amway-german-test-video.jpeg","file":"http://amway.apide.com/de/media/view/4.mp4","duration":"01:25","brand":"Amway german","views":2,"rating":0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xmlstarlet edit -u '//requestNumber' -v '1234567' /tmp/rejectCustomer_pl.soap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Returns a function, that, as long as it continues to be invoked, will not | |
// be triggered. The function will be called after it stops being called for | |
// N milliseconds. If `immediate` is passed, trigger the function on the | |
// leading edge, instead of the trailing. | |
function debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, args = arguments; | |
var later = function() { | |
timeout = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function poll(fn, callback, errback, timeout, interval) { | |
var endTime = Number(new Date()) + (timeout || 2000); | |
interval = interval || 100; | |
(function p() { | |
// If the condition is met, we're done! | |
if(fn()) { | |
callback(); | |
} | |
// If the condition isn't met but the timeout hasn't elapsed, go again |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function once(fn, context) { | |
var result; | |
return function() { | |
if(fn) { | |
result = fn.apply(context || this, arguments); | |
fn = null; | |
} | |
return result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getAbsoluteUrl = (function() { | |
var a; | |
return function(url) { | |
if(!a) a = document.createElement('a'); | |
a.href = url; | |
return a.href; | |
}; | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
recentbranches = "!sh -c \"git for-each-ref --sort='committerdate' --format='%(color:green)%(committerdate:short) %(color:yellow)%(refname)' refs/heads | sed -e 's-refs/heads/--'\"" | |
rb = "!sh -c 'git recentbranches'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul> | |
<li><button class="user-status online" data-to-hide="^ul">Online</button></li> | |
<li><button class="user-status away" data-to-hide="^ul">Away</button></li> | |
<li><button class="user-status dont-disturb" data-to-hide="^ul">Do not disturb</button></li> | |
<li><button class="user-status invisible" data-to-hide="^ul">Invisible</button></li> | |
<li><button class="user-status signout" data-to-hide="^ul">Sign out</button></li> | |
</ul> |
OlderNewer