Skip to content

Instantly share code, notes, and snippets.

View DanAntFerrari's full-sized avatar

Daniele Antonio Ferrari DanAntFerrari

View GitHub Profile
@DanAntFerrari
DanAntFerrari / Preferences.sublime-settings
Created June 6, 2014 10:44
My sublime editor config
{
"color_scheme": "Packages/User/Monokai (SL).tmTheme",
"draw_white_space": "all",
"trim_trailing_white_space_on_save": true,
"font_size": 10,
"ignored_packages":
[
"Markdown",
"Vintage"
],
@DanAntFerrari
DanAntFerrari / share.html
Last active March 9, 2016 15:57
Social links share
<ul class="social">
<li>
<a title="Pinterest" href="//www.pinterest.com/pin/create/button/?url=http://www.YOURSITE.com/cat-{{ post.id_post }}"
target="_blank"
rel="nofollow"
onclick="window.open(this.href,'_blank', 'width=700, height=300');return false;">
<span class="icon icon-pinterest"></span>
</a>
</li>
<li>
@DanAntFerrari
DanAntFerrari / gofullscreen.js
Created January 21, 2014 13:03
Active fullscreen by key down
function keyboardShortcuts(){
// setup the keyboard shortcuts
console.log('keyboardShortcuts: listner ON');
document.addEventListener('keyup', function(e) {
console.log('keyboardShortcuts: e.keyCode',e.keyCode);
switch(e.keyCode) {
case 70:
// F
// Make the body toggle full screen.
@DanAntFerrari
DanAntFerrari / input-number-range.css
Created July 24, 2013 10:17
Disable webkit's appearance default browser style for input type=“number” and input type=“range”
//Disable spin buttons on input type=“number” and input slider type=“range” in Webkit browsers
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button,
input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
margin: 0;
}
@DanAntFerrari
DanAntFerrari / devCSS.js
Last active December 19, 2015 07:09
Online CSS templating debug
var mystyle="http://localhost/x/css/style.css";
function test() {
var CSShold = document.getElementById('DevCSS');
if (CSShold){
//console.log('if');
document.getElementsByTagName('head')[0].removeChild(CSShold)
}/*else{
//console.log('else');
@DanAntFerrari
DanAntFerrari / meta_viewport.js
Created June 14, 2013 11:50
Create meta vieport an mobile tag by JS
var HandheldFriendlyTag=document.createElement('meta');
HandheldFriendlyTag.id="HandheldFriendly";
HandheldFriendlyTag.name = "HandheldFriendly";
HandheldFriendlyTag.content = "true";
document.getElementsByTagName('head')[0].appendChild(HandheldFriendlyTag);
var MobileOptimizedTag=document.createElement('meta');
MobileOptimizedTag.id="MobileOptimized";
MobileOptimizedTag.name = "MobileOptimized";
MobileOptimizedTag.content = "320";
document.getElementsByTagName('head')[0].appendChild(MobileOptimizedTag);
/*
* Reset default browser CSS inside a element with class ".reset-inner".
* Based on work by Eric Meyer: http://meyerweb.com/eric/tools/css/reset/index.html
-------------------------------------------------------------- */
.reset-inner, .reset-inner div, .reset-inner span, .reset-inner applet, .reset-inner object, .reset-inner iframe,
.reset-inner h1, .reset-inner h2, .reset-inner h3, .reset-inner h4, .reset-inner h5, .reset-inner h6, .reset-inner p, .reset-inner blockquote, .reset-inner pre,
.reset-inner a, .reset-inner abbr, .reset-inner acronym, .reset-inner address, .reset-inner big, .reset-inner cite, .reset-inner code,
.reset-inner del, .reset-inner dfn, .reset-inner em,.reset-inner img, .reset-inner ins, .reset-inner kbd, .reset-inner q, s, .reset-inner samp,
.reset-inner small, .reset-inner strike, .reset-inner strong, .reset-inner sub, .reset-inner sup, .reset-inner tt, .reset-inner var,
@DanAntFerrari
DanAntFerrari / Browser Language
Last active December 18, 2015 07:29
Check browser Language on IE and Firefox
var l_lang;
if (navigator.userLanguage) {
// Explorer
l_lang = navigator.userLanguage;
}
else if (navigator.language){
// FF
l_lang = navigator.language;
}
else{
@DanAntFerrari
DanAntFerrari / gist:5712424
Created June 5, 2013 08:24
Javascrip Alert for check CHECK IE VERSION
<!-- CHECK IE VERSION -->
<!--[if IEMobile 7 ]><script type="text/javascript">alert('Browsing with IE mobile 7")</script> <![endif]-->
<!--[if lt IE 7 ]><script type="text/javascript">alert('Browsing with IE 6")</script> <![endif]-->
<!--[if IE 7 ]><script type="text/javascript">alert('Browsing with IE 7")</script> <![endif]-->
<!--[if IE 8 ]><script type="text/javascript">alert('Browsing with IE 8")</script> <![endif]-->
<!--[if IE 9 ]><script type="text/javascript">alert('Browsing with IE 9")</script> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><script type="text/javascript">alert('not IE')</script><!--<![endif]-->
@DanAntFerrari
DanAntFerrari / userDefineLang_LESS.xml
Created January 4, 2013 14:20
LESS-highlight-Notepad++ ============================== About: This styler has been built by Daniele Antonio Ferrari for Notepad++ Description: package for highlight LESS code in Notepad++ based on Monkay by Fabio Zendhi Nagao (Copyright © 2008 Fabio Zendhi Nagao - http://zend.lojcomm.com") Requirements: - This style is based on Verdana fonts. -…
<NotepadPlus>
<UserLang name="LESS" ext="less" udlVersion="2.0">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" forceLineCommentsAtBOL="no" foldCompact="no" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments" id="0">00// 01 02 03/* 04*/</Keywords>
<Keywords name="Numbers, additional" id="1"></Keywords>
<Keywords name="Numbers, prefixes" id="2"># , rgb, px, em</Keywords>