Skip to content

Instantly share code, notes, and snippets.

@DragonI
DragonI / animated-bell-notification-badge.markdown
Created September 20, 2016 20:08
Animated Bell Notification Badge
@DragonI
DragonI / baseConverter.js
Last active June 21, 2016 15:08 — forked from faisalman/baseConverter.js
ES6: Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*
* 6/20/2016 - DragonI
* Hipsterize faisalman's excellent code to ES6
@DragonI
DragonI / dabblet.css
Created November 29, 2013 05:18 — forked from LeaVerou/dabblet.css
(C)Leanest CSS spinner ever
/**
* (C)Leanest CSS spinner ever
*/
@keyframes spin {
to { transform: rotate(1turn); }
}
.progress {
position: relative;
/* BS3 using input group icons from Font-Awesome 3.2.1 */
/* no need for any margin/padding for headings when using WELL */
.well h3 {
padding-top: 0;
margin-top: 0;
margin-bottom: 20px;
}
#signupForm .input-group {
margin-bottom: 20px;
/*
* This decorates Handlebars.js with the ability to load
* templates from an external source, with light caching.
*
* To render a template, pass a closure that will receive the
* template as a function parameter, eg,
* T.render('templateName', function(t) {
* $('#somediv').html( t() );
* });
*
@DragonI
DragonI / dabblet.css
Created April 13, 2013 17:19
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #ccf;
background: linear-gradient(45deg, #ccf, #ccc);
min-height: 100%;
$(document).ready(function() {
var ds_loaded = false, top = $("#disqus_thread").offset().top;
window.disqus_developer = 1;
window.disqus_shortname = 'dragoncrew';
function check(){
if ( !ds_loaded && $(window).scrollTop() + $(window).height() > top ) {
$.ajax({
type: "GET",
url: "http://" + disqus_shortname + ".disqus.com/embed.js",
@DragonI
DragonI / laravel-javascript-cookies.markdown
Last active March 30, 2018 04:58
hack to access / set cookies created in JavaScript from Laravel 3.2

##Objective

Add RESS for conditional content based on screen size. Accomplished by creating a JavaScript cookie

##Problem

When a cookie is set via JavaScript, Laravel's Cookie can't read the cookie. It doesn't work because there is no httpOnly option in Laravel. Symfony cookie does have httpOnly option but it defaults to TRUE. httpOnly has to be set to FALSE in order to access cookies from the browser. See issues: