Skip to content

Instantly share code, notes, and snippets.

@partkyle
partkyle / Struts2ActionRedirectBuilder.java
Created August 2, 2011 02:01
Struts2 Action Redirect Result Builder
public class Redirect {
private String actionName;
private String method;
private Map<String, Object> params = new LinkedHashMap<String, Object>();
public Redirect actionName(String actionName) {
this.actionName = actionName;
return this;
}
@partkyle
partkyle / about.md
Created August 11, 2011 18:46 — forked from catwell/about.md
Programming Achievements: How to Level Up as a Developer
@partkyle
partkyle / profile.ps1
Created August 20, 2011 01:56
Powershell gist
# Load posh-git example profile
. 'C:\Users\kpartridge\posh-git\profile.example.ps1'
New-PSDrive -name script -PSProvider FileSystem -Root $home\Documents\Scripts
New-Alias -Name sudo 'script:\sudo.ps1'
New-Alias -Name which Get-Command
PROMPT='%{$fg[magenta]%}%c$(git_prompt) %{$reset_color%}$ '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[cyan]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[white]%} ?%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[white]%} *%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[white]%} +%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}"
testing gist plugin
(function($, window, undefined) {
$.fn.tooltip = function(options) {
options = $.extend(options, {
title: 'needs a title',
body: 'tst',
position: 'left'
});
$('<div>') // 50 other elements
// '<div>'....
(function($, window, undefined) {
$.fn.tooltip = function(options) {
options = $.extend(options, {
title: 'needs a title',
body: 'tst',
position: 'left'
});
$('<div>') // 50 other elements
// '<div>'....
@partkyle
partkyle / tooltip.js
Created November 8, 2011 23:04
Quick little tooltip idea
(function($, window, undefined) {
$.fn.tooltip = function(options) {
options = $.extend(options, {
title: 'needs a title',
body: 'tst',
position: 'left'
});
$('<div>') // 50 other elements
// '<div>'....
$('test').click(function ()
{
//this is the code here
}
);
$('test').click(function ()
{
//this is the code here
});
// Basic function definition
function function_name (argument) {
// body...
}
function function_name (argument)
{
// body...
}