Skip to content

Instantly share code, notes, and snippets.

Brian Dombrowski bdombro

Block or report user

Report or block bdombro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bdombro /
Last active Aug 13, 2019
#!/usr/bin/env bash
# Will create a tsx version of an svg file. Skips if dest exists.
# To run in batch, use
# `find src -name "*.svg" -exec ./utils/ {} \;`
# or with dest dir
# # `find src -name "*.svg" -exec ./utils/ {} src/components/icons \;`
# Note that $SED syntax is different on OSX, so install linux sed with homebrew first.
View firebase-file-upload.js
handleValidSubmit = async (event: any, values: {title: string; description: string; file: any}) => {
const {currentUser} = this.props.mobx;
if (this.state.loading) {
console.log("Submit ignored because loading.");
this.setState({loading: true});
try {
bdombro / mysql-drop-all-tables.sql
Created Sep 10, 2018
View mysql-drop-all-tables.sql
SET @tables = NULL;
SELECT GROUP_CONCAT(table_schema, '.', table_name) INTO @tables
FROM information_schema.tables
WHERE table_schema = 'database_name'; -- specify DB name here.
SET @tables = CONCAT('DROP TABLE ', @tables);
PREPARE stmt FROM @tables;
cd existing_repo
git remote rename origin old-origin
git remote add origin
git push -u origin --all
git push -u origin --tags
View srdb.cli.php
#!/usr/bin/php -q
// CUSTOM: Increase memory limit to improve likelyhood of success
* To run this script, execute something like this:
* `./srdb.cli.php -h localhost -u root -n test -s "findMe" -r "replaceMe"`
* use the --dry-run flag to do a dry run without searching/replacing.
bdombro / gist:f45dc7e16f2ed821d2c5d271302c38ce
Created May 24, 2018
Timeout - Run process and kill if it runs too long.
View gist:f45dc7e16f2ed821d2c5d271302c38ce
# Src:
# timeout [-SIG] [time] [--] command args...
# Run the given command until completion, but kill it if it runs too long.
# Specifically designed to exit immediatally (no sleep interval) and clean up
# nicely without messages or leaving any extra processes when finished.
bdombro / nginx-pm2-reverse-proxy-with-caching.conf
Last active Jul 20, 2018
NGINX PM2 Reverse Proxy with Caching
View nginx-pm2-reverse-proxy-with-caching.conf
# Note: if using cloudfare, you MUST add a http redirect rule in cloudflare or
# cf will cache the 301 redirect for both HTTP AND HTTPS, causing an infinite 301 loop
# Ex rule: http://** with action Always Use HTTPS
# Ref:
proxy_cache_path /var/cache/nginx/aii.globalintegrity.org_proxy levels=1:2 keys_zone=aii.globalintegrity.org_proxy:10m max_size=187108864 inactive=7d use_temp_path=off;
server {
listen 80;
View CommonBinaryExtensions.txt
bdombro / .gitlfstracks
Last active Oct 13, 2019
Git LFS Default Tracks - Common binary file extensions
View .gitlfstracks
"To include this, run `cat .gitlfstrack | xargs git lfs track`"
curl -O
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
You can’t perform that action at this time.