A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
var elastic = require('elasticsearch'); | |
var client = new elastic.Client({ host: 'localhost:9200' }); | |
var index = 'myindex'; | |
var type = 'document'; | |
(function init() { | |
Promise.resolve() | |
.then(deleteIndex, handleError) |
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
function CONST (obj, key, value){ | |
Object.defineProperty(obj, key, { | |
enumerable: false, | |
configurable: false, | |
writable: false, | |
value: value | |
}); | |
} |
# Create your superuser | |
$ mongo | |
> use admin | |
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]}) | |
> exit | |
# Alias for convenience (optional and at your own risk) | |
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile | |
$ source ~/.bash_profile |
ALL | |
All messages in the mailbox; the default initial key for | |
ANDing. | |
ANSWERED | |
Messages with the \Answered flag set. | |
BCC | |
Messages that contain the specified string in the envelope | |
structure's BCC field. |
First, you have to enable profiling
> db.setProfilingLevel(1)
Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...
/* The images for this example can be downloaded from http://j.mp/loadingimagesforti */ | |
var win = Ti.UI.createWindow({ backgroundColor: '#f00'}); | |
var loading = Ti.UI.createImageView({ | |
images: [ | |
'images/loading/00.png', 'images/loading/01.png', 'images/loading/02.png', | |
'images/loading/03.png', 'images/loading/04.png', 'images/loading/05.png', | |
'images/loading/06.png', 'images/loading/08.png', 'images/loading/09.png', | |
'images/loading/10.png', 'images/loading/11.png' | |
], | |
width: 33, height: 33 |
// | |
// in this demo, we simply show how you could dynamically scroll | |
// with a continuous amount of data in the tableview by detecting | |
// when the user's scroll position gets near the end of the table | |
// and start a background fetch of new data and seamlessly append | |
// the new data to the table automatically | |
// | |
var win = Ti.UI.createWindow(); |