Skip to content

Instantly share code, notes, and snippets.

View mineiro's full-sized avatar

José Netto mineiro

View GitHub Profile

Keybase proof

I hereby claim:

  • I am mineiro on github.
  • I am mineiro (https://keybase.io/mineiro) on keybase.
  • I have a public key ASCtONpZ4gyDZ1o72vCFjUIwZ8I1DXkO5Ln6yK0lmLnFFQo

To claim this, I am signing this object:

@mineiro
mineiro / SassMeister-input-HTML.html
Created October 28, 2014 21:30
Generated by SassMeister.com.
<div class="container">
<div class="primary-content">
Primary Content
</div>
<div class="secondary-content">
Secondary Content
</div>
</div>
@mineiro
mineiro / Import Skype Contacts.scpt
Created May 7, 2013 18:15
Import Skype Contacts
set AppleScript's text item delimiters to {", "}
set contactsFile to choose file of type {"public.text"} with prompt "Choose a file:" default location (path to desktop folder) without invisibles
set contactsList to read contactsFile
set delimitedContactsList to every text item of contactsList
repeat with contactItem in delimitedContactsList
@mineiro
mineiro / JBoss auto start on RHEL CentOS & Scientific Linux.md
Created May 7, 2013 18:07
JBoss auto start on RHEL, CentOS & Scientific Linux

When using a binary JBoss installation on RHEL, CentOS or Scientific Linux, it may be required to start the services when the system starts itself.

JBoss binary installations already ship with a shell script for Red Hat based systems that does exactly that, but misses some chkconfig parameters.

In order to add JBoss to system initialization, you have to append these lines right after #!/bin/sh:

# chkconfig: 345 90 10
# description: Runs the JBoss Application Server
# processname: jboss
var diacriticsMap = [
{'base':'A', 'letters':/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},
{'base':'AA','letters':/[\uA732]/g},
{'base':'AE','letters':/[\u00C4\u00C6\u01FC\u01E2]/g},
{'base':'AO','letters':/[\uA734]/g},
{'base':'AU','letters':/[\uA736]/g},
{'base':'AV','letters':/[\uA738\uA73A]/g},
{'base':'AY','letters':/[\uA73C]/g},
{'base':'B', 'letters':/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},
{'base':'C', 'letters':/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},
@mineiro
mineiro / centos6-ks.cfg
Last active December 16, 2015 11:59
CentOS 6 - Sample Kickstart
# Install OS instead of upgrade
install
# Firewall configuration
firewall --enabled --ssh
# Keyboard layouts
keyboard 'us'# Use network installation
url --url="http://mirror.centos.org/centos/6/os/x86_64"
# Network information
network --bootproto=dhcp --device=eth0
# Reboot after installation
@mineiro
mineiro / Create a CentOS Vagrant box with dynamic ethernet MAC address.md
Last active December 15, 2015 09:19
Create a CentOS Vagrant box with dynamic ethernet MAC address

Create a CentOS Vagrant box with dynamic ethernet MAC address

When preparing a CentOS box, you have to be careful about /etc/udev/rules.d/70-persistent-net-generator.rules and /etc/sysconfig/network-scripts/ifcfg-eth0, because it uses the MAC address of the interface to configure itself.

The way I found to overcome this, is by editing both files and removing some config lines.

Below are the modifications:

##/etc/udev/rules.d/70-persistent-net-generator.rules

@mineiro
mineiro / unblocker.sh
Created March 30, 2012 21:45
Superdrive Unblocker
sudo rm /private/var/db/mds/system/mds.install.lock
@mineiro
mineiro / boot.log
Created March 23, 2011 18:34
Novell IDM UserApplication 3.6.1 MBEANS Starting Errors
15:22:01,777 INFO [Server] Starting JBoss (MX MicroKernel)...
15:22:01,778 INFO [Server] Release ID: JBoss [Trinity] 4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)
15:22:01,778 DEBUG [Server] Using config: org.jboss.system.server.ServerConfigImpl@72ffb
15:22:01,778 DEBUG [Server] Server type: class org.jboss.system.server.ServerImpl
15:22:01,778 DEBUG [Server] Server loaded through: org.jboss.system.server.NoAnnotationURLClassLoader
15:22:01,778 DEBUG [Server] Boot URLs:
15:22:01,778 DEBUG [Server] file:/opt/novell/idm/jboss/lib/endorsed/serializer.jar
15:22:01,778 DEBUG [Server] file:/opt/novell/idm/jboss/lib/endorsed/xalan.jar
15:22:01,778 DEBUG [Server] file:/opt/novell/idm/jboss/lib/endorsed/xercesImpl.jar
15:22:01,778 DEBUG [Server] file:/opt/novell/idm/jboss/lib/jboss-jmx.jar
@mineiro
mineiro / gist:631740
Created October 18, 2010 05:03
Oracle Gists
/* Create TABLE INDEX with CTXSYS type */
CREATE INDEX index_name ON TABLE(COLUMN) INDEXTYPE IS CTXSYS.CONTEXT;
/* Select rows with specific text */
SELECT COLUMN, SCORE(1) FROM TABLE WHERE CONTAINS(COLUMN, 'text', 1) > 0;