Skip to content

Instantly share code, notes, and snippets.

View afelicioni's full-sized avatar
👔
Focused on @aws ☁️

Alessio Felicioni afelicioni

👔
Focused on @aws ☁️
View GitHub Profile
Partial error code list
from https://apicommunity.wunderground.com/weatherapi/topics/error-code-list
missingkey : you must supply a key
keynotfound : this key does not exist
invalidkey : this key is not valid due to exceeding rate plan
invalidfeature : a requested feature is not valid due to exceeding rate plan
querynotfound : No cities match your search query
plannerwithhistory : Cannot load Travel Planner and History in the same request
invalidquery : you must supply a location query
@afelicioni
afelicioni / setup-machine-id.sh
Created July 27, 2015 18:07
generate / update system id at /var/lib/dbus/machine-id
dbus-uuidgen > /var/lib/dbus/machine-id
@afelicioni
afelicioni / routing-alice
Created September 9, 2015 21:02
routing su interfaccia eth1 aggiuntiva, via alice adsl
ip rule add from 192.168.1.254 table alice
ip rule add to 192.168.1.254 table alice
ip route add 192.168.1.0/24 dev eth1 src 192.168.1.254 table alice
ip route add default via 192.168.1.1 dev eth1 table alice
@afelicioni
afelicioni / Gruntfile.js
Last active September 10, 2015 22:34
deploy su ftp con file system watcher via grunt
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
ftpush: {
all: {
auth: {
host: 'ftp.felolabs.com',
port: 21,
authKey: 'key1'
},
function isTouch() {
try{ document.createEvent("TouchEvent"); return true; }
catch(e){ return false; }
}
function is_touch_device() {
return 'ontouchstart' in window // works on most browsers
|| 'onmsgesturechange' in window; // works on ie10
};
=SE(NON(VAL.VUOTO(D2));CONCATENA(RIPETI("0";5-LUNGHEZZA(D2));D2);"")
@afelicioni
afelicioni / .htaccess
Created October 15, 2015 16:50
codeigniter .htaccess
# hints: https://ellislab.com/codeigniter/user-guide/general/urls.html
<IfModule mod_rewrite.c>
RewriteEngine on
# installed on subfolder? uncomment the following
# RewriteBase /ci/
RewriteBase /
# no direct access for /system folder
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
# no direct access for /application folder
@afelicioni
afelicioni / duplicati
Created October 22, 2015 09:54
evidenzia duplicati su foglio elettronico (intervallo, anche su più colonne, con riferimento assoluto) e riferimento corrente
=SE(CONTA.SE($L$2:$M$9999;L2)>1;"DUP";"")
@afelicioni
afelicioni / windows-scheduled-task.cmd
Created November 10, 2015 15:42
scheduled task command, windows host (warning: not just a CTRL+C & CTRL+V crontab replacement). Scheduled for every Monday at 20:15
schtasks /create /tn "Namespace\Scheduled Task" /tr "php -f C:\xampp\htdocs\index.php" /sc weekly /d MON /st 20:15