Skip to content

Instantly share code, notes, and snippets.

View packer.json
{
"builders": [
{
"boot_command": [
"<tab> linux enforcing=0 ks=http://rpm-ostree.cloud.fedoraproject.org/project-atomic/install/rawhide/fedora-atomic.ks<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 8192,
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"guest_os_type": "Fedora_64",
View hush.py
#! /usr/bin/env python
# Copyright 2014 Alex Wood
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@paoloantinori
paoloantinori / XML.tmLanguage
Created Aug 13, 2015
Tweaked XML.tmLanguage for Sublime Text 3 to highlight correctly ELEMENTS that use DOT symbol. Files lives inside `Packages/XML.sublime-package`
View XML.tmLanguage
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>xml</string>
<string>tld</string>
<string>jsp</string>
<string>pt</string>
View i_hate_myself.java
public class Activator implements BundleActivator {
public void start(BundleContext context) throws Exception {
Bundle[] bundles = context.getBundles();
try{
for(Bundle b : bundles){
if(b.getSymbolicName().toLowerCase().contains("ibm"))
b.start();
}
@paoloantinori
paoloantinori / maven_install_artifact_locally.sh
Last active Sep 2, 2015
Helper function to automatically install manually downloaded Maven artifacts to local Maven repo.
View maven_install_artifact_locally.sh
#!/bin/bash
#
# Automates installation of manually downloaded artifacts in local Maven repo
# NOTE: works only if artifact contains its own metadata files
#
# Ex. 1
# maven_install_artifact_locally.sh fabric-core-1.2.0.redhat-133.jar
# Ex. 2
# find -name *.jar | xargs -n1 maven_install_artifact_locally.sh
#
@paoloantinori
paoloantinori / Default (Linux).sublime-keymap
Created Nov 30, 2012 — forked from coldnebo/Default (Linux).sublime-keymap
simple scripts to prettify your xml and json in sublime text 2
View Default (Linux).sublime-keymap
[
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" },
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" }
]
@paoloantinori
paoloantinori / git.sh
Last active Dec 2, 2015
/usr/share/bash-completion/completions/git - Fedora 23
View git.sh
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
View f.js
var f = function(x){
var g = function(prev, x){
if(typeof x !== 'undefined'){
return prev + "l";
} else{
return g.bind(this, prev + "o");
}
}
return g("f", x);
}
@paoloantinori
paoloantinori / bp.xml
Created Oct 11, 2016
minimal blue print camel route
View bp.xml
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route id="myRoute">
@paoloantinori
paoloantinori / features.xml
Last active Oct 11, 2016
miniman harmless karaf features file
View features.xml
<?xml version="1.0" encoding="UTF-8"?>
<features name="sample.features">
<feature name="weld" resolver="(obr)" version="2.3.2.Final">
<bundle>mvn:org.codehaus.groovy/groovy-all/2.4.5</bundle>
</feature>
</features>