This file contains 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
import React from "react"; | |
interface DragGuardProps {} | |
/** | |
* DragGuard prevents dragging by touch-enabled children like form controls, buttons, or links | |
*/ | |
export const DragGuard: React.FC<DragGuardProps> = ({ children }) => { | |
return <div onMouseDown={(e) => e.stopPropagation()}>{children}</div>; | |
}; |
This file contains 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
/* | |
* Discord: Don't copy stuff into this box | |
* Me: dOn'T COpy sTuFf iNtO tHIs bOx | |
*/ | |
clearMessages = function (guild_id, author_id, authToken, deleted = new Set()) { | |
const searchURL = `https://discordapp.com/api/v6/guilds/${guild_id}/messages/search?author_id=${author_id}&include_nsfw=true` | |
const headers = { Authorization: authToken } | |
let clock = 0 | |
interval = 500 | |
function delay(duration) { |
This file contains 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
git clone git@github.com:jsnns/dotfiles.git ~/.me | |
bash ~/.me/install.sh |
This file contains 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
import datetime | |
import pytz | |
import dateutil.parser | |
def to_utc(str, *, zulu_marker=False): | |
# string formats | |
from_format = '%m/%d/%Y %I:%M:%S %p' | |
to_format = '%m/%d/%Y %H:%M:%S' |
This file contains 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
# arrays | |
integer = input("What's your favorite number? ") | |
if integer == 13: | |
print("LIAR!") | |
elif integer == 7: | |
print("You must be Marshal") | |
else: | |
print("Cool your favorite number is: " + str(integer)) |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am jsnns on github. | |
* I am jsansbury (https://keybase.io/jsansbury) on keybase. | |
* I have a public key ASAmBoSir_CxygEj4IIlE_7Yd-Dixs1iERSIaZ75rcjTXgo | |
To claim this, I am signing this object: |