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
@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
@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()
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();
}
@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
@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
@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
@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].

@neodevelop
neodevelop / .gitconfig
Last active August 18, 2021 16:46
Sharing my alias to work with git
[user]
name = Jose Juan Reyes
email = neodevelop@gmail.com
[core]
editor = vim
pager = less -FRSX
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
quotepath = false
excludesfile = /Users/makingdevs/.gitignore_global
commentChar = ";"
@jpantuso
jpantuso / osx_lion_rail_setup.md
Created July 27, 2011 19:51
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL
@gak
gak / fish-prompt.sh
Last active February 4, 2022 18:34
My custom fish prompt code explained at http://geraldkaszuba.com/tweaking-fish-shell/
function _common_section
printf $c1
printf $argv[1]
printf $c0
printf ":"
printf $c2
printf $argv[2]
printf $argv[3]
printf $c0
printf ", "