Skip to content

Instantly share code, notes, and snippets.

View urosgruber's full-sized avatar
🐢

Uros Gruber urosgruber

🐢
  • Squarebox
  • Slovenia
View GitHub Profile
@urosgruber
urosgruber / Vagrantfile
Created October 21, 2015 17:38 — forked from jeebak/Vagrantfile
A vagrant replacement for ievms (for Linux, OSX, and Windows hosts)
# Usage: vagrant up windowsVersion-IEversion
#
# Eg. vagrant up xp-8
#
# Based off of: # https://gist.github.com/anthonysterling/7cb85670b36821122a4a
boxes = {
"xp-6" => "http://aka.ms/vagrant-xp-ie6",
"xp-8" => "http://aka.ms/vagrant-xp-ie8",
"vista-7" => "http://aka.ms/vagrant-vista-ie7",
"win7-8" => "http://aka.ms/vagrant-win7-ie8",
MyApp = new Backbone.Marionette.Application();
MyApp.addRegions({
mainRegion: "#content"
});
// Models
ShutterModel = Backbone.Model.extend({
urlRoot: "/api/shutters",
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
@urosgruber
urosgruber / 0_reuse_code.js
Created June 25, 2014 12:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
# ---- Makefile for Vermaden's FreeBSD 9.1 root on ZFS manual install
# $Id: Makefile,v 1.18 2013/08/07 13:31:29 root Exp root $
#
# Copyright (c) 2013 Adriaan van Roosmalen <j65nko daemonforums.org>>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
module.exports = function( grunt ) {
'use strict';
//
// Grunt configuration:
//
// https://github.com/cowboy/grunt/blob/master/docs/getting_started.md
//
grunt.initConfig({
// Project configuration
var tabbableElements = 'a[href], area[href], input:not([disabled]),' +
'select:not([disabled]), textarea:not([disabled]),' +
'button:not([disabled]), iframe, object, embed, *[tabindex],' +
'*[contenteditable]';
var keepFocus = function (context) {
var allTabbableElements = context.querySelectorAll(tabbableElements);
var firstTabbableElement = allTabbableElements[0];
var lastTabbableElement = allTabbableElements[allTabbableElements.length - 1];
#!/bin/sh
#
# This hooks is placed in a Bare repository
# It makes sure that working tree doesn't contain any local changes
# And if it contains - submits a commit and returns false
# So if false returned - client should PULL and then PUSH again
#
# Assuming following file structure:
# .
# |-- myproject