All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.
# run command in the foreground
command
# run commend in the background
var png = { | |
selector: "#aaaa", | |
w: "500px", h: "500px", | |
fn: "fallback.png" | |
}; | |
function svg2png({ selector, w, h, fn }) { | |
var svg = document.querySelector( selector ); | |
var svgData = new XMLSerializer().serializeToString( svg ); |
The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Mon, 01 Dec 2014 00:48:25 GMT till Tue, 01 Dec 2015 00:48:25 GMT.
Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:
githubUsers
.filter(user => user.followers > 508)
// usage: | |
// @breakpoint(xxs) | |
// font-size: 10px | |
@mixin breakpoint($point) | |
@if $point == xxs | |
@media (max-width: 130px) | |
@content | |
@else if $point == xs | |
@media (min-width: 240px) |
predefined variables :
To know the return codes returned by ansible modules, just use plain ansible -vvv to see them : ansible -i ~/ansible/arrfab.net/hosts/hosts.cfg -vvv -m copy -a 'src=files/sysinfo dest=/etc/sysinfo' tungstene.arrfab.net tungstene.arrfab.net | success >> { "changed": true,
#server.modules += ( "mod_rewrite") | |
# Workaround to have a working reverse-proxy that matches an URL does URL rewriting in Ligghtpd. | |
# | |
# Ligtthpd 1.4.28 cannot perform both matching and URL rewriting at the same time. | |
# Therefore we need to define 2 proxies, one does the matching and bounce the request | |
# to the other one, in charge of rewriting the URL before proxying the request to the target server. | |
# | |
# More about this here: | |
# http://redmine.lighttpd.net/issues/164#note-9 |
function get_avatar_from_service(service, userid, size) { | |
// this return the url that redirects to the according user image/avatar/profile picture | |
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback | |
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px ) | |
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word ) | |
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px ) | |
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word ) | |
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px ) | |
// everything else will go to the fallback | |
// google and gravatar scale the avatar to any site, others will guided to the next best version |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.