Skip to content

Instantly share code, notes, and snippets.

View binarytemple-clients's full-sized avatar

binarytemple-clients

View GitHub Profile
@binarytemple-clients
binarytemple-clients / foo.markdown
Created September 12, 2016 19:53
using the keychain command from within a config file
System.cmd("keychain.py",["-g","-a", "account_name", "-u", "user_name"]) |> Tuple.to_list |> List.first |> String.strip
#!/usr/bin/env python
import getopt
import sys
import keyring
import getpass
"""
Password wrapper, get and store passwords to system keyring
License: Apache Software License

Start the Dbg application

iex(6)> Application.start(:dbg)
{:error, {:not_started, :runtime_tools}}
iex(7)> Application.start(:runtime_tools)
:ok
iex(8)> Application.start(:dbg)
:ok
iex(51)> Enum.each([1,2,3], &( IO.puts "#{inspect &1}") )
1
2
3
:ok
    iex(4)> Application.start(:dbg)
    {:error, {:not_started, :runtime_tools}}
    iex(5)> Application.start(:runtime_tools)
    :ok
    iex(6)> Application.start(:dbg)
    :ok
    iex(7)> Dbg.trace(:send)
    %{counts: %{nonode@nohost: 1}, errors: %{}}
wget http://mirror.sdunix.com/gnu/emacs/emacs-24.5.tar.gz
tar zxvfp emacs-24.5.tar.gz
cd emacs-24.5/
./configure
sudo yum -y install libXpm-devel libjpeg-turbo-devel openjpeg-devel openjpeg2-devel turbojpeg-devel giflib-devel libtiff-devel gnutls-devel libxml2-devel GConf2-devel dbus-devel wxGTK-devel gtk3-devel
./configure
make
sudo make install
sudo yum -y install gcc gcc-c++ glibc-devel make ncurses-devel openssl-devel autoconf java-1.8.0-openjdk-devel git
sudo yum -y install wxBase.x86_64
sudo yum -y install wget
wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
sudo rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
sudo yum -y install esl-erlang
sudo mkdir /opt/elixir
sudo git clone https://github.com/elixir-lang/elixir.git /opt/elixir
cd /opt/elixir
sudo make clean test

docker volume ls

docker volume create --name mysql-data 
mysql-data

Create a file inside a volume, the container is terminated. The container is restarted, and the file is still there