Skip to content

Instantly share code, notes, and snippets.

@bakertim
bakertim / index.html
Last active December 14, 2015 23:39
Fixed headers in html like table views in iOS designed for use in either html or markdown. - Requires JQuery - adapted from http://jsfiddle.net/QuVkV/3/
<p>Lorem or incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<h1>This is your facebook like button</h1>
<p>Lorem or incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<h1>Another bar here</h1>
<p>Lorem or incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor i
<html>
<head>
<style>
.fixedContainer {
position: fixed;
z-index: 2;
background-color: red;
height: 500px;
width: 1024px;
}
@bakertim
bakertim / gist:8832024
Created February 5, 2014 20:10
Objective-c: Dependecy Injection Class
//
// SRSDependencyBuilder.m
//
// Created by Tim Westbaker on 2/5/14.
// Copyright (c) 2014 Double Blue Sports. All rights reserved.
//
// Objective C version of
// Original PHP code: http://net.tutsplus.com/tutorials/php/dependency-injection-huh/
#import <Foundation/Foundation.h>
@bakertim
bakertim / gist:9004291
Created February 14, 2014 16:32
PHP: fix Paris missing find_many method
<?php
/**
* Wrap Idiorm's find_many method to return
* an instance of the class associated with
* this wrapper instead of the raw ORM class.
*/
public function find_many() {
$items = parent::find_many();
$result = array();
foreach ($items as $item) {
// Go to menue:
// find->find in files
// Switch on reg_ex button
// Find:
^(.*)$
// Where:
c:\your_folder\,*.php,*.phtml,*.js,*.inc,*.html, -*/folder_to_exclude/*
// Then click on the find button
// Be careful to not click on Replace!!!
@bakertim
bakertim / gist:9006631
Created February 14, 2014 18:45
BASH: Remove .DS_Store
#! /bin/bash
find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch
@bakertim
bakertim / gist:9006638
Created February 14, 2014 18:46
CLI: Configure .gitignore to exclude .DS_Store
#! /bin/bash
git config --global core.excludesfile ~/.gitignore
echo .DS_Store >> ~/.gitignore
@bakertim
bakertim / gist:9023123
Created February 15, 2014 18:20
CLI: New machine setup
# initial Computer setup
# Tim Westbaker
# Created 2-15-14
# Git configuration
g config --global alias.b branch
g config --global alias.a add
g config --global alias.c commit
g config --global alias.co checkout
g config --global alias.d diff
@bakertim
bakertim / gist:9036356
Created February 16, 2014 15:57
CLI: Fix preferences not saving (Mac OSX)
chmod -RN ~/Library/Preferences
@bakertim
bakertim / gist:9084225
Created February 19, 2014 01:12
Apple-Script: Toggle Hidden Files
if (do shell script "defaults read com.apple.finder AppleShowAllFiles") is equal to "0" then
do shell script "defaults write com.apple.finder AppleShowAllFiles 1"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles 0"
end if
tell application "Finder" to quit
delay 2
launch application "Finder"