Skip to content

Instantly share code, notes, and snippets.

@tristanoneil
tristanoneil / ops.csv
Last active November 15, 2023 18:06
ops
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
opportunity_id
0061U00000Ky9QOQAZ
0061U00000Ky9QQQAZ
0061U00000Ky9hDQAR
0061U00000Ky8jyQAB
0061U00000Ky8hLQAR
0061U00000KyA1hQAF
0061U00000Ky8iXQAR
0061U00000Ky8vnQAB
0061U00000Ky8vrQAB
if [ -d ~/cache/phantomjs-2.1.1-linux-x86_64 ]
then
echo "PhantomJS 2.1.1 already found in cache, skipping download"
else
wget -O ~/cache/phantomjs-2.1.1.tar.bz2 https://s3.amazonaws.com/maji-development/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar xvfj ~/cache/phantomjs-2.1.1.tar.bz2 -C ~/cache/
fi
cp ~/cache/phantomjs-2.1.1-linux-x86_64/bin/phantomjs ~/.phantomjs/bin/phantomjs
@tristanoneil
tristanoneil / setup.sh
Last active February 17, 2016 19:42 — forked from hubertlepicki/setup.sh
PhantomJS 2.1.0
PHANTOMJS_URL="https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2"
set -e
rm -rf ~/.phantomjs
wget --continue "${PHANTOMJS_URL}" -O "${HOME}/cache/phantomjs"
tar xvfj "${HOME}/cache/phantomjs"
ln -s "${HOME}/cache/phantomjs" "${HOME}/bin/"
chmod +x "${HOME}/bin/phantomjs"
function fish_greeting
set_color green
print_weather | cowsay
end
function print_weather
if test -f .weather
set time (head -n 1 .weather)
set current (date +%s)
set diff (math $current - $time)

Winooski

  • Mule Bar - Good beer bar, craft cocktails and food.
  • Misery Loves Company - Amazing low class, high class food. I recommend going for lunch. Also serves some good beer and cocktails. My favorites are the Big Red, Rough Francis and the Korean Rueben.
  • Winooski Beverage Warehouse (The Bevie) - Huge bottled/can beer and wine selection. I go here pretty much on a weekly basis.

Burlington

self.navigationController.view.addConstraints([
NSLayoutConstraint(
item: add,
attribute: .Width,
relatedBy: .Equal,
toItem: add,
attribute: .Width,
multiplier: 1,
constant: 0
),
irb(main):022:0> Cookbook.find_by(name: 'mysql').cookbook_versions.sort_by { |v| Semverse::Version.new(v.version) }.reverse.first
Cookbook Load (0.6ms) SELECT "cookbooks".* FROM "cookbooks" WHERE "cookbooks"."name" = 'mysql' LIMIT 1
CookbookVersion Load (2.5ms) SELECT "cookbook_versions".* FROM "cookbook_versions" WHERE "cookbook_versions"."cookbook_id" = $1 [["cookbook_id", 699]]
=> #<CookbookVersion id: 2861, cookbook_id: 699, license: "Apache 2.0", version: "4.1.2", created_at: "2014-02-28 10:27:00", updated_at: "2014-02-28 10:27:00", tarball_file_name: "mysql20140228-22364-1stzk6m", tarball_content_type: "application/x-tar", tarball_file_size: 26275, tarball_updated_at: "2014-02-28 10:26:56", readme: "mysql Cookbook\n==============\n[![Build Status](htt...", readme_extension: "md", dependencies_imported: true, description: "Installs and configures mysql for client or server", legacy_id: 6009, web_download_count: 65, api_download_count: 0, verification_state: "pending">
irb(main):023:0> Cookbook
require 'parslet'
recipe = <<EOH
:1 oz: @1 :60 Minutes:
:1 oz: @2 :30 Minutes:
EOH
class BierDown < Parslet::Parser
rule(:colon) { match(':') }
rule(:at) { match('@') }
  • Line 13 in CookbookUploadsController. Do we need to check if the upload is valid if we're checking if it's valid in the finish! method?
  • What value does Virtus add to CookbookUpload::Metadata that can't be achieved with accessors?
class A
  attr_accessor :b, :c, :d

  def initialize(h)
    h.each { |k, v| send("#{k}=", v) }
  end
end