Skip to content

Instantly share code, notes, and snippets.

View marianoviola's full-sized avatar

Mariano Viola marianoviola

View GitHub Profile
@marianoviola
marianoviola / html-languages.txt
Created November 11, 2022 14:08 — forked from JamieMason/html-languages.txt
HTML lang attribute / ISO language code reference / Culture names
CULTURE SPEC.CULTURE ENGLISH NAME
--------------------------------------------------------------
Invariant Language (Invariant Country)
af af-ZA Afrikaans
af-ZA af-ZA Afrikaans (South Africa)
ar ar-SA Arabic
ar-AE ar-AE Arabic (U.A.E.)
ar-BH ar-BH Arabic (Bahrain)
ar-DZ ar-DZ Arabic (Algeria)
ar-EG ar-EG Arabic (Egypt)
@marianoviola
marianoviola / .htaccess
Created February 9, 2018 09:15 — forked from vielhuber/.htaccess
Apache: htaccess force www and https ssl #server
# force HTTPS and www.
RewriteEngine On
RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR]
RewriteCond %{HTTPS} off
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L]
# alternative way
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
@marianoviola
marianoviola / README.MD
Created December 6, 2017 08:16 — forked from 1wheel/README.MD
you-draw-it
@marianoviola
marianoviola / index.html
Created April 28, 2017 14:22 — forked from igorzilla/index.html
Alluvial Diagram
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Alluvial Diagram</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.5.0"></script>
<style type="text/css">
body {
margin: 1em;
}
@marianoviola
marianoviola / export-to-csv.gs
Created April 18, 2017 07:45 — forked from mderazon/export-to-csv.gs
Google apps script to export to individual csv files all sheets in an open spreadsheet
/*
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
ss.addMenu("csv", csvMenuEntries);
@marianoviola
marianoviola / package.json
Created March 8, 2017 16:40
using `npm run` to build and watch with less and browserify
{
"name": "my-app",
"version": "0.0.0",
"dependencies": {
"browserify": "~2.36.1",
"less": "~1.5.1"
},
"devDependencies": {
"watchify": "~0.4.1",
"catw": "~0.2.0"
@marianoviola
marianoviola / mac-tweaks.md
Created December 14, 2016 15:26 — forked from koenbok/mac-tweaks.md
My Favorite Mac Tweaks

Skip verifying disk images

defaults write com.apple.frameworks.diskimages skip-verify true

Always hide the Desktop

defaults write com.apple.finder CreateDesktop false; killall Finder

Make terminal logins fast

touch ~/.hushlogin

Disable most animations

@marianoviola
marianoviola / Contract Killer 3.md
Last active August 11, 2016 15:22
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@marianoviola
marianoviola / HEY-YOU.md
Created August 10, 2016 17:21 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
@marianoviola
marianoviola / pubsub.md
Created August 10, 2016 17:21 — forked from addyosmani/pubsub.md
Four ways to do Pub/Sub with jQuery 1.7 and jQuery UI (in the future)

#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)

Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.

(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)

##Option 1: Using jQuery 1.7's $.Callbacks() feature:

$.Callbacks are a multi-purpose callbacks list object which can be used as a base layer to build new functionality including simple publish/subscribe systems. We haven't yet released the API documentation for this feature just yet, but for more information on it (including lots of examples), see my post on $.Callbacks() here: