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
/** | |
* Simple jQuery Table Sorter | |
*/ | |
(function($){ | |
$(document).ready(function(){ | |
// Table Sorter | |
$('table.sortable').each(function () { |
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 | |
# | |
# ghost - this script starts and stops the ghost npm daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Ghost - just another blog | |
# processname: ghost | |
# pidfile: /var/run/ghost.pid | |
# Source function library. |
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
[program:myqueue] | |
command=php artisan queue:listen --env=your_environment | |
directory=/path/to/laravel | |
stdout_logfile=/path/to/laravel/app/storage/logs/myqueue_supervisord.log | |
redirect_stderr=true |
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 | |
# | |
# /etc/rc.d/init.d/supervisord | |
# | |
# Supervisor is a client/server system that | |
# allows its users to monitor and control a | |
# number of processes on UNIX-like operating | |
# systems. | |
# | |
# chkconfig: - 64 36 |
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
/** | |
* jQuery Password Complexity Meter | |
*/ | |
(function ($) { | |
$(document).ready(function () { | |
$('.check-complexity').complexify({minimumChars:6, strengthScaleFactor:0.3}, function(valid, complexity){ | |
$('.password-complexity > .progress-bar').css('width', complexity + '%'); |
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
// Wire the trigger to show the file manager dialog | |
$('#addImageBtn').click(function () { | |
// Launch the dialog | |
ConcreteFileManager.launchDialog(function (data) { | |
// Parse the callback data to get more file detail | |
ConcreteFileManager.getFileDetails(data.fID, function(r) { | |
// Loop over each file and do whatever you want with it |
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
/* backup the db OR just a table | |
* See original: https://davidwalsh.name/backup-mysql-database-php | |
*/ | |
function backup_tables($host,$user,$pass,$name,$tables = '*') | |
{ | |
$link = mysqli_connect($host,$user,$pass,$name); | |
//get all of the tables | |
if($tables == '*') |
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/bash | |
# Check if command was ran as root. | |
if [[ $(id -u) -eq 0 ]]; then | |
echo "The command \"sphp\" should not be executed as root or via sudo directly." | |
echo "When a service requires root access, you will be prompted for a password as needed." | |
exit 1 | |
fi | |
# 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
{ | |
"10": ["165/70"], | |
"12": ["155/80"], | |
"13": [ | |
"155/80", | |
"175/70", | |
"175/80", | |
"185/60", | |
"185/70", | |
"185/80", |
OlderNewer