- Separate subject from body with a blank line.
- Limit the subject line to 50 characters.
- Capitalize the subject line.
- Do not end the subject line with a period.
- Use the imperative mood in the subject line. (Start the line with "Fix", "Add", "Change" instead of "Fixed", "Added", "Changed".
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
#!/bin/bash | |
# download and install latest geckodriver for linux or mac. | |
# required for selenium to drive a firefox browser. | |
install_dir="/usr/local/bin" | |
json=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest) | |
if [[ $(uname) == "Darwin" ]]; then | |
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos"))') | |
elif [[ $(uname) == "Linux" ]]; then | |
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux64"))') |
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
[Unit] | |
Description=Gunicorn for project %I | |
After=network.target | |
After=syslog.target | |
[Service] | |
EnvironmentFile=/etc/conf.d/django_%i | |
ExecStart=/usr/bin/start_gunicorn | |
Restart=always | |
SyslogIdentifier=gunicorn%I |
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
Install i3-gaps on Ubuntu 16 | |
apt-get install libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf xutils-dev dh-autoreconf | |
git clone --recursive https://github.com/Airblader/xcb-util-xrm.git | |
cd xcb-util-xrm/ | |
./autogen.sh | |
make | |
sudo make install |
Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'
Example: To get json record having _id equal 611
cat my.json | jq -c '.[] | select( ._id | contains(611))'
Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
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
"""" Tested in Python 3.4 """ | |
import urllib.request | |
import http.client | |
http.client.HTTPConnection.debuglevel = 1 | |
response = urllib.request.urlopen('https://github.com/eweitz') |
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
#!/bin/bash | |
brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer | |
pip3 install --upgrade Cython==0.25.2 | |
# USE_OSX_FRAMEWORKS=0 pip3 install kivy # currently doesn't work due to incompatibility with SDL_mixer: https://github.com/kivy/kivy/pull/5459 | |
USE_OSX_FRAMEWORKS=0 pip3 install http://github.com/kivy/kivy/archive/master.zip | |
# --- NOTES ---- | |
# This is so you don't need to use Kivy.app -- I prefer that these deps install via pip and run via python like everything else. | |
# For python2, just use python2 version of pip | |
# I'm assuming usage of virtualenv here -- if you want to install globally, pip3 may require `sudo -H` |
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
import time, socket, os, sys, string ,httplib | |
print "\t################################################################" | |
print "\t# DOS BOMBER V.1.0 #" | |
print "\t# #" | |
print "\t# Written by zero sec(pwned security) #" | |
print "\t# #" | |
print "\t# #" | |
print "\t################################################################" |