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 os | |
import subprocess | |
import re | |
currentdir = os.getcwd() | |
filename = currentdir + "/git_submodule_commands.sh" | |
pattern = re.compile("(?P<push_url>Push\s+URL):\s+(?P<url>https.*)") | |
# Check if file exists. If it does, delete it. | |
if os.path.isfile(filename): |
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
factorial :: Integer -> Integer | |
factorial i | |
| i <= 0 = 1 | |
| otherwise = i * factorial(i-1) | |
main = do | |
-- 120 | |
print (factorial 5) |
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
// Terminator | |
Control + Shift + e = split Horizontally | |
Control + Shift + o = split Vertically | |
Control + Shift + t = open new tab | |
Control + Shift + i = open new window | |
Control + Shift + w = close terminal | |
Control + Shift + q = close window | |
Control + Shift + g = reset and clear the terminal | |
Alt + any directional button = focus on terminal depending on direction |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import argparse | |
from PIL import Image | |
# Get filename from arguments | |
parser = argparse.ArgumentParser(description='get arguments') |
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
It's best to be honest with yourself and come to terms with where you are in life and where you want to be. After that, unless you put action into your belief, you will be sad. Even if you fail, but put action into the belief, you'll be happy and have grown. | |
There is nothing noble in being superior to your fellow man; true nobility is being superior to your former self. | |
Hemingway | |
If your life sucks, make it better. No one will do it for you. Period. | |
“It’s only on the brink that people find the will to change. Only at the precipice do we evolve.” | |
reply |
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
// NodeJS | |
const assert = require('assert'); | |
/** | |
* Flatten an array of arbitrarily nested arrays of integers into a flat array of integers. | |
* e.g. [[1,2,[3]],4] -> [1,2,3,4]. | |
* | |
* @name flatten | |
* @param {Array} arr An array to flatten, nested or otherwise | |
* @returns {Array} the flattened array |
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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "cmd+k cmd+p", | |
"command": "python.execInTerminal", | |
"when": "editorTextFocus" | |
} | |
] |
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
* { | |
color: #93A1A1 !important; | |
background-color: #002b36 !important; | |
} | |
body > center > table > tbody > tr:first-child * { | |
background-color: #073642 !important; | |
} | |
body > center > table > tbody > tr:first-child * a:hover { | |
background: #002b36 !important; | |
} |
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
jest.mock( | |
'next/link', | |
() => | |
({ children }: { children: ReactChildren }): ReactChildren => | |
children, | |
) |
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
// Setup user events | |
const user = userEvent.setup() | |
// Clicking on an element. Using await is important | |
await user.click(screen.getTextBy('Some button')) | |
// Output HTML of screen | |
screen.debug() |
OlderNewer