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
# coding:utf-8 | |
# Copyright 2011 litl, LLC. All Rights Reserved. | |
import httplib | |
import re | |
import urllib | |
import urlparse | |
from flask import Blueprint, request, Response, url_for | |
from werkzeug.datastructures import Headers |
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
# [PackageDev] target_format: plist, ext: tmLanguage | |
name: AutoIt Script | |
scopeName: source.autoit | |
fileTypes: [au3] | |
uuid: E4862A3B-FBD6-342C-AB07-4EE2567CF68B | |
patterns: | |
- name: keyword.control.autoit | |
match: \b(?i:byref|case|const|continuecase|continueloop|default|dim|do|else|elseif|endfunc|endif|endselect|endswitch|endwith|enum|exit|exitloop|false|for|func|global|if|in|local|next|redim|return|select|step|switch|then|to|true|until|wend|while|with)\b |
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
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
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
/** | |
* Created by andy hulstkamp | |
*/ | |
var webpage = require("webpage"), | |
fs = require("fs"); | |
var debug = false, | |
pageIndex = 0, | |
allLinks = [], |
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
# OSXKVM project's ultimate goal is to upstream to run MacOSX from unadulterated and standard images on KVM. | |
# http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/ | |
# http://kashyapc.com/2014/03/10/notes-for-building-kvm-based-virtualization-components-from-upstream-git/ | |
# http://blog.ostanin.org/2014/02/11/playing-with-mac-os-x-on-kvm/ #ubuntu12.04, http://files.ostanin.org/2014/02/osx-kvm.tar.xz | |
# http://www.vpsee.com/2014/06/install-and-run-os-x-mavericks-with-kvm-under-linux/ #Verified on CentOS 6.5 with 3.x kernel | |
# kernel 3.10.0-* can be patched directly, no need kvm-kmod external module. | |
# http://git.kernel.org/cgit/virt/kvm/kvm.git/commit/?id=100943c54e0947a07d2c0185368fc2fd848f7f28 | |
# https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/?id=refs/tags/v3.10 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<link rel="stylesheet" href="http://c7.se/css/main.css"> | |
<style> | |
body { font-family: 'Helvetica Neue', Sans-serif; } | |
#list { | |
width: 100%; | |
} |
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
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: server | |
spec: | |
containers: | |
- image: resouer/sample:v2 | |
name: war | |
lifecycle: |
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
// import_json_appsscript.js | |
// https://gist.github.com/allenyllee/c764c86ed722417948fc256b7a5077c4 | |
// | |
// Changelog: | |
// (Oct. 16 2019) tag: allenyllee-20191016 | |
// 1. Fixed google script error: urlfetchapp - service invoked too many times https://stackoverflow.com/questions/10598179/google-apps-script-urlfetchapp-service-invoked-too-many-times | |
// (Jul. 16 2018) tag: allenyllee-20180716 | |
// 1. Fixed the issue "If you try to query /arrayA[k]/arrayB[n]/arrayC[m]/.../member, you will always get /arrayA[k]/arrayB[k]/arrayC[k]/.../member." | |
// (Nov. 30 2017) tag: allenyllee-20171130 | |
// 1. Add the ability to query array elements by using xpath like "/array[n]/member" where "n" is array index |
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
<script src="ticker.js"></script> | |
<script> | |
var ticker = new KiteTicker({api_key: "api_key", access_token: "access_token"}); | |
ticker.connect(); | |
ticker.on("ticks", onTicks); | |
ticker.on("connect", subscribe); | |
function onTicks(ticks) { |
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
def calc_allocations(self, date, quantity, cap): | |
"""Figure out ideal allocations for a given date""" | |
# { | |
# coin_name: (percent_allocation, data) | |
# } | |
top_market = self.get_top_market(date, quantity) | |
total_cap = sum([coin.market_cap for coin in top_market]) | |
allocations = [{ |
OlderNewer