Skip to content

Instantly share code, notes, and snippets.

View jcarouth's full-sized avatar

Jeff Carouth jcarouth

View GitHub Profile
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
oh noes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJXDZj7AAoJEEllxC7B+rMNzNkP/3jirRKu1HLDwd1GKz0fxTwo
9kYy9lItdYOzv7gMl+cTbdfyJyUA75GJBdks+xKO171Gg4xuo8O3ODALw3//OsVc
QfGTK3Qxky3M5dm9W54Lm8Xy0vX0HmmHruUGTxsg6wwk3j6Mn1qXSmPgQYzVxsUx
SELECT GROUP_CONCAT(LETTERS_YO SEPARATOR '') as ME
FROM (
SELECT DISTINCT t1.LETTERS_YO FROM (SELECT 'A' AS LETTERS_YO UNION SELECT 'B' UNION SELECT 'D') as t1
INNER JOIN
(SELECT * FROM(SELECT 'A' UNION SELECT 'B' UNION SELECT 'C' UNION SELECT 'D') as t2) as t3
ORDER BY LETTERS_YO DESC
) AS t4
@jcarouth
jcarouth / SecretProject.php
Created October 4, 2015 20:36
Secret Project with 100% test coverage
<?php
class SecretProject
{
public function run()
{
return true;
}
}
<?php
try {
//snip
try {
something_that_throws();
} catch (Exception $e) {
throw $e;
}
//snip
} catch (Exception $e) {
Jeff Carouth is a web application developer honing his programming and skiing skills at Liftopia. He is an
active member of the PHP community, speaker, co-organizer of BCSPHP, and co-host of the Loosely Coupled
podcast. He believes quality code, testing, and automation are necessary ingredients in a recipe for a
successful software project. When not hacking away at code he is a father and husband, beer and Scotch
enthusiast, and an amateur photographer. Follow Jeff on Twitter as jcarouth or read his blog at
http://carouth.com
Verifying that +jcarouth is my Bitcoin username. You can send me #bitcoin here: https://onename.io/jcarouth
@jcarouth
jcarouth / app.rb
Last active August 29, 2015 14:07
class Character
attr_accessor :name
def initialize(attributes = {})
attributes.each do |attr, value|
setter = "#{attr}="
send(setter, value) if self.respond_to?(setter)
end
end
end

ZendCon 2014 PGP Keysigning

At ZendCon 2014 there will be a PGP Keysigning event. To participate all you need to do is a) have a PGP key you would like signed by other particpants and you will be able to sign other participant's keys with and b) have some form of official identification that matches the primary identity on your key. For example, if you name is listed on your PGP key as Bobby Tables you should have a government-issued ID that reads close to Bobby Tables. (Common substitutions like Matt for Matthew or Jen for Jennifer are usually acceptable.)

For some background and how-to information, check out my blog posts on a similiar PGP keysigning event at php[tek] 2014 and Signing PGP Keys for the mechanics of how to sign keys.

Why you should participate

The web of trust is an important component to the security and usability of PGP keys for signing and encrypting. I am pers

some_object = nil
puts 'some_object is not set' if !some_object
# is equivalent to
puts 'some_object is not set' unless some_object

Keybase proof

I hereby claim:

  • I am jcarouth on github.
  • I am jcarouth (https://keybase.io/jcarouth) on keybase.
  • I have a public key whose fingerprint is 3FEA BC89 9C3A 86A0 44AF 66E0 E5DA D6A0 4D8B D439

To claim this, I am signing this object: