This file contains hidden or 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
| $("form").on('submit', function(e) { | |
| if (_gaq) | |
| _gaq.push(['_trackEvent', 'my category', 'my action']); | |
| return true; | |
| }); |
This file contains hidden or 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
| $("form").on('submit', function(e) { | |
| var form = this; | |
| if (_gaq) { | |
| e.preventDefault(); | |
| _gaq.push(['_trackEvent', 'my category', 'my action']); | |
| setTimeout(function() { form.submit(); }, 100); | |
| return false; | |
| } |
This file contains hidden or 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 bash | |
| sudo rm -rf ~/chef | |
| mkdir ~/chef | |
| cd ~/chef | |
| chef_binary=/usr/local/bin/chef-solo | |
| # Are we on a vanilla system? | |
| if ! test -f "$chef_binary"; then | |
| export DEBIAN_FRONTEND=noninteractive | |
| # Upgrade headlessly (this is only safe-ish on vanilla systems) |
This file contains hidden or 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
| var href = "http://www.domain.com"; | |
| ga('send', 'event', { | |
| 'eventCategory' : 'myCategory', | |
| 'eventAction' : 'myAction', | |
| 'eventLabel' : 'myLabel', | |
| 'eventValue' : 'myValue', | |
| 'hitCallback' : function () { | |
| document.location = href; | |
| } |
This file contains hidden or 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
| Can you please answer the following questions so we can assess the project, | |
| and judge if we would be a good match? | |
| 1. Is this a new project, or is this for an existing website or application? | |
| - This is a project for a completely new site or application | |
| - This is a project to update an existing site or application | |
| 2. Which of the following areas do you need help with? |
This file contains hidden or 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
| Hi Bob, | |
| Just wanted to inform you that we have not yet received payment of | |
| invoice ####-##. | |
| I'm sure you must have mistakenly overlooked this. I've included | |
| a copy of the invoice for your convenience. | |
| If payment has already been sent, please disregard this email. Do | |
| not hesitate to contact me if you have any questions. |
This file contains hidden or 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 | |
| $root = $_SERVER['DOCUMENT_ROOT']; | |
| chdir($root); | |
| $path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/'); | |
| set_include_path(get_include_path().':'.__DIR__); | |
| if(file_exists($root.$path)) | |
| { | |
| if(is_dir($root.$path) && substr($path,strlen($path) - 1, 1) !== '/') | |
| $path = rtrim($path,'/').'/index.php'; | |
| if(strpos($path,'.php') === false) return false; |
This file contains hidden or 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 | |
| # simple cron script to check disk space and send notifications | |
| #cd $(dirname $0) && pwd | |
| if [ "$(cd $(dirname $0) && pwd)" != "/etc/cron.hourly" ]; then | |
| echo "Warning: script should be located in /etc/cron.hourly for periodic checks" | |
| fi | |
| CONFIG_FILE=/etc/check-disk-space.conf |
This file contains hidden or 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 | |
| # parse error logs on your server and send you daily updates to email | |
| # configure options | |
| EMAIL=<...> | |
| WORKDIR="/root" | |
| TAIL=5 # number of entries to send | |
| IGNORE="/backup" # path to ignore | |
| LOG_FILENAME = "error.log" |
This file contains hidden or 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 | |
| // php -S localhost:3000 router.php | |
| $root = $_SERVER['DOCUMENT_ROOT']; | |
| chdir($root); | |
| $path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/'); | |
| set_include_path(get_include_path().':'.__DIR__); | |
| if(file_exists($root.$path)) | |
| { | |
| if(is_dir($root.$path) && substr($path,strlen($path) - 1, 1) !== '/') |