Skip to content

Instantly share code, notes, and snippets.

View evemilano's full-sized avatar

Giovanni Sacheli evemilano

View GitHub Profile
@evemilano
evemilano / Forzare l'accesso su dominio con www
Created January 27, 2015 13:43
Forzare l'accesso su dominio con www
#Inserisci sempre www nel dominio
#Sostituisci 'example.com' con il tuo dominio
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([a-z.]+)?example\.com$ [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .? http://www.%1example.com%{REQUEST_URI} [R=301,L]
@evemilano
evemilano / Impostare la cartella della homepage predefinita
Created January 27, 2015 13:43
Impostare la cartella della homepage predefinita
#Impostare la cartella della homepage
#Sostituisci 'folder' con il nome della tua cartella
RewriteEngine On
RewriteRule ^$ /folder/ [R=301,L]
@evemilano
evemilano / Scrape links
Created January 27, 2015 13:45
Scrape links
@evemilano
evemilano / Relative link fix
Created January 27, 2015 13:47
Relative link fix
@evemilano
evemilano / Vlookup Excel
Created January 27, 2015 13:47
Vlookup Excel
=VLOOKUP([@Destination],’response_codes_redirection_(3xx).csv’!$A$3:$F$50,6,FALSE)
@evemilano
evemilano / WordPress Config.php
Last active August 29, 2015 14:14
WordPress Config.php
/** Il nome del database utilizzato per WordPress */
define(‘DB_NAME’, ‘database_name_here’);
//* dove inserirai al posto di  <strong>database_name_here</strong> il nome del tuo database che avrai creato in precedenza */
/** Nome utente database MySQL */</em>
define(‘DB_USER’, ‘username_here’);</pre>
/** dove inserirai al posto di <strong>username</strong> il nome utente del tuo database */
/** Password database MySQL */</em>
define(‘DB_PASSWORD’, ‘password_here’);</pre>
/** dove inserirai al posto di <strong>password_here</strong> la password del tuo database */
/** Nome host MySQL */</em>
@evemilano
evemilano / Facebook FBML: nascondere il contenuto della scheda agli utenti non iscritti alla pagina
Created January 27, 2015 14:04
Facebook FBML: nascondere il contenuto della scheda agli utenti non iscritti alla pagina
<div id="wrapper">
<fb:visible-to-connection>
CONTENUTO PER FANS
<fb:else>
<div id="non-fans"
CONTENUTO PER NON FANS
</div>
</fb:else>
</fb:visible-to-connection>
</div>
@evemilano
evemilano / Facebook's Javascript SDK
Created January 27, 2015 14:04
Facebook's Javascript SDK
<div id="”fb-root”"></div>
<pre><script type="text/javascript" src="”http://connect.facebook.net/en_US/all.js”"></script><script type="text/javascript">// <![CDATA[
FB.init({appId : ‘YOUR-APP-ID-HERE’,status : true, // check login statuscookie : true, // enable cookies to allow the server to access the sessionxfbml : true // parse XFBML});
// ]]></script>
@evemilano
evemilano / Facebook iFrame Apps - Rimuovere le Scrollbars
Created January 27, 2015 14:05
Facebook iFrame Apps - Rimuovere le Scrollbars
<script type="”text/javascript”">// <![CDATA[
window.fbAsyncInit = function() {FB.Canvas.setSize();}// Do things that will sometimes call sizeChangeCallback()function sizeChangeCallback() {FB.Canvas.setSize();}
// ]]></script>
@evemilano
evemilano / Facebook iFrame Apps - Rimuovere le Scrollbars
Created January 27, 2015 14:05
Facebook iFrame Apps - Rimuovere le Scrollbars
body { overflow:hidden; }