Skip to content

Instantly share code, notes, and snippets.

View biapar's full-sized avatar
🙂

Biagio Paruolo biapar

🙂
View GitHub Profile
@biapar
biapar / uninstall_vmware.sh
Created September 3, 2016 14:42 — forked from boneskull/uninstall_vmware.sh
completely uninstall vmware on mac
#!/usr/bin/env bash
# Usage: bash uninstall_vmware.bash
remove() {
entry="$1"
echo -ne "Removing \e[1;34m$entry\e[0m... "
sudo rm -rf "$entry" &> /tmp/uninstall-vmware.log
if [[ ! -e "$entry" ]]; then
echo -e "\e[1;32mOK\e[0m"
@biapar
biapar / gist:bd95e66a8e3f9402231ece7191508b81
Created July 27, 2016 09:07 — forked from LucaRosaldi/Elenco Province Italiane
HTML: <select> Provincie Italiane
<select id="provincia" name="provincia">
<option value="ag">Agrigento</option>
<option value="al">Alessandria</option>
<option value="an">Ancona</option>
<option value="ao">Aosta</option>
<option value="ar">Arezzo</option>
<option value="ap">Ascoli Piceno</option>
<option value="at">Asti</option>
<option value="av">Avellino</option>
<option value="ba">Bari</option>
@biapar
biapar / Umbraco Razor Navigation
Created May 9, 2016 08:22 — forked from cyfer13/Umbraco Razor Navigation
A navigation control written using c# Razor
@inherits umbraco.MacroEngines.DynamicNodeContext
@using umbraco.MacroEngines
@{
Page.useStartingNodeAsHeaderNode = ConvertStringToBool(@Parameter.useStartingNodeAsHeaderNode);
Page.startingNodeId = ConvertStringToInt(@Parameter.startingNodeId);
Page.numberOfLevelsToDisplay = GetNumberOfLevelsToDisplay(@Parameter.numberOfLevelsToDisplay);
Page.cssClassForActiveTree = GetStringvalue(@Parameter.cssClassForActiveTree, "active");
Page.cssClassForCurrentlySelectedNode = GetStringvalue(@Parameter.cssClassForCurrentlySelectedNode, "selected");
Page.startingLevel = GetStartingLevel();
using System;
using System.Linq;
using System.Web.Mvc;
using Umbraco.Course.Models;
using Umbraco.Web.Mvc;
namespace Awesome.FormDemo.Controllers
{
public class TicketOrderController : SurfaceController
{
@biapar
biapar / businesses.json
Created February 21, 2016 12:38 — forked from zross/businesses.json
Leaflet.js Tips, Step 7 (filter buttons)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@biapar
biapar / Creating Shazam in Java
Created January 29, 2016 23:27 — forked from spejman/Creating Shazam in Java
Algoritmo de Shazam
A backup of http://sites.google.com/site/redcodenl/creating-shazam-in-java-1 just in case
Why is this necessary? Read http://sites.google.com/site/redcodenl/patent-infringement
Please fork, tweet about, etc.
----
Creating Shazam in Java
A couple of days ago I encountered this article: How Shazam Works
This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java?
@biapar
biapar / Descrizione
Created January 13, 2016 09:57
VestaCP firewall custom script
-cd /usr/local/vesta/data/firewall
-vim custom.sh
-chmod +x $VESTA/data/firewall/custom.sh
Stop/Start your Firewall service from VestaCP
http://www.lowendtalk.com/discussion/44292/solved-server-with-vestacp-and-firewall-enabled-blocks-dns-lookups
http://www.lowendguide.com/3/networking/iptables-and-vestacp-output-rules-to-allow-dns-lookups/
@biapar
biapar / hacked wordpress scan
Created January 11, 2016 12:32 — forked from splacento-incomm/hacked wordpress scan
Hacked wordpress can /usr/bin/host
/usr/bin/host has been preloaded;
grep -ri --include=*.php "/usr/bin/host" ./
check all cronjobs:
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done
check running processes:
ps -aux
@biapar
biapar / gist:18a9c4d77702743dbca4
Created December 17, 2015 14:16 — forked from grandmanitou/gist:8863248
Place multiple markers with infowindow on Google Maps API v3, use external links to trigger click and center map on desired location.
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?language=fra&amp;sensor=false"></script>
<script type="text/javascript">
var map;
var Markers = {};
var infowindow;
var locations = [
[
'Samsung Store Madeleine',
'<strong>Samsung Store Madeleine</strong><p>5 Boulevard Malesherbes, 75008 Paris<br>10h – 20h</p>',
48.8701925,
@biapar
biapar / package.json
Created November 19, 2015 13:23 — forked from Benjaminsson/package.json
My boilerplate packe.json for an Umbraco site
{
"name": "package",
"version": "1.0.0",
"private": true,
"devDependencies": {
"gulp": "~3.8.11",
"gulp-load-plugins": "~0.10.0",
"browser-sync": "~2.7.2",
"wiredep": "~2.2.2",