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
/* | |
Foreach helper function | |
callback | |
Function to execute for each element, taking three arguments: | |
currentValue | |
The current element being processed in the array. | |
index | |
The index of the current element being processed in the array. | |
array | |
The array that forEach() is being applied to. |
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
#!/bin/sh | |
# Create a file with these contents in your repo at | |
# .git/hooks/pre-commit | |
# Place any .sscript files in a folder called Packed/ | |
# Extract any .sscript files from a Packed/ directory | |
for i in `find . -name "*.sscript" -type f -exec echo \{\} \;`; do | |
# Only act if within a Packed directory |
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 | |
/** | |
* Get human readable time difference between 2 dates | |
* | |
* Return difference between 2 dates in year, month, hour, minute or second | |
* The $precision caps the number of time units used: for instance if | |
* $time1 - $time2 = 3 days, 4 hours, 12 minutes, 5 seconds | |
* - with precision = 1 : 3 days | |
* - with precision = 2 : 3 days, 4 hours | |
* - with precision = 3 : 3 days, 4 hours, 12 minutes |
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
#!/bin/sh | |
# | |
# Postgresql backup script | |
# http://www.bitweaver.org/wiki/pg_backup+PostgreSQL+backup+script | |
# | |
# Author | |
# | | |
# +-- speedboy (speedboy_420 at hotmail dot com) | |
# +-- spiderr (spiderr at bitweaver dot org) | |
# +-- flexiondotorg (code at flexion dot org) |