I hereby claim:
- I am kandalf on github.
- I am k4nd4lf (https://keybase.io/k4nd4lf) on keybase.
- I have a public key ASDiCAcQJaH8DbmwRNirZdfZqQ7w6_q4uYFXfC9NKeYbxAo
To claim this, I am signing this object:
#!/usr/bin/env python | |
import os, sys | |
from pathlib import Path | |
cwd = os.getcwd() | |
pip_path = Path("{}/Pipfile".format(cwd)) | |
req_path = Path("{}/requirements.txt".format(cwd)) | |
dev_req_path = Path("{}/requirements-dev.txt".format(cwd)) |
I hereby claim:
To claim this, I am signing this object:
func SearchUsersLike(terms []string) ([]*UsernameData, error) { | |
var args = make([]interface{}, len(terms)) | |
var query = ` | |
SELECT DISTINCT username, slug | |
FROM users u | |
INNER JOIN submissions s ON s.user_id = u.id | |
INNER JOIN works w ON w.submission_id = s.id | |
WHERE u.confirmed_at IS NOT NULL AND | |
w.discontinued_at IS NULL AND (` |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.
So, these are the different settings we are going to compare:
# Contributor: tuxce <[email protected]> | |
pkgname=package-query | |
pkgver=1.5 | |
pkgrel=2 | |
pkgdesc="Query ALPM and AUR" | |
arch=('i686' 'x86_64' 'mips64el' 'armv6h' 'armv7h' 'arm') | |
url="https://github.com/archlinuxfr/package-query/" | |
license=('GPL') | |
depends=('pacman>=4.1' 'pacman<4.3' curl 'yajl>=2.0') | |
source=(http://mir.archlinux.fr/~tuxce/releases/$pkgname/$pkgname-$pkgver.tar.gz) |
package main | |
import "log" | |
func main() { | |
redisDB := &RedisDB{LogFilePath: "./redis-incr.log"} | |
redisDB.Connect("127.0.0.1:6379", "1") | |
redisDB.SetupDB() | |
for i := 0; i < 3000; i++ { |
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: Encuestas | |
# Required-Start: $all | |
# Required-Stop: $network $local_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start the Encuestas unicorns at boot | |
# Description: Enable Encuestas at boot time. | |
### END INIT INFO |