Skip to content

Instantly share code, notes, and snippets.

bashing keybindings

Ronen narkisr

bashing keybindings
View GitHub Profile
View gist:148668
public <T> String toAmf(final T source) throws IOException {
final StringBuffer buffer = new StringBuffer();
final ByteArrayOutputStream bout = new ByteArrayOutputStream();
final Provider<SerializationContext> provider = new SerializationContextProvider();// creating the provider
final Amf3Output amf3Output = new Amf3Output(provider.get());// creating the context instance
final BASE64Encoder encoder = new BASE64Encoder();
View Maven2Gradle.groovy
* Copyright 2007-2009 the original author or authors.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View snipplr-export.rb
require 'yaml'
require 'ostruct'
require 'xmlrpc/client'
require "cgi"
key = "34af1ea48bef1d5ed090"
server = "", "/xml-rpc.php")"user.checkkey", key)
hashes ="snippet.list",key)
View xml-playground.groovy
class SpeculationDTO {
private int value1;
private double value2;
def xml = """
View analytics
<script type="text/javascript">//<![CDATA[
var gaJsHost = (('https:' == document.location.protocol) ? 'https://ssl.' : 'http://www.');
document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));
<script type="text/javascript">//<![CDATA[
try {
var pageTracker = _gat._getTracker('UA-3291642-5');
} catch(err) {}
View server.clj
(ns blog.server
(:import org.joda.time.DateTime)
(:require [ring.util.response :as ring-res] [ring.middleware.reload :as reload] [ring.middleware.stacktrace :as strace]
[ring.adapter.jetty :as ring-jet] [ring.middleware.file :as rfile] [ring.middleware.file-info :as rfile-info]
[compojure.route :as route] [blog.view.layout :as layout]
(compojure core)
(blog.persistency couchdb)
View uam.log
Tue Jan 18 22:37:21 IST 2011
+ hook_exec pre-umount
+ local hooktype fn
+ hooktype=pre-umount
+ [ -d /etc/udev/uam-hooks/pre-umount ]
+ [ -f /etc/udev/uam-hooks/pre-umount/* ]
+ debug Starting uam umounter on /dev/sdc1.
+ bool 1
+ [ -n ]
+ return 0
View uam.conf
# This is just a sourced bash script, so think what you put here.
# If you'd like to use $ sign, you must enclose string in '' or escape it.
# If you'd like to use some other variable, feel free to use it.
# In booleans 1, 'y', 't', 'yes', 'true' and 'on' evaluate as true.
# Whether to log progress verbosely, or just print a plain summary at the end.
narkisr / ubunt-desktop.seed
Created Sep 30, 2011
An Ubuntu desktop preseed file
View ubunt-desktop.seed
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/splash boolean false
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i console-setup/variantcode string
# network
d-i netcfg/get_nameservers string
d-i netcfg/get_ipaddress string
d-i netcfg/get_netmask string
narkisr / gist:1313490
Created Oct 25, 2011
Ugly solution for gradles cache access issue in multi build enviroment (jenkins)
View gist:1313490
GRADLE_APP_BASE_NAME=`basename "$0"`
# my ugly extension point
mkdir -p $CACHE_HOME
cp /var/lib/jenkins/.gradle/init.gradle $CACHE_HOME