Skip to content

Instantly share code, notes, and snippets.

@danyeah
danyeah / isjQueryobj.js
Created July 31, 2013 07:49
is jQuery Object
function isjQueryObj(arg) {
return arg instanceof jQuery
}
@danyeah
danyeah / formHandler.js
Created September 16, 2013 09:01
FormHandler
formHandler: function(options) {
var defaults = {
form: "form",
languages: "en",
jsPath: "js/"
}
var settings = typeof options !== "undefined" ? $.extend(options, settings) : defaults;
if ( $(settings.form).length == 0 ) { throw( settings.form + " is not present in DOM") };
var $form = $(settings.form);
@danyeah
danyeah / _column.scss
Created September 24, 2013 15:37
Column Sass
@mixin column($number, $gap) {
-webkit-column-count:$number;
-webkit-column-gap: $gap;
-moz-column-count:$number;
-moz-column-gap: $gap;
column-count:$number;
column-gap: $gap;
}
@danyeah
danyeah / .zshrc
Last active December 27, 2015 10:09
.zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
autoload colors && colors
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
@danyeah
danyeah / SassMeister-input.scss
Last active December 30, 2015 08:59
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// ----
@mixin e($name) {
@at-root #{&}__#{$name} {
@content;
}
}
@danyeah
danyeah / fonts.css
Created December 20, 2013 09:17
Fix font rendering in chrome
/* http://www.dev-metal.com/fix-ugly-font-rendering-google-chrome */
/* this is how a font-face rule usually looks like */
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff') format('woff'), /* Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
@danyeah
danyeah / brackets.sublime-macro
Created March 17, 2014 11:15
Sublime macro: { [tab] }
[
{
"args":
{
"characters": " "
},
"command": "insert"
},
{
"args":
@danyeah
danyeah / SassMeister-input.scss
Created March 28, 2014 13:20
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
%widget {
padding: 10px;
h1 {
margin-bottom: 10px;
/*
* Tooltip
* Block: .tooltip
* Elements:
* Modifiers:
*/
.tooltip {
display: inline-block;
position: relative;
$(document).ready(function() {
var DEBUG = false;
function formfiller1() {
$("input").add("textarea").not("[type=button], [type=submit]").each(function() {
if ( $(this).hasClass('email')) {
$(this).attr("value" ,"daniel@mail.it");
} else {
$(this).attr("value","test");
}