Skip to content

Instantly share code, notes, and snippets.

View brian-slate's full-sized avatar

Brian Slate brian-slate

  • Los Angeles, CA
  • 17:12 (UTC -07:00)
View GitHub Profile
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
const matrixSize = 5;
const cellSize = 50;
function drawMatrix() {
ctx.strokeStyle = 'black';
ctx.lineWidth = 1;
@brian-slate
brian-slate / vpn_connection.scpt
Last active June 14, 2016 16:00 — forked from adgedenkers/vpn_connection.scpt
Toggle Connection to VPN on a Mac via AppleScript
-- Cisco VPN Connection Script using OS X Keychain --
-- CONFIG
-- Fill in the following
set vpn_name to "'NETWORK_VPN_SERVICE_NAME'"
set user_name to "USER_NAME"
set keychain_item_name to "UNIQUE_KEYCHAIN_ITEM_NAME"
set is_using_duo_security to false -- enable if using duo security MFA
set duo_security_type to "1" -- 1:push, 2:sms, 3:phone call
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
<b>Fatal error</b>: Call to undefined method stdClass::find() in <b>/nfs/c07/h01/mnt/112667/domains/hwtn.org/html/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php</b> on line <b>2076</b><br>
Code from my home.php which Ive commented out for the time being. The culprit was the "$image->get_href_thumb_link();" line.
<!-- <div id="image-carousel-wrap">
<?php if(get_settings('hwtn_nextgen_carousel_id')): ?>
<?php $image_gallery = nggdb::get_gallery(get_settings('hwtn_nextgen_carousel_id')); ?>
<div class="prev"></div>
<div id="image-carousel">
<ul>
@brian-slate
brian-slate / gist:6126462
Created July 31, 2013 21:43
Ember-Data 401 error handling...
Ember.Application.initializer({
name: "currentUser",
initialize: function (container, application) {
App.deferReadiness();
var authenticatedUser = App.User.find({ filter: "authenticated" }).one('becameError', this, function () {
// not triggered by a 401 error fetching current user...
App.advanceReadiness();
@brian-slate
brian-slate / pdo_dblib_crash.log
Created June 15, 2012 22:22
pdo_dblib crash in php5.3.13 with passwords over 30 characters
Process: httpd [36085]
Path: /usr/sbin/httpd
Identifier: httpd
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: httpd [35994]
PlugIn Path: /usr/local/lib/libsybdb.5.dylib
PlugIn Identifier: libsybdb.5.dylib
PlugIn Version: 6.0.0 (compatibility 6.0.0)
@brian-slate
brian-slate / config.log
Created June 15, 2012 17:32
Homebrew config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:1897: checking for Cygwin environment
configure:1913: /usr/bin/clang -c -Os -w -pipe -march=native -Qunused-arguments -I/usr/local/Cellar/readline/6.2.2/include -I/usr/local/Cellar/libxml2/2.8.0/include -I/usr/local/Cellar/icu4c/4.8.1.1/include -I/usr/local/Cellar/gettext/0.18.1.1/include conftest.c 1>&5
configure:1909:8: error: use of undeclared identifier '__CYGWIN32__'
return __CYGWIN__;
^
configure:1907:20: note: expanded from macro '__CYGWIN__'
#define __CYGWIN__ __CYGWIN32__
$ brew install php53 -V --with-mysql --with-mssql --with-intl | tee ~/brew-install-php53.log
==> Downloading http://www.php.net/get/php-5.3.13.tar.bz2/from/this/mirror
Already downloaded: /Users/bmherold/Library/Caches/Homebrew/php53-5.3.13
==> ./configure --prefix=/usr/local/Cellar/php53/5.3.13 --disable-debug --with-config-file-path=/usr/local/etc/php/5.3 --with-config-file-scan-dir=/usr/local/etc/php/5.3/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enable-sqlite-utf8 --enable-wddx --enable-ftp --enable-sockets --enable-zip --enable-pcntl --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-mbstring --enable-mbregex --enable-zend-multibyte --enable-bcmath --enable-calendar --with-openssl=/usr --with-zlib=/usr --with-bz2=/usr --with-ldap --with-ldap-sasl=/usr --with-xmlrpc --with-kerberos=/usr --with-libxml-dir=/usr/local/Cellar/libxml2/2.8.0 --with-xsl=/usr --with-curl=/usr --with-gd --enable-gd-native-ttf --with-freetype-dir=/usr/X11 --with