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
<?php | |
/** | |
* An helper file for Laravel 4, to provide autocomplete information to your IDE | |
* Generated with https://github.com/barryvdh/laravel-ide-helper | |
* Updated for Laravel 4.2.1 (2014-06-01) | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
*/ | |
namespace { |
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
$(document).ready(function(){ | |
countdown(); | |
setInterval(countdown, 1000); | |
function countdown () { | |
var now = moment(), // get the current moment | |
// May 28, 2013 @ 12:00AM | |
then = moment([2014, 9, 20]), | |
// get the difference from now to then in ms | |
ms = then.diff(now, 'milliseconds', true); | |
// If you need years, uncomment this line and make sure you add it to the concatonated phrase |
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
build_settings: | |
verbose: false | |
prefer_symlink: false | |
setup: | |
composer: | |
action: "install" | |
prefer_dist: false | |
test: |
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 formatBytes(bytes,decimals) { | |
if(bytes == 0) return '0 Bytes'; | |
var k = 1024, | |
dm = decimals || 2, | |
sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], | |
i = Math.floor(Math.log(bytes) / Math.log(k)); | |
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; | |
} | |
// Usage: |
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
s3cmd setacl s3://bucket/path/to/file --acl-public | |
s3cmd info s3://bucket/path/to/file | |
s3cmd setacl s3://bucket/path/to/file --acl-private | |
# S3CMD SET ALL FILES IN FOLDER TO PRIVATE | |
s3cmd setacl s3://bucket/path/to/file --acl-private --recursive |
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
<?php | |
$transactionIds = Transaction::pluck('id'); // +100k transaction ids | |
$maxAtOneTime = 5000; | |
$total = count($transactionIds); | |
$pages = ceil($total / $maxAtOneTime); | |
$transactions = collect(); |