- New questions by interest /interests/:interestId/questions/new?limit=10&offset=10
- Following questions by interest /interests/:interestId/questions/following?limit=10&offset=10
- Top questions by interest /interests/:interestId/questions/top?limit=10&offset=10
- New questions for all interests /questions/new?limit=10&offset=10
- Following questions for all interests /questions/following?limit=10&offset=10
- Top questions for all interests /questions/top?limit=10&offset=10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.stuartrexking.blog; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.stream.IntStream; | |
final class ThreadInterference { | |
private enum Counter { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@n1:~$ dig @localhost –t SRV eventstore.service.consul | |
; <<>> DiG 9.9.5-3ubuntu0.5-Ubuntu <<>> @localhost –t SRV eventstore.service.consul | |
; (1 server found) | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 10149 | |
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1 | |
;; OPT PSEUDOSECTION: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@n1:~$ eventstored --mem-db -log /var/log/eventstore.log --int-ip 172.20.20.10 --ext-ip 172.20.20.10 --cluster-size=3 --cluster-dns eventstore.service.consul | |
[04273,01,06:05:28.629] | |
ES VERSION: 3.2.1.0 (release-v3.2.1/7994e0fec6b2dc6740dfb54cbf3139e98c3fc592, Wed, 9 Sep 2015 19:11:22 +0200) | |
OS: Linux (Unix 3.13.0.63) | |
RUNTIME: 3.12.1 (tarball) (64-bit) | |
GC: 2 GENERATIONS | |
LOGS: /var/log/eventstore.log | |
MODIFIED OPTIONS: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@n1:~$ sudo eventstored --mem-db -log /var/log/eventstore.log --int-ip 172.20.20.10 --ext-ip 172.20.20.10 --cluster-size=3 --cluster-dns eventstore.service.consul --cluster-gossip-port=2113 | |
[04858,01,06:51:46.994] | |
ES VERSION: 3.2.1.0 (release-v3.2.1/7994e0fec6b2dc6740dfb54cbf3139e98c3fc592, Wed, 9 Sep 2015 19:11:22 +0200) | |
OS: Linux (Unix 3.13.0.63) | |
RUNTIME: 3.12.1 (tarball) (64-bit) | |
GC: 2 GENERATIONS | |
LOGS: /var/log/eventstore.log | |
MODIFIED OPTIONS: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@n1:~$ ifconfig eth1 2>/dev/null|awk '/inet addr:/ {print $2}'|sed 's/addr://' | |
172.20.20.10 | |
vagrant@n1:~$ curl http://172.20.20.11:2113/gossip | |
{ | |
"members": [ | |
{ | |
"instanceId": "00000000-0000-0000-0000-000000000000", | |
"timeStamp": "2015-09-16T07:00:10.033572Z", | |
"state": "Manager", | |
"isAlive": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if lat && long: | |
if sort param: | |
use sort param: | |
else: | |
use lat long | |
else: | |
if sort param other than lat/long: | |
use sort param | |
else: | |
use created_at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name domain.com www.domain.com; | |
location / { | |
proxy_pass http://anotherdomain/index.html; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
location ~ ^/(.*\Z) { | |
rewrite ^/(.*) http://domain.com permanent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/ruby | |
require 'rubygems' | |
require 'fog' | |
require 'json' | |
require 'optparse' | |
USAGE = "usage: bootstrap.rb build_number " | |
#defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Expected line: | |
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen | |
Actual line: | |
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart 10gen | |
----- | |
apt_repository "mongo10gen" do | |
uri "http://downloads-distro.mongodb.org/repo/ubuntu-upstart" |
OlderNewer