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 | |
| // jQuery version of https://gist.github.com/3110728 | |
| /* | |
| -- the SQL database table | |
| create table form_ajax ( | |
| ID varchar(5) not null, | |
| Name varchar(100), | |
| Address varchar(100), |
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
| # LESS compiler | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} ^(.*)\.css | |
| RewriteCond %1.less -f | |
| RewriteRule ^(.*)\.css lessphp/less.php?f=$1.less |
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
| <h1>Alert</h1> | |
| <p>Bootstrap JS</p> | |
| <div class="alert fade in"> | |
| <button type="button" class="close" data-dismiss="alert">×</button> | |
| <strong>Holy guacamole!</strong> Best check yo self, you're not looking too good. | |
| </div> | |
| <p></p><a ng-click="alert=true">Open Alert (AngularJS)</a></p> | |
| <div class="alert fade" ng-class="{in:alert}"> | |
| <button type="button" class="close" ng-click="alert=false">×</button> |
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
| /** | |
| * This casper scipt checks for 404 internal links for a given root url. | |
| * | |
| * Usage: | |
| * | |
| * $ casperjs 404checker.js http://mysite.tld/ | |
| * $ casperjs 404checker.js http://mysite.tld/ --max-depth=42 | |
| */ | |
| /*global URI*/ |
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 | |
| /* | |
| Plugin Name: Plugin Boilerplate | |
| Version: 0.1-alpha | |
| Description: This is how I like to make sense of the WordPress plugin architecture | |
| Author: Adam Davis | |
| Author URI: http://admataz.com | |
| Plugin URI: http://admataz.com | |
| Text Domain: admataz-plugin-boilerplate | |
| Domain Path: /languages |
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
| (function() { | |
| var script, | |
| scripts = document.getElementsByTagName('script')[0]; | |
| function load(url) { | |
| script = document.createElement('script'); | |
| script.async = true; | |
| script.src = url; | |
| scripts.parentNode.insertBefore(script, scripts); |
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 | |
| # Script will output dumps for all databases using seperate files | |
| # Derived from this post: http://www.cyberciti.biz/faq/ubuntu-linux-mysql-nas-ftp-backup-script/ | |
| USER="root" | |
| PASSWORD="SnM1073k" | |
| HOST="localhost" | |
| MYSQL="$(which mysql)" | |
| MYSQLDUMP="$(which mysqldump)" | |
| OUTPUT_DIR="/backups/files" |
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
| #### Example SSH config file | |
| # Host = a list of domains, IPs and personalized aliases that use this config | |
| # entry. These alias names follow "Host" and are space delimited. | |
| # e.g. Host 192.168.1.1 example.com example1 myalias1 | |
| # Hostname = the IP or real hostname | |
| # e.g. Hostname 192.168.1.1 | |
| # User = the username | |
| # e.g. User jdoe | |
| # Port = if this is a non standard port, i.e. not 22 |
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
| /** | |
| Uploading files | |
| Taken from: http://mikejolley.com/2012/12/using-the-new-wordpress-3-5-media-uploader-in-plugins/ | |
| INSTRUCTIONS: | |
| In the page you wish to use this script you'll need to enque the media scripts and this script. | |
| Then create a input box and a button with NOTHING in between.. with the class 'upload_image_button' | |
| <?php | |
| wp_enqueue_media(); |
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
| controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) { | |
| $scope.$on('authLoaded', function() { | |
| $scope.isExpert($scope.main.serieId); | |
| $scope.isMember($scope.main.serieId); | |
| }); | |
| $scope.loadAuth = function() { | |
| Auth.load().success(function(data) { | |
| $scope.main.user = data.user; | |
| $scope.$broadcast("authLoaded"); |