Skip to content

Instantly share code, notes, and snippets.

Lucas Dohmen moonglum

Block or report user

Report or block moonglum

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@moonglum
moonglum / faucet.config.js
Created Dec 29, 2018
Example of using faucet with nunjucks
View faucet.config.js
let path = require("path");
module.exports = {
sass: [{
source: "./src/app.scss",
target: "./dist/app.css"
}],
nunjucks: [{
source: "./src/index.njk",
@moonglum
moonglum / faucet.config.js
Created Nov 23, 2018
Bootstrap faucet starter kit
View faucet.config.js
module.exports = {
sass: [{
source: "./index.scss",
target: "./dist/bootstrap.css"
}]
};
@moonglum
moonglum / Dockerfile
Created Apr 12, 2018
A user that can't modify `/app` can modify it when it is mounted
View Dockerfile
FROM ruby:2.4
RUN useradd -m app && \
mkdir /app
WORKDIR /app
USER app
CMD ["bash"]
@moonglum
moonglum / inline_bundler.rb
Created Mar 28, 2018
Running this will first check if the gem mote is installed, install it if it isn't and then require the gem and use it
View inline_bundler.rb
require "bundler/inline"
gemfile do
source "https://rubygems.org"
gem "mote", "~> 1.3.0"
end
example = Mote.parse("Hello {{name}}", self, [:name])
puts example.call(name: "World")
View Gemfile
# frozen_string_literal: true
source "https://rubygems.org"
gem "rspec"
View infinity.rb
x = [200, 100, 300].reduce(Float::INFINITY) do |smallest, current|
if current < smallest
current
else
smallest
end
end
p x
View main.rs
fn main() {
println!("Hello, world!");
}
fn make_guess(_g: Game, _c: char) -> Game {
unimplemented!()
}
#[derive(Debug, PartialEq, Eq)]
struct Game {
@moonglum
moonglum / fizzbuzz.html
Last active Nov 24, 2015
This is a FizzBuzz Solution I found on Twitter. It was always shared as a screenshot, so I typed it myself, to try it out ;) Source: https://twitter.com/ericwastl/status/667567483432402944
View fizzbuzz.html
<html>
<head>
<style>
body {
counter-reset: n;
}
div:before {
counter-increment: n;
content: counter(n);
}
View keybase.md

Keybase proof

I hereby claim:

  • I am moonglum on github.
  • I am moonglum (https://keybase.io/moonglum) on keybase.
  • I have a public key whose fingerprint is 1EEF 0573 E355 33E8 1722 042F E203 C1DA 52DA 2D13

To claim this, I am signing this object:

@moonglum
moonglum / books.js
Created Dec 8, 2014
Foxx Example App from the Blog Series on the ArangoDB Blog.
View books.js
/*jslint indent: 2, nomen: true, maxlen: 100 */
/*global require, applicationContext, Joi */
(function () {
'use strict';
var FoxxGenerator = require('foxx_generator').Generator,
Joi = require('joi'),
generator;
generator = new FoxxGenerator('books', {
You can’t perform that action at this time.