Skip to content

Instantly share code, notes, and snippets.

@innotekservices
innotekservices / jquery.spin.js
Created October 16, 2011 02:39
jQuery Plugin for Spin.js
/*
You can now create a spinner using any of the variants below:
$("#el").spin(); // Produces default Spinner using the text color of #el.
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
$("#el").spin({ ... }); // Produces a Spinner using your custom settings.
$("#el").spin(false); // Kills the spinner.
@nimbupani
nimbupani / index.html
Created December 2, 2011 05:00
Showing latest post on home page with Jekyll
---
layout: default
---
<div class="blog-index">
{% assign post = site.posts.first %}
{% assign content = post.content %}
{% include post_detail.html %}
</div>
@ThomasBurleson
ThomasBurleson / gist:1910025
Created February 25, 2012 18:45
Using $.post() with Promises
// an IIFE that illustrates different implementations
// of $.post() with Promises
//
// Check out jsFiddle `jQuery and Promises with UI animation`
// - demonstrates $.Deferrred() and custom $.when()
// - @ http://jsfiddle.net/ThomasBurleson/RTLr6/179/
//
var onSubmitFeedback = (function () {
var target = $("#container").append("<div class='spinner'>");
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

def filtroConvolucion(imagen):
x,y = imagen.size
px = imagen.load()
#MX = [[-1,0,1],[-1,0,1],[-1,0,1]] #mascara lineas horizontales
MX = [[-1,0,1],[-2,0,2],[-1,0,1]]
#MY = [[1,1,1],[0,0,0],[-1,-1,-1]] #mascara lineas verticales
MY = [[1,2,1],[0,0,0],[-1,-2,-1]]
imagenNuevaX = Image.new('RGB',(x,y))
imagenNuevaY = Image.new('RGB',(x,y))
@mindplay-dk
mindplay-dk / notes.md
Created May 2, 2013 20:12
Some thoughts about Controller/Action patterns in PHP - please feel free to post comments!

Does the Controller/Action pattern make sense in PHP?

I find myself wondering lately, why do we use the Controller/Action pattern in PHP?

Are there any real benefits to this?

class UserController extends Controller
{

public function create() {

@Chaser324
Chaser324 / GitHub-Forking.md
Last active November 14, 2024 08:32
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@kuroisuna
kuroisuna / ajax.js
Last active November 26, 2015 20:00 — forked from coderdiaz/ajax.js
$(document).ready(function(){
$('#getDatos').click(function(){
$.ajax({
url: 'consulta.php',
success: function(data){
$("p").remove();
console.log(data); //<=== Esta puede ser removida;
var datos = $.parseJSON(data);
console.log(datos); //<=== Esta puede ser removida;
@ericelliott
ericelliott / essential-javascript-links.md
Last active November 8, 2024 17:29
Essential JavaScript Links
@Braunson
Braunson / dataTables.less
Created February 9, 2015 20:19
DataTables 1.10.4 converted to LESS
//
// Colour customisation
//
// Border between the header (and footer) and the table body
@table-header-border: 1px solid #111111;
// Border of rows / cells
@table-body-border: 1px solid #dddddd;