This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function(){ | |
// Cascading series of finds to focus the most likely relevant field | |
window.setTimeout(function() { | |
jQuery("div.fieldWithErrors :input:visible:enabled:first, :input:visible:enabled:first").focus(); | |
jQuery(".tabs-container").not(".tabs-hide").find("div.fieldWithErrors :input:visible:enabled:first, :input:visible:enabled:first").focus(); | |
}, 100); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my_time_formats = { | |
:date_time12 => "%m/%d/%y %I:%M%p", | |
:date_time24 => "%m/%d/%y %H:%M", | |
:file => "%Y-%m-%d-%H-%M%p", | |
:search => "%m/%d/%Y", | |
:default => "%m/%d/%y %I:%M%p" | |
} | |
my_date_formats = { | |
:date_time12 => "%m/%d/%y", | |
:date_time24 => "%m/%d/%y", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# {{ansible_managed}} | |
127.0.0.1 localhost.localdomain localhost | |
::1 localhost6.localdomain6 localhost6 | |
{% for item in groups['all'] %} | |
{% set ip = next(ip for ip in hostvars[item]['ansible_all_ipv4_addresses'] if ip.find("10.") == 0, hostvars[item]['ansible_default_ipv4']) %} | |
{% if ip %} | |
{{ ip }} {{ item }} | |
{% endif %} | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param1={% for z in groups['zookeeper'] %}{% if loop.index > 1 %}:{% endif %}{{ hostvars[z]['ansible_fqdn'] }}:{{ port }}{% endfor %} | |
param2=something | |
param3=something | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
### BEGIN INIT INFO | |
# Provides: druid_historical | |
# Required-Start: $local_fs $remote_fs $syslog $network | |
# Required-Stop: $local_fs $remote_fs $syslog $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts Druid historical service | |
# Description: start Druid historical service using start-stop-daemon | |
### END INIT INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Parent < ActiveRecord::Base | |
# assume there's a varchar field on the table called "name" | |
def name | |
puts "Holla from tha Parent!" | |
super | |
read_attribute(:name) || "default value!" | |
end | |
end | |
class Child < Parent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe SomeController do | |
before(:each) do | |
login as 'user' | |
end | |
... | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Rename screenshots into a format Jira won't complain about.. ;P | |
# | |
SCREENSHOTDIR=~/ | |
LOCKFILE=$(dirname $0)/$(basename $0).pid | |
echo "LOCKFILE: ${LOCKFILE}" | |
if [ -e ${LOCKFILE} ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Switch between different installed Java VMs in a Debian based system | |
# | |
available=( $(update-alternatives --list java) ) | |
if [ -n "${1}" ]; then | |
case "${1}" in | |
/*bin/java) | |
VM="${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:gotoline() | |
let file = bufname("%") | |
let names = matchlist( file, '\(.*\):\(\d\+\)') | |
if len(names) != 0 && filereadable(names[1]) | |
exec ":e " . names[1] | |
exec ":" . names[2] | |
if foldlevel(names[2]) > 0 | |
exec ":foldopen!" | |
endif |
OlderNewer