Skip to content

Instantly share code, notes, and snippets.

#Make a new Madlib Example: search with sentiment

##Make a button to direct to your madlib in tracks/index.html.erb

      <div class="item">
        <div class="carousel-caption container">
          <div class="row">
            <div class="col-sm-7">

#postgres issues after computer shut down (or brew update, or sniffing the wind)

##Error Message:

could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "pool"=>5, "database"=>"hacker_klone_development"}
@kattak
kattak / Outreach for Introverts.md
Last active June 8, 2018 18:17
when you want to do outreach, but only if you can sign up without talking to anyone

Outreach Resources

OOTH was made to help connect tech newbies with experienced people in tech.

I talked to a former bootcamp grad in LA who now manages a team of React software engineers based in LA. I showed her my final project readme and she answered my questions about interviewing, company selection, self-study after graduation, etc. Highly recommended!

*I chose to talk to the person most similar to me, but they have quite a range of hella impressive people, in tech and tech-adjacent fields, including design, product, fintech, VC, data science, UI/UX, etc!

For example, January 2017 volunteers include:

@kattak
kattak / 01.25.2017 JS Algos.md
Created January 30, 2017 05:17
Some basic JS algo problems

#JS Algorithm Problems

Write a method no_dupes which will take an array and return that same array with all duplicate items removed. Assume integers. This should be done without using uniqueness methods like Ruby's uniq.

// No Dupes in action:

// no_dupes( [ 1, 4, 2, 7, 3, 1, 2, 8 ] ); // #=> [ 1, 4, 2, 7, 3, 8 ]

no_dupes( [ 100, 32, 44, 44, 23, 32, 44 ] )

@kattak
kattak / Scope in Ruby.md
Last active January 31, 2017 03:27
What's the error?

#Scope in Ruby

def longest_palindrome(words)
  words.split.each do |word|
    #Initialize current longest palindrome 
    curr_palindrome = ""
    
      #replace current palindrome if longer 
      curr_palindrome = word if word.length > curr_palindrome.length && palindrome?(word) 
@kattak
kattak / react.md
Last active July 26, 2017 18:20
High level overview and Hello World in react.js

React

"React is a declarative, efficient, and flexible JavaScript library for building user interfaces."

Compared to other frameworks:

  • 120KB, pretty large, but no required dependencies
  • Fast
  • Less DSL - "domain specific language" (vs. Angular, Ember)
  • React Native for iOS and Android apps
  • Supports server-side rendering
@kattak
kattak / linkedlists.md
Last active June 30, 2017 21:07
Why are linked lists important, and where are they used?

Linked Lists

What is a vector?

std::vector

  • One dimensional array

Pointers

Expanding Vector Example

  • Cache efficiency of a vector
@kattak
kattak / React Virtual DOM and Synthetic Events.md
Last active July 26, 2017 18:31
Why is React faster than other JS frameworks such as Angular or Ember? Its implementation of a *virtual DOM* and *synthetic events*

React's Virtual DOM

-One reason React is so fast

Why are UIs difficult to build?

  • Humans are in a loop
  • Hard to test, doesn't look/feel right when there's a bug
  • Lots of state, seems simple to user, but lots of complexity under the hood
  • Tooling mismatch: front-end tools not as good as back-end

Thoughts:

@kattak
kattak / Thinking in React.md
Last active July 26, 2017 19:22
High level overview how to write a React app, and overview of tricky .bind and this.props