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 | |
function ashuffle (&$array) { | |
$shuffle = $array; | |
shuffle($shuffle); | |
return $array = array_combine(array_keys($array), $shuffle); | |
} | |
?> |
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 | |
function ashuffle (&$array) { | |
$shuffle = $array; | |
shuffle($shuffle); | |
return $array = array_combine(array_keys($array), $shuffle); | |
} | |
?> |
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
::setup - Setup Windows Development Environment | |
ECHO *** install chocolatey | |
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin | |
ECHO *** install Google Chrome | |
choco install GoogleChrome -y | |
ECHO *** install Firefox | |
choco install firefox -y | |
pause | |
::EOF |
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
::install_dotnetfx40.bat - installs dotNetFx40_Full_x86_x64.exe | |
::based on install_ooo.bat by @jpswade | |
@ECHO OFF | |
:SETTINGS | |
SET INSTALLNAME=Microsoft .NET Framework | |
SET SOURCEDIR=%CD% | |
SET INSTALLURL=http://www.microsoft.com/en-gb/download/details.aspx?id=17718 | |
SET INSTALLEXE=dotNetFx40_Full_x86_x64.exe | |
:START |
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
@ECHO off | |
ECHO Fixes for Windows AutoUpdates | |
ECHO @see http://support.microsoft.com/kb/971058 | |
ECHO By @jpswade | |
PAUSE | |
ECHO Updating the time... | |
W32TM /config /update /syncfromflags:manual /manualpeerlist:"time-b.nist.gov,0x8" | |
ECHO Stopping the services... |
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
#fix_apache | |
#http://lists.bitfolk.com/lurker/message/20140907.170406.4b9ef2e5.en.html | |
echo start>>httpd.log | |
echo ps -C httpd -FH>>httpd.log | |
ps -C httpd -FH>>httpd.log | |
echo ps -eo pmem,pcpu,vsize,pid,cmd | sort -k 1 -nr>>httpd.log | |
ps -eo pmem,pcpu,vsize,pid,cmd | sort -k 1 -nr>>httpd.log | |
#cat /etc/httpd/conf/httpd.conf | grep LoadModule | |
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak | |
sed -i 's|^LoadModule|#LoadModule|g' /etc/httpd/conf/httpd.conf |
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 | |
#curl -O https://gist.githubusercontent.com/jpswade/d82392d62bd25b43c6ce/raw/59a7e9c990ba9979f0967de049aea23f76e2bb2d/xphpunit /usr/local/bin/phpunitx && chmod 755 /usr/local/bin/phpunitx | |
# a wrapper around phpunit with xdebug enabled for eclipse | |
# make sure the debug session is started in the debug client (eclipse, netbeans, choose one of the settings below) | |
# see component diagram on https://en.wikipedia.org/wiki/Xdebug | |
# export XDEBUG_CONFIG="idekey=ECLIPSE_DBGP" | |
export XDEBUG_CONFIG="idekey=netbeans-xdebug" | |
phpunit --colors $@ |
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
::install_thunderbird.bat - Installs Mozilla Thunderbird | |
@ECHO OFF | |
SETLOCAL EnableDelayedExpansion | |
:SETTINGS | |
SET INSTALLVER=17.0.11esr | |
SET INSTALLEXE=Thunderbird Setup %INSTALLVER%.exe | |
SET INSTALLURL=http://download.cdn.mozilla.net/pub/mozilla.org/thunderbird/releases/%INSTALLVER%/win32/en-GB/Thunderbird Setup %INSTALLVER%.exe | |
SET INSTALLDIR=%PROGRAMFILES%\Mozilla Thunderbird | |
SET INSTALLTBE=%INSTALLDIR%\thunderbird.exe |
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
::setup_test.bat - Setup Windows Testing Environment | |
@ECHO OFF | |
:SETTINGS | |
SET SETUPNAME=Setup Windows Testing Environment | |
:START | |
TITLE %SETUPNAME% Installer | |
ECHO *** %SETUPNAME% Installer | |
ECHO. | |
:ADMINCHECK |
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
#!/usr/bin/perl | |
############################################################################### | |
# vzubc.pl - Human readable user beancounters | |
# | |
# This script reads /proc/user_beancounters on OpenVz HNs and VEs and displays | |
# the values in human-readable format (megabytes/kilobytes). | |
# | |
# The script can be distributed freely for everybody who finds it usable. | |
# | |
# Based on a script by Christian Anton |