As configured in my dotfiles.
start new:
tmux
start new with session name:
/************************************************************************** | |
* OSM2GEO - OSM to GeoJSON converter | |
* OSM to GeoJSON converter takes in a .osm XML file as input and produces | |
* corresponding GeoJSON object. | |
* | |
* AUTHOR: P.Arunmozhi <aruntheguy@gmail.com> | |
* DATE : 26 / Nov / 2011 | |
* LICENSE : WTFPL - Do What The Fuck You Want To Public License | |
* LICENSE URL: http://sam.zoy.org/wtfpl/ | |
* |
As configured in my dotfiles.
start new:
tmux
start new with session name:
The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.
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 > 1000)
module = angular.module 'FacebookPluginDirectives', [] | |
createDirective = (name) -> | |
module.directive name, -> | |
restrict: 'C' | |
link: (scope, element, attributes) -> | |
FB?.XFBML.parse(element.parent()[0]) | |
createDirective pluginName for pluginName in ['fbActivity', 'fbComments', 'fbFacepile', 'fbLike', 'fbLikeBox', 'fbLiveStream', 'fbLoginButton', 'fbName', 'fbProfilePic', 'fbRecommendations'] |
A simple bookmarklet which makes our painful life a bit easier.
javascript:(function(b,a,c,d,e){if(/\.\w+$/.test(a))b.location=c+a.replace("/blob/","/");else if(e=prompt("Insert a filename:","index.html"))b.location=c+a.replace("/tree/","/")+(~a.indexOf(d)?"/":d)+e})(window,location.pathname,"http://rawgit.com","/master/");
The usage is quite simple:
Go to any repo where you like to preview a file, and execute the booklet. If the current url is a file, it should open the file directly, otherwise it will prompt for a filename (per default it is index.html
).
IE9, IE10, and IE11 don't properly scale SVG files added with img
tags when viewBox
, width
and height
attributes are specified. View this codepen on the different browsers.
Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.
As per this answer on Stackoverflow, the issue can be resolved by removing just the width
and height
attributes.
#!/bin/bash | |
HOME="http://www.yourdomain.com/some/page" | |
DOMAINS="yourdomain.com" | |
DEPTH=2 | |
OUTPUT="./urls.csv" | |
wget -r --spider --delete-after --force-html -D "$DOMAINS" -l $DEPTH "$HOME" 2>&1 \ | |
| grep '^--' | awk '{ print $3 }' | grep -v '\. \(css\|js\|png\|gif\|jpg\)$' | sort | uniq > $OUTPUT |
# This `.htaccess` snippet does the following: | |
# 1. Create two environments called staging and development based on the host name | |
# 2. Set up ht authentication only on the stage server (`Deny from env=staging`) | |
# 3. Rewrite all requests to the main domain (www.mysite.com) if we’re not on either the development nor staging environment and the host doesn't already equal the main domain | |
AuthName "Staging Server" | |
AuthType Basic | |
AuthUserFile /var/sites/mysite/.htpasswd | |
AuthGroupFile /dev/null |
# Add taps | |
brew tap homebrew/apache | |
brew tap homebrew/dupes | |
brew tap homebrew/php | |
# Install Apache | |
brew install httpd22 | |
# Install PHP | |
brew install php55 --homebrew-apxs --with-apache --without-pcntl |
mixin php-foreach(expr) | |
| <?php foreach(!{expr}): ?> | |
block | |
| <?php endforeach; ?> | |
mixin php-print(expr) | |
| <?php print !{expr}; ?> | |
mixin php-if(expr) | |
| <?php if(!{expr}): ?> |