Skip to content

Instantly share code, notes, and snippets.

FROM openjdk:8-jdk AS builder
RUN mkdir /src
COPY HelloWorld.java /src
RUN javac /src/HelloWorld.java
FROM openjdk:8-jre
COPY --from=builder /src/HelloWorld.class /
WORKDIR /
CMD ["java", "HelloWorld"]
@oscarrenalias
oscarrenalias / README.md
Last active September 27, 2020 18:46
Docker service discovery with HAproxy, consul and registrator on Docker Machine and Docker Swarm

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
<keymap>
<global>
<remote>
<Yellow>RunScript("/storage/.xbmc/userdata/keymaps/sound.py")</Yellow>
</remote>
</global>
</keymap>
@oscarrenalias
oscarrenalias / gist:5504943
Created May 2, 2013 20:01
Retroarch.cfg configuration file for Retroarch in OpenELEC. Modifications to the default one: joystick settings, video and audio.
## Skeleton config file for RetroArch
# Save all save files (*.srm) to this directory. This includes related files like .bsv, .rtc, .psrm, etc ...
# This will be overridden by explicit command line options.
savefile_directory =/storage/.xbmc/userdata/addon_data/emulators.retroarch/save/
# Save all save states (*.state) to this directory.
# This will be overridden by explicit command line options.
savestate_directory =/storage/.xbmc/userdata/addon_data/emulators.retroarch/save/
@oscarrenalias
oscarrenalias / gist:5137868
Created March 11, 2013 21:21
List of packages that can be removed from a vanilla Pi installation
xserver* x11-common x11-utils x11-xkb-utils x11-xserver-utils xarchiver xauth xkb-data console-setup xinit lightdm libx{composite,cb,cursor,damage,dmcp,ext,font,ft,i,inerama,kbfile,klavier,mu,pm,randr,render,res,t,xf86}* lxde* lx{input,menu-data,panel,polkit,randr,session,session-edit,shortcut,task,terminal} obconf openbox gtk* libgtk* alsa* nano python-pygame python-tk python3-tk scratch tsconf
# Run this with jboss-cli to deplyo the given module:
module add --name=com.mydomain.placeholder --resources=placeholder\target\placeholder-6.6.6-SNAPSHOT.jar
/subsystem=ee:write-attribute(name="global-modules",value=[{"name" => "com.mydomain.placeholder","slot" => "main"}])
@oscarrenalias
oscarrenalias / ehcache.xml
Created March 1, 2013 08:28
A better ehcache.xml configuration file for the Play Framework, which out of the box limits the size of the cache based on the number of objects you put in it rather than the number of bytes. I personally think that's not a very smart choice. Also see http://ehcache.org/documentation/2.5/configuration/cache-size#cache-configuration-sizing-attrib…
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../config/ehcache.xsd" updateCheck="false">
<!-- This is a default configuration for 256Mb of cached data using the JVM's heap, but it must be adjusted
according to specific requirement and heap sizes -->
<defaultCache
maxBytesLocalHeap="256000000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
@oscarrenalias
oscarrenalias / colorize.rb
Created February 21, 2013 08:07
Easily colorize console output in Ruby:
class String
# colorization
def colorize(color_code)
"\e[#{color_code}m#{self}\e[0m"
end
def red
colorize(31)
end
@oscarrenalias
oscarrenalias / gist:4258354
Created December 11, 2012 12:57
Using Puppet to provision instances from EC2 and automatically install Puppet agent on them
#!/bin/sh
puppet node_aws bootstrap \
--debug \
--image ami-c1aaabb5 \
--keyname 'puppet_provisioner' \
--type 'm1.small' \
--region eu-west-1 \
--security-group puppet-clients \
--login ubuntu \