Skip to content

Instantly share code, notes, and snippets.

View maxandersen's full-sized avatar
💭
; is so overrated

Max Rydahl Andersen maxandersen

💭
; is so overrated
View GitHub Profile
@maxandersen
maxandersen / gist:2035548
Created March 14, 2012 10:15 — forked from fbricon/gist:2035545
GWT Errai deployment instructions for Eclipse
Running the Application in JBoss Developer Studio or Eclipse with JBoss Tools
=============================================================================
To run the project and try it out, you will need to perform a maven
compilation before the first time you deploy, as some resources and
classes can not be generated via the GWT/Eclipse compilers alone :
1. Right-click on the project the project node in the Package Explorer and select Run As > Maven Build...
2. Set goals = package and click Run. GWT compilation might take a few minutes.
3. Once the build is complete, Right-click on the on the project node in the Package Explorer and select Refresh.
@maxandersen
maxandersen / SVN To GitHub Migration
Created September 13, 2012 07:50 — forked from nickboldt/SVN To GitHub Migration
SVN To GitHub Migration
== Migration from SVN to Git ==
This operation will require a fair amount of disk. Each copy of the overall jbosstools-svn-mirror git repo is about 2.6Gb.
After the migration, Freemarker was only 4.4Mb.
1. Check out entire git repo (using the readonly url so you cannot push back to origin by accident):
git clone git://github.com/jbosstools/jbosstools-svn-mirror.git
2. Backup local repo for reuse later
@maxandersen
maxandersen / git workflow - applying a PR
Created November 14, 2012 10:31 — forked from nickboldt/git workflow - applying a PR
git workflow - applying a PR
First, add this to your .gitconfig file:
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C(blue)%aE%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
--------------------
# applying a PR
PR_USER=dgolovin
@maxandersen
maxandersen / update_git_repos.sh
Last active January 4, 2016 08:29 — forked from douglas/update_git_repos.sh
Script to go into every subdir with a .git folder and pull latest changes from all branches/tags via git up. To use you might need to run 'gem install git up' - if you just want to get master use the original fork ;)
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
@maxandersen
maxandersen / init.lua
Created August 25, 2019 21:49
HammerSpoon Text Expansion Feature
--[[
=== HammerText ===
Based on: https://github.com/Hammerspoon/hammerspoon/issues/1042
How to "install":
- Simply copy and paste this code in your "init.lua".
How to use:
- Add this init.lua to ~/.hammerspoon/Spoons/HammerText.spoon
- Add your hotstrings (abbreviations that get expanded) to the "keywords" list following the example format.
//JAVAC_OPTIONS -source 15
public class Jbang {
public static void main(String... args) {
String heyRick = """
`````````.-::/+oooooo+ooo++/-.........```...--..-..--......................`...`````...-://++++++/////+++++++++//+++++++++++++++++++++++++++
`````.```..----/+oooooooooooo+:-.................---------------::-...`........`........-://++/+++//++++++++++////+++++++++++++++++++///+++/
`````````..--.--:/+oooooooooooo+/-....................---------://///:--.....```..`......-:////////////+++++////+++++++++o++++ooooo+++++++++
````````........--:/ossoooooooooo+/:-.................--------:::///++++/:-...```.........-://///+++++++++++++++++++++++++++/+++++++++++++++
``````````.`...``..-:/ooooooooooooo+/----.....----..------::::///::-://::::::-......`......-:///////++++++/++++++ooo+++//+++///++++++++++++/
``````````.````````...:+ooooooooo+/:----.----:::///:::///////////:::://::/+++/:--..`........-://///+++++++///+++++++++++++++++++++++++///+//
@maxandersen
maxandersen / a#a.java
Created October 14, 2020 07:15 — forked from tivrfoa/a#a.java
Tests for JBang - Multiple Files
class file4 {
public static void main(String[] args) {
System.out.println("I'm file 4");
}
}
@maxandersen
maxandersen / MTL.java
Last active November 7, 2020 01:41 — forked from tonivade/MTL.java
MTL in Java
//usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 14+
//JAVAC_OPTIONS --enable-preview -source 14
//JAVA_OPTIONS --enable-preview
//DEPS com.github.tonivade:purefun-typeclasses:1.8
//DEPS com.github.tonivade:purefun-instances:1.8
//DEPS com.github.tonivade:purefun-transformer:1.8
import static com.github.tonivade.purefun.Matcher1.is;
class AlbumImages {
public String image_id;
public String user_id;
public String albumId;
}
@maxandersen
maxandersen / CircleSpinnyThingies.java
Last active July 17, 2021 15:52 — forked from tsumnia/CircleSpinnyThingies.java
JavaFX Animations - runnable with jbang
//DEPS org.openjfx:javafx-graphics:11.0.2:${os.detected.jfxname}
import javafx.animation.*;
import javafx.application.*;
import javafx.scene.*;
import javafx.scene.layout.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
import javafx.stage.*;
import javafx.util.*;