Skip to content

Instantly share code, notes, and snippets.

View lasley's full-sized avatar

Dave Lasley lasley

  • Seattle, WA - USA
View GitHub Profile
@lasley
lasley / odoo-runbot-rancher-compose.yml
Created October 12, 2017 16:55
Odoo Runbot Rancher Compose
version: '2'
services:
cron:
scale: 1
start_on_create: true
health_check:
healthy_threshold: 2
response_timeout: 2000
port: 8069
unhealthy_threshold: 60
@lasley
lasley / helpscout_webhook_verify.py
Last active June 5, 2023 09:03
HelpScout WebHook Verification In Python (2 & 3)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import hmac
from base64 import b64encode
from hashlib import sha1
WEBHOOK_SECRET_KEY = 'your secret key'
def is_from_help_scout(data, signature, encoding='utf8'):
#!/usr/bin/env python
from io import BytesIO
from PIL import Image
with open('/testimage.png', 'rb') as f:
image = Image.open(f).load()
#!/usr/bin/env bash
if [ "${LINT_CHECK}" = "1" ];
then
pip install flake8
flake8 ./
elif [ "${TESTS}" = "1" ];
then
@lasley
lasley / Gemfile
Last active April 28, 2023 21:23
Sample Devise Implementation w/ OmniAuth
gem 'devise'
# ENV variable management
gem 'figaro'
# OmniAuth Authentication providers
gem 'omniauth-google-oauth2'
gem 'omniauth-facebook'
group :development, :test do
#!/usr/bin/env python
##
# CloudFlare API
#
# This is a library created to easily interact with CloudFlare's API in Python
# API Documentation is located at http://www.cloudflare.com/docs/client-api.html
#
# @author David Lasley <[email protected]>
# @url https://blog.laslabs.com/random-scripts-2/cloudflare-api-py/
# @package toolbox.cloudflare
@lasley
lasley / cloudflare_ddns.py
Last active June 8, 2016 15:36
Dynamic DNS With CloudFlare
#!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# DNS Updater
#
# Manipulates DNS using APIs, sets to current IP if different
# @replaces dyndns.org
#
# @author David Lasley <[email protected]>
# @package toolbox
@lasley
lasley / libcloud_ddns.py
Created August 16, 2014 00:07
DDNS With LibCloud (Python)
#!/usr/bin/env python
##
# DNS Updater
#
# Manipulates DNS using APIs, sets to current IP if different
# @replaces dyndns.org
#
# @author David Lasley <[email protected]>
# @package toolbox
# @license GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html)