This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates a mixin that saves hasMany relations (this comes in handy when filtering tree data) | |
* | |
* @class ModelSaveRelationsMixin | |
* @main ModelSaveRelationsMixin | |
* @constructor | |
*/ | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
var NativeObjectMixin = Ember.Mixin.create({ | |
toNative: function() { | |
var properties = []; | |
for (var key in this) { | |
var types = ['string', 'number', 'boolean']; | |
if (types.contains(Ember.typeOf(this[key]))) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Em from 'ember'; | |
var locked = false; | |
var adNetwork = function(imagePath, options) { | |
function run() { | |
var ImageMarkup = '<img id="adNetwork" style="display: none" src="' + imagePath + '" />'; | |
var defaults = { | |
css: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Hadoken Easter Egg | |
Author: Aaron Ghent | |
*/ | |
/* global $ */ | |
var hadoken = function() { | |
if($('.hadoken').length > 0) { | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SlimApp extends \Slim\Slim | |
{ | |
/** | |
* Route Groups | |
* | |
* This is an override for adding the ability to have a callable class | |
* to allow for a pod structure / tree hierarchy with individual classes | |
* containing there own sub routers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.hostname = "nodejs" | |
config.vm.network :forwarded_port, guest: 3000, host: 3000 | |
config.vm.synced_folder "./", "/home/vagrant/srv", create: true, group: "vagrant", owner: "vagrant" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# requirements: sudo apt-get install lftp | |
# add to crontab -e | |
# */15 * * * * sh ~/bin/sync.sh | while read line; do echo "[$(date -R)] $line" >> ~/.log/sync_cron.log; done; 2>&1 | |
server="<<SSH HOST>>" | |
remote_dir=files/complete | |
local_dir=/media/dump/ | |
log_file=~/.log/sync.log | |
username=$LOGNAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
ENV["LC_ALL"] = "en_US.UTF-8" | |
ENV["LC_CTYPE"] = "en_US.UTF-8" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/trusty64" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
## Install | |
# sudo apt install golang-go | |
# echo GOPATH=`pwd` | |
# export GOPATH=`pwd` | |
# go get -u -v github.com/appleboy/gin-jwt | |
# go get -u -v github.com/gin-contrib/cors | |
# go get -u -v github.com/gin-gonic/gin | |
# go get -u -v github.com/derekparker/delve/cmd/dlv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global Trianglify */ | |
import Ember from 'ember'; | |
import ResizeAware from 'ember-resize/mixins/resize-aware'; | |
export default Ember.Component.extend(ResizeAware, { | |
logTag: '[component:trianglifed-background]', | |
tagName: 'div', | |
classNames: ['trianglifed-background'], |