This file contains hidden or 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 complete_yes_no | |
self.complete ? "Yes" : "No" | |
end |
This file contains hidden or 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
" Configuration file for vim | |
set modelines=0 " CVE-2007-2438 | |
" Normally we use vim-extensions. If you want true vi-compatibility | |
" remove change the following statements | |
set nocompatible " Use Vim defaults instead of 100% vi compatibility | |
set backspace=2 " more powerful backspacing | |
set ai " auto indenting | |
set smartindent " smart indents after something? |
This file contains hidden or 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 'unirest' | |
font_formats = ["otf", "ttf", "svg", "woff"] | |
font_formats.each do | |
|format, response| | |
response = Unirest::post("https://ofc.p.mashape.com/convert/", | |
{"X-Mashape-Authorization" => "***********************" }, | |
{:file => File.new("Arial.ttf", "rb"), | |
:format => "#{format}", :callback => "http://aqueous-taiga-8219.herokuapp.com/target"} | |
) |
This file contains hidden or 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
Started POST "/target" for 90.229.215.223 at 2013-05-15 19:48:26 -0600 | |
Processing by CheckInputsController#target as */* | |
Parameters: {"file"=>#<ActionDispatch::Http::UploadedFile:0x007f9ca98975e0 @original_filename="Skia-Regular.ttf", @content_type="application/octet-stream", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"Skia-Regular.ttf\"\r\nContent-Type: application/octet-stream\r\n", @tempfile=#<File:/var/folders/g0/m3jlqvpd4cbc3khznvn5c_7m0000gn/T/RackMultipart20130515-5063-1uybosa>>, "originalFileName"=>"Skia.ttf"} | |
WARNING: Can't verify CSRF token authenticity | |
Completed 500 Internal Server Error in 1ms | |
TypeError (can't convert ActionDispatch::Http::UploadedFile into String): | |
app/controllers/check_inputs_controller.rb:18:in `initialize' | |
app/controllers/check_inputs_controller.rb:18:in `new' | |
app/controllers/check_inputs_controller.rb:18:in `target' |
This file contains hidden or 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
Started POST "/target" for 90.229.215.223 at 2013-05-15 20:27:45 -0600 | |
Processing by CheckInputsController#target as */* | |
Parameters: {"file"=>#<ActionDispatch::Http::UploadedFile:0x007f9cab4c37a0 @original_filename="Skia-Regular.woff", @content_type="application/octet-stream", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"Skia-Regular.woff\"\r\nContent-Type: application/octet-stream\r\n", @tempfile=#<File:/var/folders/g0/m3jlqvpd4cbc3khznvn5c_7m0000gn/T/RackMultipart20130515-5063-1k02gby>>, "originalFileName"=>"Skia.ttf"} | |
WARNING: Can't verify CSRF token authenticity | |
Completed 500 Internal Server Error in 1ms | |
ArgumentError (pathname contains null byte): | |
app/controllers/check_inputs_controller.rb:18:in `initialize' | |
app/controllers/check_inputs_controller.rb:18:in `new' | |
app/controllers/check_inputs_controller.rb:18:in `target' |
This file contains hidden or 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
array = [] | |
random_number = rand(5) + 5 | |
string = "" | |
walls_and_halls = ["W", "."] | |
(random_number * random_number + 1).times { string << walls_and_halls.sample } | |
string = string.chop! |
This file contains hidden or 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
<% if @user.errors.any? %> | |
<div id="error_explanation" > | |
<div class="alert alert-error"> | |
The form contains <%= pluralize(@user.errors.count, "error") %>. | |
</div> | |
<ul> | |
<% @user.errors.full_messages.each do |msg| %> | |
<li>* <%= msg %></li></br> | |
<% end %> | |
</ul> |
This file contains hidden or 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 'csv' | |
CSV.foreach(filename, :headers => true) do |row| | |
Pokemon.create!(row.to_hash) | |
end |
This file contains hidden or 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
$('h1').click -> | |
alert("You clicked this") |
This file contains hidden or 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> | |
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<script src="click.js"></script> | |
</head> | |
<body> | |
<h1>This should do something!!</h1> | |
</body> |