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 | |
ssh -T username@hostorip << EOSSH | |
cd /home/username/; ls -l; | |
wget -c http://example.com/file.tar.gz; | |
tar -zxvf file.tar.gz; | |
exit; | |
EOSSH |
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 | |
find . -type d -iname .git | xargs rm -rf | |
find . -type d -iname .sass-cache | xargs rm -rf | |
find . -type f -iname .gitignore | xargs rm -rf | |
find . -type f -iname .DS_Store | xargs rm -rf | |
find . -type f -iname config.codekit | xargs rm -rf | |
find . -type f -iname screen.css.map | xargs rm -rf | |
find . -type f -iname rtl.css.map | xargs rm -rf | |
find . -type f -iname config.rb | xargs rm -rf | |
find . -type d -iname sass | xargs rm -rf |
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 all type posts | |
* | |
* @return void | |
* @author alispx | |
**/ | |
function alispx_get_type_posts_data( $post_type = 'post' ) { |
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
// based on https://gist.github.com/cosmocatalano/4544576 | |
function scrape_instagram( $username, $slice = 9 ) { | |
$username = strtolower( $username ); | |
if ( false === ( $instagram = get_transient( 'instagram-media-new-'.sanitize_title_with_dashes( $username ) ) ) ) { | |
$remote = wp_remote_get( 'http://instagram.com/'.trim( $username ) ); | |
if ( is_wp_error( $remote ) ) |
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 | |
/** | |
* Template Widget | |
* | |
* This file is used to register and display the Layers - Your widget Name. | |
* | |
* @package Layers | |
* @since Layers 1.0 | |
*/ |
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
// Design Bar | |
$this->design_bar( | |
'side', // CSS Class Name | |
array( | |
'name' => $this->get_field_name( 'design' ), | |
'id' => $this->get_field_id( 'design' ), | |
), // Widget Object | |
$instance, // Widget Values | |
array( | |
'layout', |
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
<? | |
/** | |
* Repeatable Custom Fields in a Metabox | |
* Author: Helen Hou-Sandi | |
* | |
* From a bespoke system, so currently not modular - will fix soon | |
* Note that this particular metadata is saved as one multidimensional array (serialized) | |
*/ | |
function hhs_get_sample_options() { |
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 | |
/* | |
Template Name: Update Network | |
*/ | |
get_header(); | |
if ( is_user_logged_in() ) { |
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
function _remove_script_version( $src ){ | |
$parts = explode( '?', $src ); | |
return $parts[0]; | |
} | |
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); | |
add_filter( 'style_loader_src', '_remove_script_version', 15, 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
<link rel='stylesheet' id='style' href='http://local.wordpress.dev/alispx/wp-content/themes/highwind/style.css?ver=1.0' type='text/css' media='all' /> | |
<script type='text/javascript' src='http://local.wordpress.dev/alispx/wp-includes/js/jquery/jquery.js?ver=1.11.1'></script> |