Skip to content

Instantly share code, notes, and snippets.

View vyach-vasiliev's full-sized avatar

ฬะทçะรโลนร vyach-vasiliev

  • Milky Way galaxy, planet Earth
View GitHub Profile

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@vyach-vasiliev
vyach-vasiliev / delete_cortana.md
Created March 13, 2023 17:24
Delete Cortana from Windows 10 [FOREVER]

A quick way to remove intrusive Cortana from your OS by PoweShell (under admin rights)

Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage

Hooray!

@vyach-vasiliev
vyach-vasiliev / check.sh
Created February 16, 2023 12:06
Check Django version for packages
#!/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
@vyach-vasiliev
vyach-vasiliev / ReadMe.md
Last active April 22, 2023 00:44
One element CSS Snow by Keith Clark
@vyach-vasiliev
vyach-vasiliev / gist:24f6d68bd5d93d39e95661b818383b9e
Created December 27, 2022 11:29 — forked from linuxfood/gist:1474361
Django ModelForm custom fields in ModelAdmin
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):
@vyach-vasiliev
vyach-vasiliev / ReadMe.md
Last active March 11, 2023 22:52
Fastest copy big files with Robocopy - Windows 10 and above

Fastest copy big files

Robocopy is Robust File Copy, a command-line tool built into Windows 10

How to use multi-threaded feature with Robocopy

  1. Run this Command Prompt with administrator rights.
  2. Run this .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"
@vyach-vasiliev
vyach-vasiliev / README.md
Last active October 30, 2024 19:30
Compact VDisk after Docker operations

Resolving Docker Hard Disk Image File Size Issues on Windows

Is Your Docker Hard Disk Image File Too Large?

Is Docker Image Still Taking Up Space After Deletion?

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.

Common Problem for Windows OS Users

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.

@vyach-vasiliev
vyach-vasiliev / postgres-cheatsheet.md
Created September 5, 2022 07:43 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

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)
@vyach-vasiliev
vyach-vasiliev / 500px_FavoritePhotos.md
Last active August 26, 2022 14:46
Get links favorite images from 500px.com

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
@vyach-vasiliev
vyach-vasiliev / ReadMe.md
Last active August 24, 2022 22:52
Convert tags in 1Password backup to single name of folder Bitwarden

Modification .1pux (1Password backup file) to be compatible with Bitwarden import.

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.