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
#!/usr/bin/env bash | |
TOKEN="INSERTACCESSTOKENHERE" | |
OWNER="BBC-News" | |
REPO="responsive-news" | |
FILE_PATH="scripts/build/tabloid.sh" | |
FILE="https://api.github.com/repos/$OWNER/$REPO/contents/$FILE_PATH" | |
curl --header "Authorization: token $TOKEN" \ | |
--header 'Accept: application/vnd.github.v3.raw' \ |
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
#!/bin/bash | |
COOKIE_JAR="ab-cookie-jar" | |
COOKIE_NAME="_myapp_session" | |
USERNAME="[email protected]" | |
PASSWORD="password" | |
LOGIN_PAGE_URI="http://localhost:3000/users/sign_in" | |
TEST_PAGE_URI="http://localhost:3000/dashboard" | |
echo "Logging in and storing session id." |
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
#!/bin/bash | |
COOKIE_JAR="ab-cookie-jar" | |
COOKIE_NAME="_myapp_session" | |
USERNAME="[email protected]" | |
PASSWORD="password" | |
LOGIN_PAGE_URI="http://localhost:3000/users/sign_in" | |
TEST_PAGE_URI="http://localhost:3000/dashboard" | |
echo "Logging in and storing session id." |
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
Sampling process 7644 for 3 seconds with 1 millisecond of run time between samples | |
Sampling completed, processing symbols... | |
Analysis of sampling Atom Helper (pid 7644) every 1 millisecond | |
Process: Atom Helper [7644] | |
Path: /Applications/Atom.app/Contents/Frameworks/Atom Helper.app/Contents/MacOS/Atom Helper | |
Load Address: 0x10279b000 | |
Identifier: com.github.atom.helper | |
Version: 1.13.0 (1.13.0) | |
Code Type: X86-64 | |
Parent Process: Atom [6943] |
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 'sinatra' | |
enable :sessions | |
# helpers/session_helper.rb | |
helpers do | |
def session_user_id | |
session[:user_id] | |
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
var Test = { | |
describe: Test_describe, | |
before: Test_before, | |
expect: Test_expect, | |
it: Test_it, | |
context: Test_context, | |
contexts: [], | |
assertEquals: Test_assertEquals, | |
logError: Test_logError, | |
logSuccess: Test_logSuccess, |
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
module Timeable | |
def start_timer | |
@timeable_timer = Time.now.utc | |
end | |
def end_timer | |
Time.now.utc - @timeable_timer | |
end | |
end | |
class DragRace |
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
puts "Assign bob = \"bob\"" | |
bob = "bob" | |
puts "bob_smith is also a bob" | |
puts "So bob_smith = bob (the variable reference)" | |
bob_smith = bob | |
puts "We want to capitalize bob so : bob.capitalize!" |
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 SuperPower blast_them method depends on the abstract method projectile | |
module Blastable | |
def blast_them | |
puts "BLASTING: #{projectile} (#{self.class.name})" | |
end | |
end | |
class Tyrannosaurus | |
include Blastable |
NewerOlder