Skip to content

Instantly share code, notes, and snippets.

View tricon's full-sized avatar

David Aaron Fendley tricon

View GitHub Profile
@anonymoussc
anonymoussc / README.md
Created August 7, 2015 10:12
AngularJS custom directives animations

##AngularJS custom directives animations

$animate method's signatures:

$animate.addClass(element, className); $animate.removeClass(element, className);

Both functions receive the element parameter that will have a class added or removed and the className class that will be used and return a promise that is resolved once the animation has completed itself or has been cancelled.

@priyadarshan
priyadarshan / lisp-idioms.md
Created May 10, 2015 18:52
Lisp Idioms (Gene Michael Stover)
@avdi
avdi / nullenum.rb
Created January 9, 2015 20:32
Behold, the null enumerator.
e = loop
e # => #<Enumerator: main:loop>
e.next # => nil
e.next # => nil
e.peek # => nil
e.size # => Infinity
e.rewind
e.next # => nil
@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active April 23, 2026 01:20
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@matthewmueller
matthewmueller / osx-for-hackers.sh
Last active May 15, 2026 06:38
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@makmanalp
makmanalp / sshtest-playbook.yml
Last active June 18, 2021 15:06
SSH agent forwarding tester for ansible / vagrant
---
- hosts: all
sudo: no
tasks:
- shell: echo "Client= [$SSH_CLIENT] Sock= [$SSH_AUTH_SOCK]"
register: myecho
- debug: msg="{{myecho.stdout}}"
- shell: ssh-add -l
register: myecho
- debug: msg="{{myecho.stdout}}"
@todc
todc / mac-setup.md
Last active May 15, 2025 08:52
Fresh Mac OS Setup

1. Run Software Update

Make sure everything is up to date.

Software Update

2. Install Xcode and its "Command Line Tools"

  1. Go to App Store and install Xcode.
  2. Open and accept the terms
(add-hook 'ruby-mode-hook
'(lambda ()
(define-key ruby-mode-map (kbd "C-c c") 'rinari-find-controller)
(define-key ruby-mode-map (kbd "C-c m") 'rinari-find-model)
(define-key ruby-mode-map (kbd "C-c v") 'rinari-find-view)
(define-key ruby-mode-map (kbd "C-c e") 'rinari-find-environment)
(define-key ruby-mode-map (kbd "C-c i") 'rinari-find-migration)
(define-key ruby-mode-map (kbd "C-c j") 'rinari-find-javascript)
(define-key ruby-mode-map (kbd "C-c n") 'rinari-find-configuration)
(define-key ruby-mode-map (kbd "C-c v") 'rinari-find-view)
@adamico
adamico / collection_check_boxes_input.rb
Last active September 2, 2025 16:56 — forked from mattclar/simple_form.rb
This fork adds a custom horizontal form wrapper and merges append/prepend in a 'group' wrapper
#app/inputs/collection_check_boxes_input.rb
class CollectionCheckBoxesInput < SimpleForm::Inputs::CollectionCheckBoxesInput
def item_wrapper_class
"checkbox-inline"
end
end
@maxim
maxim / rails_load_path_tips.md
Last active January 9, 2025 00:59
How to use rails load paths, app, and lib directories.

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/