Skip to content

Instantly share code, notes, and snippets.

CREATE TABLE cities (
id SERIAL PRIMARY KEY,
name VARCHAR(100),
geom GEOMETRY(Point, 4326)
);
CREATE USER felt_user WITH PASSWORD 'your_secure_password';
GRANT CONNECT ON DATABASE your_database TO felt_user;
GRANT USAGE ON SCHEMA public TO felt_user;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO felt_user;
-- Grant select permission on future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO felt_user;
@cduruk
cduruk / Dockerfile
Created July 7, 2021 05:17 — forked from mveytsman/Dockerfile
Dockerfile for postgis on fly.io
ARG PG_VERSION=12.5
ARG VERSION=dev
FROM golang:1.16 as flyutil
ARG VERSION
WORKDIR /go/src/github.com/fly-examples/postgres-ha
COPY . .
client = Twitter::REST::Client.new do |config|
config.consumer_key = CONSUMER_KEY
config.consumer_secret = CONSUMER_SECRET
config.access_token = OAUTH_TOKEN
config.access_token_secret = OAUTH_TOKEN_SECRET
end
def remove_friendships(client)
begin
@cduruk
cduruk / deletion.log
Created February 10, 2018 01:20
An oral history
➜ tw git:(master) ruby delete.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- twitter (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from delete.rb:2:in `<main>'
➜ tw git:(master) rvm
zsh: command not found: rvm
➜ tw git:(master) gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: key 105BD0E739499BDB: "Piotr Kuczynski <[email protected]>" not changed
gpg: key 3804BB82D39DC0E3: 81 signatures not checked due to missing keys
@cduruk
cduruk / data.json
Last active August 29, 2015 14:10
Sprongo
"{\"total\":1079,\"current_page\":1,\"per_page\":15,\"total_pages\":72,\"tickets\":[{\"id\":3910792,\"subject\":\"Feedback\",\"replies_count\":0,\"agent_replies_count\":0,\"comments_count\":0,\"last_activity_at\":\"2014-11-28T18:42:07Z\",\"created_at\":\"2014-11-28T18:42:07Z\",\"unanswered\":true,\"archived\":false,\"private\":false,\"spam\":false,\"trash\":false,\"summary\":\"can I copy a playlist that has already been created and paste under a different team?\",\"draft\":false,\"source\":{\"web\":\"[email protected]\"},\"labels\":[],\"content\":{\"html\":\"can I copy a playlist that has already been created and paste under a different team?<br>\",\"text\":\"can I copy a playlist that has already been created and paste under a different team?\n\",\"truncated\":false,\"attachments\":[{\"id\":1187638,\"created_at\":\"2014-11-28T18:42:04Z\",\"filename\":\"user.txt\",\"size\":603,\"content_type\":\"application/octet-stream\",\"cid\":null,\"url\":{\"original\":\"https://sprongo.supportbee.com/att
@cduruk
cduruk / keybase.md
Created August 13, 2014 21:18
keybase.md

Keybase proof

I hereby claim:

  • I am cduruk on github.
  • I am cduruk (https://keybase.io/cduruk) on keybase.
  • I have a public key whose fingerprint is 757B 80B7 C7BE E441 E519 9DA4 D859 787C FA7C 1ACB

To claim this, I am signing this object:

@cduruk
cduruk / units.swift
Created June 11, 2014 22:05 — forked from 74hc595/units.swift
foo
// Playground - noun: a place where people can play
import Cocoa
protocol UnitBase {
class var unitLabel:String { get }
}
// T: the unit
// U: its inverse
@cduruk
cduruk / madness.txt
Created December 6, 2013 04:02
Bower Install
➜ Code npm install -g bower
npm http GET https://registry.npmjs.org/bower
npm http 200 https://registry.npmjs.org/bower
npm http GET https://registry.npmjs.org/bower/-/bower-1.2.8.tgz
npm http 200 https://registry.npmjs.org/bower/-/bower-1.2.8.tgz
npm http GET https://registry.npmjs.org/bower-config
npm http GET https://registry.npmjs.org/bower-endpoint-parser
npm http GET https://registry.npmjs.org/bower-logger
npm http GET https://registry.npmjs.org/bower-json
npm http GET https://registry.npmjs.org/bower-registry-client