Skip to content

Instantly share code, notes, and snippets.

View fakefarm's full-sized avatar
🐽
🦁🍎🐸🧄🐔🍐🐹🍑🐮 🐴🦆🥦🐙🐳F🦞🧅🐶 🦧👾A🦈🐋🍉K🌽 🐣🐎🦚🦩🦔🐿🦨🐉🥕 🐿🐾🐒🍊E🐈🐻🥥🐱 🐼🥑🐷🐓🍌🐖F🦃 🐑🚜🍋🐂A🐏🌾🤖🐀🦔 R🦜🦝🐈🦓🐠🦑🦂M🐜

Dave Woodall fakefarm

🐽
🦁🍎🐸🧄🐔🍐🐹🍑🐮 🐴🦆🥦🐙🐳F🦞🧅🐶 🦧👾A🦈🐋🍉K🌽 🐣🐎🦚🦩🦔🐿🦨🐉🥕 🐿🐾🐒🍊E🐈🐻🥥🐱 🐼🥑🐷🐓🍌🐖F🦃 🐑🚜🍋🐂A🐏🌾🤖🐀🦔 R🦜🦝🐈🦓🐠🦑🦂M🐜
View GitHub Profile
@fakefarm
fakefarm / chapter1.md
Last active May 6, 2023 01:07
Before you read the HOLY BIBLE.

Before you read the HOLY BIBLE

draft

Legend has it that the first known computer bug was literally a moth in the machine. Computers may no longer be dealing with paper feeders, but they still have with bugs. Often the simple act of turning it off and on again will rid pesky problems. Reset is good for the system. If your faith is important to you then you should turn it off and on again to prevent pesky bugs in your beliefs. Your beliefs are the most important part of who you are. Your beliefs shape who you are. Your beliefs must be based on truth.

I communicate in metaphors and stories because the Truth is not clear to see in plain English. If I try to use plain English then I will be accused of saying shocking or cliche statements. For example you will find it strange for me to say that the HOLY BIBLE is telling the truth, but Christianity is lying. Depending on your current world view my claim will sound shocking or cliche. Before I continue I want you to know who I am not.

The HOLY BIBLE describ

@fakefarm
fakefarm / ruby-debugger.md
Created June 22, 2022 08:57
Ruby Debugger Commands

Commands

Control flow

  • s[tep]
    • Step in. Resume the program until next breakable point.
  • s[tep] <n>
    • Step in, resume the program at <n>th breakable point.
  • n[ext]
  • Step over. Resume the program until next line.
@fakefarm
fakefarm / nginx.conf
Last active May 5, 2022 11:19 — forked from etagwerker/nginx-default
default configuration for nginx to work with a rails app
# This is example contains the bare mininum to get nginx going with
# Unicorn or Rainbows! servers. Generally these configuration settings
# are applicable to other HTTP application servers (and not just Ruby
# ones), so if you have one working well for proxying another app
# server, feel free to continue using it.
#
# The only setting we feel strongly about is the fail_timeout=0
# directive in the "upstream" block. max_fails=0 also has the same
# effect as fail_timeout=0 for current versions of nginx and may be
# used in its place.
@fakefarm
fakefarm / iterm2_shell_integration_notes.txt
Created November 10, 2021 17:12
iterm_shell_integration_notes.txt
I wanted to see images in iterm, and it did all this:
https://apple.stackexchange.com/questions/256322/how-to-install-imgcat-on-iterm2
------------------------------------------------------
iTerm2 shell integration was installed!
You will also have these commands:
------------------------------------------------------
imgcat filename
Displays the image inline.
@fakefarm
fakefarm / object_to_csv.rb
Created November 10, 2021 16:59
ruby_object_to_csv.rb
# convert ruby objects into a csv
require 'csv'
stores = Store.all.map(&:attributes).map(&:to_options)
CSV.open("report.csv", "w", headers: stores.first.keys, write_headers: true) do |csv|
stores.each do |h|
csv << h.values
end
/*
Mmachine learnng crawling Robot using Simple Reinforcement Learning
by: jim demello
*/
// Servo setup: the servos must be oriented so that if the arm is rotating counter-clockwise to the left of the servo, then up is 0 degrees
// and down is 180 degrees, for both servos. Then when the arm is in it's highest postion, servo 1 (the servo closest to the
// body of the robot, will be at 0 degrees and servo 2 will be at 40 degrees.)
// Sonar: the ultrasonic module should be placed facing the rear of the robot as it measures movement of the robot away from some
// solid structure like a wall.
class SockMerchant
attr_reader :pile
def initialize(socks: , pile:)
@socks = socks
@pile = pile
end
def match
last = nil;
@fakefarm
fakefarm / server.md
Created February 6, 2018 10:40 — forked from jtadeulopes/server.md
Server setup with ubuntu, nginx and puma for rails app.

Update and upgrade the system

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo reboot

Configure timezone

@fakefarm
fakefarm / web-servers.md
Created January 17, 2018 02:03 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets