Skip to content

Instantly share code, notes, and snippets.

Umberto Nicoletti unicolet

Block or report user

Report or block unicolet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@unicolet
unicolet / gist:1020795
Created Jun 11, 2011
Sample configuration file for Simple VCB
View gist:1020795
#
# Simple VCB can be used to drive vcb backups from more than one
# server. The list must be comma separated. The names will be used as the actual URL
#
vcb.servers=vsphere,vcenter
#
# vsphere config:
# the name is the actual server name and will be used as the url
# user, password: self explanatory
View YUIMenubarTagLib.groovy
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@unicolet
unicolet / rsync-server-gist.nsi
Created Jan 12, 2012
Nullsoft script to create an installer for a rsync Windows Service package based on cygwin
View rsync-server-gist.nsi
;NSIS Modern User Interface
;Rsync Windows Service Script
;Written by Umberto Nicoletti http://unicolet.blogspot.com/
!define SCRIPT_VERSION "1.0"
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
View gist:1843703
If you have ruby-1.9.2, good. I used rvm, and did a recent install with
rvm install ruby-1.9.2
rvm --default use 1.9.2
Then to the SproutCore parts:
gem install sproutcore [The console output indicated SproutCore 1.6]
cd to your dev area, e.g. .../Development/sproutcore
@unicolet
unicolet / sproutcore_dev_from_scratch_ubuntu.sh
Last active Sep 30, 2015
Sproutcore official and development from scratch on barebone Ubuntu Linux
View sproutcore_dev_from_scratch_ubuntu.sh
#
# Use these commands to install sproutcore official (and development version)
# on Ubuntu linux
#
# Tested on Lucid Lynx provisioned by vagrant (http://vagrantup.com/)
#
sudo apt-get install curl
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
source /home/vagrant/.rvm/scripts/rvm
source /home/vagrant/.profile
@unicolet
unicolet / todos sc.outlet patch
Created Feb 26, 2012
add sc.outlet usage to todos tutorial as per ericocean's suggestion. Apply with patch -p1 < outlet.patch
View todos sc.outlet patch
diff --git a/apps/todos/main.js b/apps/todos/main.js
index 7fbd18a..06ccd2e 100644
--- a/apps/todos/main.js
+++ b/apps/todos/main.js
@@ -28,7 +28,8 @@ Todos.main = function main() {
Todos.store.find(SC.Query.local(Todos.Todo, 'isCompleted = true')));
// Focus the new todos item
- Todos.mainPage.getPath('mainPane.newTodoField.field').becomeFirstResponder();
+ Todos.mainPage.get('field').becomeFirstResponder();
@unicolet
unicolet / jsts_with_nodejs.js
Created May 28, 2012
using jsts (Javascript Topology Suite) with nodejs
View jsts_with_nodejs.js
#!/usr/bin/nodejs
# run from jsts directory, the script expects lib to be a subdir of current dir
var i = require('./lib/javascript.util.js');
var j = require('./lib/jsts.js');
var geometryFactory = new jsts.geom.GeometryFactory();
var coordinate = new jsts.geom.Coordinate(1,2);
var point = geometryFactory.createPoint(coordinate);
@unicolet
unicolet / osm_bright_bg
Created Jun 6, 2012
TileDrawer: change bright style background color
View osm_bright_bg
--- style.xml.orig 2012-05-31 15:39:50.080704580 +0200
+++ style.xml 2012-05-31 15:40:36.856701370 +0200
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over" bgcolor="rgb(140,182,211)">
+<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over" bgcolor="rgb(241,238,232)">
<Style name="line pattern style 110">
<Rule name="rule 589">
<Filter>(not (([tunnel]='true')) and not (([tunnel]='yes')))</Filter>
@unicolet
unicolet / reader.py
Created Jun 27, 2012
Nagios cfg from Google Docs
View reader.py
import csv
from jinja2 import Template,FileSystemLoader,Environment
loader = FileSystemLoader('templates')
env = Environment(loader=FileSystemLoader('templates'))
tmp=[]
hostgroups=set()
hosts = csv.reader(open('hosts.csv'), delimiter=',', quotechar='"')
for h in hosts:
@unicolet
unicolet / refresh list view.js
Created Jul 6, 2012
Refresh SC.ListVIew (and scroll down)
View refresh list view.js
/*
NOTE: replace YourListView/YourController with the actual names of the
controller/listview in your app.
*/
YourController.content.add(yournewobject);
this.invokeLater(function(){
YourListView.computeLayout();
YourListView.scrollDownPage();
You can’t perform that action at this time.