This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby | |
RUN apt-get -y update && apt-get -y install libicu-dev cmake ruby-bundler && rm -rf /var/lib/apt/lists/* | |
COPY . /opt/gollum | |
WORKDIR /opt/gollum | |
RUN bundle install --path vendor/bundle | |
ENTRYPOINT ["gollum", "--adapter", "rugged", "--port", "80", "--bare", "/srv/wiki"] | |
EXPOSE 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq '.Parameters | to_entries | map("\(.key)=\(.value)") | join(" ")' /tmp/test.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate subprocess; | |
use subprocess::Exec; | |
use std::io::BufReader; | |
use std::io::{BufRead}; | |
use std::error::Error; | |
fn execute() -> std::result::Result<(), Box<Error>> { | |
let exec = Exec::cmd("/tmp/hoge.sh") | |
.stderr(subprocess::Redirection::Merge); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$1" ] ; then | |
echo usage: $0 id | |
exit 1 | |
fi | |
CLOUDFRONT_ID=$1 | |
while true; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #[derive(PartialEq)] | |
// pub enum Option2<T> { | |
// None, | |
// Some(T), | |
// } | |
// $ rustc option.rs -Z unstable-options --pretty=expanded | |
#![feature(prelude_import)] | |
#![no_std] | |
#[prelude_import] | |
use std::prelude::v1::*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from gimpfu import * | |
def plugin_main(image, layer): | |
image.disable_undo() | |
image.resize(image.width / 2, image.height / 2, 0, 0) | |
layer.scale(image.width, image.height, 0, 0) | |
image.enable_undo() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from gimpfu import * | |
def plugin_main(image, layer, image_path): | |
# image.disable_undo() | |
layer = pdb.gimp_file_load_layer(image, image_path) | |
layer.opacity = 50.0 | |
layer.mode = SUBTRACT_MODE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from gimpfu import * | |
def plugin_main(image_arg, layer_arg, image_path): | |
image = pdb.gimp_file_load(image_path, "") | |
image.resize(image.width / 2, image.height / 2, 0, 0) | |
layer = image.layers[0] | |
layer.scale(image.width, image.height, 0, 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------ | |
-- Config | |
------------------------------------ | |
-- MyDNS ID | |
mid="MyDNSID" | |
-- MyDNS Password | |
pwd="MyDNSPASSWD" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button :class="'btn btn-' + size"></button> |