Skip to content

Instantly share code, notes, and snippets.

View adamki's full-sized avatar
🤙

Adam Ki adamki

🤙
View GitHub Profile
@adamki
adamki / object_model_challenges.rb
Last active August 29, 2015 14:27 — forked from JoshCheek/object_model_challenges.rb
object_model_challenges.rb
# Run these with `command + option + n`, NOT `b`
# ===== Toplevel methods are defined where? =====
def rawr!
"#{self} says: rawr!"
end
public :rawr!
# *****
@adamki
adamki / gist:73de255332d0f8651f85
Created September 22, 2015 22:35
Lightning talk outline/Everyday Algoreithms
Here are some algorithms that we use everyday and they influence alot of the tech we user everyday.
#Fourier Transform
basic overview of how awesome this algorithm affects all electronics from cell phones, computers, wi-fi, routers etc.
#Integer Factorization
Brief overview of how, Without this algorithm, cryptography would be much more unsafe.
#Link Analysis
Learn how Google, Facebook, Google+, Facebook, LinkedIn suggestions, Netflix and Hulu for movies, YouTube for videos, etc effect YOU as a wonderful internet user!
@adamki
adamki / vimrc
Last active February 28, 2016 09:36
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim " set the runtime path to include Vundle and initialize
call vundle#begin()
Plugin 'vundleVim/vundle.vim' " let Vundle manage Vundle, REQUIRED
Plugin 'scrooloose/syntastic'
Plugin 'scrooloose/nerdtree.git'
Plugin 'kien/ctrlp.vim'
# Path to your oh-my-fish.
set fish_path $HOME/.oh-my-fish
# Path to your custom folder (default path is ~/.oh-my-fish/custom)
#set fish_custom $HOME/dotfiles/oh-my-fish
# Load oh-my-fish configuration.
. $fish_path/oh-my-fish.fish
# Custom plugins and themes may be added to ~/.oh-my-fish/custom
@adamki
adamki / gist:4b0d5bf6fbf7974839ab
Last active November 17, 2015 17:53
demo and explain JS scopes!
# Javascript Scopes
Javascript scopes are pretty confusing if you come from a Ruby BG. Many times, I _thought_ that I was saving data to a variable or passing a specific value, but in all reality, I was passing around nil. I would like to demonstrate some of the *GOTCHAS* of Js.
EXAMPLE ONE: Variables have local and global scopes. They work like so:
```
var test = "I'm global";
@adamki
adamki / gist:cea50f99eb7ec8586056
Created December 8, 2015 18:24
Implementing Mandrill Email
Pre-Work:
Got to Mandrill and set up and account. Have your `username` and `keys` ready.
In Rails, run ` rails g mailer NotificationsMailer` (or something similar) will set up a new file in the `app/mailer/` folder. In this case it generates a `notifications_mailer.rb`. It also creates a new dir: `app/views/notifications`
1. Configure your Mail APP . In `config/application.rb` add the following configuration :
```
config.action_mailer.delivery_method = :smtp
@adamki
adamki / gist:20bded28810675f9e7b3
Created December 8, 2015 18:24
Implementing Mandrill Email
Pre-Work:
Got to Mandrill and set up and account. Have your `username` and `keys` ready.
In Rails, run ` rails g mailer NotificationsMailer` (or something similar) will set up a new file in the `app/mailer/` folder. In this case it generates a `notifications_mailer.rb`. It also creates a new dir: `app/views/notifications`
1. Configure your Mail APP . In `config/application.rb` add the following configuration :
```
config.action_mailer.delivery_method = :smtp
# What is VIM? ( 15 minutes)
* What have you heard and what questions do you have?
* Is there any benefit to using VIM?
Endless customization, Terminal integration, Been around forever and not going anywhere. You'll never have to learn another IDE.
* How does it compare to Atom/Sublime?
Hard to say. Atom now has Vim mode, which is actually a pretty good IDE emulator. I prefer Atom/Subl for strict HTMLCSS writing occassionally.
* Pros: highly customizeable, Large community of users, become a hipster or something.
@adamki
adamki / js-exercisms.md
Created January 30, 2016 09:32
Documenting my attempts at JS Exercisms.

Leap

my code here

  • Responder #1 here - This version took the same approach and minified it! Pretty clever. I kind of like my explicit returns. But this version is def more sleek.
  • Responder #2 here - Really cool implementaion of OOP JS. I dont actually understand everything going on here, but it looks easier on my eyes since is it following OOP guidelines.
  • Responder #3 here - Its David Daniel! Woot! Cool, clean and simple. Very close to mine, but he leaves out the explicit returns.
  • Responder #4 here - Its Tess Griffen! Cool. It's a bit verbose and really uses the if/else conditional blocks. But I like it. It is simple to read.

Hammin

Array Prototype Methods

I understand that functions in JavaScript can take any number of arguments. Yep.

I can describe the similarity between blocks in Ruby and anonymous functions in JavaScript. Yep. Anonymous functions are similar to Ruby Blocks.

Where are the methods available to all arrays (e.g. forEach, map, etc.) defined? Array.prototype.methods