To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
| # added this to | |
| sub vcl_recv { | |
| if (req.http.host == "yourdomain.com") { | |
| set req.http.Location = "http://www.yourdomain.com" + req.url; | |
| error 750 "Permanently moved"; | |
| } | |
| } |
| /** | |
| * called when an item in the ListView is clicked; we will get the section | |
| * index, and addition event information | |
| * | |
| * @param {Object} _event | |
| */ | |
| function loadMoreBtnClicked(_event) { | |
| alert('not implemented yet'); | |
| } |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
| 1. Drop all incoming connections to ElasticSearch on port 9200: | |
| iptables -A INPUT -j DROP -p tcp --destination-port 9200 -i eth0 | |
| 2. Persist this change on reboot: | |
| iptables-save > /root/my_iptables_config | |
| /sbin/iptables-restore < /root/my_iptables_config | |
| 3. Create a directory in your web application, I usually name mine /_es and add an .htaccess file. |
| <?php | |
| if (Config::has('sentry.key')) { | |
| $bufferHandler = new Monolog\Handler\BufferHandler( | |
| new Monolog\Handler\RavenHandler( | |
| new Raven_Client(Config::get('sentry.key')), | |
| Monolog\Logger::WARNING | |
| ) | |
| ); | |
| # for real, I have a mapping and my color is not "indexed" | |
| curl -XPUT 'http://localhost:9200/pony_index_tmp' -d ' | |
| { | |
| settings: { | |
| number_of_shards: 1, | |
| number_of_replicas: 0 | |
| } | |
| }' | |
| curl -XPOST "http://localhost:9200/pony_index_tmp/pony/1" -d ' |
| var rootWin = Ti.UI.createWindow(); | |
| var navGroup = Ti.UI.iPhone.createNavigationGroup({ | |
| window: rootWin | |
| }); | |
| var button = Ti.UI.createButton({ | |
| title: 'Open ListView Tests' | |
| }); | |
| button.addEventListener('click', function() { | |
| openTestsWindow(); | |
| }); |
| cd ~ | |
| sudo apt-get update | |
| sudo apt-get install openjdk-7-jre-headless -y | |
| # Download the compiled elasticsearch rather than the source. | |
| wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| sudo mv elasticsearch-* elasticsearch | |
| sudo mv elasticsearch /usr/local/share |
| -- install packages | |
| # yum update | |
| # yum groupinstall "Development Tools" "Additional Development" | |
| -- epel for redis, libyaml, pip, qtwebkit-devel | |
| # rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm | |
| # yum install libicu-devel libyaml-devel redis wget python-pip qt-devel qtwebkit-devel | |
| -- install ruby |