See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
A quick way to remove intrusive Cortana from your OS by PoweShell (under admin rights)
Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage
Hooray!
#!/bin/sh | |
filename="check-"$(date '+%Y%m%d')".txt" | |
> "$filename" | |
while IFS= read -r line || [ -n "$line" ]; do | |
res=$(bash -c "sh runpython.sh -m johnnydep --output-format pinned $line" | grep -v "run python with params" | grep Django) | |
echo -n "$res, " >> "$filename" | |
echo "$line" >> "$filename" | |
done < requirements.local.txt |
by Keith Clark
from django.contrib import admin | |
from django import forms | |
class MyModelAdmin(admin.ModelAdmin): | |
# ... | |
def get_form(self, request, obj=None, **kwargs): | |
form_factory = super(MyModelAdmin, self).get_form(request, obj, **kwargs) | |
form_factory.base_fields['my_custom_field'] = forms.CharField(widget=forms.Textarea(), required=True) | |
# ... | |
def save_model(self, request, obj, form, change): |
Robocopy is Robust File Copy, a command-line tool built into Windows 10
Command Prompt
with administrator rights..bat
script in command prompt like:fastcopy "D:\folder" "D:\new_folder"
or for network files
fastcopy "\\10.1.2.111\folder" "D:\new_folder"
If you're a Windows OS user, you may have encountered the problem of Docker images consuming excessive disk space even after they've been deleted. This long-standing issue can significantly affect system performance and storage management.
Many Windows users have faced the challenge of Docker image files growing unexpectedly large. Even after removing images, the disk space is not always reclaimed efficiently, leading to frustration and reduced available storage.
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)Recently, the 500px.com platform has restricted access to favorites photos in order to force the user to purchase of a premium status.
These steps allow you to upload your favorites library in JSON
format.
// prepare page
document.querySelector('#root > [class^="StyledLayout__Box"]').style.overflow = "scroll"; // add scroll to sidebar
// now sroll to end page, please
Update 25/08/2022
Script that will join tags in 1Password backup file .1pux/export.data for import into Bitwarden as single name of folder.
Join multiple tags with "/" like ['Social', 'Personal', ] -> ['Social/Personal', ]. And "archived" item marked in tags like ['Archived/Social/Personal', ].
Please note, the script includes custom sorting tags and custom modification url.