Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
extension CGFloat { | |
func radians() -> CGFloat { | |
let b = CGFloat(M_PI) * (self/180) | |
return b | |
} | |
} | |
extension UIBezierPath { | |
convenience init(circumscribedCircleRect rect:CGRect) { |
extension CGFloat { | |
func radians() -> CGFloat { | |
let b = CGFloat(M_PI) * (self/180) | |
return b | |
} | |
} | |
extension UIBezierPath { | |
convenience init(circleSegmentCenter center:CGPoint, radius:CGFloat, startAngle:CGFloat, endAngle:CGFloat) | |
{ |
#!/usr/bin/env node | |
// run with: node sequencehunt_server.js | |
// info page: http://localhost:8080/info | |
// correct values: http://localhost:8080/check?val0=4&val1=12&val2=77&val3=98&val4=35 | |
var http = require('http'); | |
var url = require('url'); | |
var TimingAttackProtectionSeconds = 3; |
# Create a container from the mongo image, | |
# run is as a daemon (-d), expose the port 27017 (-p), | |
# set it to auto start (--restart) | |
# and with mongo authentication (--auth) | |
# Image used is https://hub.docker.com/_/mongo/ | |
docker pull mongo | |
docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth | |
# Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception) | |
# add a root user |
Learn how you can create your own Twitter bot using Node.js and the new Twitter API. The bot will auto retweet in response to tweets with some particular hashtags. (https://goo.gl/4whEIt)
Here are the tools we’ll be using to create the bot —
#!/usr/bin/env bash | |
# Create a page in the current dir | |
echo "My Test Page" > test.html | |
# Start server | |
python -m SimpleHTTPServer 8000 &> /dev/null & | |
pid=$! | |
# Give server time to start up |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)