Skip to content

Instantly share code, notes, and snippets.

View koohz's full-sized avatar
🏠
Working from home

koohz

🏠
Working from home
View GitHub Profile
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
const Duration _kExpand = Duration(milliseconds: 200);
/// A single-line [ListTile] with a trailing button that expands or collapses
/// the tile to reveal or hide the [children].
@peyerluk
peyerluk / gist:6b74ca6c1764af356165
Created June 23, 2014 09:11
SwipeEvents (jQuery plugin)
# Credit: Eike Send for the awesome swipe event
# ---------------------------------------------
#
# https://github.com/peachananr/onepage-scroll
$.fn.swipeEvents = ->
return this.each ->
startX = startY = undefined
$this = $(this)
$this.bind('touchstart', touchstart)
@claviska
claviska / jquery.offscreen.js
Created October 30, 2013 21:36
jQuery offscreen plugin
/*
* jQuery offscreen plugin
*
* Filters that detect when an element is partially or completely outside
* of the viewport.
*
* Usage:
*
* $('#element').is(':off-bottom')
*
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>