Skip to content

Instantly share code, notes, and snippets.

View JGallardo's full-sized avatar

Juan Gallardo JGallardo

View GitHub Profile
@JGallardo
JGallardo / A-Pen-by-Juan-Gallardo.markdown
Created February 20, 2014 04:26
A Pen by Juan Gallardo.
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>[Pute your page title here]</title>
<meta name="description" content="[Describe the purpose of your website. And focus on what the specific page is about.]">
<meta name="author" content="[Put your name up here]">
@JGallardo
JGallardo / topics.py
Last active August 29, 2015 14:03
script to get my the topics that I answer the most on Quora
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
def get_topics(user):
url = "http://www.quora.com/" + user + "/topics"
browser = webdriver.Chrome()
browser.get(url)
time.sleep(2)
@JGallardo
JGallardo / postgresql-fail-fml
Created October 25, 2014 05:28
fail fail fail
/Users/juangallardo/.rvm/gems/ruby-2.1.3/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:11:in `block (3 levels) in <top (required)>'
/Users/juangallardo/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/Users/juangallardo/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/Users/juangallardo/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/Users/juangallardo/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/Users/juangallardo/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/juangallardo/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/Users/juangallardo/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/juangallardo/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/Users/juangallardo/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/application.rb:150:in `inv
@JGallardo
JGallardo / HTML5
Created May 10, 2012 18:20
Very Barebone HTML5 template w/ comments on how to use
<!--
Anything between <!-- --> is a comment. It is only visible in a text editor and does not affect how the code affects what is shown. These are here to pass notes between developers. In the head tag is where you enter metadata. Your name (optional)
This document was created by Juan Gallardo, a student of DeVry University. To be a study aid to students of web design.
-->
<!-- the <!DOCTYPE html> as shown below is how you immediately know if the document is written in HTML5 as opposed to HTML4.01 or earlier -->
<!DOCTYPE html>
<head>
@JGallardo
JGallardo / favicon code
Created July 26, 2012 19:28
To add a favicon in wordpress
<link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/favicon.ico" />
@JGallardo
JGallardo / Remove links from images uploaded to posts
Created August 1, 2012 02:59
WordPress- To remove links from images uploaded to posts. Add this code to functions.php
@JGallardo
JGallardo / normalize_shortened.css
Created August 3, 2012 16:43
Shortened normalize.css
/*! normalize.css 2012-07-07T09:50 UTC - http://github.com/necolas/normalize.css */
/* Shortened by Juan Gallardo, who can be reached at jgallardo720@gmail.com.
* I removed comments and combined comma seperated items to fewer lines. result was 500 lines shortened to 56 lines.
* I still recommend that you read through the orignial and perhaps use it as its own style sheet.
* But if you want to include all CSS in one sheet and do not need documentation within the site, then use this version.*/
article, aside, details, figcaption, figure, footer, header,
hgroup, nav, section, summary { display: block; }
audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
audio:not([controls]) { display: none; height: 0; }
[hidden] { display: none; }
@JGallardo
JGallardo / OC Ipsum - 1 paragraph
Created August 22, 2012 20:01
1 paragraph of Orange County inspired filler text
Newport Beach marina Villanova Ferrari Lasagna. Irvine Boring Private school UCI Dentist Pho Starbucks Spectrum. Costa Mesa South Coast Plaza. Huntington Beach Bikini Fireworks Hot dogs Dog beach Surf Shops Skaters Bro Blondes Augmented Breasts. Laguna Beach Pacific Coast Highway 133 Laguna Art College Bodyboard. Costa Mesa Orange County Fair South Coast Plaza Boring Ikea.
@JGallardo
JGallardo / form.html
Created December 1, 2012 03:15
action triggered by send
<!-- testing this below-->
<!--form -->
<form action="send.php" class="form-horizontal" method="post" name="contact_form">
<div class="control-group">
<label>NAME<span class="required">*</span></label>
<input type="text" name="name" id="name" value="" class="input-xlarge requiredField" />
</div>
<div class="control-group">
<label>EMAIL<span class="required">*</span></label>
<input type="text" name="email" id="email" value="" class="input-xlarge requiredField email" />