Skip to content

Instantly share code, notes, and snippets.

View AndreaPaciolla's full-sized avatar

Pacho AndreaPaciolla

View GitHub Profile
@AndreaPaciolla
AndreaPaciolla / GroovyMacOSX.txt
Last active June 15, 2019 13:55
How to install groovysdk on macOSX via homebrew
1. Install groovysdk:
brew remove groovy
brew install groovysdk
2. Set GROOVY_HOME, otherwise Intellij reports as broken installation:
export GROOVY_HOME=/usr/local/opt/groovysdk/libexec
3. Point IntelliJ to the installed directory, e.g.: /usr/local/Cellar/groovysdk/2.5.7/libexec
Open terminal
'command + spacebar' search for "terminal"
vi kill_sophos
Copy text below, right-click on terminal window and select 'Paste':
#!/bin/bash
sudo rm -R /Library/Sophos\ Anti-Virus/
sudo rm -R /Library/Application\ Support/Sophos/
sudo rm -R /Library/Preferences/com.sophos.*
sudo rm /Library/LaunchDaemons/com.sophos.*
1. Basi
a. Clone/Commit/Push/Pull
b. Branch (local/remote/link)
c. Stash
d. Remotes
e. Merge
2. Avanzato
a. Merge squash
b. Rebase
c. Cherry-pick
@AndreaPaciolla
AndreaPaciolla / bower.json
Last active July 26, 2017 08:28
jsonSchemaRealWorldExample
{
"name": "dwx-widget-chat",
"version": "8.0.1",
"authors": [
"Objectway"
],
"ignore": [],
"dependencies": {
"ofsui": "^6.x",
"typedefinitions": "^4.x",
@AndreaPaciolla
AndreaPaciolla / main.ts
Created March 20, 2017 07:51
A simple utility function to help debugging rxJS observables. This function extends rxjs/Observable namespace and allow to use a function as debug.
// main.ts
const debuggerOn = true;
Observable.prototype.debug = function(message: string) {
return this.do(
nextValue => {
if(debuggerOn) console.log(message, nextValue);
},
error => {
if(debuggerOn) {
const path = require('path');
const webpack = require("webpack");
const CommonsChunkPlugin = require(path.resolve(__dirname, "node_modules/webpack/lib/optimize/CommonsChunkPlugin"));
module.exports = {
entry: {
'customer-application': './src/customer-application',
'dwx-widget-dev-menu': './src/app_components/dwx-widget-dev-menu/dwx-widget-dev-menu',
'dwx-widget-goal-dashboard-b': './src/app_components/dwx-widget-goal-dashboard-b/dwx-widget-goal-dashboard-b',
},
whenReady = angular.module('whenReady', [])
# WHEN READY ALLOWS YOU TO FIRE AN EVENT FROM THE VIEW WHEN SOME DATA IS READY
# IT USES WATCHERS TO ACCOMPLISH THIS, THEN THE WATCHER IS DESTROYED
# ELEMENT USAGE: <whenready watch="user.id" do="callme()"> </whenready> # BE SURE U ADD COMPATIBILITY FOR IE
# ATTRIBUTE USAGE: <div whenready="user.id" whenready-do="callme()"> </div>
whenReady.directive('whenready', ->
restrict: "E"
@AndreaPaciolla
AndreaPaciolla / customEventsOptimizely.js
Last active August 29, 2015 14:04
how to create custom events in global javascript with optimizely
$(document).ready( function() {
$("selector").click( function(e) {
e.preventDefault();
window['optimizely'] = window['optimizely'] || [];
window.optimizely.push(["trackEvent", "custom_event_id"]);
alert("Hello there");
});
});
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
@AndreaPaciolla
AndreaPaciolla / ng-submit.coffee
Created March 7, 2014 17:01
Rewritten the ng-submit ( directive of angularjs ), to fix the Safari's HTML5 'required' tag non-tollerance.
#
# REWRITTEN NG-SUBMIT DIRECTIVE
# TO FIX THE SAFARI'S HTML5 'REQUIRED' TAG
# NON-TOLLERANCE
#
angular.module("powerhtml").directive("ngSubmit", ->
restrict: "A"
priority: 1
link: (scope, elm, attrs) ->