This file contains 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
2017-01-16 08:40:53,218 [DEBUG @ msgpack_stream.py:send:33] 28705 - sent [0, 1, b'vim_get_api_info', ()] | |
2017-01-16 08:40:53,219 [DEBUG @ base.py:send:113] 28705 - Sending 'b'\x94\x00\x01\xb0vim_get_api_info\x90'' | |
2017-01-16 08:40:53,219 [DEBUG @ base.py:run:138] 28705 - Entering event loop | |
2017-01-16 08:40:53,219 [DEBUG @ msgpack_stream.py:_on_data:54] 28705 - waiting for message... | |
2017-01-16 08:40:53,219 [DEBUG @ msgpack_stream.py:_on_data:56] 28705 - received message: [0, 1, b'poll', []] | |
2017-01-16 08:40:53,219 [DEBUG @ async_session.py:_on_request:86] 28705 - received request: b'poll', [] | |
2017-01-16 08:40:53,219 [DEBUG @ msgpack_stream.py:_on_data:54] 28705 - waiting for message... | |
2017-01-16 08:40:53,219 [DEBUG @ msgpack_stream.py:_on_data:59] 28705 - unpacker needs more data... | |
2017-01-16 08:40:53,220 [DEBUG @ msgpack_stream.py:_on_data:54] 28705 - waiting for message... | |
2017-01-16 08:40:53,220 [DEBUG @ msgpack_stream.py:_on_data:56] 28705 - received message: [1, 1, None, [1, {b'error_types': {b'Valida |
This file contains 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 zsh | |
# from http://unix.stackexchange.com/a/141496/159078 | |
#dependencies: pdftk, ImageMagick, gpg, wipe, openssl | |
signature=~/Drive/personal/sig-no-underline-cleaner.png | |
f=${1%.pdf} | |
page=$2 | |
density=144 |
This file contains 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
⟩ iex | |
Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] | |
Interactive Elixir (1.4.0-rc.1) - press Ctrl+C to exit (type h() ENTER for help) | |
iex(1)> dt = DateTime. | |
compare/2 from_iso8601/1 from_naive!/2 from_naive/2 | |
from_unix!/1 from_unix!/2 from_unix/1 from_unix/2 | |
to_date/1 to_iso8601/1 to_naive/1 to_string/1 | |
to_time/1 to_unix/1 to_unix/2 utc_now/0 |
This file contains 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
def call(conn, _options) do | |
config_info = | |
conn | |
|> get_jwt_from_header | |
|> verify_jwt | |
|> get_data | |
|> get_configuration | |
handle_authentication(conn, config_info) | |
end |
This file contains 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
# Install ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# This assumes a wifi only system... |
This file contains 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
require "json" | |
require "kemal" | |
macro build_routes(hash) | |
{% for route, info in hash %} | |
{{info[:method].id}} {{route}} do |env| | |
# originally I had info[:method] but that would kick out "put" | |
# but changing to info[:method].id kicked out put, which worked. | |
env.response.status_code = {{info[:status_code]}} | |
env.response.content_type = "application/json" |
This file contains 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 | |
# OpenVPN Installer | |
# | |
# This installer was designed to work with Ubuntu 14.04. It installs | |
# an OpenVPN server, generates an associated OpenVPN client configuration file, | |
# configures a firewall, and enables automatic security updates. | |
# | |
# Once the installer finishes, the `/root/client.ovpn` file will have been generated. | |
# Download this file to your local machine and open it in an OpenVPN client and you'll |
This file contains 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/sh | |
mix credo -i PipeChainStart |
This file contains 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
def call(%Plug.Conn{req_headers: [{"authorization", token}]} = conn, _options) when is_binary(token) do | |
# I want this to match | |
conn | |
end | |
# this ends up matching | |
def call(conn, _), do: halt(conn) | |
conn = %{conn(:get, "/ping") | req_headers: [{"authorization", "asdf"}]} | |
call(conn) # matches the first, cool |
This file contains 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 | |
# user-data-hardening.sh | |
# Authors: Cody Bunch ([email protected]) | |
# | |
# Script intended to be supplied as userdata to a cloud of some flavor. | |
# Enables some sane sysctl defaults, turns up iptables, and | |
# installs a HIDS / NIDS package | |
# Supply your email here | |
echo "What's your email address?" |