Skip to content

Instantly share code, notes, and snippets.

View machuga's full-sized avatar

Matt Machuga machuga

View GitHub Profile
@machuga
machuga / ajax content slider
Created May 9, 2012 13:25
binding click event
$(document).ready(function() {
$('.arrow').live('click', function(event) {
var ec = $('#events-container');
ec.fadeOut();
event.preventDefault();
var url = $(this).attr('href');
$.ajax({
url : url,
dataType : "html",
success : function(data) {
@machuga
machuga / payments.html
Created May 16, 2012 23:46 — forked from glideranderson/payments.html
Horrible rails controller method, need help
[{:active=>"no", :start=>Tue, 15 May 2012 20:42:17 UTC +00:00, :amount=>"10.00", :card_type=>"Visa", :card_number=>"0195"}]
<p>Get this output at the end of my .each</p>
@machuga
machuga / rules.md
Last active September 22, 2023 19:45 — forked from radar/rules.md
#laravel rules

Asking for help in #laravel on Freenode

Please behave in a polite, considerate, and inclusive manner in the channel at all times. People volunteer their time in the channel to help people like you with your Laravel problems and some respect (in both directions) will go an extremely long way.

When asking questions in the #laravel channel, please follow these 12 simple rules.

  1. Do your research before hand. Your question may be answerable with a quick Google search or by simply experimenting. If it's a concept you're confused about, first check out our Official Documentation. If you're using a method in Laravel, you can look it up in the API Docs.
  2. If you've tried Googling, explain what terms you've tried to use so people can better help you.
  3. Clearly explain what is happening and create a Paste (http://laravel.io/bin), (http://kopy.io), or (http://gist.github.com) to better explain yourself
  4. **Do not use any paste service that is no
#include <unistd.h>
#include <mach/mach.h>
#include <mach/mach_vm.h>
#include <mach-o/dyld.h>
int
main (int argc, char * argv[])
{
volatile char * library;
const mach_vm_size_t page_size = getpagesize ();
@machuga
machuga / google_analytics_turbolinks5.js
Created May 12, 2017 10:59 — forked from Startouf/ google_analytics_turbolinks5.js
Google Analytics for Turbolinks 5 (& Rails 5)
// Google Analytics code to work with Turbolniks 5
this.GoogleAnalytics = (function() {
function GoogleAnalytics() {}
GoogleAnalytics.load = function() {
var firstScript, ga;
window._gaq = [];
window._gaq.push(["_setAccount", GoogleAnalytics.analyticsId()]);
window._gaq.push(['_setAllowAnchor', true]);