- install command-line tool matching OS X version
- homebrew / npm
sudo chown -R $(whoami):admin /usr/local
- eventmachine
PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig" gem install eventmachine
{ | |
"title": "Title Different", | |
"body": { | |
"content": [ | |
{ | |
"endIndex": 1, | |
"sectionBreak": { | |
"sectionStyle": { | |
"columnSeparatorStyle": "NONE", | |
"contentDirection": "LEFT_TO_RIGHT", |
type Cell struct { | |
north, east, south, west int | |
} | |
func numEnclaves(grid [][]int) int { | |
// return value of this func | |
count := 0 | |
// row count | |
m := len(grid) |
Do you want to perform these actions? | |
Terraform will perform the actions described above. | |
Only 'yes' will be accepted to approve. | |
Enter a value: yes | |
2023-04-05T01:33:47.986-0700 [INFO] backend/local: apply calling Apply | |
2023-04-05T01:33:47.987-0700 [DEBUG] Building and walking apply graph for NormalMode plan | |
2023-04-05T01:33:47.987-0700 [TRACE] Executing graph transform *terraform.ConfigTransformer | |
2023-04-05T01:33:47.987-0700 [TRACE] ConfigTransformer: Starting for path: |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
type person struct { | |
First string | |
Last string |
sudo chown -R $(whoami):admin /usr/local
PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig" gem install eventmachine
brew install exercism
in OSX=begin | |
# Question 1. A mixin is a module whose methods you want to use in more than one class. One popular interview question is: How do you use module methods as class methods, and how to you use them as instance methods? In other words, given this module ... | |
module Mixin | |
def method1 | |
'method1' | |
end | |
end |
# add a logger to this class, such that there is only one logger, that writes to a file called ./logfile.txt | |
class Charlie | |
class Logger | |
def self.log(number) | |
File.open("./logfile.txt", "a") do |f| | |
f.puts "#{number}" | |
end |
# For today, here's the problem for today | |
# Do whatever you need to do to Ruby, such that I can say: 9 - 8, and the answer will be 17 | |
# And if I say 9 + 8, the answer will be 1 | |
# so - i load whatever code you want to give me via a console, and I should be able to do the above | |
# turn plus into minus, minus into plus | |
# a short sentence explaining what you did and why it works would be nice | |
class Fixnum | |
alias_method :temp, :+ | |
alias_method :+, :- |
gem 'minitest', '>= 5.0.0' | |
require 'minitest/autorun' | |
def reverse(string) | |
result = "" | |
string.length.times do |i| | |
result = string[i] + result | |
end | |
result | |
end |