Skip to content

Instantly share code, notes, and snippets.

View neodevelop's full-sized avatar
🏠
Working from home

José Juan Reyes Zuñiga neodevelop

🏠
Working from home
View GitHub Profile
@ryandotsmith
ryandotsmith / a-backbone-js-demo-app-sinatra-backend.md
Created January 22, 2012 01:42
Backbone demo app with sinatra backend

A Backbone.js demo app (Sinatra Backend)

Oct 16 2010

Updates

  • 04/10/2011 - Updated application.js and application.rb thanks to @rebo's comments

In this article, I will walk through some simple steps to get a [demo app][2] up and running with [Backbone.js][3] and [Sinatra][4] on [Heroku][5].

@sturadnidge
sturadnidge / tmux-1.8-on-CentOS-6.x.txt
Last active May 10, 2021 18:31
Install tmux 1.8 on CentOS 6.x minimal (64bit)
# download latest libevent2 and tmux sources, and extract them somewhere
# (thx bluejedi for tip on latest tmux URL)
#
# at the time of writing:
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
# http://sourceforge.net/projects/tmux/files/latest/download?source=files
#
# install deps
yum install gcc kernel-devel make ncurses-devel
@pledbrook
pledbrook / BootStrap.groovy
Created May 10, 2012 12:52
Embed Vert.x in Grails
import org.vertx.groovy.core.Vertx
class BootStrap {
def init = { servletContext ->
def vertx = Vertx.newVertx()
def httpServer = vertx.createHttpServer()
vertx.createSockJSServer(httpServer).installApp(prefix: '/events') { sock ->
sock.dataHandler { buff ->
sock << buff
@ekiara
ekiara / how_to_install_tmux_on_centos
Last active August 16, 2019 13:02
HOW TO: Install tmux on Centos release 6.5
# Install tmux on Centos release 6.5
# http://superuser.com/questions/738829/attempting-to-install-tmux-on-centos-6-4-or-centos-6-5-fails-with-error-evbuff
#
# READ THIS FIRST!!!
# MAKE SURE YOU HAVE BUILD TOOLS/COMPILERS TO BUILD STUFF FROM SOURCES
# yum groupinstall "Development Tools"
# CD TO TEMPORARY DIRECTORY
ar http = require('http');
var fs = require('fs');
var util = require('util');
var fileCache;
var sendFile = function(conn, file) {
conn.writeHead(200, {"Content-Type": "text/html", "Content-Length": file.length});
conn.write(file);
conn.end();
}
@JacobAae
JacobAae / geb3.groovy
Last active July 22, 2019 22:31
Geb 3.0 standalone script in groovy (2.5.6)
@Grapes([
@Grab("org.gebish:geb-core:3.0"),
@Grab('io.github.bonigarcia:webdrivermanager:3.4.0'),
@Grab('org.seleniumhq.selenium:selenium-chrome-driver:3.141.0'),
])
import io.github.bonigarcia.wdm.WebDriverManager
import org.openqa.selenium.chrome.ChromeDriver
WebDriverManager.chromedriver().setup()
@matthewmccullough
matthewmccullough / rulesofprogramming.md
Created August 13, 2012 02:56
Rules of Programming

Rules of Programming

  • All Development is Interface Driven Development, be it Web, Desktop, Mobile, or API.
  • statics or class methods should be inconsequential and isolated to be used in a production method. Inconsequential means that the method doesn’t go outside the VM to another system, doesn’t block, or requires a hard dependency that isn’t guaranteed.
  • The new keyword should be inconsequential and isolated to be used in a production method, unless it used inside of either a Builder or Factory pattern.
  • If a class has already met the requirements for it’s existence, leave it alone, use the Adapter, Observer pattern or AOP to enhance it’s functionality.
  • Using floating-point may not be a good solution, use an integral based number for the smallest unit in your domain (e.g. seconds, pennies, pence)
  • Copying and pasting the same thing multiple times is a sign that refactoring is in order, but do so after making sure your tests run.
  • Matthew McCullough: The tool you use the most should be the most
defmodule Sudoku do
def solve do
sudoku = [
[5, 3, :_, :_, 7, :_, :_, :_, :_],
[6, :_, :_, 1, 9, 5, :_, :_, :_],
[:_, 9, 8, :_, :_, :_, :_, 6, :_],
[8, :_, :_, :_, 6, :_, :_, :_, 3],
[4, :_, :_, 8, :_, 3, :_, :_, 1],
[7, :_, :_, :_, 2, :_, :_, :_, 6],
[:_, 6, :_, :_, :_, :_, 2, 8, :_],
@Bodacious
Bodacious / Rakefile
Created August 23, 2012 11:19
my Rakefile for lastest Rubymotion app
$:.unshift("/Library/RubyMotion/lib")
require File.join(File.dirname(__FILE__), 'version')
require 'motion/project'
require 'bundler'
Bundler.require
@edigreat
edigreat / FizzBuzHw.groovy
Last active December 26, 2015 22:09
FizzBuzz with Groovy
class FizzBuzz {
String isPrintable ( divisor1=3, divisor2=5, number ) {
(number % (divisor1 * divisor2) == 0) ? "FIZZBUZZ" :
(number % divisor2 == 0) ? "BUZZ":
(number % divisor1 == 0) ? "FIZZ": "$number"
}
Map calcula(List lista){
if(lista.size()==1)