This will guide you through setting up a replica set in a docker environment using.
- Docker Compose
- MongoDB Replica Sets
- Mongoose
- Mongoose Transactions
Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!
This will guide you through setting up a replica set in a docker environment using.
Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!
<VirtualHost *:80> | |
DocumentRoot "/home/dev/server/project/dist/" | |
ServerName vuejs.project.local | |
<Directory /home/dev/server/project/dist/> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride all | |
Require all granted | |
Order allow,deny | |
allow from all |
git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )
This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.
import graphql | |
# build_executable schema | |
# | |
# accepts schema_definition (string) and resolvers (object) in style of graphql-tools | |
# returns a schema ready for execution | |
def build_executable_schema(schema_definition, resolvers): | |
ast = graphql.parse(schema_definition) | |
schema = graphql.build_ast_schema(ast) |
#!/bin/bash | |
# Installs the XCode command line tools if you don't have them | |
xcode-select --install | |
# Installs brew if you don't have it | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Makes your account the owner of /usr/local, which is preferred on single user Macs | |
sudo chown -R `whoami` /usr/local | |
# Installs all the dependencies for building libtorrent and rtorrent | |
brew install automake libtool boost curl lzlib libsigc++ openssl pkg-config xmlrpc-c | |
# Uninstall libtorrent-rasterbar if you already have it |
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
FROM php:7.0.4-fpm | |
RUN apt-get update && apt-get install -y libmcrypt-dev \ | |
mysql-client libmagickwand-dev --no-install-recommends \ | |
&& pecl install imagick \ | |
&& docker-php-ext-enable imagick \ | |
&& docker-php-ext-install mcrypt pdo_mysql |
Directly from CLI
alias x='exit'
funcsave x
or create a file in
~/.config/fish/functions
with name
#!/bin/bash | |
# Config | |
N2CHROOT=~victor/tmp/n2chroot | |
export JAIL=/var/www/chroot | |
function create_chroot { | |
# Create devices | |
mkdir $JAIL/dev | |
mknod -m 0666 $JAIL/dev/null c 1 3 |