- A functional language. Either Elixir or Clojure
- A non-SQL database. Bonus points for Riak or Datomic
- A non-bash shell
- The UNIX process model: fork/exec
- Sockets: create a socket and accept on it. Bonus points for
netcat
- A text editor
- Git. At least
git rebase -i
- Encodings
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
<html> | |
<head> | |
</head> | |
<body> | |
<table width="100%" height="100%" style="background-color:blue"> | |
<tr> | |
<td valign="middle" align="center"> | |
Yo | |
</td> | |
</tr> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="31dp" | |
android:height="183dp" | |
android:viewportWidth="31" | |
android:viewportHeight="183"> | |
<path | |
android:fillColor="#902e2e" | |
android:pathData="M0 0h31v183H0z " /> |
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
type User struct { | |
CreatedAt time.Time `json:"created_at,string"` | |
UpdatedAt time.Time `json:"updated_at,string"` | |
FirstName string `json:"first_name,string"` | |
LastName string `json:"last_name,string"` | |
} | |
data = "{…json…}" | |
var u User | |
err := json.Unmarshal(data, &u) |
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
class AppConfiguration | |
def self.configure(env) | |
raise "Neeed access token to work" unless env["TOKEN"] | |
self.access_token=env["TOKEN"] | |
end | |
def self.access_token=(token) | |
@access_token = token | |
end | |
def self.access_token |
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 "./test_helper" | |
class PasswordResetTest < ActionDispatch::IntegrationTest | |
with_user("[email protected]", "oldpassword") do |user| | |
assert_response(200) { user.visits_profile_page } | |
assert_response(400) { user.resets_password_to(nil) } | |
assert_response(200) { user_resets_password_to("newpassword") } | |
end | |
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
class FooController < ApplicationController | |
create_endpoint = swagger_method :create do |create| | |
create.summary "List all the Foos" | |
create.header :auth, :"X-AUTH-TOKEN", :required | |
create.param :new_foo, {name: String, address: {zip: String, city: String}} | |
end | |
def index | |
query = create_endpoint.parse(request) | |
auth_header = query.header[:auth] |
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
class Controller | |
def self.create_friend_request(user, params) | |
obj = Model.new(params) | |
if obj.valid? | |
render json: obj, status: :created | |
else | |
render json: obj.errors, status: 400 | |
end | |
unless Rails.env.development? || Rails.env.test? |
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
# Interesting variables: | |
# - $COLUMNS: how wide are we? | |
# - $SECONDS: how long have we been running | |
# %#: root will have #, others will have % | |
autoload -U colors | |
setopt prompt_subst | |