I no longer mantain this list. There are lots of other very comprehensive JavaScript link lists out there. Please see those, instead (Google "awesome JavaScript" for a start).
<!-- | |
When an input element gets focused, iOS Safari tries to put it in the center by scrolling (and zooming.) | |
Zooming can be easily disabled using a meta tag, but the scrolling hasn't been quite easy. | |
The main quirk (I think) is that iOS Safari changes viewport when scrolling; i.e., toolbars shrink. | |
Since the viewport _should_ change, it thinks the input _will_ move, so it _should_ scroll, always. | |
Even times when it doesn't need to scroll—the input is fixed, all we need is the keyboard— | |
the window always scrolls _up and down_ resulting in some janky animation. | |
However, iOS Safari doesn't scroll when the input **has opacity of 0 or is completely clipped.** |
// ES6 version using asynchronous iterators, compatible with node v10.0+ | |
const fs = require("fs"); | |
const path = require("path"); | |
async function* walk(dir) { | |
for await (const d of await fs.promises.opendir(dir)) { | |
const entry = path.join(dir, d.name); | |
if (d.isDirectory()) yield* walk(entry); | |
else if (d.isFile()) yield entry; |
Before you start, make sure ip
command is available on your system. In modern Linux distributions, ip
replaces older ifconfig
command. If net-tools
package (that includes ifconfig
) is not installed and you prefer using it, you can install it via sudo apt-get install net-tools
.
Use touch /home/pi/wifi-reconnect.sh
to create a shell script file,
with the following content:
#!/bin/bash
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache | |
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
The MBP is my development machine, so I needed all of my tools installed with the ability to update them with ease. In the past, I used MacPorts to take care of my MySQL, Memcached, and Ruby installions and it worked just fine. This time around however, I wanted something new and fun. Homebrew.
Homebrew is a new package manager for OS X. Unlike Fink or MacPorts, Homebrew integrates with the core operating system, reducing the number of extra libraries to install etc. Another neat feature is the ability to write software package recipes in Ruby, awesome.
Here are some raw installation instructions (clean system). I like to keep everything under user ownership to make life more enjoyable, say no to sudo.
You will need the latest version of xcode, you can get it here. After the installation is complete, you may continue.
sudo mkdir /usr/local
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
#Create a redirect server in Node.js
'use strict'
var http = require('http');
var mappings = {
g: 'http://www.google.com'