Skip to content

Instantly share code, notes, and snippets.

View nalanj's full-sized avatar
🌴
On vacation

nalanj nalanj

🌴
On vacation
  • Greenville, SC
View GitHub Profile
def form_div(form, field, message = nil, options = {}, &block)
style_class = options[:class] || ""
style_class += " error" if form.object.errors[field].any?
div_options = {}
div_options[:class] = style_class unless style_class.blank?
buffer = ""
buffer << content_tag("div", div_options) do
inner_buffer = yield
class NavLabels
constructor: () ->
mouseIn = () ->
$(this).animate({
opacity: 1
top: 45
}, 400)
mouseOut = () ->
$(this).animate({
opacity: 0
class NavLabels
constructor: () ->
mouseIn = () ->
$(this).find(".nav-label-container").animate {
opacity: 1
top: 45
}, 400
mouseOut = () ->
@nalanj
nalanj / hterm_solarized.js
Last active November 29, 2016 14:01 — forked from monkeyxite/hterm_solarized.js
Solarized for Mosh Chrome
// Solarized for Mosh Chrome
// Mosh does not seem to save profiles, so this sets the default 'mosh' profile.
// To reset, evaluate term_.prefs_.resetAll()
// Run in the JavaScript console of mosh_browser.html, which can be opened
// as explained here:
// https://github.com/rpwoodbu/mosh-chrome/wiki/FAQ#how-can-i-change-the-way-the-terminal-looks-font-color-etc
var htermProfiles = {
// Solarized Dark