Skip to content

Instantly share code, notes, and snippets.

View jasperboyd's full-sized avatar

Jasper Boyd jasperboyd

View GitHub Profile
@jasperboyd
jasperboyd / mysql_splitdump.sh
Last active February 4, 2021 15:06 — forked from jasny/mysql_splitdump.sh
Split MySQL dump SQL file into one file per table or extract a single table from https://stackoverflow.com/questions/132902/how-do-i-split-the-output-from-mysqldump-into-smaller-files
#!/bin/bash
####
# Split MySQL dump SQL file into one file per table
# based on https://gist.github.com/jasny/1608062
####
#adjust this to your case:
START="/-- Table structure for table/"
# or
@jasperboyd
jasperboyd / gist:8f262aa638faa51906f5477e728e61a3
Created December 12, 2018 21:36
ormdirtysession exeception
{"Suppressed":[],"Locale":null,"Type":"Application","RootCause":{"Cause":{"Cause":null,"Message":null,"LocalizedMessage":null,"StackTrace":[],"Suppressed":[]},"Message":"java.lang.NullPointerException","LocalizedMessage":"java.lang.NullPointerException","StackTrace":[{"FileName":"HibernateEventHandler.java","NativeMethod":false,"ClassName":"coldfusion.orm.hibernate.HibernateEventHandler","LineNumber":278,"MethodName":"invokeMethod"},{"FileName":"HibernateEventHandler.java","NativeMethod":false,"ClassName":"coldfusion.orm.hibernate.HibernateEventHandler","LineNumber":219,"MethodName":"invokeInterceptorMethod"},{"FileName":"HibernateEventHandler.java","NativeMethod":false,"ClassName":"coldfusion.orm.hibernate.HibernateEventHandler","LineNumber":159,"MethodName":"onFlushDirty"},{"FileName":"DefaultFlushEntityEventListener.java","NativeMethod":false,"ClassName":"org.hibernate.event.internal.DefaultFlushEntityEventListener","LineNumber":357,"MethodName":"invokeInterceptor"},{"FileName":"DefaultFlushEntityEventList
@jasperboyd
jasperboyd / gist:35492d55448e2cadb6d0e50a771f6e8e
Created December 15, 2017 23:37
My .vimrc (depends on vundle)
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@jasperboyd
jasperboyd / Template.html
Created November 16, 2015 16:54
Template For Directive
<sw-listing-display ng-if="$root.loadedResourceBundle"
data-showsearch="true"
data-collection-config="yourDirectiveName.getGiftCardCollectionConfig()"
data-record-edit-action="admin:entity.editgiftcard"
data-record-detail-action="admin:entity.detailgiftcard">
<sw-listing-column data-property-identifier="giftCardCode" />
<sw-listing-column data-property-identifier="order.orderNumber" />
</sw-listing-display>
@jasperboyd
jasperboyd / DirectiveBoilerplate.ts
Last active November 16, 2015 16:52
Directive Boilerplate
/// <reference path="../../../../../client/typings/tsd.d.ts" />
/// <reference path="../../../../../client/typings/slatwallTypeScript.d.ts" />
module slatwalladmin {
'use strict';
export class yourDirectiveControllerClass{
public giftCardId;
public giftCard;
@jasperboyd
jasperboyd / tscontrol.ts
Created November 13, 2015 22:01
TypeScriptController
/// <reference path='../../../../client/typings/slatwallTypescript.d.ts' />
/// <reference path='../../../../client/typings/tsd.d.ts' />
module slatwalladmin {
'use strict';
export class tscontrol{
public static $inject=["collectionConfigService"];
public collectionConfig;
@jasperboyd
jasperboyd / gist:70b7ad41814a96c316bf
Last active November 13, 2015 22:06
sw-listing-display example
<div ng-controller="tscontrol as controllernamethatyoupick">
<!-- use data-entity="product" for a standard listing -->
<sw-listing-display ng-if="$root.loadedResourceBundle"
data-showsearch="true"
data-collection-config="controllernamethatyoupick.collectionConfig"
data-record-edit-action="admin:entity.editproduct"
data-record-detail-action="admin:entity.detailproduct">
<sw-listing-column data-property-identifier="productType.productTypeName" />
<sw-listing-column data-property-identifier="brand.brandName" />
<sw-listing-column tdclass="primary" data-property-identifier="productName" />
#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default