Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View seagoj's full-sized avatar

Jeremy Seago seagoj

View GitHub Profile
-- matches in A and B
SELECT count(A.*)
FROM A
JOIN B ON DATE(A.date) = DATE(B.date), A.id = B.id, A.phone_number = B.phone_number;
@seagoj
seagoj / readme.txt
Last active April 10, 2021 21:07
solution_3.py
# Lovely Lucky LAMBs
# ==================
# Being a henchman isn't all drudgery. Occasionally, when feeling generous, Commander Lambda hand out Lucky LAMBs (Lambda's All-purpose Money Bucks). Henchmen can use Lucky LAMBs to buy things like a second pair of socks, a pillow for their bunks, or even a third daily meal!
# However, actually passing out LAMBs isn't easy. Each henchman squad has a strict seniority ranking which must be respected -- or else the henchmen will revolt and you'll all get demoted back to minions again!
# There are 4 key rules which you must follow in order to avoid a revolt:
# 1. The most junior henchman (with the least seniority) gets exactly 1 LAMB. (There will always be at least 1 henchman on a team.)
# 2. A henchman will revolt if the person who ranks immediately above them gets more than double the number of LAMBs they do.
@seagoj
seagoj / sql.puml
Last active August 13, 2020 00:46
@startuml
' extend class for Table'
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' primary key: bold
!define primary_key(x) <b>x</b>
' unique key: grren text'
!define unique_key(x) <color:green>x</color>
' not null underlined
!define not_null(x) <u>x</u>
' default: italic``'
@startuml
skinparam dpi 300
!if (%not(%variable_exists("$FONTNAME")))
!$FONTNAME = "Verdana"
!endif
!if (%not(%variable_exists("$FONTSIZE")))
!$FONTSIZE = 11
@seagoj
seagoj / vim-vixen.json
Created October 15, 2019 13:08
Vim Vixen
{
"keymaps": {
"0": { "type": "scroll.home" },
":": { "type": "command.show" },
"o": { "type": "command.show.open", "alter": false },
"O": { "type": "command.show.open", "alter": true },
"t": { "type": "command.show.tabopen", "alter": false },
"T": { "type": "command.show.tabopen", "alter": true },
"w": { "type": "command.show.winopen", "alter": false },
"W": { "type": "command.show.winopen", "alter": true },
@seagoj
seagoj / Alacritty.md
Created January 24, 2019 20:10
Storm King's Thunder:Alacritty
  • Level: 6
  • Experience: 15685 + 650 / 23000
  • HP: 40/40
  • Init: 3
  • AC: 13
  • Speed: 30
  • Proficiency Bonus: 3

Stats

  • Str: 8 (-1)
@seagoj
seagoj / request.py
Created March 19, 2017 22:15
request example
#!/usr/bin/env python3
import requests
r = requests.get('http://ip.jsontest.com/');
print(r.json());
@seagoj
seagoj / mac_apps.markdown
Last active January 5, 2017 17:10
mac gui apps
function isEmpty(obj) {
for(var key in obj) {
if(obj.hasOwnProperty(key))
return false;
}
return true;
}
@seagoj
seagoj / vagrant-up
Created April 14, 2016 16:03
Resume/Suspend Vagrant VM script
# !/bin/bash
(\
# attempts to resume VM
(vagrant resume; vagrant ssh) || \
# rebuilds vm
(vagrant destroy -f &amp;&amp; vagrant up; vagrant ssh)\
# suspends when ssh session closes
) && vagrant suspend