git config --global http.postBuffer 524288000
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
| <div class="layout-options third-setting"> | |
| <h4>3. Select Border Type</h4> | |
| <div id="gallery-wrapped" data-border-style="gallery-wrapped" class="layouts-select col-xs-12 col-sm-2 col-md-2 gallery-wrapped"> | |
| <img src="<?php echo get_stylesheet_directory_uri() .'/assets/img/mirror-img.jpg'; ?>" alt="<?php echo get_bloginfo( 'name') ; ?>"> | |
| <h4>Gallery Wrapped</h4> | |
| </div> | |
| <div id="mirror-wrapped" data-border-style="mirror-wrapped" class="layouts-select col-xs-12 col-sm-2 col-md-2 mirror-wrapped"> | |
| <img src="<?php echo get_stylesheet_directory_uri() .'/assets/img/wrap-img.jpg'; ?>" alt="<?php echo get_bloginfo( 'name') ; ?>"> | |
| <h4>Mirror Wrapped</h4> | |
| </div> |
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
| document.getElementById('chooseFiles').addEventListener("change", function (e) { | |
| var file = e.target.files[0]; | |
| var reader = new FileReader(); | |
| //alert(reader); | |
| reader.onload = function (f) { | |
| $("html, body").animate({ | |
| scrollTop: 0 | |
| }, 900); |
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 | |
| /** | |
| * The Header for our theme. | |
| * | |
| * Displays all of the <head> section and everything up till <div id="main"> | |
| * | |
| * @package WordPress | |
| * @subpackage Twenty_Twelve | |
| * @since Twenty Twelve 1.0 | |
| */ |
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 | |
| /** | |
| * The Template for displaying all single posts. | |
| * | |
| * @package WordPress | |
| * @subpackage Twenty_Twelve | |
| * @since Twenty Twelve 1.0 | |
| */ | |
| get_header(); ?> | |
| <div id="primary" class="site-content"> |
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
| <? | |
| extension_check(array( | |
| 'curl', | |
| 'dom', | |
| 'gd', | |
| 'hash', | |
| 'iconv', | |
| 'mcrypt', | |
| 'pcre', | |
| 'pdo', |
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 | |
| ## Function to set file permissions to 0644 and folder permissions to 0755 | |
| function AllDirChmod( $dir = "./", $dirModes = 0755, $fileModes = 0644 ){ | |
| $d = new RecursiveDirectoryIterator( $dir ); | |
| foreach( new RecursiveIteratorIterator( $d, 1 ) as $path ){ | |
| if( $path->isDir() ) chmod( $path, $dirModes ); | |
| else if( is_file( $path ) ) chmod( $path, $fileModes ); | |
| } |
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 | |
| abstract class WPAS_Model { | |
| static $primary_key = 'id'; | |
| private static function _table() { | |
| global $wpdb; | |
| $tablename = strtolower( get_called_class() ); | |
| $tablename = str_replace( 'wpas_model_', 'wpas_', $tablename ); | |
| return $wpdb->prefix . $tablename; | |
| } | |
| private static function _fetch_sql( $value ) { |
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/