Skip to content

Instantly share code, notes, and snippets.

Sep 25 16:41:19 notifier1 ulule-notifier[28254]: {"address":":8080","level":"info","msg":"Running Notifier API server...","time":"2019-09-25T16:41:19+02:00"}
Sep 25 16:41:19 notifier1 ulule-notifier[28254]: {"level":"info","msg":"Notifier API server has stopped","time":"2019-09-25T16:41:19+02:00"}
Sep 25 16:41:19 notifier1 ulule-notifier[28254]: notifier api: failed to start server: listen tcp :8080: bind: address already in use
Sep 25 16:41:19 notifier1 ulule-notifier[28254]: {"backend":"elasticsearch","duration":"3.754441ms","level":"info","logger":"store","method":"GET","msg":"200 GET /","status":200,"time":"2019-09-25T16:41:19+02:00","url":"http://m1.search.internal.infra.sandbox.ulule.com:9200
/"}
Sep 25 16:41:19 notifier1 ulule-notifier[28254]: {"backend":"elasticsearch","duration":"2.25µs","error":"context canceled","level":"error","logger":"store","method":"HEAD","msg":"HEAD /notifier: context canceled","time":"2019-09-25T16:41:19+02:00"}
Sep 25 16:41:19 notifier1 ulule-notifier[28254]: lemon shutdown
func Transaction(driver Driver, handler func(driver Driver) error) error {
if driver == nil {
return errors.Wrap(ErrInvalidDriver, "sqlxx: cannot create a transaction")
}
tx, err := driver.Beginx()
if err != nil {
return errors.Wrap(err, "sqlxx: cannot create a transaction")
}
178.208.56.100 - - [08/Aug/2018:13:42:30 +0000] "api.sandbox.ulule.com/v1/users/584/projects?state=created?limit=20&offset=20 [GET /v1/users/584/projects?state=created?limit=20&offset=20 HTTP/1.1]" 400 25 "-" "-" -
178.208.56.100 - - [08/Aug/2018:13:42:31 +0000] "api.sandbox.ulule.com/v1/users/584/projects?state=created?limit=20&offset=20 [GET /v1/users/584/projects?state=created?limit=20&offset=20 HTTP/1.1]" 400 25 "-" "-" -
178.208.56.100 - - [08/Aug/2018:13:42:31 +0000] "api.sandbox.ulule.com/v1/users/584/projects?state=created?limit=20&offset=20 [GET /v1/users/584/projects?state=created?limit=20&offset=20 HTTP/1.1]" 400 25 "-" "-" -
178.208.56.100 - - [08/Aug/2018:13:42:31 +0000] "api.sandbox.ulule.com/v1/users/584/projects?state=created?limit=20&offset=20 [GET /v1/users/584/projects?state=created?limit=20&offset=20 HTTP/1.1]" 400 25 "-" "-" -
178.208.56.100 - - [08/Aug/2018:13:42:31 +0000] "api.sandbox.ulule.com/v1/users/584/projects?state=created?limit=20&offset=20 [GET /v1/users/584/projects?state=crea
@thoas
thoas / gist:dbd554fb5e1ac6e5262d
Created March 16, 2015 09:50
How to resize a gif image using goroutines
package main
import (
"fmt"
"github.com/disintegration/imaging"
"image"
"image/draw"
"image/gif"
"os"
"runtime"
from django.views import generic
from django.contrib.auth.decorators import login_required
class MyView(generic.TemplateView):
template_name = 'foo/bar.html'
view = login_required(MyView.as_view())
var FormSet = function (form, prefix) {
this.$form = $(form);
this.prefix = prefix;
}
FormSet.prototype.updateElementIndex = function (el, ndx) {
var regex = new RegExp('(' + this.prefix + '-\\d+-)'),
replacement = this.prefix + '-' + ndx + '-',
element = $(el);
#!/bin/bash
# Output lines suitable for sysctl configuration based
# on total amount of RAM on the system. The output
# will allow up to 50% of physical memory to be allocated
# into shared memory.
# On Linux, you can use it as follows (as root):
#
# ./shmsetup >> /etc/sysctl.conf
define redis::source(
$version = '2.6.9',
$path = '/usr/local/src',
$bin = '/usr/local/bin',
$owner = 'redis',
$group = 'redis'
) {
exec { "git clone git://github.com/antirez/redis.git redis_${version}":
cwd => "${path}",
path => "${path}/redis_${version}",
import telnetlib
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'madmoizelle.settings'
from django.conf import settings
from django.core.cache import cache
host = '127.0.0.1'
@thoas
thoas / multi_bench.py
Created September 21, 2012 08:32 — forked from oleiade/multi_bench.py
Benchmark single-process, threads, processes in python procedure
import time
import itertools
from fastset.bitvector import bitvector
from Queue import Queue
from threading import Thread
from multiprocessing import Process