Skip to content

Instantly share code, notes, and snippets.

Andrew McElroy Sophrinix

Block or report user

Report or block Sophrinix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:daebed85198d30da56cc9eab95f52da5
# test unique violation
# test exclusion constraint violation
# output from unique violation (via ON CONFLICT IGNORE argument)
# output exclusion constraint violation (via ON CONFLICT IGNORE argument) (using \! {shell_command possibly using cat})
# GUC variable not found
test=# CREATE TABLE onek (
test(# unique1 int4,
@Sophrinix
Sophrinix / docker-install-rpi3.md
Created Jun 13, 2018 — forked from tyrell/docker-install-rpi3.md
Installing latest Docker on a Raspberry Pi 3
View docker-install-rpi3.md

Introduction

I wrote this gist to record the steps I followed to get docker running in my Raspberry Pi 3. The ARM ported debian version (Jessie) comes with an old version of docker. It is so old that the docker hub it tries to interact with doesn't work anymore :)

Hopefully this gist will help someone else to get docker running in their Raspberry Pi 3.

Installation

From original instructions at http://blog.hypriot.com/post/run-docker-rpi3-with-wifi/

View woodpecker.grc
<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.10'?>
<flow_graph>
<timestamp>Thu Dec 8 21:11:20 2016</timestamp>
<block>
<key>options</key>
<param>
<key>author</key>
<value></value>
</param>
@Sophrinix
Sophrinix / KongJwt.md
Last active Sep 12, 2017 — forked from martinheld/KongJwt.md
Short example to use JWT with Kong
View KongJwt.md

JWT Kong Example

  • Get and Start Kong and Co
git clone git@github.com:Mashape/docker-kong.git
cd docker-kong/compose
docker-compose up
  • Create Kong API Route
@Sophrinix
Sophrinix / telnet-imap
Created Aug 17, 2017 — forked from gustavohenrique/telnet-imap
playing with gmail via telnet
View telnet-imap
openssl s_client -crlf -connect imap.gmail.com:993
tag login user@gmail.com passwordhere
tag list "" "*"
tag select "inbox"
tag fetch 1:3 body[header]
tag fetch 3 body[header]
tag fetch 3 body[text]
tag fetch 2 all
tag fetch 2 fast
tag fetch 2 full
@Sophrinix
Sophrinix / telnet-imap
Created Aug 17, 2017 — forked from gustavohenrique/telnet-imap
playing with gmail via telnet
View telnet-imap
openssl s_client -crlf -connect imap.gmail.com:993
tag login user@gmail.com passwordhere
tag list "" "*"
tag select "inbox"
tag fetch 1:3 body[header]
tag fetch 3 body[header]
tag fetch 3 body[text]
tag fetch 2 all
tag fetch 2 fast
tag fetch 2 full
@Sophrinix
Sophrinix / ti.dynamiclib.js
Created Mar 20, 2017 — forked from hansemannn/ti.dynamiclib.js
Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop
View ti.dynamiclib.js
/**
* Ti.DynamicLib
* @abstract Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop.
* @version 1.1.0
*
* Install:
* 1) Search and replace '../../src/<YourFramework>.framework' with your framework location.
The path is relative to the `build/iphone` directory.
* 2a) For classic modules:
* - Add 'LD_RUNPATH_SEARCH_PATHS=$(inherited) "@executable_path/Frameworks" $(FRAMEWORK_SEARCH_PATHS)'
@Sophrinix
Sophrinix / imap-capability.md
Created Mar 15, 2017 — forked from emersion/imap-capability.md
Common IMAP servers CAPABILITY responses
View imap-capability.md

FastMail

* CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE AUTH=OTP SASL-IR
* CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID LOGINDISABLED ACL RIGHTS=kxte QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT SORT=MODSEQ THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE CATENATE CONDSTORE IDLE URLAUTH

Gandi.net

@Sophrinix
Sophrinix / overlap_cidr.py
Created Mar 10, 2017 — forked from zzzeek/overlap_cidr.py
detect overlapping CIDR ranges in SQL, prevent duplicate ranges using triggers
View overlap_cidr.py
from sqlalchemy import event
from sqlalchemy import DDL
def mysql_cidr_overlap(engine, metadata):
@event.listens_for(metadata, "after_create")
def _create_mysql_proc(target, connection, **kw):
if connection.engine.name != 'mysql':
return
if connection.scalar(
@Sophrinix
Sophrinix / overlap_cidr.py
Created Mar 10, 2017 — forked from zzzeek/overlap_cidr.py
detect overlapping CIDR ranges in SQL, prevent duplicate ranges using triggers
View overlap_cidr.py
from sqlalchemy import event
from sqlalchemy import DDL
def mysql_cidr_overlap(engine, metadata):
@event.listens_for(metadata, "after_create")
def _create_mysql_proc(target, connection, **kw):
if connection.engine.name != 'mysql':
return
if connection.scalar(
You can’t perform that action at this time.