Skip to content

Instantly share code, notes, and snippets.

tdm00 / gist:4b05d114dc0441eb68f2ed45c0e1d657
Created Jan 30, 2019
Postman Pre-request Script for Akamai OPEN
View gist:4b05d114dc0441eb68f2ed45c0e1d657
var AccessToken;
var BaseURL;
var ClientSecret;
var ClientToken;
var ReqType;
var ReqPath;
var Data;
// Pick up environment variables into credentials object
var credentials = {
View gist:a2fe0b9eeddc5d902262
On Thursday April 23 I have promptly escaped from a maximum security office in the Eyde building to the Lansing underground until Monday April 27. Today, still wanted by people like you emailing me, I survive as a person taking a vacation day. If you have a problem, if no one else can help, and if you can find a phone, maybe you can reach me at 517-884-XXXX.
Dun da Dun Daaa Dun dun duhhhh
tdm00 / sample.js
Created Jun 12, 2014
CasperJS sample test file
View sample.js
var url = '';
casper.test.begin('Lookup homepage', 1, function suite(test) {
casper.start(url, function() {
test.assertHttpStatus(200, "Web server returned page correctly");
test.assertTitle('Michigan State University');
}); {
tdm00 / example.js
Created Aug 9, 2013
Do the following in Chrome Developer Tools Console
View example.js
var d = new Date(datetime);
/* returns Wed Jul 31 2013 01:05:00 GMT-0400 (EDT) */
tdm00 / gist:5485824
Created Apr 30, 2013
Rails is just Ruby fix
View gist:5485824
module Beeper
def self.twilio_phone_number
def self.twilio_sid
def self.twilio_auth_token
tdm00 / Dev_Gemfile
Last active Dec 15, 2015
Group of gems that I use in development for Ruby on Rails. Paste this into your Gemfile and then run `bundle install`AAfter the gems are installed, you need to also run `rails generate rails_footnotes:install`
View Dev_Gemfile
group :development do
gem 'brakeman'
gem 'better_errors'
gem 'binding_of_caller'
gem 'meta_request'
gem 'rack-mini-profiler'
gem 'rails-footnotes'
# run `rails generate rails_footnotes:install`
tdm00 / gist:5151726
Created Mar 13, 2013
gitlab logrotate config
View gist:5151726
# Place this file in /etc/logrotate.d/gitlab
/home/gitlab/gitlab/log/*.log {
rotate 52
View application.css
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:b
tdm00 / Comment.rb
Created Oct 4, 2012
Dashboard of posts and comments
View Comment.rb
class Comment < ActiveRecord::Base
# Associations
belongs_to :post
belongs_to :commenter
tdm00 / patient.rb
Created Oct 1, 2012
Associations to deep?
View patient.rb
class Patient < ActiveRecord::Base
# Associations
has_many :Requisitions
# Functions
def full_name
return [given_name, family_name].join(' ')