This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Send plaintext email using gen_smtp https://github.com/Vagabond/gen_smtp | |
% This function sends email directly to receiver's SMTP server and don't use MTA relays. | |
% | |
% Example plaintext email: | |
% Mail = mail_plain(<<"Bob <[email protected]>">>, <<"Alice <[email protected]>">>, <<"The mail subject">>, <<"The mail body">>), | |
% send_email(Mail). | |
% | |
% Example email with image attachment: | |
% ImgName = "image.jpg", | |
% {ok, ImgBin} = file:read_file(ImgName), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# References: | |
# | |
# https://cinhtau.net/2016/12/09/disable-apt-auto-update-and-upgrade/ | |
# https://unix.stackexchange.com/questions/315502/how-to-disable-apt-daily-service-on-ubuntu-cloud-vm-image | |
# https://askubuntu.com/questions/824718/ubuntu-16-04-unattended-upgrades-runs-at-random-times/831206 | |
apt-get -y purge update-notifier-common ubuntu-release-upgrader-core landscape-common unattended-upgrades | |
systemctl kill --kill-who=all apt-daily.service | |
systemctl kill --kill-who=all apt-daily-upgrade.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(ldapc). | |
%% API exports | |
-export([main/1]). | |
-include_lib("eldap/include/eldap.hrl"). | |
%%==================================================================== | |
%% API functions | |
%%==================================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Helper commands for clouformation deploy in the EC2 instances | |
# curl http://169.254.169.254/latest/user-data | |
# cat /var/log/cloud-init-output.log | |
# sudo yum install htop tmux tcpdump telnet -y | |
# describe stack | |
# this parameters are not passed by command line parameters | |
# to ensure that the developer does not hit a different STACK NAME or template by mistake |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Languafy.Web.Context do | |
@behaviour Plug | |
import Plug.Conn | |
alias Languafy.User | |
def init(opts), do: opts | |
def call(conn, _) do | |
case build_context(conn) do | |
{:ok, context} -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(ldapc). | |
%% API exports | |
-export([main/1]). | |
-include_lib("eldap/include/eldap.hrl"). | |
%%==================================================================== | |
%% API functions | |
%%==================================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Install Golang 1.9 64Bits on Linux (Debian|Ubuntu|OpenSUSE|CentOS) | |
## http://www.linuxpro.com.br/2015/06/golang-aula-1-instalacao-da-linguagem-no-linux.html | |
## Run as root (sudo su) | |
## Thank's @geosoft1 | @gwmoura | |
GO_URL="https://storage.googleapis.com/golang" | |
GO_VERSION=${1:-"1.9.2"} | |
GO_FILE="go$GO_VERSION.linux-amd64.tar.gz" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am posilva on github. | |
* I am posilva (https://keybase.io/posilva) on keybase. | |
* I have a public key whose fingerprint is FEAF E4F6 7148 9486 83CA 6B9F C8A3 13CA F9EB AE00 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.URI; | |
import java.net.URISyntaxException; | |
import org.ros.address.InetAddressFactory; | |
import org.ros.namespace.GraphName; | |
import org.ros.node.AbstractNodeMain; | |
import org.ros.node.ConnectedNode; | |
import org.ros.node.DefaultNodeMainExecutor; | |
import org.ros.node.NodeConfiguration; | |
import org.ros.node.NodeMainExecutor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scanning dependencies of target cmsys_c | |
Scanning dependencies of target cmIML_test | |
[ 0%] Building C object Source/kwsys/CMakeFiles/cmsys_c.dir/ProcessUNIX.c.o | |
Scanning dependencies of target cmzlib | |
[ 0%] Building C object Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test.c.o | |
[ 0%] Building C object Utilities/cmzlib/CMakeFiles/cmzlib.dir/adler32.c.o | |
Scanning dependencies of target cmsys | |
[ 0%] Building C object Source/kwsys/CMakeFiles/cmsys.dir/ProcessUNIX.c.o | |
[ 1%] Building C object Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_ABI_C.c.o | |
[ 1%] Building C object Utilities/cmzlib/CMakeFiles/cmzlib.dir/compress.c.o |