Skip to content

Instantly share code, notes, and snippets.

View jwigal's full-sized avatar

Jeff Wigal jwigal

View GitHub Profile
@jwigal
jwigal / outer_inner_scope.php
Created January 31, 2014 18:52
global scope isn't global any more...
<?php
$global1 = "boo!";
function outer(){
global $global1;
$global2 = "ya!";
echo "<p>outer says global1 is $global1</p>";
function inner(){
@jwigal
jwigal / car.rb
Created January 22, 2012 18:22 — forked from otobrglez/car.rb
Experimenting with observer pattern (publish/subscribe pattern) in Ruby
# Simple Car class. Nothing special here...
class Car
attr_accessor :brand
attr_accessor :model
attr_accessor :year
def initialize(brand, model, year=2011)
@brand, @model, @year = brand, model, year
end
=begin
Delayed Job will let you do this:
MyMailer.delay.mailer_action(args)
but you can't do this because of yaml serialization:
MyMailer.mailer_action(args).delay.deliver
Most cases this works fine, but I need this as a before_destroy callback. my data is gone when
@jwigal
jwigal / gist:2315831
Created April 6, 2012 01:34
Kopywriting Kourse from AppSumo... any wonder why women aren't working in tech?
Date: Thu, 5 Apr 2012 19:12:32 -0400
To: jwigal@gmail.com
From: "KopywritingKourse" <nevmed@gmail.com>
Sender: kopywriting@aweber.com
Subject: why shitty stuff sometimes works better
If it's all dudes at a party, a hot chick will STAND OUT.
If every magazine ad has a hot chick on it, a big-ole picture of cute Pug will STAND OUT.

Issue with 1and1 account: our website uses 1and1 to host DNS, but we host the website itself on another server.

When I navigate to the website (firetrainingunlimited.com) the site was showing up as a 1and1 domain landing page.

Customer support technician says that it looks fine to him, the page was coming up correctly without a landing page.

They ask me to dump my cache, clear cookies, and restart my computer. No resolution. Same issue happening on multiple computers, and multiple devices.

1and1 control panel that allows me to manage the domain is not working, and is throwing a 500 error.

@jwigal
jwigal / redis_labs_rails_ssl_config.md
Last active April 24, 2023 15:28
Redis Labs SSL configuration for Rails

Config below assumes you are not using client certificate authentication, e.g.:

Transport layer security (TLS): ON and TLS client authentication: OFF

in credentials, define redislabs:

redislabs:
  username: whatsmyname