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 AppName.IpnController do | |
@moduledoc """ | |
IPN Controller. | |
""" | |
use AppName.Web, :controller | |
def create(conn, params) do | |
# PayPal requires the params returned in the exact order given. | |
# The map needs to be a list. encode/1 keep the order of a list, |
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 | |
## | |
# Trap Setup | |
# | |
# This trap setup allows for a ERRNO_MSG to be provided in any function | |
## | |
trap 'chute ${LINENO} $? "${ERRNO_MSG}"' ERR | |
function chute() { | |
echo "[ERROR] Line: ${1} Code: ${2} Message: ${3}" |
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
<?php | |
/** | |
* Snippet of using validation and filters for form submission | |
* data using phalcon. | |
* | |
* The "simple" project was created using phalcon dev tools | |
*/ | |
/** |
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 python3 | |
import requests | |
from tqdm import tqdm | |
req = requests.get("https://api.github.com/repos/mitchellh/packer/tags") | |
data = req.json() | |
version = data[0]['name'] |
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/python | |
import requests | |
from requests.auth import HTTPBasicAuth | |
import urllib3 | |
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | |
''' | |
Translate Harbor LDAP usergroup data to Puppet Hieradata |
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/python | |
import requests | |
from requests.auth import HTTPBasicAuth | |
import urllib3 | |
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | |
''' | |
Translate Harbor projects data to Puppet Hieradata |
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
<?php | |
/** | |
* Thank you to https://github.com/odan/tsid for this package. | |
* | |
* This isn't perfect, and I don't know any further method to test for | |
* for the validity of the TSID, but this is a start. | |
* | |
* I couldn't get Laravel 10 to play nice with bigIntegers as primary key. | |
* Laravel kept trying to add auto_increment on table create during migration. |