most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
var activity = Ti.Android.currentActivity; | |
var win = Ti.UI.currentWindow; | |
activity.addEventListener("create", function(e) { | |
var button = Ti.UI.createButton({title: "Hello world"}); | |
button.addEventListener("click", function(e) { | |
activity.finish(); | |
}); | |
win.add(button); | |
}); |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
var http = require('http'); | |
var server = http.createServer(function(req, res) { | |
// console.log(req); // debug dump the request | |
// If they pass in a basic auth credential it'll be in a header called "Authorization" (note NodeJS lowercases the names of headers in its request object) | |
var auth = req.headers['authorization']; // auth is in base64(username:password) so we need to decode the base64 | |
console.log("Authorization Header is: ", auth); |
First create a Vagrantfile:
vagrant init precise64
Then add the following to the new Vagrantfile:
config.vm.provision :shell, :inline => <<-EOT
# Last updated May, 2024 for Apple silicon Macs | |
# Install Homebrew if you don't already have it: https://brew.sh | |
# install nano from homebrew | |
brew install nano nanorc | |
# update your nanorc file | |
echo 'include "'"$(brew --cellar nano)"'/*/share/nano/*.nanorc"' >> ~/.nanorc | |
# close and re-open your terminal and you'll have syntax highlighting |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
See Also:
Level | Score | Regex | Credit |
---|
Elasticsearch was created in 2010 by Shay Banon after forgoing work on another search solution, Compass, also built on Lucene and created in 2004.
# install dependencies | |
sudo yum install curl-devel | |
sudo yum install libxml2-devel | |
# install extension for solr -- note use pear instead of pecl install | |
sudo pear install pecl/solr | |
# when it asks for libcURL path if you are on a 64bit machine | |
# change: | |
libcURL install prefix [/usr] : /usr/lib64 |