- What/Why JSON schema
- Apply to rails model validation
- Test your API endpoint with schema matcher
- Homework for a curious reader
- References
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
gem 'stackprof', require: false | |
gem 'ruby-prof', require: false |
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
$ cd /usr/local/lib | |
$ sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib | |
$ sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.4.dylib |
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
# app/controllers/application_controller.rb | |
class ApplicationController < ActionController::Base | |
def not_found | |
raise ActionController::RoutingError.new('Not Found') | |
rescue | |
render_404 | |
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
# This file describes how to configure a Linux computer as a router for GoogleFiber. | |
# References: | |
# https://wiki.debian.org/NetworkConfiguration#Bridges_and_VLANs | |
# https://wiki.debian.org/BridgeNetworkConnections#Configuring_bridging_in_.2Fetc.2Fnetwork.2Finterfaces | |
# http://flyovercountry.org/2014/02/google-fiber-gigabit-speeds-your-router-part-2-qos/ | |
source /etc/network/interfaces.d/* | |
# The loopback network interface | |
auto lo |
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
#!/usr/bin/env ruby | |
# Makes accessing the latest exitstatus a bit easier | |
require 'English' | |
# Updates all the outdated gems one by one and commits the changes | |
# for every gem update. This should make it a lot easier to revert | |
# a gem update. | |
class UpdateAllGems | |
def self.run |
Paprika doesn't have their API documented, so this is me reverse-engineering it from an Android device
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
#!/bin/bash -e | |
ln -s /usr/lib/x86_64-linux-gnu/amdgpu-pro . | |
ln -s /etc/OpenCL . | |
tar -czvf libs.tar.gz amdgpu-pro/* | |
tar -czvf conf.tar.gz OpenCL/* | |
cat > .dockerignore << EOF | |
OpenCL |