Skip to content

Instantly share code, notes, and snippets.

@nwinkler
nwinkler / pom.xml
Last active March 25, 2023 20:49
Combining the git-flow branching model and the Maven Release Plugin to play nice. Based on info found here: http://vincent.demeester.fr/2012/07/maven-release-gitflow/
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group</groupId>
<artifactId>dummy</artifactId>
<name>Dummy Project</name>
<version>1.0.12</version>
<packaging>pom</packaging>
<scm>
<connection>scm:git:https://......</connection>
<tag>HEAD</tag>
@jewelsea
jewelsea / SimpleDocking.java
Created March 16, 2014 05:45
Simplistic docking setup for JavaFX
import javafx.application.Application;
import javafx.geometry.Orientation;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.stage.*;
public class SimpleDocking extends Application {
public void start(final Stage stage) throws Exception {
final SplitPane rootPane = new SplitPane();
@westurner
westurner / cinst_workstation_minimal.ps1
Last active March 2, 2021 11:08
PowerShell script to install a minimal Workstation with Chocolatey
### PowerShell script to install a minimal Workstation with Chocolatey
# https://chocolatey.org
## To Run This Script:
# 1. Download this PowerShell script
# * Right-click <> ("View Raw") and "Save As" to %USERPROFILE% (/Users/<username>)
# * If Cocolatey is not already installed, see
# "Uncomment to install Chocolatey"
# * If you would like to also install Anaconda
# (Python, IPython, lots of great libraries)
@Nilzor
Nilzor / chocoProgramListToXml.ps1
Last active September 6, 2017 17:13
A script that converts list of programs output by "choco list" to an XML file parsable by choco installer. Run with 'choco list -lo | chocoProgramListToXml.ps1"
$xml = "<?xml version=`"1.0`" encoding=`"utf-8`"?>`n"
$xml += "<packages>`n"
foreach ($program in $input) {
$name, $version, $shouldBeEmpty = $program.Split(" ")
if (!$shouldBeEmpty) {
$xml += (" <package id=`"{0}`" version=`"{1}`"/>`n" -f $name,$version)
}
}
$xml += "</packages>`n"
echo $xml
@garyrussell
garyrussell / SftpInboundReceiveSample-context.xml
Created July 18, 2014 20:30
Spring Integration SftpPersistenFileListFilter Example
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:int-stream="http://www.springframework.org/schema/integration/stream"
xsi:schemaLocation="http://www.springframework.org/schema/integration/stream http://www.springframework.org/schema/integration/stream/spring-integration-stream-4.0.xsd
http://www.springframework.org/schema/integration/sftp http://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd
@sandcastle
sandcastle / oracle_guid_helpers.sql
Last active December 9, 2024 13:48
Oracle GUID helper functions for converting between GUID and RAW(16)
set serveroutput on;
declare
raw_guid raw(16);
guid varchar2(64);
begin
raw_guid := guid_to_raw ('88c6a267-65d2-48d6-8da2-6f45e2c22726');
guid := raw_to_guid('67A2C688D265D6488DA26F45E2C22726');
@bwbaugh
bwbaugh / server-name-wordlist-mnemonic.txt
Last active December 11, 2024 11:52
Server name wordlist (mnemonic)
# Original blog post: <https://mnx.io/blog/a-proper-server-naming-scheme/>
# Original word list: <http://web.archive.org/web/20091003023412/http://tothink.com/mnemonic/wordlist.txt>
# Sample usage: `curl <gist> | tail --lines +4 | shuf | head --lines 1`
acrobat
africa
alaska
albert
albino
album
alcohol
@alimbada
alimbada / Export-Chocolatey.ps1
Last active January 22, 2025 20:38
Export installed Chocolatey packages as packages.config - thanks to Matty666
#Put this in Export-Chocolatey.ps1 file and run it:
#.\Export-Chocolatey.ps1 > packages.config
#You can install the packages using
#choco install packages.config -y
Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>"
Write-Output "<packages>"
choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" }
Write-Output "</packages>"
@ser1zw
ser1zw / send-message.ps1
Created May 25, 2015 09:25
E-mail tool in PowerShell
################################################################################
# E-mail tool in PowerShell
#
# 0. Set execution policy to "RemoteSighed" in PowerShell
# Set-ExecutionPolicy RemoteSigned
#
# 1. Right click this file and select "Run with PowerShell" from context menus.
# Or run the following command in cmd.exe.
# powershell -Sta -File send-message.ps1
#
@wpm
wpm / poll.js
Last active November 14, 2019 09:59
Javascript Polling with Promises
var Promise = require('bluebird');
/**
* Periodically poll a signal function until either it returns true or a timeout is reached.
*
* @param signal function that returns true when the polled operation is complete
* @param interval time interval between polls in milliseconds
* @param timeout period of time before giving up on polling
* @returns true if the signal function returned true, false if the operation timed out
*/