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 | |
# Note this doesn't reset MAC addresses, your host is responsible for that. | |
sudo /bin/rm -v /etc/ssh/ssh_host_* | |
sudo dpkg-reconfigure openssh-server |
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 | |
# Create the user against the host... | |
curl -X "POST" "https://myjirasetup.review/rest/api/2/user" \ | |
-H 'Content-Type: application/json; charset=utf-8' \ | |
-u 'username:password' \ | |
-d $'{ | |
"password": "super-secret-password", | |
"emailAddress": "username@myjirasetup.review", | |
"displayName": "Username of MyJiraSetup", |
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 | |
# Make VMWare Tools Install for new VMs. Run once on boot. | |
# Only run this after you've mounted the VMWare tools on CD. | |
mkdir /vmwaretools | |
cd /vmwaretools | |
mount /dev/cdrom /mnt | |
tar xzf /mnt/VMwareTools* | |
umount /mnt | |
apt-get update |
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 | |
echo "Removing the existing keys... don't disconnect... :D" | |
/bin/rm -v /etc/ssh/ssh_host_* | |
# Do a Dr Who and regenerate | |
echo "Must.... regenerate" | |
dpkg-reconfigure openssh-server | |
# Now restart the service | |
service ssh restart |
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 | |
if ( $ch = curl_init() && curl_setopt($ch,CURLOPT_AUTOREFERER,FALSE) ) { | |
echo "Passed this test.\r\n"; | |
} | |
else { | |
echo "Failed this test.\r\n"; | |
} | |
class moo { |
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 | |
$URIParts = explode('?',$_SERVER['REQUEST_URI']); | |
$URI = explode('/',$URIParts[0]); | |
// Shift the array, to move it past the 'root' | |
@array_shift($URI); | |
// Now, get rid of any pesky empty end slashes | |
while ( @count($URI) > 0 && !end($URI) ) { | |
@array_pop($URI); | |
} |
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 | |
// Heres the transport grab of Bus Stops in SG | |
// Built for the YRS'rs in Sing. | |
$Url = "http://datamall.mytransport.sg/ltaodataservice.svc/BusStopCodeSet?"; | |
$ch = curl_init(); | |
$headerOptions = array ( | |
'accept', "*/*", | |
'AccountKey', 'accountKey', | |
'UniqueUserID', 'uniqueID' | |
); |