Skip to content

Instantly share code, notes, and snippets.

View JohnMorales's full-sized avatar

John Morales JohnMorales

  • Northern Virginia
View GitHub Profile
package main
import (
"fmt"
"time"
)
func main() {
count := 0
sleep (Time.now.round + 1 - Time.now).to_r
puts "Time is now #{"%10.5f" % Time.now.to_f}"
start_time = current_time = Time.now
while current_time.min == start_time.min
i = 0
while Time.now.sec == current_time.sec
i += 1
end
puts "Ran #{i} in the last sec #{"%10.5f" % Time.now.to_f}"
@JohnMorales
JohnMorales / dabblet.css
Created November 30, 2014 12:26
Corner Ribbon (css-tricks)
/**
* Corner Ribbon (css-tricks)
*/
.wrapper {
margin: 50px auto;
width: 280px;
height: 370px;
background: white;
border-radius: 10px;
/**
* Simple Styles for hrs (http://css-tricks.com/examples/hrs/)
*/
hr.style-one {
border: 0;
height: 1px;
background: #333;
background-image: -webkit-linear-gradient(left, #ccc, #333, #ccc);
background-image: -moz-linear-gradient(left, #ccc, #333, #ccc);
@JohnMorales
JohnMorales / dabblet.css
Last active August 29, 2015 14:10
Non-form Fieldset Style
/**
* Non-form Fieldset Style
*/
.fieldset {
position: relative;
border: 1px solid #ddd;
padding: 10px;
}
@JohnMorales
JohnMorales / dabblet.css
Last active August 29, 2015 14:10
Untitled
.inner-border {
background: #000;
color: #fff;
margin: 50px;
padding: 15px;
position: relative;
}
.inner-border:before {
border: 5px solid #000;
content: "";
@JohnMorales
JohnMorales / dabblet.css
Created November 30, 2014 12:14
Corner Effect
body {
background: #e6e6e6;
}
.corners {
background: #f6f6f6;
height: 700px;
margin: 50px auto;
max-width: 600px;
position: relative;
width: 80%;

#ActiveRecord cheat sheet / EXAMPLES

INSTALL

$ gem install activerecord

in GEMFILE: gem ‘activerecord’

REQUIRE