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 BELOW WORKS FOR LOCAL WINDOWS MACHINE FROM A WAMP HOSTED CODEIGNITER SITE - CALL MADE FROM CODEIGNITER CONTROLLER | |
$myCmd = "C://wamp//bin//wkhtmltopdf//wkhtmltopdf.exe http://proofofconcept.proximitystage.com/email-media-queries C://Users//mosley.j//Desktop//jonnny.pdf"; | |
$result = exec($myCmd,$output,$var); | |
var_dump($output); | |
var_dump($var); | |
// BELOW IS THE CMD LINE CODE/STEPS YOU NEED IN ORDER TO RUN THE SAME THING FROM PURE CMD LINE |
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
/** | |
* A bookmarklet for viewing the largest contentful paint in a page. | |
* Will show each LCP after the bookmarklet is clicked. | |
* | |
* To install: | |
* 1. Copy the code starting from the line beginning `javascript:` | |
* 2. Add a new bookmark in Chrome, and paste the code in as the URL. | |
**/ | |
javascript:(function(){ | |
try { |
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 | |
# CloudWays - Download local backups for all applications | |
# ======================================================= | |
# * Local backups must be enabled and available. See https://support.cloudways.com/how-to-download-a-full-backup/ | |
# * Add your machine's SSH key to your server so this script needs no input. | |
# * Backups will be saved inside a new folder with today's date within your nominated backup directory. (This might not be the date the backup was taken.) | |
# * Only tested on Digital Ocean VPS so far. | |
# Configuration |
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
$ curl --help | |
Usage: curl [options...] <url> | |
--abstract-unix-socket <path> Connect via abstract Unix domain socket | |
--alt-svc <file name> Enable alt-svc with this cache file | |
--anyauth Pick any authentication method | |
-a, --append Append to target file when uploading | |
--basic Use HTTP Basic Authentication | |
--cacert <file> CA certificate to verify peer against | |
--capath <dir> CA directory to verify peer against | |
-E, --cert <certificate[:password]> Client certificate file and password |
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
images/* | |
*.csv |
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 | |
# | |
# This script creates a chrooted user, scp enabled, on an Amazon Linux aws instance | |
# | |
# 2017-10-05 | |
# | |
# change username and password here: | |
username="abc" |
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 require_auth() { | |
$AUTH_USER = 'admin'; | |
$AUTH_PASS = 'admin'; | |
header('Cache-Control: no-cache, must-revalidate, max-age=0'); | |
$has_supplied_credentials = !(empty($_SERVER['PHP_AUTH_USER']) && empty($_SERVER['PHP_AUTH_PW'])); | |
$is_not_authenticated = ( | |
!$has_supplied_credentials || | |
$_SERVER['PHP_AUTH_USER'] != $AUTH_USER || | |
$_SERVER['PHP_AUTH_PW'] != $AUTH_PASS |
NewerOlder