Discover gists
This file contains hidden or 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
#!/bin/bash | |
# prisma does not generate rollback (down script by default) | |
# this script will generate the down script for each migration | |
name=$1 | |
dir=$(pwd) | |
if [ -z "$name" ] | |
then |
This file contains hidden or 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
pip install -e packages/markitdown[all] | |
pip install pyinstaller | |
create a bootstrap file: | |
markitdown-main\packages\markitdown\src\runme.py | |
content: | |
import markitdown.__main__ |
This file contains hidden or 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
Two pointers: one input, opposite ends | |
```python3 | |
def fn(arr): | |
left = ans = 0 | |
right = len(arr) - 1 | |
while left < right: | |
# do some logic here with left and right | |
if CONDITION: |
This file contains hidden or 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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
# any name can be used; Velero uses the labels (below) | |
# to identify it rather than the name | |
name: change-storage-class-config | |
# must be in the velero namespace | |
namespace: velero | |
# the below labels should be used verbatim in your | |
# ConfigMap. |
This file contains hidden or 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
<div style="position:absolute;top:-999px;left:-999px"> | |
<svg | |
id="effectSvg" | |
width="200" | |
height="200" | |
viewBox="0 0 200 200" | |
xmlns="http://www.w3.org/2000/svg"> | |
<filter id="displacementFilter4"> |
This file contains hidden or 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
http://www.mysqltutorial.org/import-csv-file-mysql-table/ | |
------------------------------------------------------------ | |
Import CSV File Into MySQL Table | |
This tutorial shows you how to use the LOAD DATA INFILE statement to import CSV file into MySQL table. |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
This file contains hidden or 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
@tool | |
extends Control | |
@export var device: int = 0 | |
func _process(delta: float) -> void: | |
queue_redraw() | |
func _draw() -> void: | |
# Set the size, the layout isn't dynamic and based on something I sketched! |
NewerOlder