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 / 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 / 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
@bhalash
bhalash / SassMeister-input.scss
Created September 16, 2015 08:11
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
@mixin selectorer($selector: null) {
&#{if($selector, ' ' + unquote($selector), $selector)} {
background: center/100% auto no-repeat url('foo');
}
}
@bhalash
bhalash / readme.md
Created September 30, 2015 22:33 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser