Skip to content

Instantly share code, notes, and snippets.

View ucheng's full-sized avatar
💭
😄

Yu-Cheng Wang ucheng

💭
😄
View GitHub Profile
@ucheng
ucheng / add-custom-post-type-menu.php
Created March 15, 2016 14:10 — forked from tommcfarlin/add-custom-post-type-menu.php
[WordPress] Add a custom post type menu as a child of an existing custom post type menu.
<?php
// Define the 'Portfolio' post type. This is used to represent galleries
// of photos. This will be our top-level custom post type menu
$args = array(
'labels' => array(
'all_items' => 'Gallery',
'menu_name' => 'Portfolio',
'singular_name' => 'Gallery',
'edit_item' => 'Edit Gallery',
<?
public function rsa_verify_sign($key, $signature, $package) {
$rsa = new Crypt_RSA();
$rsa->setHash("sha256");
$rsa->setSignatureMode(CRYPT_RSA_SIGNATURE_PKCS1);
$rsa->loadKey($key);
$verify = $rsa->verify(base64_decode($package), $signature);
return $verify;
}
?>
<?php
[select member-1-state "Alabama" "Alaska" "Arizona" "Arkansas" "California" "Colorado" "Connecticut" "Delaware" "Florida" "Georgia" "Hawaii" "Idaho" "Illinois" "Indiana" "Iowa" "Kansas" "Kentucky" "Louisiana" "Maine" "Maryland" "Massachusetts" "Michigan" "Minnesota" "Mississippi" "Missouri" "Montana" "Nebraska" "Nevada" "New Hampshire" "New Jersey" "New Mexico" "New York" "North Carolina" "North Dakota" "Ohio" "Oklahoma" "Oregon" "Pennsylvania" "Rhode Island" "South Carolina" "South Dakota" "Tennessee" "Texas" "Utah" "Vermont" "Virginia" "Washington" "West Virginia" "Wisconsin" "Wyoming" "--" "District of Columbia" "Puerto Rico" "Guam" "American Samoa" "U.S. Virgin Islands" "Northern Mariana Islands"]
require 'bundler/capistrano'
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
set :user, "<<your webfaction user>>"
set :domain, "#{user}@<<your domain>>"
set :application, "<<your application>>"
set :repository, "<< your ssh repository link >>"
set :deploy_to, "/home/#{user}/webapps/#{application}"