Skip to content

Instantly share code, notes, and snippets.

Avatar

binarytemple-clients

View GitHub Profile
@binarytemple-clients
binarytemple-clients / foo.markdown
Created Sep 12, 2016
using the keychain command from within a config file
View foo.markdown
System.cmd("keychain.py",["-g","-a", "account_name", "-u", "user_name"]) |> Tuple.to_list |> List.first |> String.strip
View keychain.py
#!/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
View Dbg.markdown

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
View Elixir Enum.md
iex(51)> Enum.each([1,2,3], &( IO.puts "#{inspect &1}") )
1
2
3
:ok
View example.using.dbg.markdown
    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: %{}}
View install-emacs-24.5-from-source-centos7install-emacs-24.5-from-source-centos7.sh
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
View install-elixir-centos-7.sh
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
View setting.up.docker.volumes.markdown

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

You can’t perform that action at this time.