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 nice_size(size): | |
if size >= 1073741824: | |
postfix = " Gb." | |
divisioner = 1073741824 | |
elif 1048576 <= size < 1073741824: | |
postfix = " Mb." | |
divisioner = 1048576 | |
elif 1024 <= size < 1048576: |
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
Get-SshAgent - Returns the process ID of the running agent, or zero if there is not one currently running. | |
Start-SshAgent - Starts the agent process and sets the appropriate environment variables for SSH. | |
Stop-SshAgent - Stops the process if there is one and unsets the variables. | |
Add-SshKey - Instructs the agent to add the given key to itself. This will cause you to be prompted for the passphrase. |
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
{ | |
"color_scheme": "Packages/Dayle Rees Color Schemes/Frontier.tmTheme", | |
"drag_text": false, | |
"font_face": "Consolas", | |
"font_size": 14, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], |
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
import sys, os | |
sys.path.append(os.pardir) |
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
class вася(): | |
def курить_бамбук(): | |
print ("пых-пых") | |
петров = вася | |
петров.курить_бамбук() # пых-пых |
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 bar(x: "широта в градусах"=60): | |
pass | |
def foo(x: int, y: int, *args: str) -> int: | |
pass | |
bar.__annotations__ # {'x': 'широта в градусах'} | |
foo.__annotations__ # {'y': <class 'int'>, 'args': <class 'str'>, 'return': <class 'int'>, 'x': <class 'int'>} |
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
from fabric.api import * | |
import os | |
import fabric.contrib.project as project | |
# Local path configuration (can be absolute or relative to fabfile) | |
env.theme = 'themes/your-theme' | |
env.deploy_path = '/absolute/path/for/generated/output' | |
# Remote server configuration | |
prod = 'username@server.example.com:22' |
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
Show hidden characters
{ | |
// Sets the colors used within the text area | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
// Note that the font_face and font_size are overriden in the platform | |
// specific settings file, for example, "Preferences (Linux).sublime-settings". | |
// Because of this, setting them here will have no effect: you must set them | |
// in your User File Preferences. | |
"font_face": "Consolas", | |
"font_size": 12, |
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
var defaults = { | |
zero: 0, | |
one: 1 | |
}; | |
var myOptions = Object.create(defaults); | |
var yourOptions = Object.create(defaults); | |
// When I want to change *just* my options | |
myOptions.zero = 1000; |
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
; <! - left alt-key | |
; ^ - ctrl-key | |
; + - shift-key | |
; sc021 - W | |
; sc010 - D | |
; sc011 - F | |
; sc014 - T | |
; sc013 - R | |
; sc024 - J | |
; sc025 - K |
OlderNewer