{ | |
"final_space": true, | |
"console_title": true, | |
"console_title_style": "folder", | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"horizontal_offset": 0, | |
"vertical_offset": 0, |
# Source: https://stackoverflow.com/a/43317244 | |
$path = ".\aws-ec2-key.pem" | |
# Reset to remove explict permissions | |
icacls.exe $path /reset | |
# Give current user explicit read-permission | |
icacls.exe $path /GRANT:R "$($env:USERNAME):(R)" | |
# Disable inheritance and remove inherited permissions | |
icacls.exe $path /inheritance:r |
g = 'module attribute (module-global variable)' | |
"""This is g's docstring.""" | |
class AClass: | |
c = 'class attribute' | |
"""This is AClass.c's docstring.""" | |
def __init__(self): | |
"""Method __init__'s docstring.""" |
# Futures | |
from __future__ import unicode_literals | |
from __future__ import print_function | |
# Generic/Built-in | |
import datetime | |
import argparse | |
# Other Libs | |
import youtube_dl |
#!interpreter [optional-arg] | |
# -*- coding: utf-8 -*- | |
""" | |
{Description} | |
{License_info} | |
""" | |
# Futures | |
from __future__ import print_function |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
import os, signal | |
def check_kill_process(pstring): | |
for line in os.popen("ps ax | grep " + pstring + " | grep -v grep"): | |
fields = line.split() | |
pid = fields[0] | |
os.kill(int(pid), signal.SIGKILL) |