Skip to content

Instantly share code, notes, and snippets.

View skorth's full-sized avatar

Sascha Korth skorth

View GitHub Profile
git clone https://github.com/OWASP/railsgoat.git
cd railsgoat
gem install brakeman
brakeman -o report.html
open report.html
bundle
gem install bundler-audit
bundle-audit update
bundle-audit
gem 'devise', '3.0.0'
@skorth
skorth / github.js
Last active January 15, 2018 10:46
Show all Github Comments
javascript:(function(){document.querySelectorAll('.outdated-diff-comment-container').forEach((el) => {el.classList.add('open')});}());
@skorth
skorth / abstract_mysql_adapter.rb
Created January 12, 2016 08:28
Remove `DEFAULT NULL` for primary key column to support MySQL 5.7.3
class ActiveRecord::ConnectionAdapters::Mysql2Adapter
NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY"
end
{
user(id: 123) {
name,
friends {
name
}
}
}
{
"data": {
"user" : {
"name": "Luke Skywalker",
"friends": [
{ name: "Han Solo" },
{ name: "Leia Organa" }
]
}
}
type Query {
user: User
user(id: Int): User
}
type User {
name: String
profilePicture(size: Int = 50): ProfilePicture
}
{
user(id: 123) {
name,
profilePicture(size: 200) {
width,
height,
url
}
}
}
{
__schema {
types {
kind
name
description
}
}
}