Skip to content

Instantly share code, notes, and snippets.

View ocxo's full-sized avatar
💆‍♂️
domakesaythink

Adam Ochonicki ocxo

💆‍♂️
domakesaythink
View GitHub Profile
#!/bin/bash
#####
# Builds a custom nginx
#
RELEASE_TAGS="nginx+custom"
RELEASE_MAINTAINER="Adam Ochonicki"
RELEASE_MAINTAINER_EMAIL="github.com@fromonesrc.com"
RELEASE_MESSAGE="Testing"
@ocxo
ocxo / gist:ce376fb4ab3298392048
Created December 16, 2014 17:10
temporary hack to address bug with vagrant-vbguest installation on vagrant 1.7.1
# temporary hack to address bug with vagrant-vbguest installation
# https://github.com/mitchellh/vagrant/issues/4962
if awk "BEGIN {exit `vagrant -v` == "1.7.1" ? 0 : 1 }"
then
sudo sed -i .original 's/\*\*opts/opts/g' /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/machine.rb
fi
unless Chef::Config[:solo]
databag = Chef::EncryptedDataBagItem.load("credentials", "datadog")
node.default.datadog.api_key = databag['api_key']
include_recipe "datadog::dd-agent"
end
users = User.where("data @> hstore('first_name', null) or data @> hstore('last_name', null)")
users.each do |u|
u.first_name = "First" if u.first_name.blank?
u.last_name = "Last" if u.last_name.blank?
u.save(validate: false)
end

Hi there,

You’re receiving this email because your account is using an integration which we are sadly removing from Zendesk.

“Screenr”, an integration for Screencasting within Zendesk, is unfortunately going away. The company behind Screenr, “Articulate”, will cease offering Screenr as a product by June, 2015 at the earliest.

This should not immediately affect you and there is nothing you need to do right now. Please keep reading to stay informed about what will happen.

What happened?

014-09-11T01:48:19.636674+00:00 app[app.1]: /app/node_modules/moustached-hubot/scripts/statuspage.coffee:103
2014-09-11T01:48:19.639754+00:00 app[app.1]: broken_components = components.filter(function(component) {
2014-09-11T01:48:19.639812+00:00 app[app.1]: ^
2014-09-11T01:48:19.641594+00:00 app[app.1]: TypeError: Object #<Object> has no method 'filter'
2014-09-11T01:48:19.641597+00:00 app[app.1]: at /app/node_modules/moustached-hubot/scripts/statuspage.coffee:94:8, <js>:103:40
2014-09-11T01:48:19.641599+00:00 app[app.1]: at IncomingMessage.<anonymous> (/app/node_modules/hubot/node_modules/scoped-http-client/lib/index.js:70:20)
2014-09-11T01:48:19.641600+00:00 app[app.1]: at IncomingMessage.emit (events.js:117:20)
2014-09-11T01:48:19.641602+00:00 app[app.1]: at _stream_readable.js:943:16
2014-09-11T01:48:19.641603+00:00 app[app.1]: at process._tickCallback (node.js:419:13)
2014-09-11T01:48:19.641604+00:00 app[app.1]:

Keybase proof

I hereby claim:

  • I am fromonesrc on github.
  • I am fromonesrc (https://keybase.io/fromonesrc) on keybase.
  • I have a public key whose fingerprint is 0BC0 CBE9 CB8B 4AC2 C0A5 AD6F 4B56 E424 F70D 6F15

To claim this, I am signing this object:

@ocxo
ocxo / gist:10126053
Created April 8, 2014 13:43
hipchat openssl vulnerability
./Heartbleed hipchat.com:443
2014/04/08 09:43:02 ([]uint8) {
00000000 02 00 79 68 65 61 72 74 62 6c 65 65 64 2e 66 69 |..yheartbleed.fi|
00000010 6c 69 70 70 6f 2e 69 6f 59 45 4c 4c 4f 57 20 53 |lippo.ioYELLOW S|
00000020 55 42 4d 41 52 49 4e 45 30 24 6b 08 11 e5 51 d9 |UBMARINE0$k...Q.|
00000030 c4 6a ff 93 d2 f3 5d e4 63 bd 38 bb 4e 40 42 00 |.j....].c.8.N@B.|
00000040 00 00 10 00 0e 00 00 0b 68 69 70 63 68 61 74 2e |........hipchat.|
00000050 63 6f 6d 00 05 00 05 01 00 00 00 00 00 0a 00 08 |com.............|
00000060 00 06 00 17 00 18 00 19 00 0b 00 02 01 00 00 0d |................|
00000070 00 0a 00 08 04 01 04 03 02 01 02 03 f7 32 56 49 |.............2VI|
@ocxo
ocxo / gist:9142012
Created February 21, 2014 19:47
Ukraine government
"Hi, my name is Nastasia,
Usually I have a normal job working in an advertising agency. But times are not normal.
Yesterday more than 70 of my fellow people were shot and killed by the government in Ukraine.
Shot in the head, shot in the stomach. Blood coloring the cobble stones red at Kyiv's main square, Maidan, where me and my friends have walked, ate ice-cream and danced at festivals over the years.
The government claims that these people were terrorists, yet I know what system they were fighting against. A corrupt, brutal and criminal bunch of thugs making the lives of ordinary citizens unbearable.
require 'rubygems'
require 'right_aws'
aws_access_key_id = 'your-access-key'
aws_secret_access_key = 'your-secret-key'
target_bucket = 'your-source-bucket'
destination_bucket = 'your-destination-bucket'
s3 = RightAws::S3Interface.new(aws_access_key_id, aws_secret_access_key)