This file contains hidden or 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 | |
#Script used to run gnokii smsd | |
#Cronjob @solidmarkup.com | |
/usr/sbin/smsd -u root -p MySQLPassword -d smsgw -c localhost -m mysql -b IN -f /var/log/smsdaemon.log |
This file contains hidden or 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
#Console 1 | |
ping -i .2 <GATEWAY MAC ADDRESS> | egrep --line-buffered -v 'PING|timeout' | sed -l -e 's/^.* time=\(.*\) ms$/\1/g' > ping.bat | |
#Console 2 | |
while true ; do tail -n 150 ping.bat | gnuplot -e "set term dumb size 150, 40; plot '-'" ; sleep 1 ; done |
This file contains hidden or 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(){ | |
var $nav = $('.navigation'), | |
$mhlHeight = $('.mhl').height(), | |
fixedStyle = { | |
'position':'fixed', | |
'top':0, | |
'left':0, | |
'z-index':1, | |
'width':'100%' |
This file contains hidden or 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 namespace App\Http\Middleware; | |
use Closure; | |
class AfterMiddleware{ | |
/** | |
* Handle an outgoing request. | |
* | |
* @param \Illuminate\Http\Request $request |
This file contains hidden or 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
To enable PHP in Apache add the following to httpd.conf and restart Apache: | |
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so | |
The php.ini file can be found in: | |
/usr/local/etc/php/5.6/php.ini | |
✩✩✩✩ PEAR ✩✩✩✩ | |
If PEAR complains about permissions, 'fix' the default PEAR permissions and config: | |
chmod -R ug+w /usr/local/Cellar/php56/5.6.10/lib/php |
This file contains hidden or 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
#Needs imagemagick library | |
D:\>for /R %i in (*.jpg) DO identify %i >> result.txt |
This file contains hidden or 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 contents from easylist domain | |
$content = file_get_contents('easylist.txt'); | |
# Extract adserver list only | |
preg_match('/(\!\s\*\*\*\seasylist:easylist\/easylist_adservers\.txt\s\*\*\*)[^"]+(\!\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-Third\-party\sadverts\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\!)/', $content, $extracted, PREG_OFFSET_CAPTURE); | |
/* | |
* Remove unnecessary strings from every URL |
This file contains hidden or 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 | |
# Flush out the list before we begin. | |
ipfw -q -f flush | |
# Set rules command prefix | |
cmd="ipfw -q add" | |
pif="vtnet0" # interface name of NIC attached to Internet | |
$cmd 00005 allow all from any to any via vtnet0 |
This file contains hidden or 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
# sarg.conf | |
# | |
# TAG: access_log file | |
# Where is the access.log | |
# sarg -l file | |
# | |
access_log /250Vault/squid/logs/access.log | |
# TAG: graphs yes|no | |
# Use graphics where possible. |