As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.
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
#!/usr/bin/env python3 | |
import email | |
import smtplib | |
import sys | |
smtp_address = "smtp.gmail.com" | |
smtp_port = 587 | |
smtp_user_name = "YOUR_EMAIL@gmail.com" | |
smtp_password = "YOUR_APP_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
<script type="text/javascript"> | |
(function($) { | |
$("body").load(function() { | |
setTimeout(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | |
}, 1); | |
}); | |
})(jQuery); |
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 | |
//get raw POST data so we can extract the email address | |
$data = file_get_contents("php://input"); | |
preg_match("/\<EMailAddress\>(.*?)\<\/EMailAddress\>/", $data, $matches); | |
//set Content-Type | |
header("Content-Type: application/xml"); | |
echo '<?xml version="1.0" encoding="utf-8" ?>'; ?> | |
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006"> |
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 | |
//get query data so we can extract the email address | |
$email = $_REQUEST['emailaddress']; | |
$domain = explode('@', $_REQUEST['emailaddress'])[1]; | |
//set Content-Type | |
header("Content-Type: application/xml"); | |
echo '<?xml version="1.0" encoding="utf-8" ?>'; ?> | |
<clientConfig version="1.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
for i in `curl https://www.cloudflare.com/ips-v4`; do csf -a $i; done |
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 | |
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2014 Rob Dunham | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights |
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 | |
/** | |
* Session Helper Class | |
* | |
* A simple session wrapper class. | |
* | |
* Recommended for use with PHP 5.4.0 or higher. (Not required.) | |
* | |
* Usage Example: |
NewerOlder