Skip to content

Instantly share code, notes, and snippets.

View BandanaKM's full-sized avatar

Bana Malik BandanaKM

  • Codecademy
  • New York
View GitHub Profile
Name: Bandana Malik
Github: https://github.com/BandanaKM
Blog: http://bandanakm.github.io/
Tagline: codegirldangerous
Profile Picture: http://media-cache-ec0.pinimg.com/avatars/bandanakm-1357094487_600.jpg
Treehouse Account:
CoderWall Account:
CodeSchool Account: http://www.codeschool.com/users/bandanakm
Favorite Websites:
Twitter: https://twitter.com
@BandanaKM
BandanaKM / Alien Sandwhich
Last active December 23, 2015 19:09
alien sandwich_bana.malik
1. place objects in front of you
2. press finger firmly onto object
if finger touches object AND moves completely through object
label 'spread'
execute on all objects
3. press finger firmly onto object
if finger touches object AND does not move completely through object
label 'dishware'
@BandanaKM
BandanaKM / SQL Book Assignment
Last active December 23, 2015 21:19
sql book assignment
🐧 mkdir artist
[23:36:02] ~
🐧 cd artist
[23:36:06] artist
🐧 sqlite artist.sql
-bash: sqlite: command not found
[23:36:52] artist
🐧 sqlite3 artist.sql
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
@BandanaKM
BandanaKM / Creating Hashes
Last active December 24, 2015 09:29
Creating Hashes
movies_hash = {
:horror => ['The Shining', 'Nightmare on Elm Street', 'People Under the stairs']
:comedy => ['Waterboy', 'Zoolander', 'Napolean Dynamite']
:romance => ['Titanic', 'Casablance', 'Pretty Woman'] }
recipes_hash = {
:dal => ['ginger', 'garlic', 'onions', 'mung beans', 'water', 'green pepper', 'salt', 'olive oil', 'garam masala', 'tumeric']
:basmati_rice => ['basmati_rice', 'olive oil', 'peas', 'cumin', 'salt']
:raita => ['lowfat plain yogurt', 'red pepper', 'cumin', 'salt', 'shredded cucumber']
fruit_arr = ['apple', 'orange', 'apple', 'banana', 'apple', 'pear', 'cat', 'apple']
apple_arr = fruit_arr.collect do |x|
if x == 'apple'
'apple'
end
end
p apple_arr.compact
@BandanaKM
BandanaKM / Holiday Supplies (arrays & hashes practice)
Last active December 24, 2015 09:29
Hashes: Holidays homework
holiday_supplies = {
:winter => {
:christmas => ["Lights", "Wreath"],
:new_years => ["Party Hats"]
},
:summer => {
:forth_of_july => ["Fireworks", "BBQ"]
},
:fall => {
:thanksgiving => ["Turkey"]
@BandanaKM
BandanaKM / blog_post_schedule.rb
Last active December 24, 2015 11:09
Just trying to demonstrate how I broke it down; am still going through to remove errors
# create a method called create_groups that, given an array of student names,
# a group size, and a number of groups, will return an array of groups of
# of students with no student in adjacent groups
get_students
[
"Alex Chiu",
"Amanda Himmelstoss",
"Anders Ramsay",
"Bana Malik",
The following are our groups' SQL JOIN homework files
@BandanaKM
BandanaKM / Programming in Space: Ruby meets Geolocation
Last active December 24, 2015 21:48
Programming in Space: Ruby meets Geolocation
http://bandanakm.tumblr.com/post/63283234718/programming-in-space-ruby-meets-geolocation
Programming in Space: Ruby meets Geolocation
Maps are a useful way to represent information, and have become increasingly popular in web based applications. Ruby mapping frameworks are not as mature as other platforms like GeoDjango, a framework written in Python that supports a suite of tools for spatial applications for Django.After some research, I’ve found some of the following tools and gems for Ruby (and Rails), that might be useful for Rubyists embarking on map-based and location-aware apps.
http://bandanakm.tumblr.com/post/63443596399/understanding-rubys-attribute-accessors-through