Skip to content

Instantly share code, notes, and snippets.

@pmocek
pmocek / gist:4562229
Last active December 11, 2015 06:49
TTYter commands to create @SeattlePD Tweets by Beat Twitter lists
#
# The following commands can be used with [TTYter][1] to create Twitter lists
# for @SeattlePD's "Tweets by Beat" feeds, five by precinct and one for all
# precincts' feeds combined.
#
# [1]: <http://www.floodgap.com/software/ttytter/>
#
# Get the list of feeds with:
# curl http://seattle.gov/police/tweets/feeds.htm 2>/dev/null \
# | grep twitter.com.Seatt | sed -e's/.*twitter.com.\(Seattle....\)".*/\1/'
@pmocek
pmocek / gist:4710420
Created February 4, 2013 22:41
Failure to bootstrap Chef 11 server using chef-solo
root@chef:~# cat /etc/chef/chef.json
{"chef_server": {"server_url": "http://localhost:4000", "webui_enabled": "true"}, "run_list": ["recipe[chef-server::rubygems-install]"]}
root@chef:~# chef-solo -c /etc/chef/solo.rb -j /etc/chef/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
Starting Chef Client, version 11.0.0
Compiling Cookbooks...
[2013-02-04T22:24:32+00:00] WARN: Cloning resource attributes for link[/etc/chef/webui.rb] from prior resource (CHEF-3694)
[2013-02-04T22:24:32+00:00] WARN: Previous link[/etc/chef/webui.rb]: /tmp/chef-solo/cookbooks/chef-server/recipes/rubygems-install.rb:114:in `block in from_file'
[2013-02-04T22:24:32+00:00] WARN: Current link[/etc/chef/webui.rb]: /tmp/chef-solo/cookbooks/chef-server/recipes/rubygems-install.rb:114:in `block in from_file'
[2013-02-04T22:24:32+00:00] WARN: Cloning resource attributes for link[/etc/chef/expander.rb] from prior resource (CHEF-3694)
[2013-02-04T22:24:32+00:00] WARN: Previous link[/etc/chef/expander.rb]: /tmp/chef-solo/
@pmocek
pmocek / gist:4727966
Created February 7, 2013 02:39
Chef Server v11 installation failure
[2013-02-06T21:36:39+00:00] INFO: *** Chef 11.0.0 ***
[2013-02-06T21:36:40+00:00] INFO: Setting the run_list to ["recipe[chef-server]"] from JSON
[2013-02-06T21:36:40+00:00] INFO: Run List is [recipe[chef-server]]
[2013-02-06T21:36:40+00:00] INFO: Run List expands to [chef-server]
[2013-02-06T21:36:40+00:00] INFO: Starting Chef Run for chef
[2013-02-06T21:36:40+00:00] INFO: Running start handlers
[2013-02-06T21:36:40+00:00] INFO: Start handlers complete.
[2013-02-06T21:36:40+00:00] INFO: directory[/etc/chef-server] created directory /etc/chef-server
[2013-02-06T21:36:40+00:00] INFO: directory[/etc/chef-server] owner changed to 0
[2013-02-06T21:36:40+00:00] INFO: directory[/etc/chef-server] group changed to 0
@pmocek
pmocek / gist:4733480
Created February 7, 2013 19:30
Chef deploy_revision provider used in application_php fails, seemingly attempting to use home dir of apache user for SSH known_hosts when running git ls-remote
[2013-02-07T19:08:14+00:00] INFO: Processing deploy_revision[my_app] action deploy (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/providers/default.rb line 122)
================================================================================
Error executing action `deploy` on resource 'deploy_revision[my_app]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '128'
@pmocek
pmocek / gist:6855592
Created October 6, 2013 15:48
comparison of two versions of NSA Tor paper published by Washington Post (the first cached by Tor Project)
$ wget http://media.encrypted.cc/files/nsa/ces-summer-2006-tor-paper-28redacted-29.pdf
--2013-10-06 08:35:04-- http://media.encrypted.cc/files/nsa/ces-summer-2006-tor-paper-28redacted-29.pdf
Resolving media.encrypted.cc (media.encrypted.cc)... 92.62.46.23, 2a02:2c8:f000:23::2
Connecting to media.encrypted.cc (media.encrypted.cc)|92.62.46.23|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 315597 (308K) [application/pdf]
Saving to: `ces-summer-2006-tor-paper-28redacted-29.pdf'
100%[==================================================================>] 315,597 232K/s in 1.3s
@pmocek
pmocek / gist:7012387
Created October 16, 2013 18:21
sample of public records received from Seattle Police Department via [request](https://www.muckrock.com/foi/seattle-69/alpr-data-review-request-log-6422/) for ALPR data review request log
==> tbl_Images.txt <==
477D3D07-84A9-489F-85AF-4EA93F4BF069|2013-05-13 11:00:39.960|AE04180B-35D7-E111-9D4B-00A0D525C26C| 1|01F59F98-BAFD-4E53-B995-000009BCF456|A | NULL
4C38CD46-87A2-4AAC-8646-559E0D108280|2013-07-09 12:36:35.633|A2DD0344-39E3-E211-993E-00A0D52CFB18| 1|0A37C779-758C-4F1D-B069-00003634583C|A | NULL
9238D0EB-2BF4-4BBB-8EB9-43E7A11945BF|2013-07-24 10:53:16.483|AC04180B-35D7-E111-9D4B-00A0D525C26C| 1|ADD45538-F9BE-49ED-A594-0001003DDF15|A | NULL
30CBD2FB-7874-4E38-BC74-BDC119518A95|2013-07-12 19:33:07.877|AC04180B-35D7-E111-9D4B-00A0D525C26C| 1|E71CDE9A-E228-41D6-9EC2-00013074DA65|A | NULL
4C1713A6-358C-4687-8AF5-72639916885B|2013-07-29 12:13:05.820|AC04180B-35D7-E111-9D4B-00A0D525C26C| 1
--- earlier_version
+++ later_version
@@ -1,36 +1,42 @@
-http://www.smh.com.au/world/mission-accomplished-says-edward-snowden-20131224-hv6t0.html
+http://www.washingtonpost.com/world/national-security/edward-snowden-after-months-of-nsa-revelations-says-his-missions-accomplished/2013/12/23/49fc36de-6c1c-11e3-a523-fe73f0ff6b8d_story.html
-MOSCOW: Edward Joseph Snowden emerged at the appointed hour, alone, blending
+MOSCOW — The familiar voice on the hotel room phone did not waste words.
+
+"What time does your clock say, exactly?" he asked.
@pmocek
pmocek / gist:8657e7e566ade0c2b97f
Created June 19, 2014 20:08
HTTPS requests for Ars Technica URLs redirect to HTTP (insecure) URLs
$ curl --verbose https://arstechnica.com/ars-staff-pgp-keys/
* About to connect() to arstechnica.com port 443 (#0)
* Trying 50.31.151.33... connected
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
@pmocek
pmocek / gist:1d558542e8a532327d61
Last active August 29, 2015 14:06
No SSL with The Intercept's interc.pt URL shortener
$ curl --verbose https://interc.pt/1r3Srqo
* About to connect() to interc.pt port 443 (#0)
* Trying 69.58.188.49... connected
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to interc.pt:443
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to interc.pt:443
@pmocek
pmocek / xychelsea_2015-04-16T0942-0500
Last active August 29, 2015 14:19
Transcription of handwritten letter from Chelsea Manning via @xychelsea <https://twitter.com/xychelsea/status/588714140618731521>
Chelsea E. Manning
89289
1300 North Warehouse Road
Fort Leavenworth, Kansas 66027-2304
2015.04.04
Statement for: Public Release
Subject: @xychelsea twitter account