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
/* ============================================================= | |
* bootstrap-scrollspy.js v2.0.1 | |
* http://twitter.github.com/bootstrap/javascript.html#scrollspy | |
* ============================================================= | |
* Copyright 2012 Twitter, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* |
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
:log info "NamecheapDDNS: start updating..." | |
:global ddnspass "yourownddnspass" | |
:global theinterface "pppoe-out1" | |
:global ddnshost "subdomain" | |
:global ddnsdomain "example.com" | |
:global ipddns [:resolve "$ddnshost.$ddnsdomain"]; | |
:global ipfresh [ /ip address get [/ip address find interface=$theinterface ] address ] | |
:if ([ :typeof $ipfresh ] = nil ) do={ |
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
from bottle import abort, HTTPResponse | |
def handle(data, event): | |
headers = dict() | |
content = # binary content | |
headers['Content-Type'] = 'image/jpeg' | |
headers['Content-Disposition'] = 'inline' | |
headers['Content-Length'] = len(content) |
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 receiveLoginUser (user) { | |
return {type: 'RECEIVE_LOGIN_USER', payload: user} | |
} | |
function login (email, password) { | |
return (dispatch) => { | |
// 可以呢到再dispatch(loadingLogin(true)) | |
return axios.post("xxxx/login", { email, password }).then(response => { | |
dispatch(receiveLoginUser(response.user)) |
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
Verifying my Blockstack ID is secured with the address 1BWJAGmwniQLu9DpM9X6DM9eEFWpuYRa9e https://explorer.blockstack.org/address/1BWJAGmwniQLu9DpM9X6DM9eEFWpuYRa9e |
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
require "hello2" | |
cocos2d.CCLuaLog("result is " .. myadd(3, 5)) | |
-- create scene & layer | |
layerFarm = cocos2d.CCLayer:node() | |
layerFarm:setIsTouchEnabled(true) | |
layerMenu = cocos2d.CCLayer:node() |
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
/** Sample for use of templates | |
* This sample uses the file TextTemplateWithUserFields.odt from the Samples | |
* folder. The file contains a number of User text fields (Variables - User) | |
* and a bookmark which we use to fill in various values | |
*/ | |
protected void templateExample() throws java.lang.Exception { | |
// create a small hashtable that simulates a rowset | |
Hashtable recipient = new Hashtable(); | |
recipient.put("Company", "Manatee Books"); | |
recipient.put("Contact", "Rod Martin"); |
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
#!/usr/bin/env bash | |
# | |
# This bootstraps Puppet on Ubuntu 12.04 LTS. | |
# | |
set -e | |
# Load up the release information | |
. /etc/lsb-release | |
REPO_DEB_URL="http://apt.puppetlabs.com/puppetlabs-release-${DISTRIB_CODENAME}.deb" |
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 | |
# run bash <(curl -sS https://gist.github.com/marcoleong/5573628/raw) | |
# author: Marco Leong (marcoleong at Github) | |
cd /tmp | |
echo "Downlaoding http://apt.puppetlabs.com/puppetlabs-release-precise.deb..." | |
wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb | |
echo "Installing puppetlabs-release-precise.deb" |
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
set :application, "Music Tube" | |
set :domain, "server.yourserver.com" | |
set :deploy_to, "~/www/serverfolder.yourserver.com" | |
set :app_path, "app" | |
set :repository, "git://github.com/yourname/yourrepo.git" | |
set :scm, :git | |
set :scm_verbose, true | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none` |
NewerOlder