Skip to content

Instantly share code, notes, and snippets.

John Morales JohnMorales

  • Northern Virginia
Block or report user

Report or block JohnMorales

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

#ActiveRecord cheat sheet / EXAMPLES


$ gem install activerecord

in GEMFILE: gem ‘activerecord’


View dabblet.css
.inner-border {
background: #000;
color: #fff;
margin: 50px;
padding: 15px;
position: relative;
.inner-border:before {
border: 5px solid #000;
content: "";
JohnMorales / dabblet.css
Last active Aug 29, 2015
Non-form Fieldset Style
View dabblet.css
* Non-form Fieldset Style
.fieldset {
position: relative;
border: 1px solid #ddd;
padding: 10px;
View dabblet.css
* Simple Styles for hrs (
*/ {
border: 0;
height: 1px;
background: #333;
background-image: -webkit-linear-gradient(left, #ccc, #333, #ccc);
background-image: -moz-linear-gradient(left, #ccc, #333, #ccc);
View dabblet.css
body {
background: #e6e6e6;
.corners {
background: #f6f6f6;
height: 700px;
margin: 50px auto;
max-width: 600px;
position: relative;
width: 80%;
JohnMorales / dabblet.css
Created Nov 30, 2014
Corner Ribbon (css-tricks)
View dabblet.css
* Corner Ribbon (css-tricks)
.wrapper {
margin: 50px auto;
width: 280px;
height: 370px;
background: white;
border-radius: 10px;
View timing.rb
sleep ( + 1 -
puts "Time is now #{"%10.5f" %}"
start_time = current_time =
while current_time.min == start_time.min
i = 0
while == current_time.sec
i += 1
puts "Ran #{i} in the last sec #{"%10.5f" %}"
View gist:73e1280c962604e48273
package main
import (
func main() {
count := 0
View confirmation_opentilt.js
ga('create', 'UA-54906935-2', 'auto', {'name': 'lifefuelsTracker'});
ga('require', 'ec');
ga('ec:setAction', 'purchase', {
'id': 'SET_TRANS_ID_HERE', // (Required) Transaction id (string).
'revenue': 'SET_TOTAL_HERE', // Revenue (currency).
'coupon': 'SET_COUPON_HERE' // Transaction coupon (string).
ga('lifefuelsTracker.send', 'event', 'preorders', 'completed purchase');
View rc.optware
#! /bin/sh
if test -z "${REAL_OPT_DIR}"; then
# next line to be replaced according to OPTWARE_TARGET
case "$1" in
echo "Starting Optware."
You can’t perform that action at this time.