Skip to content

Instantly share code, notes, and snippets.

View minichiello's full-sized avatar

Gerson Minichiello minichiello

  • Como, Italy
View GitHub Profile
@minichiello
minichiello / parsley.cnpj-validator.js
Created December 12, 2019 23:55 — forked from guigmaster/parsley.cnpj-validator.js
Custom's Parsley Validator's
'use strict';
(function($) {
window.ParsleyValidator
.addValidator('validcnpj', function (value, requirement) {
var cnpj = value.replace(/[^0-9]/g, '')
, len = cnpj.length - 2
, numbers = cnpj.substring(0,len)
, digits = cnpj.substring(len)
, add = 0

Keybase proof

I hereby claim:

  • I am minichiello on github.
  • I am minichiello (https://keybase.io/minichiello) on keybase.
  • I have a public key whose fingerprint is 87DF 651D 47E2 4D0E 3F7D 17F3 1454 B031 F92A 0CC5

To claim this, I am signing this object:

@minichiello
minichiello / wpcf7-ip-shortcode-wordpress-cloudflare.php
Created January 29, 2018 19:23 — forked from vhsu/wpcf7-ip-shortcode-wordpress-cloudflare.php
Override $_SERVER['REMOTE_ADDR'] for Wordpress with Contact form 7 [_remote_ip] shortcode and Cloudflare
// Override $_SERVER['REMOTE_ADDR'] on Wordpress to retrieve the client ip for cloudflare users
// This will also correct the [_remote_ip] shortcode with contact form 7 ( wpcf7 ) or any other plugin using $_SERVER['REMOTE_ADDR']
// Simply add the following code in the wp_config.php file and you're done.
if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}
@minichiello
minichiello / insert-posts.php
Created January 4, 2018 14:32
Insert a post into WordPress from an external script
<?php
// Load WordPress
require_once 'path/to/www/wp-load.php';
require_once ABSPATH . '/wp-admin/includes/taxonomy.php';
// Set the timezone so times are calculated correctly
date_default_timezone_set('Europe/London');
// Create post
@minichiello
minichiello / bootstrap_css_map_fix.css
Created August 15, 2014 16:54
Bootstrap CSS Google Maps Fix
#map-container #map-canvas img {
max-width: none;
}
#map-container #map-canvas label {
width: auto;
display: inline;
}
source "https://rubygems.org"
gem 'puma'
gem 'sinatra'
@minichiello
minichiello / Rakefile
Created August 10, 2012 20:52 — forked from dwayne/.excludes
Deploying Sinatra/Thin to WebFaction
require 'rake'
namespace :thin do
desc "Start the application"
task :start do
puts "Starting the application..."
system "thin -s 1 -C config/config.yml -R config/config.ru start"
end
@minichiello
minichiello / google_apps.txt
Created November 9, 2011 00:21
Google Apps
MX 10 ASPMX.L.GOOGLE.COM.
MX 20 ALT1.ASPMX.L.GOOGLE.COM.
MX 20 ALT2.ASPMX.L.GOOGLE.COM.
MX 30 ASPMX2.GOOGLEMAIL.COM.
MX 30 ASPMX3.GOOGLEMAIL.COM.
MX 30 ASPMX4.GOOGLEMAIL.COM.
MX 30 ASPMX5.GOOGLEMAIL.COM.
calendar CNAME ghs.google.com.
docs CNAME ghs.google.com.
mail MX 10 ASPMX.L.GOOGLE.COM.

Game Engines

Name Latest Release Size (KB) License Type Unit Tests Docs Notes
The Render Engine 1.5.3 MIT Cross-browser; extensive API; open-source. 2
gameQuery 0.5.1 CC BY-SA 2.5 Designed to be used with jQuery
gTile 0.0.1 (2008-07-21) Tile based
Akihabara 1.3 GPL2/MIT Classic Repro Intended for making classic arcade-style games in JS+HTML5 3
The Javascript 2D Game Engine GPL Emphasis on gravity/physics/collision detection; uses HTML5 Canvas and ExplorerCanvas for IE support. Focus on limiting CPU usage. 4
The GMP Javascript Game Engine