Edit file /home/gitlab/gitlab/config/unicorn.rb
Find line listen "#{app_dir}/tmp/sockets/gitlab.socket" and comment it.
Uncomment line listen "127.0.0.1:8080"
sudo a2enmod proxysudo a2enmod proxy_balancer
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| #!/bin/sh | |
| # | |
| # For each ref, validate the commit. | |
| # | |
| # - It disallows deleting branches without a /. | |
| # - It disallows non fast-forward on branches without a /. | |
| # - It disallows deleting tags without a /. | |
| # - It disallows unannotated tags to be pushed. |
This article is now published on my website: A one-off git repo server.
| -- Error Message: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. | |
| -- | |
| -- our table name that has this issue is XYZ | |
| -- | |
| SET GLOBAL innodb_file_format=Barracuda; | |
| SET GLOBAL innodb_file_per_table=ON; | |
| ALTER TABLE XYZ ROW_FORMAT=COMPRESSED; |
This Gist is a collection of configuration files that can be used to easily setup a Homebrew-based LEMP stack on Mac OS X.
Files in this repository are numbered and named for ordering purposes only. At the top of each file is a section of metadata that denote what component the file belongs to and the default name & location of the file. Feel free to implement it however you want.
Note: some configuration files have hard-coded paths to my user directory -- fix it for your setup
| #!/bin/sh | |
| remove_dangling() { | |
| echo "Removing dangling images ..." | |
| docker rmi $(docker images -f dangling=true -q) | |
| } | |
| remove_stopped_containers() { | |
| echo "Removing stopped containers ..." | |
| docker rm $(docker ps -qa) |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
| import React from 'react'; | |
| import shallowEqual from 'react/lib/shallowEqual'; | |
| class PureRenderComponent extends React.Component { | |
| shouldComponentUpdate(nextProps, nextState) { | |
| return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState); | |
| } | |
| } |
| package main | |
| import ( | |
| "bufio" | |
| "io/ioutil" | |
| "os/signal" | |
| //"syscall" | |
| "fmt" | |
| "log" | |
| "os" |