Skip to content

Instantly share code, notes, and snippets.

View vedranjaic's full-sized avatar

Vedran Jaic vedranjaic

  • NEOS
  • Zagreb, Croatia
View GitHub Profile
@vedranjaic
vedranjaic / input_fields.txt
Created August 12, 2015 10:02
A checklist for designing mobile input fields
Should it be there at all
1. Is this field absolutely necessary?
Description
2. Is the label above it? (Not inside, not below)
3. Is the field marked as required (*) or optional?
4. Have you removed any placeholder from inside the field?
Visibility
5. Is the field big enough so that most possible field values are visible?
@vedranjaic
vedranjaic / css-multiline-ellipsis.scss
Created March 1, 2015 05:49
CSS multiline ellipsis
$font-size: 16px;
$line-height: 1.4;
$lines-to-show: 3;
h2 {
display: block; /* Fallback for non-webkit */
display: -webkit-box;
max-width: 400px;
height: $font-size*$line-height*$lines-to-show; /* Fallback for non-webkit */
margin: 0 auto;
@vedranjaic
vedranjaic / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@vedranjaic
vedranjaic / bootstrap-nav-hover.js
Created December 30, 2014 22:32
Bootstrap nav dropdown on hover
$(document).ready(function(){
$(".dropdown").hover(
function() {
$('.dropdown-menu', this).not('.in .dropdown-menu').stop( true, true ).slideDown("fast");
$(this).toggleClass('open');
},
function() {
$('.dropdown-menu', this).not('.in .dropdown-menu').stop( true, true ).slideUp("fast");
$(this).toggleClass('open');
}
@vedranjaic
vedranjaic / sftp-config.json
Last active August 29, 2015 14:12
SFTP config file
{
// XYZ FTP
"type": "ftp",
// Settings
"connect_timeout": 5,
"save_before_upload": true,
"upload_on_save": true,
"sync_down_on_open": false,
"sync_skip_deletes": false,
@vedranjaic
vedranjaic / gulp-environment.js
Last active August 29, 2015 14:12
Gulp tasks condition for development and production environment
// Gulp environment
// https://github.com/gulpjs/gulp-util#noop
// should start gulp with desired environment
// gulp --type production
.pipe(gutil.env.type === 'production' ? uglify() : gutil.noop())
@vedranjaic
vedranjaic / _mixins.scss
Last active January 12, 2017 07:37
sass breakpoint mixin for media queries
// Mixins
// http://css-tricks.com/media-queries-sass-3-2-and-codekit/
@mixin breakpoint($point) {
@if $point == lg {
@media (min-width: 1200px) { @content; }
}
@else if $point == md {
@media (min-width: 992px) { @content; }
}
@else if $point == sm {
@vedranjaic
vedranjaic / index.html
Created August 1, 2013 21:19
Bootstrap 3 Starter Kit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Bootstrap 101 Template</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- CSS -->
@vedranjaic
vedranjaic / apple_add_dock_spacer_tile.txt
Created June 7, 2013 20:33
Apple Add spacer tile in Dock
defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
killall Dock
<!--
http://www.quotes.uk.com/web-design/meta-tags.php
Last updated: Wednesday, 22nd May 2013
-->
## Technical Formatting Meta Tags
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta http-equiv="content-language" content="en">
<meta http-equiv="content-language" content="en-gb">