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
.ednwsl8c { | |
max-width: 800px !important; | |
max-height: inherit !important; | |
} |
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
// Debounce function | |
function debounce(func, wait) { | |
let timeout; | |
return function() { | |
const context = this, args = arguments; | |
const later = function() { | |
timeout = null; | |
func.apply(context, args); | |
}; | |
clearTimeout(timeout); |
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 matchBalancedBrackets(inputText) { | |
const matches = [] | |
let stack = 0 | |
let startIndex | |
for (let i = 0; i < inputText.length; i++) { | |
const char = inputText[i] | |
if (char === '[') { | |
if (stack === 0) { | |
startIndex = i |
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
const checkboxes = document.querySelectorAll('.checkbox input[type="checkbox"]'); | |
let lastChecked; | |
function handleCheck(e) { | |
let inBetween = false; | |
if(e.shiftKey && this.checked) { | |
checkboxes.forEach( checkbox => { | |
if(checkbox === this || checkbox === lastChecked) { | |
inBetween = !inBetween; |
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
relative-date() { | |
while read input_string; do | |
local file_path=`echo $input_string | cut -d ' ' -f 5` | |
local ls_date=`echo $input_string | cut -d ' ' -f 1,2,3,4` | |
# Accepts date in format found in `ls` output, and converts to epoch | |
local date="$(date -j -f "%d %b %H:%M:%S %Y" "$ls_date" +"%s")" | |
local now="$(date +"%s")" | |
local time_diff=$((now - date)) | |
if ((time_diff > 24*60*60)); 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
require 'rubygems' | |
require 'selenium-webdriver' | |
class Unclap | |
USERNAME = "@yourusername" | |
def initialize | |
@driver = Selenium::WebDriver.for :chrome | |
@links_to_unclap = [] | |
@problem_links = [] |
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
Homebrew build logs for macvim on Mac OS X 10.11.3 | |
Build date: 2016-04-19 09:57:26 |
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
[difftool "Kaleidoscope"] | |
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\" | |
[diff] | |
tool = Kaleidoscope | |
[difftool] | |
prompt = false | |
[mergetool "Kaleidoscope"] | |
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot | |
trustExitCode = true | |
[mergetool] |
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 ActiveAdmin::Views::Pages::Base < Arbre::HTML::Document | |
def build_page_content | |
build_flash_messages | |
div :id => "active_admin_content", :class => (skip_sidebar? ? "without_sidebar" : "with_sidebar") do | |
build_sidebar unless skip_sidebar? | |
build_main_content_wrapper | |
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
createuser -s -U $USER |
NewerOlder