Skip to content

Instantly share code, notes, and snippets.

View biapar's full-sized avatar
🙂

Biagio Paruolo biapar

🙂
View GitHub Profile
@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 / 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 / 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.
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 / 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();
@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 / 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:2c92a7b559bc5890ba606acfa6e10004
Created November 5, 2016 14:06
Zurb Foundation 6 and Jarallax: CSS Tip
.jarallax {
position: relative;
background-size: cover;
background-repeat: no-repeat;
left: 50%;
top: 50%;
min-width: 100%;
min-height: 100%;
-webkit-transform: translate(-50%,-50%);
-moz-transform: translate(-50%,-50%);
@biapar
biapar / gist:2902f4ee8790af18dcd875a0040d8a32
Created December 14, 2016 13:46
An Umbraco partial view that list the last six post from Articulate blog
@inherits Umbraco.Web.Mvc.UmbracoViewPage<IPublishedContent>
@using Articulate;
@using Articulate.Models;
@using Umbraco;
@using Umbraco.Web;
@using Umbraco.Core;
@using Umbraco.Core.Models;
@using System.Linq;
@using System;
@{
@biapar
biapar / ForgotPassword.cshtml
Last active January 24, 2017 15:33 — forked from DavidVeksler/ForgotPassword.cshtml
Umbraco 7: reset password for user and forgot password implementation
@using FEE.Domain
@inherits UmbracoTemplatePage
@{
Layout = "FEEMaster.cshtml";
var featuredImage = CoverImageProvider.GetCoverImageOrDefault(CurrentPage.featuredImage);
}
@section bodyClass {subpage}
@*TODO maybe implement:https://github.com/warrenbuckley/CWS-Umbraco-Standard-Membership/blob/master/CWSUmbracoStandardMembership/Views/AuthSurface/ResetPassword.cshtml