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
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.4.22 <0.9.0; | |
library console { | |
address constant CONSOLE_ADDRESS = | |
0x000000000000000000636F6e736F6c652e6c6f67; | |
function _sendLogPayloadImplementation(bytes memory payload) internal view { | |
address consoleAddress = CONSOLE_ADDRESS; | |
/// @solidity memory-safe-assembly |
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
"""IPython startup script to detect and inject VIRTUAL_ENV's site-packages dirs. | |
IPython can detect virtualenv's path and injects it's site-packages dirs into sys.path. | |
But it can go wrong if IPython's python version differs from VIRTUAL_ENV's. | |
This module fixes it looking for the actual directories. We use only old stdlib | |
resources so it can work with as many Python versions as possible. | |
References: | |
http://stackoverflow.com/a/30650831/443564 |
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
ssh -D port -C -N user@server |
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
setxkbmap -model pc105 -layout pl,ru -variant legacy, -option grp:alt_shift_toggle,grp_led:scroll |
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
cd /path/to/your_django_app/ | |
mkdir locale | |
django-admin makemessages -l ru # or other languages | |
# (edit translations in /locale directory) | |
django-admin compilemessages |
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
@ TXT v=spf1 ip4:yourip4 ip6:yourip6 include=_spf.yandex.net ~all |
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
# edited file-that-i-remember.txt | |
git add file-that-i-remember.txt | |
git commit | |
# realize you forgot a file | |
git add file-that-i-forgot.txt | |
git commit --amend --no-edit | |
# if the original commit (the one without the file you forgot to add) was pushed to a remote repo, you may need to push amended commit with --force: | |
git push origin master --force |
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
def get_migration_apps(): | |
migration_apps = [] | |
for module in INSTALLED_APPS: | |
try: | |
app = module.rsplit('.', 1)[1] | |
except IndexError: | |
app = module | |
migration_apps.append(app) | |
return migration_apps |
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
[user] | |
name = %name% | |
email = %email% | |
[credential] | |
helper = cache | |
[core] | |
editor = gvim -f | |
excludesfile = ~/.gitignore | |
[diff] | |
tool = gvimdiff |