Skip to content

Instantly share code, notes, and snippets.

View breqdev's full-sized avatar

Brooke Chalmers breqdev

View GitHub Profile
@initialed85
initialed85 / ubiquiti_air_os_scrape.py
Created February 1, 2018 14:18
Example interaction with Ubiquiti AirOS "API"
# Requirements:
#
# Python 2.7
# Requests package (pip install requests)
import pprint
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
USERNAME = 'some_readonly_username'
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active May 24, 2024 01:23
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@pingswept
pingswept / server.py
Last active May 5, 2023 22:45
Code for Color Commons project on Greenway Light Blades in Boston. The real code starts around line 808; the rest is mostly boilerplate and data.
from flask import Flask, render_template, request
from uwsgidecorators import *
import pytronics
import os, time
public = Flask(__name__)
public.config['PROPAGATE_EXCEPTIONS'] = True
# Include "no-cache" header in all POST responses
@public.after_request
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git