Skip to content

Instantly share code, notes, and snippets.

View aldnav's full-sized avatar
๐Ÿคนโ€โ™‚๏ธ
ยฏ\_(ใƒ„)_/ยฏ

Aldrin Navarro aldnav

๐Ÿคนโ€โ™‚๏ธ
ยฏ\_(ใƒ„)_/ยฏ
View GitHub Profile
@mbdhack
mbdhack / dos.py
Last active August 29, 2015 13:57
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################################################################"
@garyjohnson
garyjohnson / install_kivy_1.10.0_macos_python3
Last active February 24, 2019 04:51
Install Kivy 1.10.0 on macOS for Python3 without Kivy.app
#!/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`
@eweitz
eweitz / http_debugging.py
Last active November 12, 2022 20:32 — forked from tonetheman/http_debugging.py
Debug requests for urllib in Python 3
"""" Tested in Python 3.4 """
import urllib.request
import http.client
http.client.HTTPConnection.debuglevel = 1
response = urllib.request.urlopen('https://github.com/eweitz')
@vasanthk
vasanthk / System Design.md
Last active July 12, 2025 23:12
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. 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?

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@ipbastola
ipbastola / jq to filter by value.md
Last active May 29, 2025 00:52
JQ to filter JSON by value

JQ to filter JSON by value

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)

Proper Commit Messages

How to Write a Git Commit Message - Chris Beams

chris.beams.io/posts/git-commit/

The seven rules of a great git commit message

  1. Separate subject from body with a blank line.
  2. Limit the subject line to 50 characters.
  3. Capitalize the subject line.
  4. Do not end the subject line with a period.
  5. Use the imperative mood in the subject line. (Start the line with "Fix", "Add", "Change" instead of "Fixed", "Added", "Changed".
@doubtingben
doubtingben / gist:60a228c06a48a5b8601ea5e94e4ab22c
Created November 9, 2016 17:20
Install i3-gaps on Ubuntu 16
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
@afk-mario
afk-mario / [email protected]
Last active February 22, 2024 22:15
Django + Gunicorn + VirtualEnv + Systemd
[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
@cgoldberg
cgoldberg / geckodriver-install.sh
Last active August 18, 2023 10:20
download and install latest geckodriver for linux or mac (selenium webdriver)
#!/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"))')