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
#Primary config file for Fish Shell | |
# replace things because fish are picky | |
#sighhhh... replaces eval "$(rbenv init -)" with eval "rbenv init -" > /dev/null 2>&1 | |
echo "Fishifying evals...." | |
cat ~/.shared_evals | sed -e 's/"$(/\\"/g' | sed -e 's/)"/\\" > \\/dev\\/null 2>\\&1/g' > ~/.config/fish/.fishified_shell_setup | |
echo "Getting ENV vars...." | |
cat ~/.shared_env >> ~/.config/fish/.fishified_shell_setup |
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
[user] | |
name = David Ladowitz | |
email = david@ladowitz.com | |
[core] | |
quotepath = false | |
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
excludesfile = ~/.gitignore_global | |
editor = subl -n -w | |
[color] | |
ui = true |
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 String | |
def reverse_sentance | |
new_sentance = self | |
new_sentance = new_sentance.gsub(".", "") | |
new_sentance = new_sentance.split(" ") | |
new_sentance = new_sentance.reverse | |
new_sentance = new_sentance.join(" ") | |
new_sentance << "." |
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
def numberOfPairs(a, k) | |
matching_pairs = [], outer_index = 0 | |
while outer_index < a.length | |
inner_index = outer_index + 1 | |
while inner_index < a.length | |
if a[outer_index] + a[inner_index] == k | |
matching_pairs = add_pair_to_array(matching_pairs, [a[outer_index], a[inner_index]]) | |
end |
This file has been truncated, but you can view the full file.
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
<body ng-style="{'overflow': main.overflowView ? 'auto' : 'hidden'}" style="overflow: hidden;" class=""> | |
<!-- ngIf: !main.isLoaded && !main.overflowView && ('false' != 'true') --> | |
<!-- uiView: undefined --><ui-view name="miscView" class="ng-scope"></ui-view> | |
<div mobile-snap="" class="height_hundred" ng-show="main.isLoaded && !main.overflowView"> | |
<!-- ngIf: main.isSmallScreen --> | |
<snap-content snap-opt-disable="'right'" class="snap-content" style=""> | |
<div class="row mobile-zero-margins"> | |
<!-- uiView: undefined --><ui-view class="hidden-xs col-sm-1 ng-scope" style="width:60px" name="sidebarLeft" ng-hide="main.galleryView"><!-- ngIf: !main.isSmallScreen --><div ng-if="!main.isSmallScreen" class="ng-scope"> | |
<div class="menu menu__border munu--fixed"> |
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
def check_admin_devices | |
count = 0 | |
AdminDevice.limit.all.each do |admin_device| | |
device = Device.find(admin_device.id) | |
unless device.last_run_time_tester | |
puts "'last_run_time_tester' was false: #{admin_device.description}" | |
count += 1 | |
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
require 'benchmark' | |
def janky(length) | |
start_time = Time.now | |
(1..length).each { |num| num } | |
time = Time.now - start_time | |
time | |
end | |
def benchmarked(length) |
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
<form action="/cards" method="post" id="payment-form"> | |
<div class="form-row"> | |
<script type="text/javascript" src="https://js.stripe.com/v1/"> | |
<script type="text/javascript"> | |
// this identifies your website in the createToken call below | |
$(document).ready(function(){ | |
Stripe.setPublishableKey('pk_07T3vzpNsDZ1R1f6EXJUiQKC0u0qK'); | |
}); |
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
RouterTester::Application.routes.draw do | |
get "managers/index" | |
get "managers/show" | |
get "managers/new" | |
get "managers/create" | |
get "managers/update" |
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
RouterTester::Application.routes.draw do | |
resources :companies do | |
member do | |
put 'location' | |
end | |
end | |
resources :managers do |
NewerOlder