Skip to content

Instantly share code, notes, and snippets.

View Random-Stack-Random-Day's full-sized avatar

Coding in GA Random-Stack-Random-Day

  • Cartersville, GA
View GitHub Profile

Donavin's Portfolio

Making a BootStrap based portfolio to encourage my bootstrap foundation. Throwing in some jQ/JS to 'spruce' it up a bit.

A Pen by Donavin Northrup on CodePen.

License.

@Random-Stack-Random-Day
Random-Stack-Random-Day / Nearly Finalized Twitter.markdown
Last active September 24, 2015 02:52
Nearly Finalized Twitter

Nearly Finalized Twitter

Bootstrap Based Tab Browser: Array based Twitter Query, and Forismatic API. Side-by-side comparison.

A Pen by Donavin Northrup on CodePen.

License.

dnorthrup@bloccit:~/workspace (master) $ rails c
Loading development environment (Rails 4.2.4)
[1] pry(main)> cd Post.first
Post Load (0.2ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT 1
[2] pry(#<Post>):1> self.post = "My new post!"
NoMethodError: undefined method `post=' for #<Post:0x00000004599468>
from /usr/local/rvm/gems/ruby-2.2.1/gems/activemodel-4.2.4/lib/active_model/attribute_methods.rb:433:in `method_missing'
[3] pry(#<Post>):1> self.title = "My new title!"
=> "My new title!"
[4] pry(#<Post>):1> self.body = "My new body!"
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match */*
// @grant none
// ==/UserScript==
/* jshint -W097 */
<% provide(:title, @user.name) %>
<div class="row">
<aside class="col-md-4">
<section class="user_info">
<h1>
<%= gravatar_for @user %>
<%= @user.name %><br>
</h1>
</section>
</aside>
"[#<MTG::Legality:0x0000000539e900 @representable_attrs={:features=>{Representable::JSON=>true}, :definitions=>{\"format\"=>#<Representable::Definition ==>format @options={:parse_filter=>[], :render_filter=>[], :as=>\"format\"}>, \"legality\"=>#<Representable::Definition ==>legality @options={:parse_filter=>[], :render_filter=>[], :as=>\"legality\"}>}, :options=>{}, :wrap=>nil}, @format=\"Commander\", @legality=\"Legal\">, #<MTG::Legality:0x0000000539c3d0 @representable_attrs={:features=>{Representable::JSON=>true}, :definitions=>{\"format\"=>#<Representable::Definition ==>format @options={:parse_filter=>[], :render_filter=>[], :as=>\"format\"}>, \"legality\"=>#<Representable::Definition ==>legality @options={:parse_filter=>[], :render_filter=>[], :as=>\"legality\"}>}, :options=>{}, :wrap=>nil}, @format=\"Legacy\", @legality=\"Legal\">, #<MTG::Legality:0x0000000539afd0 @representable_attrs={:features=>{Representable::JSON=>true}, :definitions=>{\"format\"=>#<Representable::Definition ==>format @options={:pars
namespace :cards do
desc "Create cards"
task :create_cards => :environment do
cards = MTG::Card.all
cards.each do |card|
puts card.name + '-' + card.set
card.image_url.blank? ? image_url = "/assets/mtgCardBack.jpg" : image_url = card.image_url
card.legalities each do |x|
y = []
y << {x.format => x.legality}
@Random-Stack-Random-Day
Random-Stack-Random-Day / CharBuilder
Last active April 18, 2018 20:03
Testing Formik
static checkLossPerk = (perkProgress, removed) => {
let tempArray = new Array(removed);
for (let i=removed; i>0; i--){
if (perkProgress % 3 === 0) {
console.log("Can't lose any!");
}
else {
perkProgress--
console.log(perkProgress, "Lost one")
import React, { Component } from 'react';
import classNames from 'classnames';
import { FormControl } from 'material-ui/Form';
import { Redirect } from 'react-router-dom';
import InputFields from '../UI/Input/InputFields';
import Button from '../UI/Button/RaisedButton';
import Util from '../../util/Util';
import firebase from 'firebase';
import ErrorLabel from '../UI/Errors/ErrorLabel';
import Loading from '../UI/Loading/Loading';