Skip to content

Instantly share code, notes, and snippets.

View dryan's full-sized avatar
Black Lives Matter

Dan Ryan dryan

Black Lives Matter
View GitHub Profile
#! /bin/sh
# From https://medium.com/@jonathan.leitschuh/zoom-zero-day-4-million-webcams-maybe-an-rce-just-get-them-to-visit-your-website-ac75c83f4ef5
# turns off video by default for your local user account
defaults write ~/Library/Preferences/us.zoom.config.plist ZDisableVideo 1
# To prevent the vulnerable server from running on your machine
# (this does not impact Zoom functionality), run these two lines in your Terminal.
pkill "ZoomOpener"; rm -rf ~/.zoomus; touch ~/.zoomus && chmod 000 ~/.zoomus;
pkill "RingCentralOpener"; rm -rf ~/.ringcentralopener; touch ~/.ringcentralopener && chmod 000 ~/.ringcentralopener;
# (You may need to run these lines for each user on your machine.)

Keybase proof

I hereby claim:

  • I am dryan on github.
  • I am dryan (https://keybase.io/dryan) on keybase.
  • I have a public key whose fingerprint is 3285 D024 0131 7A03 7787 458A 6088 6B14 0A92 6029

To claim this, I am signing this object:

@dryan
dryan / post-merge
Created August 8, 2014 21:38
update dependencies on git merge
#!/bin/bash
if [ -f 'package.json' ];
then
npm install
fi
if [ -f 'bower.json' ];
then
bower install
fi
if [ -f 'requirements.txt' ];
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am dryan on github.
  • I am dryan (https://keybase.io/dryan) on keybase.
  • I have a public key whose fingerprint is 7E76 E4D1 C6A2 B6FD 8D5E 251E 0B1C D282 DD21 7A08

To claim this, I am signing this object:

@dryan
dryan / backup.py
Created January 22, 2014 19:21
Backup a MySQL database and/or a directory of files to S3.
#!/usr/bin/env python
import subprocess, sys, os, zipfile
try:
import boto
except ImportError:
print 'requires boto. `pip install boto`'
sys.exit(os.EX_UNAVAILABLE)
try:
@dryan
dryan / settings.py
Last active September 7, 2023 11:04
Handling EC2 ELB health checks and Django's ALLOWED_HOSTS setting.
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = [
'yourdomain.tld',
'.compute-1.amazonaws.com', # allows viewing of instances directly
]
import requests
EC2_PRIVATE_IP = None
try:
@dryan
dryan / gruntfile.js
Last active December 25, 2015 17:19
gruntfile for watching directory and compiling scss files on save
'use strict';
var
SCSS_ROOT = 'media',
CSS_ROOT = 'media',
SASS_FRAMEWORKS = 'bower_components',
fs = require('fs'),
path = require('path'),
scssFileMap = {},
scssFiles = fs.readdirSync(SCSS_ROOT),
@dryan
dryan / cloud2campfire
Created August 14, 2013 18:31
CLI to put your latest CloudApp image into Campfire chat
#! /usr/bin/env python
import sys, os, ConfigParser, argparse
from getpass import getpass
CLOUD_CONFIG_PATH = os.path.expanduser('~/.cloudapp')
CAMPFIRE_CONFIG_PATH = os.path.expanduser('~/.basecamp')
def log(message, error_code = None):
if error_code:
@dryan
dryan / .bashrc
Last active December 16, 2015 05:29
activate a virtualenv if present on cd. additionally, if a "set_env.sh" file is present with environment variables, load those in.
# add this to the end of your .bashrc, .zshrc or equivalent
function cd() {
builtin cd "$@"
if [ -f "bin/activate" ]
then
source "bin/activate"
elif [ -f "../bin/activate" ]
then
source "../bin/activate"
else