Skip to content

Instantly share code, notes, and snippets.

View bdunnette's full-sized avatar
💭
🤔

Brian Dunnette bdunnette

💭
🤔
View GitHub Profile
@bdunnette
bdunnette / openpgp.txt
Created January 25, 2017 14:29
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:653209785db2920ed1ad006862be838daa8af7b8]
# cd to your Firebase project directory and run:
# curl https://gist.githubusercontent.com/bdunnette/258eafa8425e3b7c89dc873c73a5cc2d/raw/add-gulp.sh | sh
REPO=https://gist.githubusercontent.com/bdunnette/258eafa8425e3b7c89dc873c73a5cc2d/raw
echo public/vendor >> .gitignore
echo node_modules >> .gitignore
mkdir -p public/js public/css
touch public/css/app.css
curl $REPO/gulpfile.js > gulpfile.js
curl $REPO/app.js > public/js/app.js
sed "s/myApp/${PWD##*/}/g" -i public/js/app.js
@bdunnette
bdunnette / fix-google-credentials
Created October 24, 2016 17:33
Update Google OAuth credentials in Meteor/Mongo
db.meteor_accounts_loginServiceConfiguration.update({"service":"google"},{$set:{"clientId":"your-client-id","secret":"your-secret"}})
// In SpectrumMin.js, find the ChooseViewer function...
function ChooseViewer(){var viewer=null;
// Insert the following line before if(wPressed||aPressed)...
if(IsChrome()){wPressed=true;} // If user is running Chrome, sets web viewer as default to avoid SIS download
if(wPressed||aPressed){if(SystemParms.SessionMode=="IVD"){alert("WebViewer is disabled in IVD mode");
--Run as a scheduled task: "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLCMD.EXE" -i F:\Images2\Backup\AperioDBBackup.sql -o F:\Images2\Backup\AperioDBBackup.log
DECLARE @BackupFile varchar(1000)
SELECT @BackupFile = (SELECT 'F:\Images2\Backup\NSAperio-FullDB-'+ CONVERT(varchar(500),getDate(),112) +'.bak')
BACKUP DATABASE Aperio
TO DISK = @BackupFile
WITH FORMAT;
GO
@bdunnette
bdunnette / data.html.twig
Created June 15, 2016 15:10
Exclude reCaptcha responses from Grav form emails
{% extends "forms/default/data.html.twig" %}
{% block field %}
{% if field.name!='g-recaptcha-response' %}
<div>{% block field_label %}<strong>{{ field.label }}</strong>{% endblock %}: {% block field_value %}{{ string(form.value(field.name)|e)|nl2br }}{% endblock %}</div>
{% endif %}
{% endblock %}
@bdunnette
bdunnette / config.json
Last active June 27, 2016 23:57 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#bada55",
"@brand-success": "#5cb85c",
@bdunnette
bdunnette / add-gulp.sh
Last active May 9, 2018 10:28
Add Gulp & Angular to your Loopback project
# cd to your Loopback project directory and run:
# curl https://gist.githubusercontent.com/bdunnette/4c1c7a153c70e8988fa48363f6b429d8/raw/add-gulp.sh | sh
REPO=https://gist.githubusercontent.com/bdunnette/4c1c7a153c70e8988fa48363f6b429d8/raw
echo client/vendor >> .gitignore
mv server/boot/root.js server/boot/root.js.bak
sed 's/\("files\".*\:.*{\)/&\"loopback\#static\"\:\{\"params\"\:\"\$\!\.\.\/client\"\}/' -i server/middleware.json
mkdir -p client/js client/css server/fixtures
touch client/css/app.css server/fixtures/.gitkeep
wget -O gulpfile.js $REPO/gulpfile.js
wget -O server/component-config.json $REPO/component-config.json
# Rename original out of the way, so updates / reinstalls don't squash our hack fix
sudo dpkg-divert --add --rename --divert /usr/bin/ruby.divert /usr/bin/ruby
sudo dpkg-divert --add --rename --divert /usr/bin/gem.divert /usr/bin/gem
# Create an alternatives entry pointing ruby -> ruby2.0
sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby2.0 1
sudo update-alternatives --install /usr/bin/gem gem /usr/bin/gem2.0 1
del .gsf-save*
FOR %%A IN (*.svs) DO vips dzsave %%A %%~nA.zip --centre --overlap 0 --layout google