Skip to content

Instantly share code, notes, and snippets.

View johana-star's full-sized avatar
🕶️

Johana Star johana-star

🕶️
View GitHub Profile

🤔

  • find good books: I’m an adept textual learner, and benefit especially from longer format tech books. However, as a beginner you don’t have a good compass for which books are worth your time, so it’s vital to…

  • find informal mentors: especially when starting out, anyone who has any experience with a topic will be able to point you to resources. If you are fortunate enough to know someone with some professional experience, they can definitely serve as a guide, so you should…

  • cultivate kindness and camaraderie with experts: when I decided I wanted to learn Rails, it was because I already knew folks building webapps with it in their day-to-day, and they seemed like the sort of people I would enjoy spending my worklife with. I asked them to direct me to resources, and some of them stuck…

[brief aside: it’s important to remember to evaluate and discard anything that doesn’t work for you. How you do that is a problem left to the reader.]

  • Prefer open to closed: I learn by example, so being able to review
@johana-star
johana-star / README.md
Created January 9, 2017 18:16
Github Scientist example

GitHub's Scientist gem provide's a framework for running and publishing experiments, however, I found their code snippets a little confusing. They confused me because the examples were either too simple (that is, did not demonstrate the publishing feature) or they were incomplete (that is, they assumed the user had some implementation correctly setup and just needed to add code to make it run).

This is the shortest hello world style example which demonstrates publishing I could figure out.

@johana-star
johana-star / commit.html
Created December 21, 2016 23:29
Fork of Tim Pope's advice on good commit messages
_NOTE: Tim Pope's blog has a NSFW title, and this post can be found easily by googling: 'tpope git commit'._
<div class="post">
<h1>A Note About Git Commit Messages</h1>
<p class="date">19 Apr 2008</p>
<p>I want to take a moment to elaborate on what makes a well formed commit message. I think the best practices for commit message formatting is one of the little details that makes Git great. Understandably, some of the first commits to rails.git have messages of the really-long-line variety, and I want to expand on why this is a poor practice.</p>
<p>Here’s a model Git commit message:</p>
<pre><code>Capitalized, short (50 chars or less) summary
@johana-star
johana-star / straight-jerk.md
Created June 24, 2016 22:42
Cached copy of a story that The Stranger pulled off their site

Queer Issue: The Straight Guy Who Teaches Queer Folks How to Have Wild Sex

Max Cameron, Proprietor of Max's Bondage Lessons, Isn't Queer in the Romantic Sense—But He Considers Himself Politically, Socially, and Morally Queer

by Matt Baume Max Cameron Matt Baume Tweet submit to reddit On the slope of a leafy Seattle hillside sits a handsome 1904 home in which a portrait of a human skeleton hangs over the mantel. It's an x-ray of a woman who has a ribbon of metal screws driven into her spinal column like railroad spikes.

"That's a former partner of mine," says Max Cameron. He's giving me a tour of the first floor of the home, which is immaculate. There's an antique wooden rocking horse in a reading room, a thriving green garden outside the kitchen window, and a metal cage just large enough for a person next to the fireplace. "She had scoliosis," he explains of the portrait.

I have a fairly lateral opinion on this, which is the idea of management is necessarily Tayloristic, and the factory model doesn't apply to software. Therefore we shouldn't manage our coders, but we should work to foster leaders and force multipliers. One's organization should determine fair methods of assessing folks skills as leaders, force multipliers, and technical experts. All of these traits should be compensated (we do a terrible job of both assessing and compensating emotional labor in particular.) It's possible that a person with strong technical expertise and weak leadership could be more well compensated than a strong leader weak in technical expertise, but it's less than ideal.

require "active_record"
require "./app/models/task"
require "csv"
class OmnifocusImporter
class FileNotFound < StandardError; end
def initialize(file)
raise FileNotFound unless File.exist? file
CSV::Converters[:blank_to_nil] = lambda do |field|
@johana-star
johana-star / rocky_raccoon.csv
Last active January 14, 2017 22:24
Ruby Riddle: Why doesn't to_proc work on a refined Hash?
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 12 columns, instead of 4 in line 1.
Task ID,Type,Name,Status,Project,Context,Start Date,Due Date,Completion Date,Duration,Flagged,Notes
1,Context,Rocky Raccoon,active
1.1,Action,Now somewhere in the black mountain hills of Dakota,,,Rocky Raccoon,,,,,0,
1.2,Action,There lived a young boy named Rocky Raccoon,,,Rocky Raccoon,,,,,0,
1.3,Action,And one day his woman ran off with another guy,,,Rocky Raccoon,,,,,0,
1.4,Action,He hit young Rocky in the eye,,,Rocky Raccoon,,,,,0,
1.5,Action,Rocky didn't like that he said I'm gonna get that boy,,,Rocky Raccoon,,,,,0,
1.6,Action,So one day he walked into town,,,Rocky Raccoon,,,,,0,
1.7,Action,Booked himself a room in the local saloon,,,Rocky Raccoon,,,,,0,
1.8,Action,Rocky Raccoon checked into his room,,,Rocky Raccoon,,,,,0,
@johana-star
johana-star / hackintosh-kext-confusion.md
Created April 14, 2016 00:29
Hackintosh kext Confusion

I'm following this guide: http://www.tonymacx86.com/el-capitan-desktop-guides/175815-guide-gigabyte-brix-using-clover-uefi-gb-bxi5h-4200-gb-bxi5-4570r-gb-bxi7-4770r.html It links to this guide for the USB Bootloader instructions: http://www.tonymacx86.com/el-capitan-laptop-support/148093-guide-booting-os-x-installer-laptops-clover.html

There are links in both guides to projects with C files and XCode projects which can somehow be used to make kext files, but they don't specify what that process looks like, for instance: https://github.com/RehabMan/OS-X-Generic-USB3

I am not sure how to use this project to generate a kext file, and don't want to accidentally bork system drivers on the Mac that I am creating the bootloader on. How do I create a kext file from a project like the one above?

require 'rspec'
class Fibonacci
def self.memoize(method_name)
slow_method_name = "slow_#{method_name}".to_sym
alias_method slow_method_name, method_name
cache ||= {}
define_method method_name do |index|
unless cache.key?(index)
@johana-star
johana-star / order_dependent_spec.rb
Created March 10, 2016 19:04
RSpec example of order-dependent failure.
RSpec.configure do |config|
config.order = :random
end
class Global
@@counter = 0
def self.counter; @@counter; end
def self.increment_counter; @@counter += 1; end
end