Skip to content

Instantly share code, notes, and snippets.

View andrewSC's full-sized avatar
🎉

Andrew Crerar andrewSC

🎉
View GitHub Profile
Started POST "/user/development/api/v1/imports" for 10.125.0.2 at 2016-03-02 18:11:54 +0000
Processing by Api::Json::ImportsController#create as JSON
Parameters: {"table_name"=>"shapes_merge", "sql"=>"SELECT shapes.shape_id, shapes.shape_pt_lat, shapes.shape_pt_lon, shapes.shape_pt_sequence, CASE WHEN trips.the_geom IS NULL
THEN shapes.the_geom ELSE trips.the_geom END AS the_geom, trips.direction_id, trips.route_id, trips.service_id, trips.shape_id AS trips_shape_id, trips.trip_headsign, trips.trip_
id FROM shapes FULL OUTER JOIN trips ON LOWER(TRIM(shapes.shape_id)) = LOWER(TRIM(trips.shape_id))", "user_domain"=>"development"}
(0.000788s) SELECT * FROM "users" WHERE ("username" = 'development') LIMIT 1
(0.000701s) SELECT * FROM "users" WHERE "id" = '86de79d4-2177-4d21-a8aa-790c564c9476'
(0.000123s) BEGIN
(0.000530s) INSERT INTO "logs" ("type", "user_id", "entries", "updated_at") VALUES ('import', '86de79d4-2177-4d21-a8aa-790c564c9476', '', '2016-03-02 18:11:54.105590+0000') RETUR
NING *
@thomasfr
thomasfr / iptables.sh
Last active April 13, 2024 01:59
iptable rules to allow outgoing DNS lookups, outgoing icmp (ping) requests, outgoing connections to configured package servers, outgoing connections to all ips on port 22, all incoming connections to port 22, 80 and 443 and everything on localhost
#!/bin/bash
IPT="/sbin/iptables"
# Server IP
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')"
# Your DNS servers you use: cat /etc/resolv.conf
DNS_SERVER="8.8.4.4 8.8.8.8"
# Allow connections to this package servers