Skip to content

Instantly share code, notes, and snippets.

View dberry37388's full-sized avatar

Daniel Berry dberry37388

View GitHub Profile
@dberry37388
dberry37388 / auth.js
Created February 7, 2019 00:27
Sample auth.js Vuex store.
import authApi from '@/api/auth';
import Cookies from 'js-cookie';
import Errors from '@/modules/error';
export default {
namespaced: true,
state: {
errors: new Errors(),
status: '',
access_token: Cookies.get('access_token') || '',
@dberry37388
dberry37388 / Skyrocket Notes App Technical.md
Created December 30, 2018 22:47 — forked from Spittal/Skyrocket Notes App Technical.md
Skyrocket Notes App Technical Overview

Skyrocket Notes

Create a simple 'Note Taking' application on the web using the technologies of your choosing.

We want you to feel like you can be creative and comfortable during this task. So, take the time you need to develop this. Share it with us either on Github as public repo or as a .zip archive. Remember that you can use whatever tools you would like to complete this task, just make sure you leave us instructions on how to run the application.

@dberry37388
dberry37388 / bootstrap.min.js
Created August 30, 2017 17:50
bootstrap.min.js
if ("undefined" == typeof jQuery) throw new Error("Bootstrap requires jQuery"); + function (a) {
"use strict";
function b() {
var a = document.createElement("bootstrap"),
b = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd otransitionend",
transition: "transitionend"
#!/usr/bin/env bash
# Update Package List
apt-get update
# Update System Packages
apt-get -y upgrade
# Force Locale
Sentry::getUserRepository()->findById(Sentry::getUser()->id);
object(Vertexhs\Users\Models\User)#802 (24) { ["table":protected]=> string(5) "users" ["guarded":protected]=> array(4) { [0]=> string(2) "id" [1]=> string(10) "created_at" [2]=> string(10) "updated_at" [3]=> string(9) "activated" } ["permissionsInstance":protected]=> NULL ["loginNames":protected]=> array(1) { [0]=> string(5) "email" } ["with":protected]=> array(1) { [0]=> string(16) "values.attribute" } ["eavNamespace":protected]=> string(14) "platform/users" ["valueRelation":protected]=> string(6) "values" ["connection":protected]=> NULL ["primaryKey":protected]=> string(2) "id" ["perPage":protected]=> int(15) ["incrementing"]=> bool(true) ["timestamps"]=> bool(true) ["attributes":protected]=> array(10) { ["id"]=> int(1) ["email"]=> string(25) "daniel.berry@vertexhs.com" ["password"]=> string(60) "$2y$10$ptKAysVjpyy05EwFOY9hsuIQO0uE4z5r9UkGT1N3jp//EiazKeyci" ["persistence_codes"]=> string(316) "["zJAoLHFa5yIjKTjRKqzaX3vIraJG23d6","nYKXWAqM7btmeW8
$me = Sentry::getUserRepository()->findById($id);
$otherMe = Sentry::getUser();
// works fine
$me->activityLogs()->get();
// gives me a "Call to undefined method Illuminate\Database\Query\Builder::activityLogs()"
$otherMe->activityLogs()->get();
@dberry37388
dberry37388 / createadmin
Created March 13, 2012 03:03
Sentry Task to Create an Admin User
<?php
/**
* Part of the Sentry package for FuelPHP.
*
* @package Sentry
* @version 2.0
* @author Cartalyst LLC
* @license MIT License
* @copyright 2011 Cartalyst LLC
@dberry37388
dberry37388 / gist:1988978
Created March 6, 2012 21:07
FuelPHP - Set ENV from Command Line

env FUEL_ENV php oil r

@dberry37388
dberry37388 / session
Created January 23, 2012 18:38
Simple FuelPHP task to create/drop the sessions DB table
<?
/**
* Sessions DB Table Task
*
* Run this task to set add/remove/clear the db sessions table
* for your app. This could be expanded in app/tasks for application specific stuff.
*
* @version 1.0
* @author Daniel Berry
* @license MIT License