Skip to content

Instantly share code, notes, and snippets.

View susodapop's full-sized avatar

Jesse susodapop

View GitHub Profile
@nicwestvold
nicwestvold / zoom_fix.sh
Last active July 9, 2019 14:52
zoom security vulnerability - 2019-07-08
# notes taken from this article:
# https://medium.com/@jonathan.leitschuh/zoom-zero-day-4-million-webcams-maybe-an-rce-just-get-them-to-visit-your-website-ac75c83f4ef5
# saved as a gist so I don't lose the info
# disable video on join
# For just your local account
defaults write ~/Library/Preferences/us.zoom.config.plist ZDisableVideo 1
# For all users on the machine
sudo defaults write /Library/Preferences/us.zoom.config.plist ZDisableVideo 1
@arikfr
arikfr / redash.py
Last active December 11, 2019 04:57
import requests
import os
class Redash(object):
def __init__(self, redash_url, api_key):
self.redash_url = redash_url
self.session = requests.Session()
self.session.headers.update({'Authorization': 'Key {}'.format(api_key)})
def test_credentials(self):
@linhmtran168
linhmtran168 / 00-SETUP.md
Last active March 28, 2024 09:33
Setup Redash for Oracle

Usage

Refs

https://redash.io/

Download Redash

$ curl -L -O https://github.com/getredash/redash/archive/v5.0.1.zip
@MichaelLawton
MichaelLawton / deleteAmazonSavedItems.js
Last active April 24, 2024 19:06
Removes all Amazon saved for later items on the cart page. It will only remove visible items. You might want to scroll first to make more items visible. To use paste code in developer console (Ctrl+Shift+J or Cmd+Opt+J in Chrome) then press enter.
function deleteSavedItems() {
var query = document.querySelectorAll("#sc-saved-cart input[value=Delete]")
if (query.length) {
query[0].click();
}
if (query.length > 1) {
setTimeout(deleteSavedItems,100);
}
else {
console.log('Finished');

Serving Flask under a subpath

Your Flask app object implements the __call__ method, which means it can be called like a regular function. When your WSGI container receives a HTTP request it calls your app with the environ dict and the start_response callable. WSGI is specified in PEP 0333. The two relevant environ variables are:

SCRIPT_NAME
The initial portion of the request URL's "path" that corresponds to the application object, so that the application knows its virtual "location". This may be an empty string, if the application corresponds to the "root" of the server.

@Bouke
Bouke / gist:10454272
Last active September 22, 2023 17:23
Install FreeTDS, unixODBC and pyodbc on OS X

First, install the following libraries:

$ brew install unixodbc
$ brew install freetds --with-unixodbc

FreeTDS should already work now, without configuration:

$ tsql -S [IP or hostname] -U [username] -P [password]
locale is "en_US.UTF-8"

locale charset is "UTF-8"

@cliss
cliss / organize-photos.py
Created October 6, 2013 14:43
Photo management script. This script will copy photos from "~/Pictures/iPhone Incoming" into a tree the script creates, with folders representing month and years, and photo names timestamped. Completely based on the work of the amazing Dr. Drang; see here: http://www.leancrew.com/all-this/2013/10/photo-management-via-the-finder/ You can see more…
#!/usr/bin/python
import sys
import os, shutil
import subprocess
import os.path
from datetime import datetime
######################## Functions #########################