Skip to content

Instantly share code, notes, and snippets.

View teamgroove's full-sized avatar

René teamgroove

  • SMILEUPPS-F091BA1E67
  • -`ღ´-
View GitHub Profile
@nateware
nateware / gist:3915757
Created October 19, 2012 01:27
Start Mac VNC server from command line
# Step 1: Set priveleges
$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
Starting...
Setting allow all users to YES.
Setting all users privileges to 1073742079.
Done.
# Step 2: Allow VNC clients
@dalcib
dalcib / ng-schema.js
Created July 25, 2012 03:38
AngularJS directive to convert JSON-Scheme in a form
/* https://github.com/nikos/cmskern/blob/master/playapp/public/javascripts/widgets.js*/
/**
* Widget for displaying a complete form as specified by the given schema.
*/
angular.widget('my:form', function(element) {
this.descend(true); // compiler will process children elements
this.directives(true); // compiler will process directives
@i-blis
i-blis / hubic.rb
Created May 8, 2012 21:05
How to get Hubic Webdav credentials
#!/usr/bin/env ruby
# hubic.rb Get credentials to Webdav server of Hubic account
require 'httpclient'
require 'json'
require 'optparse'
require 'highline/import'
module Hubic
extend self
@kkaefer
kkaefer / bump
Created May 11, 2011 15:44
Bumps version numbers in package.json and creates a git tag for it
#!/usr/bin/env sh
version() {
ruby <<"EOS"
doc = File.read './package.json'
regex = /("version"\s*:\s*")([^"]+)(")/
cur = regex.match(doc)
if ENV['CMD'] == 'major' then
nxt = (cur[2].to_i + 1).to_s + ".0.0"
elsif ENV['CMD'] == 'minor' then
@penguinboy
penguinboy / Object Flatten
Created January 2, 2011 01:55
Flatten javascript objects into a single-depth object
var flattenObject = function(ob) {
var toReturn = {};
for (var i in ob) {
if (!ob.hasOwnProperty(i)) continue;
if ((typeof ob[i]) == 'object') {
var flatObject = flattenObject(ob[i]);
for (var x in flatObject) {
if (!flatObject.hasOwnProperty(x)) continue;