Skip to content

Instantly share code, notes, and snippets.

View noeldiaz's full-sized avatar

Noel Diaz noeldiaz

  • Baylor College of Medicine
  • Houston, TX
View GitHub Profile
@noeldiaz
noeldiaz / upgrading-vagrant-fusion.mdown
Created November 10, 2015 19:09 — forked from akitaonrails/upgrading-vagrant-fusion.mdown
Upgrading Vagrant from the default Virtualbox provider to VMWare Fusion on the Mac

I had some headaches yesterday while trying to upgrade to VMWare Fusion with Vagrant.

The steps that work are:

  • export your boxes from Virtualbox to OVA files
  • run 'vagrant destroy' on all your boxes
  • uninstall Virtualbox using the uninstaller script in the installer DMG
  • download VMWare Fusion
  • run 'vagrant plugin install vagrant-vmware-fusion' to install the provider plugin
  • run 'vagrant plugin license vagrant-vmware-fusion license.lic' to install the license you just bought
<?php
// (string) $message - message to be passed to Slack
// (string) $room - room in which to write the message, too
// (string) $icon - You can set up custom emoji icons to use with each message
public static function slack($message, $room = "engineering", $icon = ":longbox:") {
$room = ($room) ? $room : "engineering";
$data = json_encode(array(
"channel" => "#{$room}",
"text" => $message,
@noeldiaz
noeldiaz / http.conf
Created November 4, 2015 15:28 — forked from mehmetc/http.conf
Log data to Kibana from Primo
#HTTP configuration file
#defines jQuery.PRIMO endpoint
<location "/log">
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "POST, GET, OPTIONS"
Header set Access-Control-Allow-Headers "content-type"
</location>
<VirtualHost *:443>
@noeldiaz
noeldiaz / gist:30c06ea37199ac790ad7
Last active August 29, 2015 14:27 — forked from thinkchip/gist:114f6e8d904ead2bd086
EasyMDB RS232 V1.0.2
#
#Example of how to use EasyMDB RS232
#Date June/2014
#Version 1.0.2
#Not warranty, for educational purposes
#Thinkchip
#V1.0.1
#dispense coin function
#Level coin changer added
@noeldiaz
noeldiaz / gist:2c833bf2bfcbd630dc0e
Last active August 29, 2015 14:26 — forked from taylorotwell/gist:db67dd369b00022850b4
Mac Yosemite Dev Machine Setup

XCode

  • Install XCode from App Store.
  • Open XCode and agree to terms and conditions.

XCode CLI Tools

  • xcode-select --install

Install Homebrew

# Ignore everything in this directory
*
# Except this file
!.gitignore
<?php
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class AuthController extends Controller
@noeldiaz
noeldiaz / v-cloak.md
Last active August 29, 2015 14:22 — forked from adamwathan/v-cloak.md

Handy helpers for controlling visibility of elements until Vue has compiled.

Use like:

<div v-cloak>
  <h1>
    <span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
    <span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
 
class XSSProtection
{
/**
* The following method loops through all request input and strips out all tags from
* the request. This to ensure that users are unable to set ANY HTML within the form
* submissions, but also cleans up input.
*
* @param Request $request
* @param callable $next
* @return mixed
@noeldiaz
noeldiaz / highlight.sh
Last active August 29, 2015 14:08 — forked from simono/highlight.sh
#!/bin/zsh
#
# Highlight a given file and copy it as RTF.
#
# Simon Olofsson <[email protected]>
#
set -o errexit
set -o nounset