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 | |
/** | |
* Find all the `$variables` in a given PHP file | |
* @var string $path to a php file | |
* @return string[] list of variable (not including the "$") | |
*/ | |
function dk_get_vars_in_file($path) { | |
$php_code = file_get_contents($path); | |
$known_tokens = []; | |
foreach(token_get_all($php_code) as $token) { |
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 | |
/** | |
* Converts a string like "The �me is:" to "The time is:" | |
* | |
* @param string $input Your string that might have UTF-8 characters that are html encoded. | |
* @return string A cleaned string | |
*/ | |
function utf_hex_html_entities_decode($input) | |
{ |
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
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: 'AWS::Serverless-2016-10-31' | |
Resources: | |
# Build the API Gateway and setup an API Key | |
ApiGatewayEndpoint: | |
Type: 'AWS::Serverless::Api' | |
Properties: | |
StageName: Prod | |
Auth: |
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
/9j/4QBERXhpZgAATU0AKgAAAAgAAgE7AAIAAAAQAAAAJodpAAQAAAABAAAANgAAAABEYXZpZCBLcnl6YW5pYWsAAAAAAAAA/+0AllBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAB5HAFaAAMbJUccAQAAAgAEHAIAAAIABBwC5gBDaHR0cHM6Ly9mbGlja3IuY29tL2UvZ0FwWDFRdW1sMnk5S09neXlZamJuaDFIVGwwbmdadWpCNzdWMVJnV2ZLQSUzRBwCUAAPRGF2aWQgS3J5emFuaWFrHAIAAAIABAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWFlaIAAAAAAAAPNRAAEAAAABFsxYWVogAAAAAAAA |
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
sudo apt-get update | |
sudo apt-get install -y apt-transport-https ca-certificates | |
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list | |
sudo apt-get update | |
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual | |
sudo apt-get install -y docker-engine | |
sudo service docker start | |
sudo docker pull php:5.6-apache |
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
/* Chrome requires that @import's start at the beginning of a style block. This hack ensures the font loads */ | |
</style><style>@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css); | |
/* switch the font from gntsocial to fontawesome */ | |
.getnoticed-sharebar-modern .sharebar a:before { font-family: "FontAwesome" } | |
.getnoticed-sharebar-modern .sharebar a.share-buffer:before { content: "\f2ae"; } | |
.getnoticed-sharebar-modern .sharebar a.share-email:before { content: "\f0e0"; } | |
.getnoticed-sharebar-modern .sharebar a.share-facebook:before { content: "\f09a"; } | |
.getnoticed-sharebar-modern .sharebar a.share-googleplus:before { content: "\f0d5"; } |
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
chrome --kiosk https://www.youtube.com/embed/kfVsfOSbJY0?rel=0&autoplay=1 |
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
find . -mindepth 1 -type f -exec chmod 644 {} \; | |
find . -mindepth 1 -type f -name "*.php" -exec chmod 600 {} \; | |
find . -mindepth 1 -type d -exec chmod 755 {} \; |
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 | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
$ua = $_SERVER['HTTP_USER_AGENT']; | |
//User agent must be set to "**MY-SECRET-USER-AGENT**" and the ?secret must be "key" | |
if("**MY-SECRET-USER-AGENT**" == $ua && isset($_GET['secret']) && "key" == $_GET['secret']){ |
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
Davids-MacBook-Pro:~ davidkryzaniak$ ssh [email protected] | |
[email protected]'s password: | |
Tomato v1.28.0000 MIPSR2-108 K26 IPv6-VPN | |
root@unknown:/tmp/home/root# vi amazon-dash-watcher.sh |
NewerOlder