Skip to content

Instantly share code, notes, and snippets.

Avatar

Blake btsuhako

View GitHub Profile
@btsuhako
btsuhako / Dockerfile
Created Oct 4, 2019
Docker image for pg_upgrade 10 -> 11 with PostGIS 2.5
View Dockerfile
FROM mdillon/postgis:11
RUN sed -i 's/$/ 10/' /etc/apt/sources.list.d/pgdg.list
RUN apt-get update && apt-get install -y --no-install-recommends \
postgresql-10 postgresql-10-postgis-2.5 postgresql-10-postgis-2.5-scripts \
&& rm -rf /var/lib/apt/lists/*
ENV PGBINOLD /usr/lib/postgresql/10/bin
ENV PGBINNEW /usr/lib/postgresql/11/bin
View keybase.md

Keybase proof

I hereby claim:

  • I am btsuhako on github.
  • I am btsuhako (https://keybase.io/btsuhako) on keybase.
  • I have a public key ASCFun2fxDNhezUTkNQrshqs70-w0v7hOWKjef0ffagydAo

To claim this, I am signing this object:

@btsuhako
btsuhako / app_task_definition.json
Created Nov 29, 2018
ECS service task definition for web application + Datadog APM and logging
View app_task_definition.json
{
"ipcMode": null,
"executionRoleArn": null,
"containerDefinitions": [
{
"dnsSearchDomains": null,
"logConfiguration": null,
"entryPoint": null,
"portMappings": [
{
@btsuhako
btsuhako / datadog_task_def.json
Created Nov 29, 2018
Datadog Agent ECS task definition
View datadog_task_def.json
{
"ipcMode": null,
"executionRoleArn": null,
"containerDefinitions": [
{
"dnsSearchDomains": null,
"logConfiguration": null,
"entryPoint": null,
"portMappings": [
{
@btsuhako
btsuhako / get.js
Last active Aug 11, 2016
reimplement lodash.get()
View get.js
// basic reimplementation of https://lodash.com/docs#get
var util = require('util')
var obj1 = {
'a': {
'b': {
'c': 1
}
}
@btsuhako
btsuhako / Add URLACL
Created Dec 6, 2014
Windows: URLACL addition for non-admin processes
View Add URLACL
SET PORT_NAME = 8443
SET USER_NAME = everyone
netsh http add urlacl url=http://+:PORT_NAME/ user=USER_NAME
@btsuhako
btsuhako / gist:ad3ff0e8f9a35347a778
Created Dec 3, 2014
Consume response headers from AngularJS $resource
View gist:ad3ff0e8f9a35347a778
const API_URL = "http://myapp.com/api/v1/object/:id";
const API_KEY = "1234567890";
//URL format of API call:
//http://myapp.com/api/v1/object/1?access_token=1234567890
app.service("Service", function ($resource, $q) {
var Resource = $resource(API_URL, {
access_token: API_KEY
@btsuhako
btsuhako / ajaxJSON.js
Created Aug 21, 2013
Consume JSON with a CherryPy web application
View ajaxJSON.js
//assuming that you're using jQuery
var myObject = { "my_key": "my_value" };
$.ajax({
type: "POST",
url: "my_route",
data: JSON.stringify(myObject),
contentType: 'application/json',
dataType: 'json',