An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2... | |
# This also works perfectly for all static file content in all projects | |
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config. | |
# Example: | |
# http://example.com - Main Laravel site as usual | |
# http://example.com/about - Main Laravel site about page as usual | |
# http://example.com/robots.txt - Main Laravel site static content as usual | |
# http://example.com/api/v1 - Lumen v1 api default / route | |
# http://example.com/api/v1/ - Lumen v1 api default / route |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
The program below can take one or more plain text files as input. It works with python2 and python3.
Let's say we have two files that may contain email addresses:
foo bar
ok [email protected] sup
[email protected],wyd
hello world!
<?php | |
/** | |
* Create Subdomains | |
* | |
* Note: This script was designed to be called silently by a bash script for project creation. | |
* Add to bash script: php "$HOME/scripts/php/create-subdomains.php" "$new_account_subdomain" | |
* | |
* Requires "jamesryanbell/cloudflare": "^1.11" for the CloudFlare PHP library | |
* Recommends "kint-php/kint": "^3.2" for improved temporary PHP debugging |
<?php | |
/*############################# | |
* Developer: Mohammad Sharaf Ali | |
* Designation: Web Developer | |
* Version: 1.0 | |
*/############################# | |
// SETTINGS | |
ini_set('max_execution_time', 0); |
<?php | |
namespace App\Providers; | |
use GuzzleHttp\Client; | |
use GuzzleHttp\Exception\RequestException; | |
use GuzzleHttp\HandlerStack; | |
use GuzzleHttp\Middleware; | |
use GuzzleHttp\Promise\PromiseInterface; | |
use Illuminate\Contracts\Foundation\Application; |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Symfony\Component\HttpFoundation\ParameterBag; | |
/** | |
* @author https://github.com/Stunext | |
* |
<?php | |
define("SHARED_SECRET", "sup3rs3cr3t!!"); | |
if(!function_exists('hash_equals')) { | |
function hash_equals($str1, $str2) { | |
// Run constant-time comparison for PHP < 5.6 which doesn't support hmac_equals | |
$str1_len = strlen($str1); | |
$str2_len = strlen($str2); |
Change method boot
use Carbon\Carbon;