Skip to content

Instantly share code, notes, and snippets.

View danieldelcore's full-sized avatar
🐙
Say hello!

Daniel Del Core danieldelcore

🐙
Say hello!
View GitHub Profile
@danieldelcore
danieldelcore / sublime-text-config
Created May 27, 2015 05:13
Sublime Text 3 - Config
{
"auto_find_in_selection": true,
"caret_extra_width": 2,
"color_scheme": "Packages/Seti_UI/Scheme/Seti.tmTheme",
"draw_indent_guides": true,
"draw_white_space": "none",
"find_selected_text": true,
"folder_exclude_patterns":
[
".svn",
# Created by https://www.gitignore.io
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Thumbnails
._*
@danieldelcore
danieldelcore / HTML Empty
Created June 24, 2015 05:34
An empty html doc. To be used as a starting point
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="author" content="Daniel Del Core">
<meta name="description" content="">
<title></title>
@danieldelcore
danieldelcore / aspect-ratio
Last active August 29, 2015 14:24
Aspect Ratio Fix SASS
/*
To calculate the padding top percentage
[smaller-dimension] / [larger-dimension] * 100
*/
@mixin aspect-ratio($small-di, $large-di) {
$ratio: percentage($small-di / $large-di);
position: relative;
width: 100%;
'use strict';
/**
* Get the data associated with the symbol (item) within the querystring.
* --
* @param item : 'd'
* @return value or undefined
* --
* Example
* Url: example.com.au/?d=16
'use strict';
var $ = require('jquery');
$.fn.serializeObject = function() {
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name]) {
if (!o[this.name].push) {
function getFormatedDate() {
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1;
if(dd < 10) { dd = '0' + dd; }
if(mm < 10) { mm = '0' + mm; }
return dd+'/'+mm+'/' + today.getFullYear();
@danieldelcore
danieldelcore / super-sub-script-fix.css
Created August 6, 2015 06:27
Prevent super and sub scripts from affecting the line-height
sup, sub {
vertical-align: baseline;
position: relative;
top: -0.4em;
}
sub {
top: 0.4em;
}
ul li:nth-child(3n) {
// Styling for every third element here.
}
@danieldelcore
danieldelcore / handlebars-block-helpers.js
Created January 6, 2016 06:15
Handlebars block helpers
module.exports = {
/**
* Capitalises the string supplied
* =====================================
*/
capitals: function(str) {
return str.toUpperCase();
},