Skip to content

Instantly share code, notes, and snippets.

View palesz's full-sized avatar

Andras Palinkas palesz

  • Toronto, Canada
View GitHub Profile
@palesz
palesz / BasicAuthAuthorizationInterceptor.java
Created August 23, 2012 16:13
Basic HTTP Authentication Interceptor for Apache CXF
import org.apache.cxf.binding.soap.interceptor.SoapHeaderInterceptor;
import org.apache.cxf.configuration.security.AuthorizationPolicy;
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Exchange;
import org.apache.cxf.message.Message;
import org.apache.cxf.transport.Conduit;
import org.apache.cxf.ws.addressing.EndpointReferenceType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@palesz
palesz / diffmerge_diff.sh
Created August 23, 2012 16:19
Git configuration to be able to use SourceGear DiffMerge
"C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe" /title1="Old" "$1" /title2="New" "$2"
@palesz
palesz / json_to_csv.html
Last active November 1, 2021 14:19
JSON to CSV converter
<html>
<head>
<style>
textarea {
height: 300px;
width: 100%;
}
</style>
<script type="text/javascript">
@palesz
palesz / .gitconfig
Last active December 17, 2015 03:59
gitconfig
[alias]
lg = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
fo = fetch origin
co = commit
po = push origin
pfo = push --force origin
# activity window
setw -g monitor-activity on
setw -g window-status-activity-bg red
setw -g window-status-activity-fg yellow
#turn off automatic rename
set-option -g allow-rename off
@palesz
palesz / feedly.opml
Created April 20, 2014 02:21
palesz's opml - what do I read
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>palesz's subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="news-hun" title="news-hun">
<outline type="rss" text="Index - Belföld" title="Index - Belföld" xmlUrl="http://index.hu/belfold/rss/default/" htmlUrl="http://index.hu/belfold/"/>
<outline type="rss" text="!!444!!!" title="!!444!!!" xmlUrl="http://444.hu/feed/" htmlUrl="http://444.hu"/>
@palesz
palesz / workflowy.user.js
Last active October 20, 2017 04:45
Workflowy Agenda (Greasemonkey user script)
// ==UserScript==
// @name workflowy
// @namespace http://palesz.org/
// @include https://workflowy.com/*
// @version 1
// @grant none
// ==/UserScript==
function escapeRegExp(str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
@palesz
palesz / workflow-kanban.user.js
Last active March 24, 2016 16:06
A simple Kanban view on top of workflowy (implemented as a Greasemonkey/Tampermonkey user script)
// ==UserScript==
// @name workflowy-kanban
// @namespace http://palesz.org/
// @include https://workflowy.com/*
// @version 1
// @grant none
// ==/UserScript==
function escapeRegExp(str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
@palesz
palesz / dashboard-looper.html
Created January 20, 2016 04:01
Dashboard looper
<html>
<head>
<title>Dashboard Looper</title>
<script type="text/javascript">
var dashboards = [
{
"title": "Palesz.org",
"url": "http://palesz.org",
"delay": "5"
},
@palesz
palesz / cljify.clj
Created October 6, 2016 00:11
Convert any arbitrary Java object hierarchy to Clojure map of maps
(ns cljify)
(require 'clojure.string)
(require 'clojure.walk)
(defn cljify1 [o]
(when (not (nil? o))
(let [cname (.getName (class o))
s (partial clojure.string/starts-with? cname)]
(cond