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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Dice Roll Game</title> | |
</head> | |
<body> | |
<h1>Dice Roller</h1> | |
<div class="dice" id="first-die"></div> | |
<div class="dice" id="second-die"></div> | |
<button id="roll-dice">Roll the Dice</button> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Tiny Turtle</title> | |
<script src="https://toolness.github.io/tiny-turtle/tiny-turtle.js"></script> | |
</head> | |
<body> | |
<h1>Tiny Turtle</h1> | |
<canvas></canvas> | |
</body> |
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 ReportBuilder | |
def csv_report(objects, adapter, opts = {}) | |
writer = CsvWriter.new(adapter) | |
objects.each do |object| | |
writer.write_object(object, opts) | |
end | |
writer.to_s | |
end |
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/rlContainer" | |
style="?feedCardView" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<LinearLayout | |
android:id="@+id/llContainer" | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" |
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
package com.finnerds.wealthnow.adapters; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.Button; | |
import android.widget.ImageView; | |
import android.widget.TextView; | |
import android.widget.Toast; |
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
# encoding: utf-8 | |
namespace :dev do | |
namespace :heroku do | |
HEROKU_CMD = "GEM_HOME='' BUNDLE_GEMFILE='' GEM_PATH='' RUBYOPT='' /usr/bin/heroku" | |
desc "initialize heroku instance" | |
task :init => :environment do | |
STDOUT.puts "What do you want to call your environment?".colorize(:yellow) | |
input = STDIN.gets.strip | |
exit if input.blank? |
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
=> #<User id: 110, email: "[email protected]", crypted_password: "$2a$10$oWWIP/cyDCkdjSAuabsWd.4LmITNER2.snHZNs1n9c8R...", salt: "y85TW1tozJXwXqxWsU7L", created_at: "2014-01-29 22:59:07", updated_at: "2014-01-29 22:59:08", remember_me_token: nil, remember_me_token_expires_at: nil, reset_password_token: nil, reset_password_token_expires_at: nil, reset_password_email_sent_at: nil, last_login_at: "2014-01-29 23:32:53", last_logout_at: nil, last_activity_at: "2014-01-31 16:50:57", first_name: "jaimel", last_name: "gauda", phone_number: "3144948435", zendesk_user_id: "605708293", last_login_from_ip_address: "24.6.52.99", used_free_months: 0, agree_to_tos: true, lead_id: nil, conversion_token: ""> | |
irb(main):005:0> user.invoices | |
[Shard: slave_0] Invoice Load (1.3ms) SELECT `invoices`.* FROM `invoices` WHERE `invoices`.`user_id` = 110 | |
=> #<ActiveRecord::Associations::CollectionProxy [#<Invoice id: 105, order_id: 112, user_id: 110, foreign_key: "in_3Ov9pbVLvRGBRg", aasm_state: "shipped", created_at: " |
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
{ | |
"command": "ruby -rubygems -r./custom_plan -eZeus.go", | |
"plan": { | |
"boot": { | |
"default_bundle": { | |
"development_environment": { | |
"prerake": {"rake": []}, | |
"console": ["c"], | |
"generate": ["g"] |
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 'zeus/rails' | |
class CustomPlan < Zeus::Rails | |
# def my_custom_command | |
# # see https://github.com/burke/zeus/blob/master/docs/ruby/modifying.md | |
# end | |
def spec(argv=ARGV) | |
# disable autorun in case the user left it in spec_helper.rb | |
RSpec::Core::Runner.disable_autorun! |
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
{ | |
"command": "ruby -rubygems -r./custom_plan -eZeus.go", | |
"plan": { | |
"boot": { | |
"default_bundle": { | |
"development_environment": { | |
"prerake": {"rake": []}, | |
"console": ["c"], | |
"generate": ["g"] |
NewerOlder