Skip to content

Instantly share code, notes, and snippets.

@qizwiz
qizwiz / .profile
Created June 9, 2011 13:58
bash profile (with rvm)
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/bin"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
class Question% a attr_accessor :key, :answers% a % a def initialize(session, key)% a self.key = key% a @answers = session[:answers] ||= {}% a end% a % a def save_answer% a # save answer logic% a end% a % a def get_results% a # get results logic% a end% a % a class << self% a def find(session, key = nil)% a keys = [ :one, :two, :three, :four, :five, :six, :seven ]% a key = key.to_s.downcase.strip.to_sym% a % a if(keys.include?(key))% a Question.new(session, key)% a else% a nil% a end% a end% a end% aend% a
<?php if ($site->getOffer()->type == 'whitepaper'): ?>% a<h3>Fill out this form to obtain our% a<?php $offerName = $site->getOffer()->name; ?> % a<?php echo ($offerName == 'Transition PartnersProgram' || $offerName == 'Built by Advisors, for Advisors' || $offerName == 'Moving Beyond The Numbers') ? 'brochure' : 'white paper'; ?>, % a<em><?php echo $site->getOffer()->CTAName(); ?></em></h3>% a<?php elseif ($site->offer_id == 39 || $site->offer_id == 40): ?>% a<h3>Fill out this form to obtain our video, <em><?php echo $site->getOffer()->name; ?>% a<?php elseif($site->getOffer()->type == 'webinar'): ?></em></h3>% a<h3>Fill out this form to obtain our webinar, <em><?php echo $site->getOffer()->name; ?></em></h3> % a<?php elseif($site->getOffer()->type == 'flash_drive'): ?>% a<h3>Fill out this form to obtain your complimentary flash drive.</h3>% a<?php endif;?>% a<?php echo $form->render(); ?>% a<li class="submit">% a <input type="image" id="submit" class="submit" src="/_images/submit-bg.gif" width="50" height=
# We want to make sure that each game is a valid game object - in this case a simple hash of values. Even still, we wouldn't want to return a hash with a nil name. Raise an InvalidGameError error in the new_game method if name is nil.
class InvalidGameError < StandardError; end
def new_game(name, options={})
{
name: name,
year: options[:year],
system: options[:system]
Create a tweets fixture in the tweets.yml file. The Tweet model has a zombie_id that's an Integer and a status that's a String.
# test/fixtures/tweets.yml
hello_world:
# zombies.yml
ash:
id: 1
name: 'Ash'
<div class="page-header">
<h1>>Navy Feeds</h1>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>Name></th>
<th>URL</th>
<th>Tags</th>
<th>Actions</th>
<!DOCTYPE html>
<html>
<script src="scripts/jquery.js"></script>
<script src="scripts/underscore.js"></script>
<script src="scripts/backbone.js"></script>
<script src="scripts/admin.js"></script>
<body>
<h1>THIS IS AN ADMIN INTERFACE</h1>
<table id="feeds-view" class="table table-striped">
Tramp: Opening connection for default using ssh...
Tramp: Sending command `exec ssh -o ControlPath=/var/folders/h5/fsftfbjd6z989gkv2gxrjf300000gq/T/tramp.29975Y4Q.%r@%h:%p -o ControlMaster=auto -o ControlPersist=no -e none default'
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on `default'
Tramp: Opening connection for default using ssh...done
modified code/lib/eCarList/Bridge/eCarList/V1/REST.pm
@@ -47,6 +47,7 @@ Returns a new eCarList::Bridge::eCarList::V1::REST object.
Returns:
$self -- a blessed eCarList::Bridge::eCarList::V1::REST object
+
=cut
sub new {
my ($class, %args) = @_;
@@ -56,11 +57,10 @@ sub new {
@qizwiz
qizwiz / xmonad.hs
Last active October 30, 2019 16:34
my first xmonad config file
import Data.Char
import XMonad
import XMonad.Actions.WindowGo
import XMonad.Config.Desktop
import XMonad.Hooks.ManageDocks
import XMonad.Prompt
import XMonad.Prompt.RunOrRaise
import XMonad.Util.EZConfig (additionalKeysP)
xpConfig :: XPConfig