Skip to content

Instantly share code, notes, and snippets.

@neoncrumpet
neoncrumpet / index.html
Created October 21, 2012 14:17
Sticky Footer
<div id="wrapper">
Stuff goes here.
<div id="footer_push"></div>
</div>
<footer>
<p>This is my footer</p>
</footer>
@smhmic
smhmic / index.html
Created October 22, 2012 20:03
CSS Atom animation
<div class="container">
<div class="wrap">
<div class="circle horizontal c1">
<div class="wrap-electron">
<div class="circle electron"></div>
</div>
</div>
<div class="circle vertical c1">
<div class="wrap-electron">
<div class="circle electron"></div>
@drublic
drublic / rem-fallback.less
Last active March 28, 2020 23:57
Fallback rem-mixin in Sass and LESS
@main-font-size: 16px;
.x-rem (@property, @value) {
// This is a workaround, inspired by https://github.com/borodean/less-properties
@px-fallback: @value * @main-font-size;
-: ~`(function () { return ';@{property}: @{px-fallback}'; }())`;
-: ~`(function () { return ';@{property}: @{value}rem'; }())`;
}
@jhned
jhned / Custom Taxonomy Rewrite Example
Created February 5, 2013 20:40
Example of a rewrite rule for a custom taxonomy.
register_taxonomy('type', 'work', array(
'labels' => array(
'name' => 'Types'
, 'singular_name' => 'Type'
, 'search_items' => 'Search Types'
, 'edit_item' => 'Edit Type'
, 'add_new_item' => 'Add New Type'
)
, 'hierarchical' => true
, 'query_var' => true
@phette23
phette23 / current-dir-in-iterm-tab-title.sh
Last active March 31, 2026 18:26
Set the iTerm tab title to the current directory, not full path.
# put this in your .bash_profile
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND";
fi
# Piece-by-Piece Explanation:
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too
# the $PROMPT_COMMAND environment variable is executed every time a command is run
# see: ss64.com/bash/syntax-prompt.html
@furf
furf / validBrackets.js
Created May 19, 2013 18:03
Given a string of brackets/parantheses, check if the string is valid. ex: [[]] is valid, ][][ is not valid. How would you solve if the parantheses could be of different types like {, [, (?
function validBrackets (brackets) {
var counts = {
'(': 0,
'[': 0,
'{': 0
},
pairs = {
')': '(',
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 31, 2026 08:17
A badass list of frontend development resources I collected over time.
@codearachnid
codearachnid / custom_tribe_event_featured_image.php
Created July 19, 2013 19:11
rewrite the tribe event featured image on single event view templates with a custom size
require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = 'EMAIL@provider.com'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }
@koenpunt
koenpunt / chosen-bootstrap.css
Last active December 17, 2025 18:08
Bootstrap 3.0 theme for Chosen
select.form-control + .chosen-container.chosen-container-single .chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;