Skip to content

Instantly share code, notes, and snippets.

View jjcall's full-sized avatar
🎯
Focusing

Jason Calleiro jjcall

🎯
Focusing
View GitHub Profile
# ~/.osx — http://mths.be/osx
# root check
if [[ $EUID -ne 0 ]]; then
echo "################################";
echo "## YOU ARE NOT RUNNING AS ROOT #";
echo "################################";
echo "#";
echo "# USAGE: sudo $0";
exit;
@jjcall
jjcall / pop-profile.html
Created July 2, 2013 20:50
Pop Profile Markup
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Profile Page</title>
<meta name="description" content="">
@jjcall
jjcall / json.js
Last active December 20, 2015 20:39
[
{
"id":"0001",
"type":"donut",
"name":"Cake",
"ppu":0.55,
"batters":{
"batter":[
{
"id":"1001",
@jjcall
jjcall / POP-Brand.markdown
Created November 8, 2013 17:32
A Pen by Jason Calleiro.
Problem:
Attempted to set a value for 'name' which is not allowed on the model User.
Summary:
Without including Mongoid::Attributes::Dynamic in your model and the attribute does not already exist in the attributes hash, attempting to call User#name= for it is not allowed. This is also triggered by passing the attribute to any method that accepts an attributes hash, and is raised instead of getting a NoMethodError.
Resolution:
You can include Mongoid::Attributes::Dynamic if you expect to be writing values for undefined fields often.
/Users/jjco/.rvm/gems/ruby-2.0.0-p0@quickmvp/bundler/gems/mongoid-9b3bc1264032/lib/mongoid/attributes/processing.rb:96:in `process_attribute'
/Users/jjco/.rvm/gems/ruby-2.0.0-p0@quickmvp/bundler/gems/mongoid-9b3bc1264032/lib/mongoid/attributes/processing.rb:25:in `block in process_attributes'
/Users/jjco/.rvm/gems/ruby-2.0.0-p0@quickmvp/bundler/gems/mongoid-9b3bc1264032/lib/mongoid/attributes/processing.rb:23:in `each_pair'
/Users/jjco/.rvm/gems/ruby-2.0.0-p0@quickmvp/bundler
$(document).ready ->
$(".next").click ->
target = $(this).attr('data-target')
$('body, html').animate
scrollTop: $('#' + target).offset().top, 600
setTimeout (->
$(".idea-logo").addClass "animated tada"
), 2000
.jackbox-modal {
font: 12px Arial, Helvetica, sans-serif;
color: #666;
line-height: 18px;
background: rgba(0, 0, 0, 0.75);
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
-o-box-sizing: content-box;
-ms-box-sizing: content-box;
box-sizing: content-box;
.navbar-header
%a.logo{href: home_path}
- if content_for(:header_follow)
.sharing
= yield :header_follow
- if content_for?(:navigation)
= yield :navigation
- else
%nav{role: "navigation"}
.navbar-header
%a.logo{href: home_path}
- if content_for(:header_follow)
.sharing
= yield :header_follow
- if content_for?(:navigation)
= yield :navigation
- else
%nav{role: "navigation"}
/* Form Progress */
.progress {
margin: 20px auto;
text-align: center;
overflow: visible;
background: inherit;
box-shadow: inherit;
text-align: right;
}