Skip to content

Instantly share code, notes, and snippets.

@aoswalt
aoswalt / gh-deploy
Last active August 15, 2016 16:05
Basic script to deploy public folder to gh-pages branch
#! /bin/sh
git checkout -b gh-temp
gulp build
echo '!public' >> .gitignore
git add -A
git commit -m "lib for gh-pages"
git subtree split --prefix public -b gh-pages
git push origin gh-pages --force
git checkout master
git branch -D gh-temp
@aoswalt
aoswalt / soap_method.ex
Last active June 20, 2018 15:33
soap method macro for building request body and handling soap responses
defmodule MdToolbox.Api.SoapMethod do
alias __MODULE__
alias MdToolbox.Api.Request
@doc "Builds the request from params"
@callback build_request(params :: list()) :: map()
@doc "Parses the request's response into data"
@callback parse_response(request :: Request.t()) :: Request.t()
@aoswalt
aoswalt / 1.dbout
Created January 24, 2020 18:37
Problematic database output with UltiSnips
pid | running_time | client_addr | client_port | application_name | state | query
-------+------------------+--------------+-------------+------------------+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------