Skip to content

Instantly share code, notes, and snippets.

View xerardoo's full-sized avatar
🎯
Focusing

Lucio G Pazos xerardoo

🎯
Focusing
View GitHub Profile
@ngbrown
ngbrown / RandData.cs
Created June 18, 2010 16:14
C# UnitTest Helpers
namespace UnitTestHelpers
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// <summary>
/// Provides random test data
/// </summary>
@ijt
ijt / http_get.go
Last active August 23, 2021 12:37
Example of using http.Get in go (golang)
package main
import (
"fmt"
"io"
"log"
"net/http"
"os"
)
@makeusabrew
makeusabrew / dialog-hide.js
Created November 7, 2011 13:10
bootbox.js - programatically hide a dialog
var box = bootbox.alert("This dialog will disappear in three seconds.");
setTimeout(function() {
// be careful not to call box.hide() here, which will invoke jQuery's hide method
box.modal('hide');
}, 3000);
@makeusabrew
makeusabrew / dialog-hide-all.js
Created November 7, 2011 13:16
bootbox.js - programatically hide all dialogs
bootbox.alert("Hello");
bootbox.confirm("Can you take it?");
bootbox.alert("Boo!");
setTimeout(function() {
// that's enough of that
bootbox.hideAll();
}, 3000);
@caleywoods
caleywoods / application.coffee
Created January 24, 2012 14:57
Backbone JS / Fullcalendar
$ ->
Event = Backbone.Model.extend()
Events = Backbone.Collection.extend({
Model: Event,
url : 'events'
})
EventsView = Backbone.View.extend({
initialize: ->
@brianherbert
brianherbert / iso_array.php
Created January 27, 2012 07:35
ISO 3166-1 alpha-3 PHP Array
<?php
$iso_array = array(
'ABW'=>'Aruba',
'AFG'=>'Afghanistan',
'AGO'=>'Angola',
'AIA'=>'Anguilla',
'ALA'=>'Åland Islands',
'ALB'=>'Albania',
'AND'=>'Andorra',
'ARE'=>'United Arab Emirates',
@leommoore
leommoore / nginx_basics.md
Last active March 2, 2024 01:13
Nginx Basics

#Nginx Basics for Ubuntu

Please see http://wiki.nginx.org/Main for more information. See http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/ for a tutorial on how to install Nginx.

##Installation To install, you can install the version which is in the standard Ubuntu repositories but it is normally quite old and will not have the latest security patches. The best way is to update the repositories first:

apt-get update
apt-get install python-software-properties

apt-get upgrade

@Aupajo
Aupajo / gist:4133515
Last active June 9, 2023 02:41
A few of my favourite Git settings
# Colours
git config --global color.status auto
git config --global color.branch auto
git config --global color.diff auto
# Short-hand aliases
git config --global alias.st status
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.br branch
@jonotron
jonotron / singleton.js
Created November 29, 2012 04:33
marionette.application singleton pattern
// usage:
// var app = require('singleton');
define(function(require) {
var Marionette = require('backbone.marionette');
// static instance of a Marionette.Application
var app = null;
// singleton function
function getSingleton() {
@ryanfitz
ryanfitz / golang-nuts.go
Created December 2, 2012 22:45
two ways to call a function every 2 seconds
package main
import (
"fmt"
"time"
)
// Suggestions from golang-nuts
// http://play.golang.org/p/Ctg3_AQisl