I hereby claim:
- I am mgeraci on github.
- I am mgeraci (https://keybase.io/mgeraci) on keybase.
- I have a public key whose fingerprint is C7B2 3496 19DC 4F2A 73FF 147D 69E4 0628 490D DCD9
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
import re | |
import os | |
import sys | |
import copy | |
import time | |
import signal | |
import StringIO | |
import hashlib |
#!/usr/bin/env python | |
# given two files, combine them line by line, character by character, such that | |
# the output takes a character from whichever file iesn't blank (defaulting to | |
# the character in file1) | |
import linecache | |
import os | |
path = os.path.dirname(os.path.realpath(__file__)) |
# regex is from http://www.regexguru.com/2008/11/detecting-urls-in-a-block-of-text/ | |
exp = /// | |
\b(?:(?:https?|ftp|file)://|www\.|ftp\.) | |
(?:\([-A-Z0-9+&@\#/%=~_|$?!:,.]*\)|[-A-Z0-9+&@\#/%=~_|$?!:,.])* | |
(?:\([-A-Z0-9+&@\#/%=~_|$?!:,.]*\)|[A-Z0-9+&@\#/%=~_|$]) | |
///ig | |
for url in $(this).text().match exp | |
# add a protocol if it just starts with www | |
url_with_protocol = "http://#{url}" if url.match(/^www.+/) |
/* instructions on where to put this file: https://www.howtogeek.com/334716/how-to-customize-firefoxs-user-interface-with-userchrome.css/ */ | |
.tabbrowser-tab > .tab-stack > .tab-content[pinned][titlechanged]:not([visuallyselected="true"]) { | |
background-image: none !important; | |
} |
A list of codemod steps to remove Bourbon from an scss codebase. Replace the -d src/
flag with a directory of your choice. For the project I'm converting now, each command should be run with the -d src/
flag, and then with the -d globals
flag to catch all locations where scss files may live.
Basic calls to transition (e.g., @include transition(opacity 200ms linear)
):
codemod -m -d src/ --extensions scss '@include transition\((.+?)\);' 'transition: \1;'
def redefine(user_input): | |
result = None | |
if user_input < 2: | |
result = user_input | |
elif user_input < 5: | |
result = user_input * 2 | |
else: | |
result = user_input * 3 |
export default { | |
post(url, data) { | |
if (!url || url === '') { | |
return Promise.reject(new Error('OkcApi was called without a url')); | |
} | |
if (url !== 'essay' && url !== '/essay') { | |
return Promise.reject(new Error(`OkcApi does not support the route '${url}'`)); | |
} |
/* Hide blue stripe on active tab */ | |
.tab-line[selected="true"] { | |
opacity: 0 !important; | |
} | |
/* Completely hide the "title changed" notification dot on pinned tabs */ | |
.tabbrowser-tab > .tab-stack > .tab-content[titlechanged] { | |
background-image: none !important; | |
} |