Skip to content

Instantly share code, notes, and snippets.

Ahn Bustamante Ahnita

  • Manila
Block or report user

Report or block Ahnita

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Ahnita / Each.rb
Last active Aug 29, 2015
Data Structures
View Each.rb
def fav_foods
food_array = []
3.times do
puts "Name a favorite food."
food_array << gets.chomp
p food_array
puts "Your favorite foods are #{food_array.join(",")}."
food_array.each do |food|
puts "I like #{food} too!"
Ahnita / cat.rb
Last active Aug 29, 2015
Object Oriented Programming I and II
View cat.rb
class Cat
attr_reader :color, :breed
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
def feed(food)
puts "Mmmmm, " + food + "!"
Ahnita / posts.js
Last active Aug 1, 2016
To create posts using JS
View posts.js
var main =function() {
$('.btn').click(function() {
var post = $('status-box').val();
$('.status-box').keyup(function() {
var postLength = $(this).val().length;
var charactersLeft = 140 - postLength;
You can’t perform that action at this time.