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
# {{PROJECTNAME}} is name of project with standard machine naming conventions (ie. no spaces or uppercase) | |
> composer create-project --no-interaction acquia/blt-project {{PROJECTNAME}} | |
> cd {{PROJECTNAME}} | |
> composer run-script blt-alias | |
> source ~/.bash_profile | |
> composer require acquia/headless_lightning:~1.1.0 | |
# Edit blt/project.yml and change the project:profile:name key to 'headless_lightning' | |
> blt vm | |
# You may need to update the 'php_version' to match your local environment in box/config.yml | |
> blt setup |
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
var webviewProvider = (function() { | |
if (/\/FBIOS/i.test(navigator.userAgent) === true) { | |
return 'facebook'; | |
} | |
if (/Twitter for/i.test(navigator.userAgent) === true) { | |
return 'twitter'; | |
} | |
if (/Pinterest\//.test(navigator.userAgent) === true) { | |
return 'pinterest'; | |
} |
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 | |
/** | |
* ABN and ACN Validator Class | |
* @author Paul Ferrett, 2009 (http://www.paulferrett.com) | |
*/ | |
class AbnValidator { | |
/** | |
* Return true if $number is a valid ABN |
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
#!/bin/bash | |
# | |
# Carries out a full mysqldump, calls percona-xtrabackup and then | |
# copies the sql dump, the percona backup and your mysql bin logs | |
# to S3 using s3cmd http://s3tools.org/s3cmd | |
# | |
# TODO: extract out the S3 backup stuff to make it optional, and so | |
# other s3 programs can replace the s3cmd call. | |
# TODO: the if [ $? == 0 ] alert blocks should be a function | |
# TODO: make the if [ $? == 0 ] if [ $? != 0 ] more consistent - test |
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
after "deploy", "deploy:cleanup" | |
after "deploy:update_code", "composer:install" | |
before "composer:install", "composer:copy_vendors" | |
after "composer:install", "phpunit:run_tests" | |
namespace :composer do | |
desc "Copy vendors from previous release" | |
task :copy_vendors, :except => { :no_release => true } do | |
run "if [ -d #{previous_release}/vendor ]; then cp -a #{previous_release}/vendor #{latest_release}/vendor; fi" | |
end |
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
Using the nc command you can scan a port or a range of ports to verify whether a UDP port is open and able to receive traffic. | |
This first command will scan all of the UDP ports from 1 to 65535 and add the results to a text file: | |
$ nc -vnzu server.ip.address.here 1-65535 > udp-scan-results.txt | |
This merely tells you that the UDP ports are open and receive traffic. | |
Perhaps a more revealing test would be to actually transfer a file using UDP. |
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
# TextMate dotfiles filter | |
# use this filter in Preferences -> Advanced -> Folder References -> File Pattern | |
# to show .gitignore, .gems (useful for Heroku), .bundle in your project | |
!(/\.(?!(htaccess|gitignore|gems|bundle))[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$ |
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
# Guide | |
# Configure the essential configurations below and do the following: | |
# | |
# Repository Creation: | |
# cap deploy:repository:create | |
# git add . | |
# git commit -am "initial commit" | |
# git push origin master | |
# | |
# Initial Deployment: |