Skip to content

Instantly share code, notes, and snippets.

View bhalash's full-sized avatar
💭
🌈

Mark bhalash

💭
🌈
View GitHub Profile
@bhalash
bhalash / GPL.md
Created March 5, 2014 19:56 — forked from jnrbsn/GPL.md

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

var nav = {
id: 'nav#top-menu',
anchor: 'nav#top-menu li',
content: '#content',
shadow: 'nav-box-shadow',
boxShadow: function() {
// Set box shadow at bottom of nav menu on window scroll.
if ($(window).scrollTop() === 0) {
$(nav.id).removeClass(nav.shadow);
} else {
@mixin breakpoint($point, $size: '') {
$cell_min: 200px;
$cell_max: 599px;
$tablet_min: 600px;
$tablet_max: 1024px;
@if $point == smartphone {
@media only screen and (min-device-width: $cell_min) and (max-device-width: $cell_max) and (orientation: portrait),
only screen and (min-device-width: $cell_min) and (max-device-width: $cell_max) and (orientation: landscape) {
@bhalash
bhalash / gist:9cafa6e13b0b7839191f
Last active August 29, 2015 14:18
Sass media query mixin
/**
* Media Queries
* -------------
* @category Stylesheet
* @package Tuairisc.ie Theme
* @author Mark Grealish <mark@bhalash.com>
* @copyright Copyright (c) 2015, Mark Grealish
* @license https://www.gnu.org/copyleft/gpl.html The GNU General Public License v3.0
* @version 2.0
* @link https://github.com/bhalash/tuairisc.ie
@bhalash
bhalash / ie_media.scss
Last active December 2, 2015 11:35
CSS media queries to target versions of Internet Explorer
/**
* Internet Explorer
* -----------------------------------------------------------------------------
* I am happy to exclude Internet Explorer 11 because it is decently good. My
* IE problems inecrease exponentially as I work backwards in time.
*
* @link http://keithclark.co.uk/articles/moving-ie-specific-css-into-media-blocks/
* @link http://keithclark.co.uk/articles/moving-ie-specific-css-into-media-blocks/media-tests/
* @link http://www.limecanvas.com/css-hacks-targeting-ie-10/
* @link http://www.paulirish.com/2009/browser-specific-css-hacks/
@bhalash
bhalash / miley.php
Last active August 29, 2015 14:24
An expiry timer, for Miley <3
<?php
/*
* Get, Set and Check Twerking time
* -----------------------------------------------------------------------------
* @param string $content Post content.
* @return string $content Post content.
*/
function for_miley_cyrus($content) {
@bhalash
bhalash / Updated lightbox.js
Last active November 5, 2017 04:28
Simple Lightbox
;(function($, window, document, undefined) {
'use strict';
$.fn.addLightbox = $.fn.addLightbox || function(args) {
var defaults = {
classes: {
hasLightbox: 'has-lightbox',
lightbox: 'rmwb-lightbox'
},
imgData: {
@bhalash
bhalash / asym-float.scss
Last active August 29, 2015 14:27
Arbitrary Scss columns
/**
* Asymmetrical Floated Elements
* -----------------------------------------------------------------------------
* float-of() provides regularly-sized floated columns side by side. This allows
* for an asymmetrical structure. SIZES ARE INCLUSIVE OF MARGIN, EXCEPT IN
* PERCENTAGE COLUMNS.
*
* Seriously -- do NOT use this mixin for regularly-spaced columns. Use
* float-of() if you need regular columns, because the right margin will look
* all fucked. This is *only* for asymmetric columns.
@bhalash
bhalash / .vimrc
Created August 24, 2015 08:55
Vimrc
" Set mode for backspace use.
set nocompatible
" Enable syntax highlighting
syntax on
" Change backspace for OSX
set backspace=indent,eol,start
" Enable line numbers.
@bhalash
bhalash / datechecker.js
Last active September 6, 2015 19:57
Datechecker
/**
* Time and Date Checker
* -----------------------------------------------------------------------------
* Does:
*
* 1. Append either time (hour:minute) or date (day/month/year) selects to
* target element.
* 2. Selects are prefixed with a given string, and suffixed with the input
* type foo_year, foo_month, etc.
* 3. A given time and date can be provided by a Unix timestamp, and the inputs