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
| @font-face { | |
| font-family: "Source Code Pro"; | |
| font-style: normal; | |
| font-weight: normal; | |
| src: url(https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/SourceCodePro/SauceCodeProNerdFont-Regular.ttf?raw=true); | |
| } | |
| @font-face { | |
| font-family: "Source Code Pro"; | |
| font-weight: bold; | |
| src: url(https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/SourceCodePro/SauceCodeProNerdFontMono-Bold.ttf?raw=true); |
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
| #!/bin/bash -e | |
| if [[ $# -lt 1 ]]; then | |
| echo "USAGE:" | |
| echo " $0 COMMIT [INVALIDATE default true]" | |
| exit 1; | |
| fi | |
| COMMIT=$1 | |
| BALENARC_BALENA_URL=${BALENARC_BALENA_URL:-"balena-cloud.com"} |
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 balenalib/amd64-debian:buster | |
| RUN apt-get update && apt-get install -y stress | |
| CMD /usr/bin/stress -c 4 -t 120 |
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 ponger = Machine({ | |
| id: 'ponger', | |
| initial: 'ready', | |
| context: { | |
| pongs: 0, | |
| }, | |
| states: { | |
| ready: { | |
| on: { | |
| PING: { |
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 pong = Machine({ | |
| id: 'pong', | |
| initial: 'started', | |
| states: { | |
| started: { | |
| on: { | |
| ping: { actions: sendParent('pong', { delay: 1000}) }, | |
| }, | |
| }, | |
| }, |
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 that returns a promise | |
| // This promise might resolve with, e.g., | |
| // { name: 'David', location: 'Florida' } | |
| const doApiAction = deviceId => | |
| fetch(`url/to/device/${deviceId}`).then(response => response.json()); | |
| const machine = Machine({ | |
| id: 'device', | |
| initial: 'current', | |
| context: { |
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 flask import Flask | |
| MAX_CONTENT_LENGTH = 16 * 1024 * 1024 | |
| app = Flask(__name__) | |
| app.config['MAX_CONTENT_LENGTH'] = MAX_CONTENT_LENGTH | |
| class WSGITransferEncodingChunked: | |
| """Support HTTP Transfer-Encoding: chunked transfers""" | |
| def __init__(self, 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
| import bottle | |
| from bottle import Bottle, static_file | |
| app = Bottle() | |
| @app.route('') | |
| @app.route('/') | |
| def index(): | |
| return static_file('index.html', root='web') |
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
| sed -e '/^\s*\(file\|url\)\s*=\s*.*$/d' -e 's/\([^\\]\)\&/\1\\\&/g' |
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
| <snippet> | |
| <content><![CDATA[ | |
| % Don't forget to include sig-alternate.cls | |
| \documentclass{sig-alternate} | |
| \pdfpagewidth=8.5truein | |
| \pdfpageheight=11truein | |
| % AMS Packages | |
| \usepackage{amsmath} | |
| \usepackage{amsfonts} |
NewerOlder