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
/** | |
* IMPORTANT NOTE: | |
* When you try to run 301/302 redirects using Workers, the preview | |
* browser on the right of this script will throw an error. Disregard it! | |
* | |
* The script will function properly. The reason the preview browser runs | |
* into this problem is that it's actually trying to redirect you, but | |
* the Cloudflare dashboard is ensuring that you stay on the page to finish | |
* your code | |
* |
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 gulp from 'gulp'; | |
import sourcemaps from 'gulp-sourcemaps'; | |
import buffer from 'gulp-buffer'; | |
import uglify from 'gulp-uglify'; | |
import tap from 'gulp-tap'; | |
import browserify from 'browserify'; | |
import babel from 'babelify'; | |
gulp.task('build', () => { |
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 create_and_charge_customer(): | |
token = request.form['token'] | |
email = request.form['email'] | |
amount_in_cents = int(10000) | |
try: | |
charge = stripe.Charge.create( | |
amount=amount_in_cents, |
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
namespace MyNamespace { | |
public class MyRequest { | |
private async Task<bool> Request () { | |
// Replace MY_TOKEN with a test token object id | |
string url = "https://api.stripe.com/v1/charges?amount=1000¤cy=usd&source=MY_TOKEN&description=Test%20charge%20to%20text%40example.com"; | |
// Replace MY_SECRET_KEY with test secret key (e.g. sk_test_...) | |
HttpWebRequest request = (HttpWebRequest)WebRequest.Create (new Uri(url)); |
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
var layout = '<div class="game-title" style="position:fixed;left:0;right:0;top:100px;text-align:center"><h1>Frogger</h1><h3>Click a character to get started.</h3></div><div class="player-selection"> <img class="player" src="https://shagamemnon.github.io/frogger/images/char-boy.png" id="hero" alt="char-boy"><img class="player" src="https://shagamemnon.github.io/frogger/images/char-princess-girl.png" alt="char-princess-girl"> <img class="player" src="https://shagamemnon.github.io/frogger/images/char-pink-girl.png" alt="char-pink-girl"> </div><img id="enemy" src="https://shagamemnon.github.io/frogger/images/enemy-bug.png" style="display:none" alt="enemy"> <canvas id="canvas" class="game-canvas" style="margin-top:5px"></canvas> <div id="scoreboard" class="game-scoreboard"> <div class="row"><span>Level</span> <br><span id="level" tabindex="1">1</span> </div><div class="row"><span>Score</span> <br><span id="counter" class="game-score" tabindex="0">0</span> </div></div><div class="pause pause-button"></div><div clas |
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
cd ~/.atom/packages && apm install chester-atom-syntax atom-beautify atom-transpose prettier-atom case-keep-replace change-case copy-path duplicate-line-or-selection editorconfig tab-foldername-index sync-settings atom-wrap-in-tag atom-ternjs autoclose-html autocomplete-modules docblockr emmet emmet-jsx-css-modules es6-javascript react-es7-snippets js-hyperclick hyperclick linter-eslint lodash-snippets language-babel atom-jest-snippets |
NewerOlder