Skip to content

Instantly share code, notes, and snippets.

View wpoch's full-sized avatar

Walter Poch wpoch

View GitHub Profile
@uupaa
uupaa / Mac VSCode: How to plantUML preview within markdown.md
Last active August 25, 2022 05:53
Mac VSCode: How to plantUML preview within markdown

Mac VSCode: How to plantUML preview within markdown.

Prepare

$ mkdir -p ~/java
$ cd ~/java
$ brew install maven
$ git clone https://github.com/plantuml/plantuml-server.git
$ cd plantuml-server 
@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active May 5, 2024 10:12
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@ullgren
ullgren / FilterProxy.java
Last active June 15, 2016 18:25
Mule custom filter with a prototype filter
import org.mule.api.MuleMessage;
import org.mule.api.routing.filter.Filter;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
public class FilterProxy implements Filter, ApplicationContextAware {
private ApplicationContext context;
private String realFilterId;
@shsteimer
shsteimer / gist:7257245
Created October 31, 2013 21:10
Tip to delete tags by pattern
#delete all the remote tags with the pattern your looking for, ie. DEV-
git tag | grep <pattern> | xargs -n 1 -i% git push origin :refs/tags/%
#delete all your local tags
git tag | xargs -n 1 -i% git tag -d %
#fetch the remote tags which still remain
git fetch
@chrisdarroch
chrisdarroch / idea
Created October 17, 2013 03:40
Open a project in IntelliJ IDEA from your command line!
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
@jbogard
jbogard / Featurefolders.cs
Created October 3, 2013 15:55
Feature folders
public class FeatureViewLocationRazorViewEngine : RazorViewEngine
{
public FeatureViewLocationRazorViewEngine()
{
ViewLocationFormats = new[]
{
"~/Features/{1}/{0}.cshtml",
"~/Features/{1}/{0}.vbhtml",
"~/Features/Shared/{0}.cshtml",
"~/Features/Shared/{0}.vbhtml",
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 14, 2024 11:33
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@wpoch
wpoch / .gitignore
Created February 22, 2011 13:50
A .gitignore for .net projects.
*.csproj.user
*.resharper.user
*.resharper
*.suo
*.cache
*.usertasks
*.userprefs
*.licx
*.bak
*.log
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh