Skip to content

Instantly share code, notes, and snippets.

View sporto's full-sized avatar

Sebastian Porto sporto

  • Melbourne, Australia
View GitHub Profile
@sporto
sporto / gist:6929593
Last active December 25, 2015 06:09
Single Page App with Go

Current Setup #1

At the moment I am using the yeoman angular generator

In development During development I have two servers running, one using grunt for the front end and another in Go for the API

In production Will use nginx to server all the front end

@sporto
sporto / SassMeister-input.scss
Created October 25, 2013 05:16
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.7)
// ----
$color: #123;
@mixin foo {
color: $color;
}
@sporto
sporto / SassMeister-input.scss
Created October 25, 2013 05:19
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.7)
// ----
// SASS, wtf 1
// notice how .alert is in the wrong place
// for .bar
.foo{
@sporto
sporto / gist:8333559
Created January 9, 2014 12:43
.bash_profile
export PATH=~/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/usr/local/git/bin:/usr/local/mysql/bin:$PATH
export PATH=/usr/local/share/npm/bin:$PATH
export PATH=/usr/local/sbin:$PATH
export PATH=~/GoDev/bin:$PATH
#########################
# Other Paths
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
export GOPATH=~/GoDev
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
@sporto
sporto / keybase.md
Created February 28, 2014 02:22
keybase.md

Keybase proof

I hereby claim:

  • I am sporto on github.
  • I am sporto (https://keybase.io/sporto) on keybase.
  • I have a public key whose fingerprint is 5800 6877 4F1B 416A 694D 45D5 E622 7DC7 1C1B 04A8

To claim this, I am signing this object:

@sporto
sporto / .vimrc
Created March 17, 2014 11:57
vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" alternatively, pass a path where Vundle should install bundles
"let path = '~/some/path/here'
"call vundle#rc(path)
@sporto
sporto / gist:9949468
Last active August 29, 2015 13:58
Loading order problem
// car.js
var Car = Vehicle.extend({...})
// vehicle.js
var Vehicle = AmazingMVCModel.extend({...})
// as car is loader before vehicle (alphabetic order) this doesn't work
@sporto
sporto / gist:7dd635727eed59cc2621
Last active August 29, 2015 14:00
Makefile - Build, copy and run golang binary to EV3
target = [email protected]
file = $(shell basename $(shell pwd))
all: build copy run
build:
GOARCH=arm GOOS=linux GOARM=5 go build
copy:
# scp test1 $(target):~/programs/$(file)
@sporto
sporto / About.md
Last active August 29, 2015 14:01
Using Workshopper

I would like to ask the user to write a program that sets some variables e.g. animal and cat Then In my verification I will like to run a series of tests on those variables and give feedback based on that.

@sporto
sporto / exercise.js
Last active August 29, 2015 14:01
user_solutions.js
var exercise = require('workshopper-exercise')();
var filecheck = require('workshopper-exercise/filecheck');
var execute = require('workshopper-exercise/execute');
var comparestdout = require('workshopper-exercise/comparestdout');
var wrappedexec = require('workshopper-wrappedexec');
// checks that the submission file actually exists
exercise = filecheck(exercise);
// execute the solution and submission in parallel with spawn()