Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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:

#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"}

#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">
@kattak
kattak / Caching in Rails.md
Created January 16, 2017 07:06
In progress...

###Big Questions for search optimization

How many queries? Can get (and parse) full lyrics? Can store/serialize lyrics? How to store once acquired? Restricted list Possible queries and benchmarks from existing APIs

Crawler Search and ranking already done when you do a search. To make search so fast, the search layer just returns the next 10 results from a list starting at position 1.