Skip to content

Instantly share code, notes, and snippets.

<?php
return array(
'router' => array(
'routes' => array(
'contact' => array(
'type' => 'Literal',
'options' => array(
'route' => '/contacts',
'defaults' => array(
@stefanotorresi
stefanotorresi / git-branches-info.sh
Last active December 16, 2015 05:49 — forked from jasonrudolph/git-branches-by-commit-date.sh
show a list with info about the last commit of each branch.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ct %cr | %h %s" $branch | head -n 1` \| $branch; done | sort -r
@stefanotorresi
stefanotorresi / facebook-invite.js
Created April 7, 2013 09:29
facebook invite to event
checkboxes = document.getElementsByName("checkableitems[]");
for (i=0;i<checkboxes.length;i++) {
var checkbox = checkboxes[i];
if (checkbox.type == "checkbox" && !checkbox.checked ) {
checkbox.click();
}
};
@stefanotorresi
stefanotorresi / wordpress-custom-login.php
Last active June 4, 2018 22:09
add these hooks to your theme's 'functions.php' to customize Wordpress login page
function myLoginLogo() {
?>
<style type="text/css">
.login h1 a {
height: 82px;
background-size: auto;
background-image: url('<?=get_template_directory_uri();?>/img/logo-login.png');
}
</style>
<?php