Skip to content

Instantly share code, notes, and snippets.

@novusidea
novusidea / maintenance.sh
Last active March 31, 2018 16:35 — forked from Zoramite/maintenance.sh
Git Maintenance Commands
# Verifies the connectivity and validity of the objects in the database
git fsck --unreachable
# Manage reflog information
git reflog expire --expire=0 --all
# Pack unpacked objects in a repository
git repack -a -d -l
# Prune all unreachable objects from the object database
@novusidea
novusidea / pagination.ctp
Last active August 29, 2015 14:07
CakePHP UIkit Pagination
<?php if( $this->Paginator->counter('{:pages}') > 1 ) : ?>
<ul class="uk-pagination">
<?php
echo $this->Paginator->prev(
'<i class="uk-icon-angle-double-left"></i>',
array(
'tag' => 'li',
'escape' => false,
'disabledTag' => 'span',
'class' => false
@novusidea
novusidea / js-self-url.js
Last active December 18, 2015 22:09
Get self url of current .js
var JS_SELF_URL = (function() {
var script_tags = document.getElementsByTagName('script');
return script_tags[script_tags.length-1].src;
})();