Skip to content

Instantly share code, notes, and snippets.

View yanik-ai's full-sized avatar
🪐
df0

yanik yanik-ai

🪐
df0
View GitHub Profile
@yanik-ai
yanik-ai / Dockerfile.centos7.python36.pipenv
Created March 9, 2019 23:39 — forked from pvergain/Dockerfile.centos7.python36.pipenv
Dockerfile based on centos:7 Python3.6 and pipenv
# Use an official centos7 image
FROM centos:7
RUN localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8
ENV LANG fr_FR.utf8
# gcc because we need regex and pyldap
# openldap-devel because we need pyldap
RUN yum update -y \
&& yum install -y https://centos7.iuscommunity.org/ius-release.rpm \
MLN_ABI = {
"contracts": {
"FundInterface.sol:FundInterface": {
"abi": [
{
"constant": False,
"inputs": [],
"name": "enableInvestment",
"outputs": [],
"payable": False,
@yanik-ai
yanik-ai / .bashrc
Created April 24, 2017 11:31 — forked from vsouza/.bashrc
Golang 1.5 setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
(default)root@precise64:/usr/lib/ckan/default/src/ckan# ckan celeryd --config=/etc/ckan/default/development.ini
/usr/lib/ckan/default/local/lib/python2.7/site-packages/celery/platforms.py:812: RuntimeWarning: You are running the worker with superuser privileges, which is
absolutely not recommended!
Please specify a different user using the -u option.
User information: uid=0 euid=0 gid=0 egid=0
uid=uid, euid=euid, gid=gid, egid=egid,
Traceback (most recent call last):
ctrl+B
Двойное нажатие Shift
PA SPORTS - NEBEN DIR
PA SPORTS - BULLETPROOF
docker-machine rm default
docker-machine create --driver virtualbox default
@yanik-ai
yanik-ai / Random generator
Created March 29, 2016 21:44 — forked from alexvandesande/Random generator
A very simple random generator. A miner can influence the number by not publishing a block with an unwanted outcome, and forfeiting the 5 block reward.
contract random {
/* Generates a random number from 0 to 100 based on the last block hash */
function randomGen(uint seed) constant returns (uint randomNumber) {
return(uint(sha3(block.blockhash(block.number-1), seed ))%100);
}
/* generates a number from 0 to 2^n based on the last n blocks */
function multiBlockRandomGen(uint seed, uint size) constant returns (uint randomNumber) {
uint n = 0;
for (uint i = 0; i < size; i++){
@yanik-ai
yanik-ai / nginx-custom-build.sh
Created March 25, 2016 16:42
Build Ubuntu or Debian packages for nginx with custom patches, configs, and name suffixes in one command
#!/bin/bash
# Author: Alexander Rodin <rodin.alexander@gmail.com>
# License: MIT
BUILD_DIR=build
while getopts "hp:s:r:b:o:c:n" opt; do
case $opt in
h)
echo "Usage: $0 [options]"
@yanik-ai
yanik-ai / gist:11b471ae19f98a5abcd0
Created March 22, 2016 14:27
socket.error: [Errno 98] Address already in use: ('0.0.0.0', 30303)
// or any othe port
sudo netstat -ltnp | grep ':30303'
// will return
tcp6 0 0 :::30303 :::* LISTEN 844/S20geth
sudo kill -9 844