Skip to content

Instantly share code, notes, and snippets.

View carchrae's full-sized avatar
🌄
again

Tom Carchrae carchrae

🌄
again
View GitHub Profile
@justincjahn
justincjahn / README.md
Last active January 16, 2024 20:15
Minecraft server(s) using systemd and screen.

Install

# Install dependencies
sudo yum install -y java-1.8.0-openjdk screen

# Create a new unprivileged user for minecraft
useradd -r -m -d /opt/minecraft minecraft

# Create the directory that will house our minecraft instances

sudo su --shell /bin/bash minecraft

@koenpunt
koenpunt / chosen-bootstrap.css
Last active March 11, 2023 01:01
Bootstrap 3.0 theme for Chosen
select.form-control + .chosen-container.chosen-container-single .chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
@innerfunction
innerfunction / capture-helper-params.js
Created August 16, 2013 18:20
Node.js module for capturing parameter values being passed to a dust.js helper. For example, if calling a helper {@Helper p1="{p1}" p2="{p2}"/}, this code will resolve values for p1 and p2 in a fully asynchronous manner before calling the helper function. Use the wrapper function as: var wrapper = require('./capture-helper-params'); helpers['myh…
// Capture templated parameter values passed to a dust.js helper function.
function captureParams(chunk, context, params, cb) {
// Object for recording resolved parameter values.
var values = {};
// Capture a single parameter value.
// @param {name} The parameter name.
// @param {next} Next step in the capture chain.
function capture( name, next ) {
return function( chunk ) {
// If the parameter value is a function then it is a dust.js template that needs to be