This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The HAML markup for the modals. Assumes inclusion of 'aria' data attributes | |
#step_1.modal{aria-hidden: false} | |
%p Step 1 Form | |
%form{ remote: :true, id: "horse_form" } | |
%label "What's your favorite horse?" | |
%input{type: :text} :favorite_horse | |
=link_to "Continue to Step #2", "#step_2", {data: {toggle: "modal"}, id:"modal_submit"} | |
#step_2.modal |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
content_id,workspace,channel,account,moment_title,moment_scheduled_at,post_name,post_type,content,scheduled_at,created_at,array_agg | |
6,atlas,Facebook,Atlas,Late Night Setist,2020-06-14 07:00:00,Facebook Post 1,standard,,,2018-07-12 21:24:21.119815+00:00,"[""https://res.cloudinary.com/opal/image/upload/v1531430716/jorik-blom-366499-unsplash_cnxxtc.jpg"", ""https://res.cloudinary.com/opal/image/upload/v1531430718/adult-barista-beverage-373639_two3g0.jpg"", ""https://res.cloudinary.com/opal/image/upload/v1531430718/daniel-gonzalez-602445-unsplash_popvcg.jpg"", ""https://res.cloudinary.com/opal/image/upload/v1531430719/coffee-cup-milk-7034_niulcj.jpg"", ""https://res.cloudinary.com/opal/image/upload/v1531430719/devin-avery-600578-unsplash_u1kocp.jpg"", ""https://res.cloudinary.com/opal/image/upload/v1531430722/marion-michele-330691-unsplash_eoqndu.jpg"", ""https://res.cloudinary.com/opal/image/upload/v1531430719/nathan-dumlao-290152-unsplash_lof1xl.jpg"", ""https://res.cloudinary.com/opal/image/upload/v1531430725/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="robbyrussell" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- !ruby/ActiveRecord:Delayed::Backend::ActiveRecord::Job | |
attributes: | |
id: 717 | |
priority: 0 | |
attempts: 0 | |
handler: |+ | |
--- !ruby/object:Delayed::PerformableMethod | |
args: [] | |
method_name: :fail_real_hard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ToDoList | |
def initialize | |
puts "What's your name, good sir?" | |
name = gets.strip | |
puts greeting(name) #this uses the greeting below | |
puts "1.) Make A To-Do List \n2.) Load A To-Do List\n" | |
while do_action = gets.chomp | |
case do_action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def duplicate_writers(artist_list) | |
FasterCSV.open("duplicate_writers_report.csv", "wb") do |csv| | |
csv << ["WRITER_ID","WRITER_NAME","ARTIST_BAND","WRITER_PRO_ID","WRITER_PRO_NUMBER","WRITING_CREDITS_COUNT"] | |
artist_list.each do |id| | |
artist = User.find(id) | |
writer_names = artist.writers.collect {|writer| writer.old_name.gsub(/\W+/,"").downcase} | |
artist.writers.each do |person| | |
#make their name downcase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Let say I'm getting back a JSON nested hash (or array of hashes) from an API | |
@example = {"results" = > {{"poop" => "shoop"},{"foo" => {"shizz" => "fizz", "nizzle"=>"bizzle"}}} | |
# YAML VIEW OF ABOVE | |
#- poop: shoop | |
#- foo: | |
# shizz: fizz | |
# nizzle: bizzle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() | |
{ | |
$('blockquote.text').expander(); | |
function initialize() { | |
var mapDiv = $('#map_canvas'); | |
var lat = mapDiv.data('latitude'), | |
lng = mapDiv.data('longitude'); | |
var mapOptions = { | |
center: new google.maps.LatLng(lat,lng), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'json' | |
require 'hashie' | |
class Geolocate | |
def self.ip(ip) | |
#REGEX FOR VALID IP ADDRESSES | |
if /\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/.match(ip).nil? | |
raise "Not a valid IP address (e.x. '123.456.78.9')" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rake aborted! | |
ActiveRecord::ConnectionNotEstablished | |
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:317:in `retrieve_connection' | |
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in `retrieve_connection' | |
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection' | |
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.9/lib/active_record/migration.rb:488:in `initialize' | |
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.9/lib/active_record/migration.rb:435:in `new' | |
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.9/lib/active_record/migration.rb:435:in `up' | |
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.0.9/lib/active_record/migration.rb:417:in `migrate' | |
/usr/lib/ruby/gems/1.9.1/gems/padrino-gen-0.9.29/lib/padrino-gen/padrino-tasks/activerecord.rb:136:in `block (2 levels) in <top (required)>' |
NewerOlder