Skip to content

Instantly share code, notes, and snippets.

View jmorenoamor's full-sized avatar
🚀
Software craftsman, Master of nothing. I love space stuff.

Jesús Moreno Amor jmorenoamor

🚀
Software craftsman, Master of nothing. I love space stuff.
View GitHub Profile
@HenrikJoreteg
HenrikJoreteg / JS Util solution using underscore.js
Created October 22, 2010 21:20
Rather than creating some other util global, just extend underscore.js with any additional methods you want.
// If you don't use underscore.js, use it (http://documentcloud.github.com/underscore/)
// Then, use underscore's mixin method to extend it with all your other utility methods
// like so:
_.mixin({
escapeHtml: function () {
return this.replace(/&/g,'&')
.replace(/>/g,'>')
.replace(/</g,'&lt;')
.replace(/"/g,'&quot;')
.replace(/'/g,'&#39;');
@pksunkara
pksunkara / config
Last active June 29, 2024 11:23
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@katta
katta / mvncolor.sh
Created June 15, 2011 18:50
Script to add colors to maven output
#!/usr/bin/env bash
# Formatting constants
export BOLD=`tput bold`
export UNDERLINE_ON=`tput smul`
export UNDERLINE_OFF=`tput rmul`
export TEXT_BLACK=`tput setaf 0`
export TEXT_RED=`tput setaf 1`
export TEXT_GREEN=`tput setaf 2`
export TEXT_YELLOW=`tput setaf 3`
@cordoval
cordoval / bdd-experiment-guide.md
Created September 9, 2011 16:38 — forked from havvg/bdd-experiment-guide.md
Behavior Driven Development in Symfony2 with Behat, Mink and Zombie.js

Description

This guide will show how to setup a new web application project with:

  • git, a distributed version control system.
  • Symfony2 framework
  • Behat, a tool for behavior driven development.
  • Mink, a tool unifying access to browser emulators wrapping them into one API.
  • Zombie.js, a browser emulator.
  • PHPUnit, the de-facto standard test suite in the PHP world.
@ProjectMoon
ProjectMoon / README.md
Last active January 6, 2023 17:31
Patch that disables Subsonic license checking and validation

Update 2020 Edition: Use something like Airsonic instead. Subsonic's code is closed source at this point, and thus this patch is useless, unless you are using a 9 year old verison of Subsonic for some reason.


A patch to disable the licensing functionality in Subsonic, a GPL-licensed media streaming server/web interface. Use of the mobile apps requires you to get a license after 30 days of trial. You obtain a license via donation.

Except that's not a donation. So, here's a patch to fix that. Support the Subsonic project with a donation that's actually a donation. The program is developed and maintained very well.

Steps to victory

@mlsimpson
mlsimpson / dircolors_ls_colors.txt
Created November 15, 2011 17:39
dircolors <==> LS_COLORS
RESET rs # reset to "normal" color
DIR di # directory
LINK ln # symbolic link (if set to 'target' instead of numerical value, the color is the same as the file pointed to)
MULTIHARDLINK mh # regular file with more than one link
FIFO pi # pipe
SOCK so # socket
DOOR do # door
BLK bd # block device driver
CHR cd # character device driver
ORPHAN or # symlink to nonexistent file, or non-stat'able file
@olivergeorge
olivergeorge / model.py
Created March 13, 2012 03:16
Decision Tree implementation for Django (pesudo code)
# Based on: http://springfans.com/ieeeSoftware/accChange.pdf
class DecisionTable(models.Model):
"""Decision Table"""
code = models.CharField(unique=True, max_length=8, verbose_name="Unique code for finding a decision table in code")
name = models.CharField(blank=True, max_length=100, verbose_name="User friendly name for decision table")
def __unicode__(self):
@tuongaz
tuongaz / BaseModelManager.php
Created April 1, 2012 03:51
Symfony2 Model Manager
<?php
abstract class BaseModelManager {
protected $em;
protected $class;
protected $repository;
protected $container;
/**
* Constructor.
@h3nrique
h3nrique / Timer.java
Last active October 5, 2015 22:38
Class used to measure method time execution
package com.package.utils;
/*
* This code is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This code is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
@miya0001
miya0001 / .vimrc
Created June 21, 2012 08:26
vimrc
syntax on
set expandtab
set shiftwidth=4
set tabstop=4
set nobackup
set number
set termencoding=utf-8
set encoding=utf-8
set fileencodings=utf-8,euc-jp,sjis
set fileformat=unix