Right-click your bookmarks bar and choose Add Page (Chrome) or New Bookmarklet (Firefox).
In Name, put this:
Pin It
In URL, put this:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"> | |
<title>Test Page</title> | |
<script> | |
// early compute the vw/vh units more reliably than CSS does itself | |
computeViewportDimensions(); |
let query = MDQueryCreate(kCFAllocatorDefault, "kMDItemContentType = com.apple.application-bundle" as CFString, nil, nil) | |
MDQueryExecute(query, CFOptionFlags(kMDQuerySynchronous.rawValue)) | |
let count = MDQueryGetResultCount(query); | |
for i in 0 ..< count { | |
let rawPtr = MDQueryGetResultAtIndex(query, i) | |
let item = Unmanaged<MDItem>.fromOpaque(rawPtr!).takeUnretainedValue() | |
if let path = MDItemCopyAttribute(item, kMDItemPath) as? String { | |
print(path) | |
} |
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 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Sublime Text 3 stores its packages in .sublime-package zip files, so unlike ST2 you can't just go to the Packages folder and see everything. However, there is an excellent plugin called PackageResourceViewer (available via Package Control) that can, among other things, extract files or whole packages to the Packages directory. | |
Once you've installed the plugin, hit CtrlShiftP to open the command palette, and type prv to get the Package Resource Viewer: options. Select Package Resource Viewer: Open Resource, navigate down the list to LaTeX, then open the section-..-(section).sublime-snippet file. You should now be able to edit this file and save it, which will create a new file Packages/LaTeX/section-..-(section).sublime-snippet that you can open directly via the file menu if you need to alter it again. |
motivation | |
* test xmpp bot behavior with different servers, measure throughput and reliability. | |
* figure out numbers for prosody, nothing seems to be published at the time of writing | |
* the goal was _not_ to push the servers to their limits, so the test environment was not highly optimized. | |
test setup | |
* macbook pro hosting ubuntu raring on vmware fusion. | |
* communication flow: xmpp client (osx) > xmpp server (ubuntu) > xmpp bot (osx). | |
* client opens 20 connections to server and pumps 150 iq stanzas (similar disco#items) to bot. this is being repeated 40x. | |
* servers: |
// Based on Glacier's example: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/examples.html#Amazon_Glacier__Multi-part_Upload | |
var fs = require('fs'); | |
var AWS = require('aws-sdk'); | |
AWS.config.loadFromPath('./aws-config.json'); | |
var s3 = new AWS.S3(); | |
// File | |
var fileName = '5.pdf'; | |
var filePath = './' + fileName; | |
var fileKey = fileName; |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh