Damien, Mundi, Nate:
Here are a few links to bolster our "web as app platform" stance, with {client}
.
[1] WEB VS. NATIVE
"HTML5 Can't Do That"
import Arweave from "arweave"; | |
import { | |
bundleAndSignData, | |
createData, | |
ArweaveSigner, | |
DataItem, | |
} from "arbundles"; | |
import { JWKInterface } from "arweave/node/lib/wallet"; | |
import fs from "fs"; |
#!/bin/bash | |
PLATFORM=iPhoneOS # iPhoneSimulator # iPhoneOS | |
HOST=arm-apple-darwin # i386-apple-darwin10 # arm-apple-darwin10 | |
ARCH=arm64 # i386 # armv7s #armv7 | |
SDK_VERSION=13.0 | |
XCODE_ROOT=`xcode-select -print-path` | |
PLATFORM_PATH=$XCODE_ROOT/Platforms/$PLATFORM.platform/Developer | |
SDK_PATH=$PLATFORM_PATH/SDKs/$PLATFORM$SDK_VERSION.sdk |
require "rubygems" | |
require "twitter" | |
# get these from apps.twitter.com | |
CONSUMER_KEY = "foo" | |
CONSUMER_SECRET = "bar" | |
OAUTH_TOKEN = "blee" | |
OAUTH_TOKEN_SECRET = "baz" | |
TWITTER_USER = "your_username" # needs to be the one associated with keys above |
# Step 1: request and download your twitter archive | |
# Step 2: create a twitter app (on their dev site) so you can fill out the key and secret data | |
# Step 3: run, and prosper | |
require 'twitter' | |
require "json" | |
USERNAME = 'YOURUSERNAME' | |
ARCHIVE_PATH = '/YOUR/DOWNLOADS/FOLDER/data/js/tweets' |
<? | |
// | |
// [ BUY BTC & ETH DAILY ON BITSTAMP ] | |
// by @levelsio | |
// | |
// 2017-08-23 | |
// | |
// 1) buy $40/day BTC | |
// 2) buy $10/day ETH | |
// |
// Creates a new promise that automatically resolves after some timeout: | |
Promise.delay = function (time) { | |
return new Promise((resolve, reject) => { | |
setTimeout(resolve, time) | |
}) | |
} | |
// Throttle this promise to resolve no faster than the specified time: | |
Promise.prototype.takeAtLeast = function (time) { | |
return new Promise((resolve, reject) => { |
Damien, Mundi, Nate:
Here are a few links to bolster our "web as app platform" stance, with {client}
.
[1] WEB VS. NATIVE
"HTML5 Can't Do That"
import { expect } from 'chai'; | |
import jsdom from 'jsdom'; | |
describe('JSDOM', () => { | |
it('should communicate with inner iframes', done => { | |
jsdom.env({ | |
url: "http://bar.com/", | |
done (err, window) { | |
var frame = window.document.createElement('iframe'); | |
window.document.body.appendChild(frame); |
const shuffle = (arr, mixed = [], pool = arr.slice()) => { | |
const remaining = pool.length; | |
if (!remaining) return mixed; | |
const index = Math.floor(Math.random() * remaining); | |
const el = pool.splice(index, 1).pop(); | |
mixed.push(el); | |
return shuffle(arr, mixed, pool); | |
}; |
Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if | |
a form sits there for a while (like a login form, but any the same) the csrf token in the form will | |
expire & throw a strange error. | |
Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner. | |
In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T! | |
Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function. | |
All of your exceptions go through here, unless you have excluded them in the $dontReport array at the |