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
| let pos = [ | |
| [0, 0], | |
| [-35, -12], | |
| [-50, -50], | |
| [-80, -40], | |
| [-50, 50], | |
| [0, -66], | |
| [35, -35], | |
| [68, -50], | |
| [70, -4], |
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
| FROM buildpack-deps:jessie-curl | |
| RUN set -ex; \ | |
| apt-get update && apt-get install --force-yes -y --no-install-recommends \ | |
| git-core \ | |
| build-essential \ | |
| libxml2-dev uuid-dev \ | |
| libssl-dev bash patch make tar xz-utils bzip2 gzip sed cpio python \ | |
| && rm -rf /var/lib/apt/lists/* && \ | |
| # Install version matching latest 32-bit CMake | |
| wget -q --no-check-certificate https://cmake.org/files/v3.6/cmake-3.6.3-Linux-x86_64.tar.gz && \ |
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
| /* jshint esversion: 6*/ | |
| const assert = require('assert'); | |
| const async = require('async'); | |
| const fs = require('fs'); | |
| let request = require('request'); | |
| const FileCookieStore = require('tough-cookie-filestore'); | |
| if (!fs.existsSync('cookies.json')) { fs.writeFileSync('cookies.json', '{}'); } | |
| let j = request.jar(new FileCookieStore('cookies.json')); | |
| request = request.defaults({ jar : j }); |
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
| 'use strict'; | |
| // Does not work on Google's servers, try stdio-async instead | |
| const fs = require('fs'); | |
| let tok = (function () { | |
| let buffer = Buffer.alloc(1); | |
| function getc() { | |
| while (true) { | |
| try { | |
| let bytes_read = fs.readSync(process.stdin.fd, buffer, 0, 1); |
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
| #define dbgprint(...) async_mem_log.print(__VA_ARGS__) | |
| #include "utilUtils.h" | |
| #include "utilRand.h" | |
| #include "utilTime.h" | |
| void asyncThreadPoolTest() | |
| { | |
| static auto one_ms = std::chrono::milliseconds(1); | |
| int threads = 6; | |
| std::vector< std::thread > workers; | |
| int queued_tasks = 0; |
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
| @echo off | |
| @REM You Discord APP ID | |
| SET APP_ID=451234567890123456 | |
| @REM Path to `dispatch` executable - if it's in your global path, just "dispatch" is fine. | |
| SET DISPATCH=bin\dispatch | |
| SETLOCAL ENABLEDELAYEDEXPANSION | |
| pushd |
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
| @echo off | |
| @REM You Discord APP ID | |
| SET APP_ID=451234567890123456 | |
| @REM Path to `dispatch` executable - if it's in your global path, just "dispatch" is fine. | |
| SET DISPATCH=bin\dispatch | |
| SETLOCAL ENABLEDELAYEDEXPANSION | |
| pushd |
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
| #define _CRT_SECURE_NO_WARNINGS 1 | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <assert.h> | |
| #include "discord_game_sdk.h" | |
| #ifdef _WIN32 | |
| #include <Windows.h> | |
| #else | |
| #include <unistd.h> | |
| #include <string.h> |
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
| const fs = require('fs'); | |
| const { GifCodec, BitmapImage } = require('./'); | |
| const Jimp = require('jimp'); | |
| let gif = fs.readFileSync('test/fixtures/rnaples-offsets-public.gif'); | |
| const codec = new GifCodec(); | |
| codec.decodeGif(gif).then((sourceGif) => { | |
| const w = sourceGif.width; | |
| const h = sourceGif.height; |
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
| const { cos, PI, sin } = Math; | |
| let time = 5; // 0-24 | |
| const LAT = 45 * PI / 180; | |
| const AXIAL_TILT = 23.5 * PI / 180; | |
| const SOLAR_ORBIT = PI/2; // 0 - tilted towards the sun = summer solstice, PI = winter solstice | |
| export function update() { | |
| ////////////////////////////////////////////////////////////////////////// |