Skip to content

Instantly share code, notes, and snippets.

# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.8.8"
sudo apt-get update
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
sudo apt-get install -y vim curl python-software-properties
sudo add-apt-repository -y ppa:ondrej/php5
sudo apt-get update
sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug
<?php
// Vendor includes
include $config->base_path . '/libraries/Vendor/autoload.php';
// Include configuration file
$config = include('../config.php');
// Create IoC container
$ioc = new \Illuminate\Container\Container;
<?php
// streamed - Macro for streamed responses with seeking support
Response::macro('streamed', function($type, $size, $name, $callback) {
$offset = 0;
$length = $size;
$status = 200;
$headers = [
'Content-Type' => $type,
<!DOCTYPE html>
<html>
<head>
<link href="http://code.jquery.com/ui/1.9.2/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<script src="http://www.jawish.org/blog/uploads/jquery.gdocsviewer.min.js"></script>
<!-- <script src="http://www.jawish.org/blog/uploads/jquery.zohoviewer.min.js"></script> -->
<meta charset="utf-8">
@hardevine
hardevine / engenius-eap600-enable-ssh.md
Created March 6, 2017 11:07 — forked from darconeous/engenius-eap600-enable-ssh.md
Enabling SSH on Engenius EAP600

Enabling SSH on Engenius EAP600

This tutorial will walk you through the steps needed to get root SSH access on an [Engenius EAP600][1] dual-band WiFi access point. SSH doesn't come enabled out of the box on these things, so if you want to SSH into the device (which is running an old version of OpenWRT), keep reading.

Picture of EAP600

@hardevine
hardevine / deploy.sh
Created June 17, 2018 14:24 — forked from BenSampo/deploy.sh
Laravel deploy script
# Change to the project directory
cd /home/forge/domain.com
# Turn on maintenance mode
php artisan down
# Pull the latest changes from the git repository
git pull origin master
# Install/update composer dependecies
@hardevine
hardevine / SkipVerification.txt
Created December 9, 2019 12:05 — forked from ygit/SkipVerification.txt
Skip Verification of Mac Apps
xattr -d com.apple.quarantine /path/to/app/myMacApp.app
@hardevine
hardevine / errorHandler.js
Created March 14, 2020 05:53 — forked from saqueib/errorHandler.js
Global error handling using axios interceptor for http calls http://www.qcode.in/api-error-handling-in-vue-with-axios
import axios from 'axios'
import toast from './toast'
function errorResponseHandler(error) {
// check for errorHandle config
if( error.config.hasOwnProperty('errorHandle') && error.config.errorHandle === false ) {
return Promise.reject(error);
}
// if has response show the error
@hardevine
hardevine / latest-ffmpeg-centos6.sh
Last active March 26, 2020 13:36 — forked from mustafaturan/latest-ffmpeg-centos6.sh
Installs latest ffmpeg on Centos 6
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0