+++ title = "₿uilder 001" date = 2025-06-26 +++
- This meetup is generously sponsored by Spiral!
- Questions are encouraged, including basic ones!
+++ title = "₿uilder 001" date = 2025-06-26 +++
#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 |
[user] | |
name = David Ladowitz | |
email = [email protected] | |
[core] | |
quotepath = false | |
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
excludesfile = ~/.gitignore_global | |
editor = subl -n -w | |
[color] | |
ui = true |
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 << "." |
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 |
<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"> |
require 'json' | |
uri = URI.parse("https://api.admoda.com/v1/advertiser/stats/campaigns.csv?date=2015-03-11") | |
http = Net::HTTP.new(uri.host, uri.port) | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_NONE # read into this | |
headers = {'Authorization' => 'Token a3446590e8920e90e857f20c3d24479c'} | |
response = http.get(uri.request_uri, headers) | |
p "----Response----" |
class Person | |
attr_accessor :name, :age | |
def initialize | |
puts "name: #{name}" | |
puts "@name: #{@name}" | |
name = "David" | |
@name = "Tom" |
require 'json' | |
require 'rest-client' | |
#get a big block of json | |
github_json = RestClient.get('https://api.github.com/users/rails/repos') | |
#format the json for ruby to read | |
ghub_json = JSON.load(github_json) | |
#loop over all the repos in the formatted json |
require 'date' | |
require 'active_support/core_ext/integer/inflections' | |
class Payday | |
def self.get_next_payday(date) | |
payday = Payday.get_next_standard_payday(date) | |
payday = Payday.weekend_adjustment(payday) | |
"Payday will be " + payday.strftime("%a %b #{payday.day.ordinalize}") |