Skip to content

Instantly share code, notes, and snippets.

View MattStopa's full-sized avatar
💭
Meow Meow Meow

Matthew Stopa MattStopa

💭
Meow Meow Meow
View GitHub Profile
// MIT LICENSE
let x = document.querySelector("[data-testid='SearchBox_Search_Input']"); x.addEventListener('keyup', (e) => {
if(e.target.value.includes("from:")) {
e.target.value = e.target.value.split("from:").join("")
let parent = e.target.parentElement
let div = document.createElement("div");
div.innerText= "From:"
parent.prepend(div)
div.style['padding'] = '5px 10px'
➜ theHardWay git:(master) ✗ ruby 1printing.rb NO ONE LIKES CHEESE
["NO", "ONE", "LIKES", "CHEESE"]
1printing.rb:95:in `initialize': No such file or directory @ rb_sysopen - NO (Errno::ENOENT)
from 1printing.rb:95:in `open'
from 1printing.rb:95:in `<main>'
CREATE TABLE users ( UserID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255) );
@MattStopa
MattStopa / asdf
Created July 12, 2013 19:13
asdf
sdfasdf
@MattStopa
MattStopa / gist:3918677
Created October 19, 2012 15:01
New Markdown
### This is H3 with the default style
>>Moo
### This is H3 with the Moo style
class AddKeys < ActiveRecord::Migration
def self.up
add_foreign_key "catalog_item", "catalog", :name => "catalog_item_catalog_id_fk"
add_foreign_key "catalog_item", "product", :name => "catalog_item_product_id_fk"
add_foreign_key "history_bak", "realm", :name => "history_bak_realm_id_fk"
add_foreign_key "history_bak", "user", :name => "history_bak_user_id_fk"
add_foreign_key "history", "meeting", :name => "history_meeting_id_fk"
add_foreign_key "history", "realm", :name => "history_realm_id_fk"
add_foreign_key "history", "user", :name => "history_user_id_fk"
add_foreign_key "invoice_history", "user", :name => "invoice_history_user_id_fk"
@MattStopa
MattStopa / gist:3136121
Created July 18, 2012 13:08
Gist Description
We couldn’t find that file to show.
Then /^I should see a JS alert$/ do
debugger
page.driver.browser.switch_to.alert
end
Then /^I should see a JS alert$/ do
debugger
page.driver.browser.switch_to.alert
end
@MattStopa
MattStopa / gist:1143586
Created August 13, 2011 07:49
Simple ruby example code
def my_method
"This is a great idea."
end