This file contains hidden or 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
| http://itch.io/api/1/KEY/my-games/graphs?num_days=30 | |
| `num_games` optional, defaults to 7. | |
| Fetches graph data for the past `num_days`. Days with 0 don't have entries. | |
| { | |
| "purchases":[ | |
| { | |
| "date":"2014-04-08", |
This file contains hidden or 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
| module.exports = function(grunt) { | |
| var pages = grunt.file.readJSON("data/pages.json"); | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON("package.json"), | |
| assemble: { | |
| options: { | |
| layout: "templates/layout.hbs", | |
| dad: "hello world", |
This file contains hidden or 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
| When you buy something the percentage you paid above the minimum is stored with | |
| the purchase. When checking to see if purchase has access to a file with a | |
| separate minimum price the percentage above is applied to the current minimum | |
| price to calculate "effective purchase pirce". | |
| For example, you have a game for 5 dollars, and a bonus file at 10 dollars. | |
| A user buys the game for 10 dollars to get the extra download. |
This file contains hidden or 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
| error_log stderr notice; | |
| daemon off; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include mime.types; | |
| variables_hash_max_size 1024; |
This file contains hidden or 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 _annotate() { | |
| echo "$(tput setaf 4)>>$(tput sgr0) $@" | |
| eval $@ | |
| } | |
| function gup() { | |
| branch=$([[ -n "$1" ]] && echo "$1" || git rev-parse --abbrev-ref HEAD) | |
| dirty=$(git diff --shortstat 2> /dev/null | tail -n1) | |
| _annotate git fetch || return |
This file contains hidden or 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
| name | downloads | |
| -----------------------+----------- | |
| luafilesystem | 8267 | |
| say | 8214 | |
| moonscript | 7993 | |
| ansicolors | 7849 | |
| lua_cliargs | 7753 | |
| dkjson | 7661 | |
| luassert | 7457 | |
| alt-getopt | 7401 |
This file contains hidden or 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
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "os" | |
| "sort" | |
| "strconv" | |
| "strings" | |
| ) |
This file contains hidden or 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 'breeze' | |
| -- declare class | |
| FooHandler = class('FooHandler', ActiveHandler) | |
| -- constructor | |
| function FooHandler:initialize() | |
| -- call base class constructor | |
| ActiveHandler.initialize(self) |
This file contains hidden or 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
| local app = lapis.Application() | |
| package.loaded.app = app | |
| require "app_1" | |
| require "app_2" | |
| return app |
This file contains hidden or 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
| local lapis = require "lapis" | |
| local app = lapis.Application() | |
| app:get("/", function() | |
| local http = require "lapis.nginx.http" | |
| local util = require "lapis.util" | |
| local api = "https://www.googleapis.com/pagespeedonline/v1/runPagespeed?" | |
| local res, status = http.simple(api .. util.encode_query_string { | |
| url = "http://leafo.net", |