I hereby claim:
- I am PHLAK on github.
- I am ChrisKankiewicz (https://keybase.io/ChrisKankiewicz) on keybase.
- I have a public key whose fingerprint is 7C25 1D83 939B 1898 6DD6 7F0A E008 E594 373D 7E9D
To claim this, I am signing this object:
{ | |
"variables": { | |
"ssh_user": "root", | |
"ssh_pass": "T@c0_Bu3n0" | |
}, | |
"builders": [ | |
{ |
#!/usr/bin/env bash | |
## Require root privileges | |
if [[ "$(whoami)" != "root" ]]; then | |
echo "ERROR: You must be root to run this script" | |
exit 1 | |
fi | |
## Install python-pip if missing | |
if [[ ! $(dpkg -l python-pip) ]]; then |
import os | |
import time | |
path = "U:\\Downloads" | |
now = int(time.time()) | |
dirList = os.listdir(path) | |
for fileName in dirList: | |
filePath = path + "\\" + fileName |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
## Script start time | |
START=$(date +%s) | |
## Total run time | |
DURRATION=$((60 * 60 * 24)) | |
## Total running time | |
UPTIME=$(($(date +%s) - $START)) |
#!/bin/bash | |
## Set the url | |
if [[ "$1" == "google" ]]; then | |
URL="ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js" | |
elif [[ "$1" == "jquery" ]]; then | |
URL="code.jquery.com/jquery-2.0.3.min.js" |
server { | |
root /var/www/example; | |
server_name example.com www.example.com; | |
location / { | |
index index.php index.html index.htm; | |
try_files $uri $uri/ /index.php; | |
} |
<?php | |
function doSomeShit($foo, $bar, $baz) { | |
// Do some shit... | |
} | |
$function = new ReflectionFunction('doSomeShit'); | |
foreach ($function->getParameters() as $parameter) { |
<?php | |
// Read file contents to string | |
$doc = file_get_contents('secret-doc.txt'); | |
// Run the regex on the string | |
preg_match_all('/\(?[0-9]{3}\)?[- ]?[0-9]{3}[-\ ]?[0-9]{4}/', $doc, $matches); | |
// Print out an array of matches | |
print_r($matches); die(); |
<?php | |
/** | |
* Example PHP singleton class for reference. | |
* For the record, singletons are evil: | |
* http://stackoverflow.com/a/138012/27025 | |
*/ | |
class Singleton { | |
/** |