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
// https://github.com/acejump/AceJump | |
// https://stackoverflow.com/questions/46719530/how-do-i-tell-intellij-ideavim-to-re-source-the-ideavimrc | |
// IdeaVim users can choose to activate AceJump with a single keystroke (f, F and g are arbitrary) by running: | |
echo -e ' | |
" Press `f` to activate AceJump | |
map f <Action>(AceAction) | |
" Press `F` to activate Target Mode |
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() |
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
* { | |
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
// 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
// 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
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
#!/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
// 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
factorial :: Integer -> Integer | |
factorial i | |
| i <= 0 = 1 | |
| otherwise = i * factorial(i-1) | |
main = do | |
-- 120 | |
print (factorial 5) |
NewerOlder