Skip to content

Instantly share code, notes, and snippets.

#sidebar_ads, #rightCol, #presence
{
display: none !important;
}
.profile_two_columns .right_column {
float: left !important;
margin-left: 30px;
}
.fbx #globalContainer {
@gampleman
gampleman / board.css
Created November 5, 2010 15:36
CSS to make a Departure board
#4606367513 {
padding: 5px 10px;
display: inline-block;
background: rgb(30, 30, 30);
background: -webkit-gradient(linear, center top, center bottom,
color-stop(0.0, rgba(0,0,0, 1)),
color-stop(0.05, rgba(30,30,30, 1)),
color-stop(1.0, rgba(50, 50, 60, 1)));
background: -moz-linear-gradient(270deg,
rgba(0,0,0,1) 0%,
.tooltip {
font: 14px Helevetica, sans-serif;
line-height: 18px;
position: relative;
border: 2px solid #73a7f0;
max-width: 200px;
margin-left: 20px;
padding: 5px 14px;
border-radius: 4px;
-webkit-border-radius: 4px;

hello

world

Testing out Gist publishin'

Yeah, this is so cool, its ridiculous.

@gampleman
gampleman / expiring_message.rb
Created February 7, 2012 12:25
Auto expiring message on command line
def expiring_message(msg, time)
message = Thread.new {
time.downto(0) do |t|
# You can use some code to get terminal width here instead of the 15 spaces I use
# however that usually isn't terribly portable.
printf "#{msg}#{' ' * 15}\r", t
sleep 1
end
puts
}
# Entity
# ======
# Entity is the base class of the Scene-Graph renderer and represents
# a single object.
class Entity
# When `perform_caching` is set to `yes` the renderer will cache the
# result as an image, unless `is_cached` is set to `no`.
perform_caching: no
is_cached: false
# `parent` is a reference to the entity this class is a child to.
@gampleman
gampleman / tracking_interceptor.md
Last active June 19, 2020 21:34
Adding tracking to emails in Rails

This gist illustrates how you would add Google Analytics tracking into your Rails mailers. Add the tracking_interceptor.rb into your path and enable it for your mailers with:

register_interceptor TrackingInterceptor
@gampleman
gampleman / README.md
Created September 10, 2014 03:08
Algorithm to find a short unique CSS selector from an arbitrary node

This algorithm when passed a DOM node will find a very short selector for that element.

@gampleman
gampleman / readme.md
Last active August 29, 2015 14:07
JS Build tool of my dreams

Features desired

(but not necessarily found elsewhere)

Must Have

  1. Native Sourcemap support: JavaScript and CSS often need these for debugging purposses. Managing this manually tends to be a complete PITA. Also we want a way to globally turn these off, if we need better build time (see next).
  2. Native Watch & Serve: Setting up a dev environment should be straightforward, as the build tool should support mutliple environments, but also the abbility to watch source files and serve them from itself.
  3. Lazy: Shouldn't rebuild stuff if it doesn't need to.
  4. Native concurrency: Detect dependencies and parallelize automatically.