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
| { | |
| "AWSEBDockerrunVersion": "1", | |
| "Image": { | |
| "Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>", | |
| "Update": "true" | |
| }, | |
| "Ports": [ | |
| { | |
| "ContainerPort": "443" | |
| } |
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
| import requests | |
| import time | |
| import pprint | |
| import hashlib | |
| # import rijndael | |
| from Crypto.Cipher import AES | |
| DEFAULT_OPTIONS = { | |
| 'blob_enc_key': 'M02cnQ51Ji97vwT4', | |
| 'debug': False, |
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
| import { Mastodon } from 'megalodon' | |
| import _ from 'lodash'; | |
| const client = new Mastodon('https://blumpus.com', 'YOUR_ACCESS_TOKEN'); | |
| const clients = {}; | |
| const main = async () => { | |
| const res = await client.getHomeTimeline(); | |
| const urls = res.data.map((r) => r.url).filter(Boolean).map((url) => { |
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
| # frozen_string_literal: true | |
| source "https://rubygems.org" | |
| git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } | |
| # gem "rails" | |
| gem 'sinatra' | |
| gem 'sinatra-contrib' |
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
| /** | |
| * | |
| * YOUR GITHUB PERSONAL ACCESS TOKEN GOES BELOW! | |
| * | |
| * To create a token, follow these instructions: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line | |
| * For Step 7, only select the "read:user" scope. | |
| */ | |
| var PERSONAL_ACCESS_TOKEN = 'yourtokengoeshere'; | |
| var getDateRange = function(days) { |
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
| class Q | |
| constructor: (@bound) -> | |
| @offset = 0 | |
| @length = 0 | |
| @data = [] | |
| enqueue: (value) -> | |
| return undefined if @length == @bound | |
| @data.push value | |
| ++@length | |
| dequeue: -> |
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
| import 'dart:html'; | |
| void main() { | |
| window.onMessage.listen((message) { print('1'); }); | |
| window.onMessage.listen((message) { print('2'); }); | |
| window.onMessage.listen((message) { print('3'); }); | |
| window.onMessage.listen((message) { print('4'); }); | |
| window.postMessage({'a': 'b'}, '*'); | |
| } |
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
| void main() async { | |
| final t1 = () => Future.delayed(Duration(seconds: 1), () => true); // should short circuit | |
| final t2 = () => Future.delayed(Duration(seconds: 3), () => true); | |
| final t3 = () => Future.delayed(Duration(seconds: 2), () => false); | |
| final timers = [t1, t2, t3]; | |
| bool isDirty = false; | |
| print('Running'); | |
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
| void main() async { | |
| final t1 = () => Future.delayed(Duration(seconds: 1), () => print('1')); | |
| final t2 = () => Future.delayed(Duration(seconds: 3), () => print('3')); | |
| final t3 = () => Future.delayed(Duration(seconds: 2), () => print('2')); | |
| final timers = [t1, t2, t3]; | |
| print('Running'); | |
| Stopwatch stopwatch = new Stopwatch()..start(); |
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
| void main() async { | |
| final t1 = () => Future.delayed(Duration(seconds: 1), () => print('1')); | |
| final t2 = () => Future.delayed(Duration(seconds: 3), () => print('3')); | |
| final t3 = () => Future.delayed(Duration(seconds: 2), () => print('2')); | |
| final timers = [t1, t2, t3]; | |
| print('Running'); | |
| Stopwatch stopwatch = new Stopwatch()..start(); |
NewerOlder