Skip to content

Instantly share code, notes, and snippets.

View oreoshake's full-sized avatar
:octocat:
I used to make it easier to develop this site securely

Neil Matatall oreoshake

:octocat:
I used to make it easier to develop this site securely
View GitHub Profile
As of July 8, 2016 I will be resigning to become the new CEO of GitLob.
@oreoshake
oreoshake / speed.diff
Created December 15, 2016 08:59
A smarter Dockerfile and more containers when testing. Takes 50% as long to run.
diff --git a/Dockerfile b/Dockerfile
index d63fcbe..22d87cd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,21 +11,22 @@ ENV DISPLAY :99
RUN rm -rf /root/bmp
-# use COPY for local testing, use the RUN command in CI
-COPY . /root/bmp
@oreoshake
oreoshake / .git-slash-hooks-slash-post-checkout
Created June 15, 2017 22:00
Automatically restore your working state from the last time you pulled a `git commit -am "wip"`
#!/bin/bash
set -e
prevHEAD=$1
newHEAD=$2
checkoutType=$3
[[ $checkoutType == 1 ]] && checkoutType='branch' ||
checkoutType='file' ;

Keybase proof

I hereby claim:

  • I am oreoshake on github.
  • I am oreoshake (https://keybase.io/oreoshake) on keybase.
  • I have a public key ASB-IgMwAQdkCZ0QKGX_YjWLn5ABKR5FPf26hoLA1KHOsgo

To claim this, I am signing this object:

Current way:

  1. User starts the flow
  2. sudo challenge (https://github.com/blog/1513-introducing-github-sudo-mode)\*
  3. scan totp seed
  4. confirm totp seed
  5. Download recovery codes / confirm backup number / enroll in delegated recovery (one or more)
  • User "prints recovery codes
  • User copies recovery to clipboard and stores elsewhere
  • User downloads a file containing the recovery codes
@oreoshake
oreoshake / unblockall.rb
Last active May 3, 2018 00:58
Deletes your blocks. Is really slow. Will probably hit rate limits quickly.
require 'twitter'
client = Twitter::REST::Client.new do |config|
config.consumer_key = ENV["CONSUMER_KEY"]
config.consumer_secret = ENV["CONSUMER_SECRET"]
config.access_token = ENV["ACCESS_TOKEN"]
config.access_token_secret = ENV["ACCESS_TOKEN_SECRET"]
end
USER_ID = < your user id >

GitHub's bug bounty workflow with chatops and slack integration

We make heavy use of bounty platform features such as common responses, interstitials, and chatops so we can respond, filter, and manage reports. This is the actual workflow that is described at a high level on the GitHub Engineering blog

Passive commands

These commands won't change any state but they can be helpful when working with the other commands.

  • .bounty responses [common_response_id] lists or shows common responses. Many of the commands accept a common_response_id that will be used to deliver consistent messaging to researchers.
  • .appsec-new will show all reports that have not been triaged.

New report comes in

@oreoshake
oreoshake / implicit_override.rb
Created January 3, 2019 20:47
Just some examples of me using factory_bot wrong
# Traits can be used as implicit factory attributes but if a value is set in a
# a factory, a trait cannot override that value. If you explicitely pass the trait,
# it overrides as expected.
require 'factory_bot'
FactoryBot.define do
factory :foobot do
foo { "parent" }
override
@oreoshake
oreoshake / calendar-to-remarkable.scpt
Last active March 30, 2019 20:16
script to generate my daily calendar and send the file to my reMarkable table
# This script assumes you have set up a "Print to ReMarkable" automator print plugin script
# Follow https://github.com/juruen/rmapi/blob/master/docs/tutorial-print-macosx.md
# crontab -e and add:
# */15 * * * * osascript /path to your script.scpt >> some log file
# «class menI» Print to ReMarkable of «class menE» PDF of «class menB» PDF of window Print of «class pcap» Calendar
# You will probably run into permission errors when editing the crontab and when the job actually runs
tell application "Calendar"
@oreoshake
oreoshake / creds.js
Last active February 28, 2020 21:21
creds = new PasswordCredential({id: username, password: "foo"})
await navigator.credentials.store(creds)
// ... then
navigator.credentials.get({
password: true,
mediation: "optional",
id: username, // no prompt or prompt with one user
})