Skip to content

Instantly share code, notes, and snippets.

View JGallardo's full-sized avatar

Juan Gallardo JGallardo

View GitHub Profile
@JGallardo
JGallardo / rssParser.rb
Created December 14, 2012 03:47
Ruby script that will allow you to retrieve information from blogs.
require 'rss/1.0'
require 'rss/2.0'
require 'open-uri'
source = "http://nostarch.com/blog/?feed=rss2" # change this location to the appropriate rss feed
content = ""
open(source) do |info|
content = info.read
end
@JGallardo
JGallardo / stockGrep.rb
Created December 14, 2012 03:51
Ruby script to retrieve any information from Yahoo Finance.
require 'open-uri'
require 'csv'
def get_info stock_symbol
puts "#{stock_symbol} Current Ticker Information"
url = "http://download.finance.yahoo.com/d/
quotes.csv?s=#{stock_symbol}&f=sl1d1t1c1ohgv&e=.csv"
puts "Connecting to #{url}\n\n\n"
csv = CSV.parse(open(url).read)
@JGallardo
JGallardo / ipAdderGen.rb
Created December 14, 2012 03:57
Ruby script to generate a range of IP Addresses.
class IP
def intitialize(ip)
@ip = ip
end
def to_s
@ip
end
def==(other)
/*! normalize.css v2.1.0 | MIT License | git.io/normalize */
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; }
audio, canvas, video { display: inline-block; }
audio:not([controls]) { display: none; height: 0; }
[hidden] { display: none; }
html { font-family: sans-serif; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
body { margin: 0; }
a:focus { outline: thin dotted; }
a:active, a:hover { outline: 0; }
h1 { font-size: 2em; margin: 0.67em 0; }
@JGallardo
JGallardo / Preloading orbit
Created April 6, 2013 00:00
Seeking feedback on how to preload the Orbit slider
<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!-- Set the viewport width to device width for mobile -->
<meta name="viewport" id="view" content="width=device-width minimum-scale=1, maximum-scale=1" />
@JGallardo
JGallardo / Orbit-1.2.3-setup.js
Created April 8, 2013 18:02
Orbit-1.2.3 Slider setup
// ==============
// ! SETUP
// ==============
//Global Variables
var activeSlide = 0,
numberSlides = 0,
orbitWidth,
orbitHeight,
locked;
@JGallardo
JGallardo / app.py
Created May 7, 2013 00:16
Python script for the practice app taught by General Assembly
from flask import Flask
from flask import request
from twilio import twiml
import os
app = Flask(__name__)
@app.route('/caller', methods=['POST'])
def caller():
response = twiml.Response()
@JGallardo
JGallardo / page-title-home.css
Created May 7, 2013 20:46
Page title that was on the home page of a prototype I was working on.
.page-title-home {
position: absolute;
top: 2px;
left: 24px;
}
.page-title-home h1 {
background-color: rgba(6, 6, 6, 0.8);
color: white;
font-family: 'Noto Sans', sans-serif;
font-size: 2.0em;
@JGallardo
JGallardo / top-bar.css
Created May 8, 2013 18:45
Default styling for navigation bar in the Foundation 4 framework.
.top-bar {
overflow: hidden;
height: 45px;
line-height: 45px;
position: relative;
background: rgb(35, 43, 45); }
.top-bar ul {
margin-bottom: 0;
list-style: none; }
.top-bar .row {
@JGallardo
JGallardo / app.js
Last active December 20, 2015 03:49
Things that I have to nest for various cases for this responsive site.
/* -----------------------------------------
Global
----------------------------------------- */
$(window).load(checkWindowSize);
$(window).resize(checkWindowSize);
/*
function checkWindowSize() {
if ( $(window).width() < 380 ) {
$('div#footer ul li').addClass('button medium secondary expanded');