Skip to content

Instantly share code, notes, and snippets.

View joellobo's full-sized avatar

Joel Lobo joellobo

View GitHub Profile
@fnando
fnando / jquery.html
Created September 26, 2011 11:17
Conditionally include jQuery from different sources.
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript">
if (typeof jQuery === "undefined") {
document.write(unescape("%3Cscript src='#{local_path}' type='text/javascript'%3E%3C/script%3E"));
};
</script>
@suprememoocow
suprememoocow / intercept.js
Created May 29, 2012 09:53
AJAX timing interceptor: this class intercepts all AJAX calls and records the time taken for the HTTP request to complete. These timings are posted back to the server in batches, if there are any to send, about every two seconds. Tested in Firefox, Chrome
(function(XHR) {
"use strict";
var stats = [];
var timeoutId = null;
var open = XHR.prototype.open;
var send = XHR.prototype.send;
@bgallagh3r
bgallagh3r / wp.sh
Last active March 23, 2025 19:40
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@yanofsky
yanofsky / LICENSE
Last active March 14, 2025 18:19
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@coffeemug
coffeemug / gist:6168031
Last active October 15, 2024 01:08
The fun of implementing date support
After spending the better part of the month implementing date support
in RethinkDB, Mike Lucy sent the team the following e-mail. It would
have been funny, if it didn't cause thousands of programmers so much
pain. Read it, laugh, and weep!
-----
So, it turns out that we're only going to support dates between the
year 1400 and the year 10000 (inclusive), because that's what boost
supports.
@rpietro
rpietro / legenda_Cine_Holliudy.srt
Created January 20, 2014 05:44
legenda cine holliudy
1
00:03:59,000 --> 00:04:01,037
ÉÉÉgua, pai!
Essa história é muito joiada!
2
00:04:01,302 --> 00:04:03,707
E os ninjas eram mais invocados
do que corrida de pato!
@alexandreaquiles
alexandreaquiles / UploadArquivoServlet.java
Last active April 11, 2025 13:59
Servlet que faz upload de arquivos no diretório configurado no init-param "diretorio", utilizando a biblioteca commons-fileupload.
package upload;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Iterator;
import java.util.List;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
# Mais usados --
alias ga="git add"
alias gc="git commit -m"
alias gca="git commit -am"
alias gs="git status"
alias gp="git push"
alias gpl="git pull"
# Diff --
alias gd="git diff"
@pranav7
pranav7 / install_chromedriver.md
Last active April 8, 2021 13:03
Installing Chromedriver and setting up Cucumber to run with Chrome on Linux/Ubuntu

Follow the below steps to install chrome webdrivers on Ubuntu

  • Install Unzip

sudo apt-get install unzip

  • Assuming you're running a 64-bit OS, download the latest version of chromedriver from their website

wget -N http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip -P ~/Downloads unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads

@voltuer
voltuer / gist:f31298c8bbdf71a61e7c
Created June 15, 2015 22:03
Puerto git bloqueado, usar http (para bower o npm)
git config --global url."https://".insteadOf git://