Skip to content

Instantly share code, notes, and snippets.

View lukefx's full-sized avatar

Luca Simone lukefx

View GitHub Profile
@lukefx
lukefx / prepare-commit-msg
Created December 14, 2017 11:53 — forked from jatubio/prepare-commit-msg
prepare-commit-msg git hook to add branch name to commit message
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
@lukefx
lukefx / 0_reuse_code.js
Created November 24, 2016 13:39
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
@lukefx
lukefx / login.js
Created October 9, 2015 12:04 — forked from theoperatore/login.js
Node.js Destiny API Authentication
var request = require('request');
var Promise = require('es6-promise').Promise;
var cjar = request.jar();
var PSN_OAUTH_URI = "https://auth.api.sonyentertainmentnetwork.com/login.do";
var BUNGIE_SIGNIN_URI = "https://www.bungie.net/en/User/SignIn/Psnid";
// Returns a promise fullfilled with the response of the
// request, or rejected with the error
@lukefx
lukefx / cmd
Created September 24, 2014 10:16
jnr-posix mvn test
C:\Develop\jnr-posix> mvn test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jnr-posix 3.0.7-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ jnr-posix ---
[INFO]
@lukefx
lukefx / CustomDataSourceComboBoxRenderer.as
Last active August 29, 2015 13:59
CustomDataSourceComboBoxRenderer
package ch.lugano.gisweb.controllers.edit {
import ch.lugano.gisweb.services.promise.Http;
import flash.events.Event;
import mx.collections.ArrayCollection;
import mx.core.IDataRenderer;
import mx.events.PropertyChangeEvent;
import mx.events.PropertyChangeEventKind;
@lukefx
lukefx / CustomDataSourceComboRenderer.as
Last active August 29, 2015 13:56
Use any json api as datasource for a combobox in Editor component ArcGIS Flex API
package ch.lugano.gisweb.controllers.edit {
import com.esri.ags.components.supportClasses.IFieldRenderer;
import com.esri.ags.skins.fieldClasses.DropDownListField;
import com.esri.ags.utils.JSONUtil;
import flash.events.Event;
import mx.collections.ArrayCollection;
import mx.collections.IList;
@lukefx
lukefx / quartieri.geojson
Created January 22, 2014 14:57
Quartieri
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lukefx
lukefx / soi.geojson
Last active December 20, 2015 19:18
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lukefx
lukefx / gist:5925333
Created July 4, 2013 06:26
Remote Deployment with Cargo
package ch.lugano.soi.main;
import org.codehaus.cargo.container.ContainerType;
import org.codehaus.cargo.container.RemoteContainer;
import org.codehaus.cargo.container.configuration.Configuration;
import org.codehaus.cargo.container.configuration.ConfigurationType;
import org.codehaus.cargo.container.deployable.Deployable;
import org.codehaus.cargo.container.deployer.Deployer;
import org.codehaus.cargo.container.deployer.DeployerType;
import org.codehaus.cargo.container.jboss.deployable.JBossWAR;
@lukefx
lukefx / bundle exec
Created August 9, 2012 15:03
JRuby 1.7.0.preview2 Bundler exception
C:\Develop\AccessManager>bundle exec rails s
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
SystemCallError: Unknown error - No message available
_exec_internal at org/jruby/RubyKernel.java:1663
exec at file:/C:/Develop/jruby/lib/jruby.jar!/jruby/kernel19/kernel.
rb:23
exec at C:/Develop/jruby/lib/ruby/gems/shared/gems/bundler-1.1.5/lib
/bundler/cli.rb:404
__send__ at org/jruby/RubyBasicObject.java:1679