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
def unique_filename(path): | |
""" | |
Enforce unique upload file names. | |
Usage: | |
class MyModel(models.Model): | |
file = ImageField(upload_to=unique_filename("path/to/upload/dir")) | |
""" | |
import os, base64, datetime |
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
# Reset Jetbrains 2020 Products | |
import glob | |
import os | |
import winreg | |
from os import path | |
from os.path import expanduser | |
home = expanduser("~") | |
newJetbrainsHome = path.join(home, "AppData\Roaming\JetBrains") |
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
#!/bin/bash | |
# Thanks @ketos @krishjun @denis111 | |
## declare array of tools | |
declare -a tools=( | |
"DataGrip" | |
"CLion" | |
"Rider" | |
"PhpStorm" |