Skip to content

Instantly share code, notes, and snippets.

View jkarnowski's full-sized avatar

Jaclyn Karnowski jkarnowski

  • Jaclyn Rocks!
  • Miami, Florida
View GitHub Profile
/*!
* minQuery example, inspired by former teacher JulianB @
*/
var miniQuery = function(htmlElement){
function isMultiple(htmlElement){
var type = htmlElement.substring(0,1);
return type != '#';
}
function breakDownElement(htmlElement){
@jkarnowski
jkarnowski / README
Created July 19, 2016 00:59
Sessions-Users-Example-CRUD
Add helpers here as *.rb files, e.g.,
app/helpers/formatting.rb
helpers do
def em(text)
"<em>#{text}</em>"
end
end

Repeating has its cons

  • more time means more money (if you're paying rent just to be here) and more opportunity cost, time away from family. there's really no way around this so it's important to keep in mind why you made this investment in the first place. you didn't come here to check boxes, you came here to learn and more time means more learning

  • could be boring if you don't lean into it, since you're seeing the same challenges and we expect you to complete them, consider that there is a ton of material in there for you to uncover. talk to phases above to to ask which challenges they wish they spent more time on. ask mentors and teachers the same. work on the stretch challenges or read more books while you're at it

  • the stigma of repeating can be hard to shake off. we spend years of our life being training to think learning works like a factory assembly line where everyone is the same age, learns at the same rate, and once you've passed a test you're basically inoculated against that subject for l

// so I can call cheerListener() on doc ready
// only takes care of listening for the data
function cheerListener(){
$('#cheer_caller').on('submit', function(event){
event.preventDefault();
var formData = $(this).serialize();
submitForm(formData)
})
}
// my module is SweetSelector
// What is public and available from outside the module?? What will be private and not available from outside?
// What's the context of <blah> relative to the Window?
// this is one approach to setting up a module and returning an object with the data that you want
var SweetSelector = (function(){
this.select = function(htmlElement){
console.log(htmlElement)
def convert_to_pig_latin(word)
@word_array = word.downcase.split("")
@vowels = ['a', 'e', 'i', 'o', 'u']
if @vowels.include?(@word_array[0])
word = @word_array.join('')
else
move_letters
add_ay
end
$(document).ready(function() {
bindListeners();
});
var bindListeners = function(){
getHorseFormListener();
postNewHorseFormListener();
}
function getHorseFormListener(){
var createTree = function(){
return new Tree()
}
var Tree = function Tree(){
this.age = 0;
this.height = 0;
this.orangeCount = 0;
this.isAlive = true;
this.oranges = [];
# SELF
class Rat
def initialize
@age = 0
end
def self.run_away
p "pitter pitter patter"
end
module BreatheFire
def breathe_fire
"WOOOOOVM *sizzle* WOOOOOVM *sizzle*"
end
end
module ShootsLasersFromEyes
def shoot_lasers_from_eyes
"Pew pew pew!"
end