sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get dist-upgrade
mkdir wily && cd wily
wget http://old-releases.ubuntu.com/ubuntu/dists/wily-updates/main/dist-upgrader-all/current/wily.tar.gz
tar -xzf wily.tar.gz
sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' Ubuntu.info
sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' Ubuntu.mirrors
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
// The simplest implementation to express the concept. | |
// Routes | |
Route::get( 'admin/user/switch/start/{id}', 'UserController@user_switch_start' ); | |
Route::get( 'admin/user/switch/stop', 'UserController@user_switch_stop' ); | |
// Inside User Controller | |
public function user_switch_start( $new_user ) |
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 | |
ini_set( 'display_errors', 1 ); | |
error_reporting( E_ALL ); | |
$from = "emailtest@YOURDOMAIN"; | |
$to = "YOUREMAILADDRESS"; | |
$subject = "PHP Mail Test script"; | |
$message = "This is a test to check the PHP Mail functionality"; | |
$headers = "From:" . $from; | |
mail($to,$subject,$message, $headers); | |
echo "Test email sent"; |
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 | |
$migrationRepository = app('migration.repository'); | |
if (!$migrationRepository->repositoryExists()) | |
{ | |
$migrationRepository->createRepository(); | |
} | |
$migrator = app('migrator'); |
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
<pre> | |
<?PHP | |
$sqlserver = ''; | |
$username = ''; | |
$password = ''; | |
$database = ""; | |
/* | |
* writer.php version 2.0 - Major update | |
* Takes stored procedure name, the input variables and an array of output variables | |
* outputs php code necessary for getting results using php pdo |
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
# So I got fed up with windows 10 and its constant supply of updates. And I've had them disabled, but | |
# now they've got this handy little tool called Windows 10 Upgrade assistant. This just goes ahead and | |
# starts updating your system without notifying you and without your permission. Some great code there! | |
# So of course you can uninstall it, but at a random time interval later, it reinstalls the updater. | |
# Total BS if you ask me. I think I've figured out how to disable it more long term though and this is | |
# how. Since I know I'm not the only one who's going to want to do this. | |
1. Uninstall Windows 10 Upgrade assistant (from the control panel) | |
2. Create a folder on the C:/ Drive called "Windows10Upgrade" and go in and modify it's permissions | |
a) Make sure that you've revoked all permissions to everyone including yourself. |
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
Just some notes I'm keeping for myself about my install that got things working - in case | |
I screw things up at some later point. | |
Get a drive with ubuntu installer image on it. | |
Run the check the drive utility to make sure things are all good before installing (You dealt | |
with a bad drive before, everythin looked good, but things didn't work perfect) | |
Install ubuntu via the second option, "install ubuntu" not through the try it first. | |
It crashed at the reboot part of the process |
I really don't recommend using this in production environments. There are potential issues with this script that could cause some damage.
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 | |
$q = (isset($_REQUEST['q'])) ? $_REQUEST['q'] : ''; | |
$records = dns_get_record("{$q}.domainname.tld", DNS_TXT); | |
$return = []; | |
if($records===false)exit( "Nope. ") ; | |
foreach($records as $record){ | |
$arr = explode(':', $record['txt'], 2); | |
if(preg_match("/:/", $record['txt'])==true && is_numeric($arr[0])){ | |
$return[$arr[0]] = $arr[1]; | |
} else { |
OlderNewer