Skip to content

Instantly share code, notes, and snippets.

View henriquechehad's full-sized avatar

Henrique Chehad henriquechehad

  • Goiânia / Brasil
View GitHub Profile
View benchmark bcrypt
Code:
============================================================
package main
import (
"log"
"sync"
"github.com/pkg/profile"
View gist:c66191032423c2927654c1bd760d2caa
package main
import (
"sync"
"testing"
"golang.org/x/crypto/bcrypt"
)
func BenchmarkBCryptCompareHashAndPassword(b *testing.B) {
View keybase.md

Keybase proof

I hereby claim:

  • I am henriquechehad on github.
  • I am henriquechehad (https://keybase.io/henriquechehad) on keybase.
  • I have a public key ASD0E9p5cWpvmPZ_V5Ajd5S3v744A6guBPSnmjB5iZCMqAo

To claim this, I am signing this object:

View gist:16f18063562c45c879cfd9e809563cd4
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: dd-agent
spec:
template:
metadata:
labels:
app: dd-agent
name: dd-agent
View dockerfile
FROM ubuntu:trusty
RUN apt-get update && apt-get install -y lua5.1 liblua5.1 lua-sec luajit curl make \
libpcre3-dev unzip git libssl-dev libreadline-dev \
libncurses5-dev libpcre3-dev libssl-dev perl wget
RUN curl -fSL http://luarocks.org/releases/luarocks-2.3.0.tar.gz -o ../luarocks-2.3.0.tar.gz
RUN tar xzf ../luarocks-2.3.0.tar.gz -C ../
RUN cd ../luarocks-2.3.0 && ./configure --lua-suffix=jit --with-lua=/usr && make build && make install
View sublist.py
array_a = [2, 31, 14, 53, 1, 214, 21, 2, 3, 5, 6, 1, 3, 4, 2, 1, 2, 4]
array_b = [1, 3, 4]
def check_sublist(a, b):
return ','.join(map(str, b)) in ','.join(map(str, a))
check_sublist(array_a, array_b)
View gist:c92962ffaa6dc604d96c
{'accredited': False,
'capture_date': DateTime('2015/10/27 18:09:4.539547 UTC'),
'category': 'Ensaios em Cosm\xc3\xa9ticos ',
'formatted_result': '',
'formatted_specs': '',
'formatted_uncertainty': '',
'formatted_unit': 'UFC/g/mL',
'id': 'BL-C',
'isnumber': True,
'keyword': 'BL-C',
View gist:53f24ca3e6a14a33f6eb
$ sudo bin/buildout -n
Develop: '/opt/bitnami/apps/plone/zeocluster/src/bika.custom'
Updating zeoserver.
Installing client1.
While:
Installing client1.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
View gist:399cc36f53a6e379b79c
Traceback (most recent call last):
File "bin/zeoserver", line 22, in <module>
import plone.recipe.zeoserver.ctl
File "/opt/bitnami/apps/plone/buildout-cache/eggs/plone.recipe.zeoserver-1.2.6-py2.7.egg/plone/recipe/zeoserver/__init__.py", line 9, in <module>
import zc.recipe.egg
File "/opt/bitnami/apps/plone/buildout-cache/eggs/zc.recipe.egg-1.3.2-py2.7.egg/zc/recipe/egg/__init__.py", line 1, in <module>
from zc.recipe.egg.egg import Egg, Scripts, Eggs
File "/opt/bitnami/apps/plone/buildout-cache/eggs/zc.recipe.egg-1.3.2-py2.7.egg/zc/recipe/egg/egg.py", line 21, in <module>
import zc.buildout.easy_install
File "/opt/bitnami/apps/plone/buildout-cache/eggs/zc.buildout-2.4.0-py2.7.egg/zc/buildout/easy_install.py", line 85, in <module>
View gist:3c17e4a42bcb34274d62
Traceback (most recent call last):
File "/opt/bitnami/apps/plone/zeocluster/bin/zeoserver", line 22, in <module>
import plone.recipe.zeoserver.ctl
File "/opt/bitnami/apps/plone/buildout-cache/eggs/plone.recipe.zeoserver-1.2.6-py2.7.egg/plone/recipe/zeoserver/__init__.py", line 9, in <module>
import zc.recipe.egg
ImportError: No module named recipe.egg
Traceback (most recent call last):
File "/opt/bitnami/apps/plone/zeocluster/bin/client1", line 269, in <module>
import plone.recipe.zope2instance.ctl
File "/opt/bitnami/apps/plone/buildout-cache/eggs/plone.recipe.zope2instance-4.2.14-py2.7.egg/plone/recipe/zope2instance/__init__.py", line 27, in <module>