Skip to content

Instantly share code, notes, and snippets.

View dima767's full-sized avatar
🎯
Focusing

Dmitriy Kopylenko dima767

🎯
Focusing
View GitHub Profile
@codebrane
codebrane / AttributesFromRawSAML.java
Created January 29, 2010 16:51
Working with SAML in Guanxi
org.guanxi.xal.saml_2_0.protocol.ResponseDocument responseDoc;
responseDoc = ResponseDocument.Factory.parse(pod.getBag().getSamlResponse());
To access the attributes in a SAML2 Response, see:
org.guanxi.sp.guard.AttributeConsumer::processSAML2Response
@Typed package org.mbte.akkatest
import se.scalablesolutions.akka.actor.*
import java.util.concurrent.TimeUnit
import java.util.concurrent.CountDownLatch
import se.scalablesolutions.akka.config.JavaConfig.AllForOne
import se.scalablesolutions.akka.config.JavaConfig.RestartStrategy
import se.scalablesolutions.akka.config.ScalaConfig.Server
class Akka {
@terrancesnyder
terrancesnyder / setenv.sh
Created May 23, 2011 00:07
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
@saetia
saetia / gist:1623487
Last active July 5, 2026 06:58
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@tlberglund
tlberglund / git-loglive
Last active September 18, 2025 07:57
Log Live Git Command
#!/bin/bash
while :
do
clear
git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $*
sleep 1
done
anonymous
anonymous / AttributeGeneratingDAO.java
Created January 3, 2013 16:08
Sketch of an attribute DAO that computes a new attribute value from the input. One would wrap this up in a parent DAO that merges with an echo of the input, or something, to ensure the resulting user attribute map returned from the whole attributes subsystem retains the username mapped as an attribute as well, as well as any other attributes col…
package net.unicon.cas.addons.persondir;
import java.util.List;
import java.util.Map;
...
/**
* Sketch of an attribute DAO that computes a new attribute value from the input.
*/
@JacobASeverson
JacobASeverson / WebSecurityConfig
Last active August 7, 2025 12:47
Example java config for using CAS with Spring Security
@Configuration
@EnableWebMvcSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Bean
public ServiceProperties serviceProperties() {
ServiceProperties serviceProperties = new ServiceProperties();
serviceProperties.setService("https://localhost:8443/cas-sample/j_spring_cas_security_check");
serviceProperties.setSendRenew(false);
return serviceProperties;
@keithhamilton
keithhamilton / gist:9b618e99eb58779b665f
Last active August 29, 2015 14:04
Java Installs for IntelliJ IDEA on OS X Yosemite
#!/bin/bash
# Oracle hasn't updated the Java 1.7u65 installer to support Yosemite,
# so here's a way to get it installed.
# This is actually what I used to get IntelliJ IDEA running, but even
# if you aren't running that IDE, this is a quick script to get Java
# going strong on your fresh install of OS X 10.10
# Install Java 6 for OS X
@christian-blades-cb
christian-blades-cb / vpn_fix.sh
Last active January 23, 2024 15:09
Fix issues with using boot2docker with Cisco's AnyConnect
#!/usr/bin/env bash
# If you're using docker-machine, call this script with your
# environment name
# Ex: ./vpn_fix dev
DEFAULTVM="boot2docker-vm"
[ $(id -u) = 0 ] || { echo "You must be root (or use 'sudo')" ; exit 1; }
report_success ()
@graemerocher
graemerocher / migrate-jira-to-github-issues.groovy
Last active November 19, 2024 15:23
JIRA to Github Issues Migration Script
@Grab(group='com.github.groovy-wslite', module='groovy-wslite', version='1.1.0')
@Grab(group='joda-time', module='joda-time', version='2.7')
import wslite.rest.*
import org.joda.time.*
import org.joda.time.format.*
import groovy.xml.*
import groovy.json.*
import static java.lang.System.*
import groovy.transform.*