View string1.py
#!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
# Basic string exercises
# Fill in the code for the functions below. main() is already set up
View union.h
typedef union {
float mFloat;
int32_t mInteger;
char* mString;
jobject mObject;
jboolean mBoolean;
jshort mShort;
jlong mLong;
jdouble mDouble;
jbyte mByte;
View List2.py
#!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
# Additional basic list exercises
View enum.c
typedef enum {
StoreType_Float,
StoreType_String,
StoreType_Integer,
StoreType_Object,
StoreType_Boolean,
StoreType_Short,
StoreType_Long,
StoreType_Double,
StoreType_Byte,
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View docker-swarm-ports.md

Docker Swarm Mode Ports

Starting with 1.12, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication
  • UDP port 4789 for "data plane" VXLAN overlay network traffic

AWS Security Group Example

AWS Tip: You should use Security Groups in AWS's "source" field rather then subnets, so SG's will all dynamically update when new nodes are added.

View docker-swarm-ports.md

Docker Swarm Mode Ports

Starting with 1.12, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication
  • UDP port 4789 for "data plane" VXLAN overlay network traffic

AWS Security Group Example

AWS Tip: You should use Security Groups in AWS's "source" field rather then subnets, so SG's will all dynamically update when new nodes are added.

View brlog.trunk-test.20170629-143703
# Logfile created on 2017-06-29 14:37:03 +0900 by logger.rb/54362
I, [2017-06-29T14:37:03.282868 #5222] INFO -- : #<BuildRuby:0x00000000d789f8 @REPOSITORY="https://svn.ruby-lang.org/repos/ruby/trunk", @REPOSITORY_TYPE=:svn, @git_branch=nil, @svn_revision=nil, @TARGET_NAME="trunk-test", @SRC_DIR="/home/ko1/ruby/src", @BUILD_DIR="/home/ko1/ruby/build", @INSTALL_DIR="/home/ko1/ruby/install", @TARGET_SRC_DIR="/home/ko1/ruby/src/trunk-test", @TARGET_BUILD_DIR="/home/ko1/ruby/build/trunk-test", @TARGET_INSTALL_DIR="/home/ko1/ruby/install/trunk-test", @configure_opts=["--enable-shared"], @build_opts="-j12", @test_opts="TESTS='-j12'", @incremental=true, @steps=["checkout", "autoconf", "configure", "build_up", "build_miniruby", "build_ruby", "build_all", "build_install", "test_btest", "test_basic", "test_all", "test_rubyspec"], @quiet=false, @gist=false, @logfile="/home/ko1/ruby/logs/brlog.trunk-test.20170629-143703", @logger=#<Logger:0x00000000cf0c38 @progname=nil, @level=0, @default_formatter=#<Logger::Formatter:0x
View wp_get_the_first_term.php
function get_the_first_term( $post_id , $taxonomy , $property = '' ){
$terms = wp_get_post_terms( $post_id , $taxonomy );
if ( is_wp_error( $terms ) || empty( $terms ) ) return 0;
if ( ! $property ) return $terms[0];
return $terms[0]->$property;
}
View zen.go
package main
import (
"fmt"
"io"
"os/exec"
)
func main() {
cmd := exec.Command("python")