Skip to content

Instantly share code, notes, and snippets.

View alexanmtz's full-sized avatar
🎯
Focusing

Alexandre Magno alexanmtz

🎯
Focusing
View GitHub Profile
@diorahman
diorahman / client.html
Created December 26, 2011 03:34
Ajax, call jQuery POST to node.js expressjs
<html>
<head>
<title>jsonp test</title>
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(function(){
$('#select_link').click(function(e){
e.preventDefault();
console.log('select_link clicked');
@paulirish
paulirish / rAF.js
Last active May 28, 2025 23:25
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 30, 2025 13:08 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@mceachen
mceachen / .travis.yml
Created April 9, 2012 01:28
Travis CI with multiple database engines
language: ruby
rvm:
- 1.9.3
env:
- DB=sqlite
- DB=mysql
- DB=postgresql
@henrik
henrik / README.markdown
Created June 26, 2012 07:30
This is how we test that all translation keys match up between locales, in Rails.

This is how we test that all translation keys match up between locales.

Stuff that only goes in one locale (such as an admin section) or that can't be translated yet (if you use external translators) can simply go in files that don't match the path "config/locales/??.yml", like "config/locales/wip.fo.yml".

@alexanmtz
alexanmtz / jquery_basic_plugin.js
Created July 24, 2012 00:31
A basic jQuery plugin file
;(function ( $, window, document, undefined ) {
// Create the defaults once
var pluginName = 'defaultPluginName',
defaults = {
propertyName: "value"
};
// The actual plugin constructor
function Plugin( element, options ) {
@xcommerce-gists
xcommerce-gists / Pay
Created August 28, 2012 21:21
How to Set Up a Payment Preapproval Using Adaptive Payments.curl
HTTP Headers
------------
-H "X-PAYPAL-SECURITY-USERID: insert_developer_user_name_here"
-H "X-PAYPAL-SECURITY-PASSWORD: insert_developer_password_here"
-H "X-PAYPAL-SECURITY-SIGNATURE: insert_developer_signature_here"
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV"
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV"
-H "X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T" #Standard Sandbox App ID
Endpoint
@BFTrick
BFTrick / .htaccess
Created September 12, 2012 13:39
Default WordPress .htaccess File
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@kasparsd
kasparsd / wordpress-plugin-svn-to-git.md
Last active June 2, 2025 17:14
Using Git with Subversion Mirroring for WordPress Plugin Development
@jpoetker
jpoetker / geb-chrome-driver.groovy
Last active April 11, 2018 14:55
Basic GEB script with Chrome
@Grapes([
@Grab("org.codehaus.geb:geb-core:0.7.2"),
@Grab("org.seleniumhq.selenium:selenium-chrome-driver:2.28.0"),
@Grab("org.seleniumhq.selenium:selenium-support:2.28.0")
])
import geb.Browser
import org.openqa.selenium.chrome.ChromeDriver
b = new Browser(driver: new ChromeDriver())