$ curl -L -O https://github.com/getredash/redash/archive/v5.0.1.zip
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
# 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 |
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 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): |
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
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'); |
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.
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"
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
#!/usr/bin/python | |
import sys | |
import os, shutil | |
import subprocess | |
import os.path | |
from datetime import datetime | |
######################## Functions ######################### |