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 puma | |
# Start Puma with next command: | |
# RAILS_ENV=production bundle exec puma -C ./config/puma.rb | |
# uncomment and customize to run in non-root path | |
# ENV['RAILS_RELATIVE_URL_ROOT'] = "/redmine" | |
application_path = '/home/redmine/redmine' |
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/bash | |
# REDMINE | |
# Maintainer: @thanhhh | |
# App Version: 2.3.1 | |
APP_ROOT="/home/redmine/redmine" | |
APP_USER="redmine" | |
DAEMON_OPTS="-C $APP_ROOT/config/puma.rb" | |
PID_PATH="$APP_ROOT/tmp/pids" |
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/bash | |
app_path="${1?No app source path given}" | |
app_name="$(basename "$app_path" | sed -r "s/\.app$//g")" | |
echo "$app_name" | |
dmg_size="$(du -ms "$app_path" | grep -oP "^\d+")" | |
dmg_path=$(sed -r "s/\.app\/?$/.dmg/g" <<< "$app_path") |
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
key=${1?No domain key given!} | |
domain=${2?No domain name given!} | |
opendkim_base="/etc/opendkim" | |
opendkim_user="opendkim" | |
opendkim_group="opendkim" | |
key_path="${opendkim_base}/keys/${domain}" | |
mkdir -p "$key_path" |
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/bash | |
gitlab_user="git" | |
if [[ "$(whoami)" == "$gitlab_user" ]] | |
then | |
echo "Searching for errors and corecting them" | |
else | |
echo "Nope, wrong user. Trying to login as $gitlab_user" | |
su "$gitlab_user" -c "$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
public class ShellPong { | |
private static final int width = 80; | |
private static final int height = 24; | |
private static final char CORNER = '+'; | |
private static final char H_WALL = '-'; | |
private static final char V_WALL = '|'; | |
private static final char PADDLE = '#'; | |
private static final char BALL = 'O'; |
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
rtmp { | |
server { | |
listen 0.0.0.0:1935; | |
chunk_size 4096; | |
# The collection server, streaming allowed from standard local /16 subnets | |
# Stream to rtmp://<server ip>/collect/<stream key> |
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
import scala.io.Source._ | |
import java.lang.Character.{isWhitespace => isSpace} | |
import scala.annotation.tailrec | |
def parseLine(s: String): (String, Seq[String]) = { | |
parseCommand(s.iterator) | |
} | |
def parseCommand(s: Iterator[Char]): (String, Seq[String]) = { | |
val elements = parseElements(s) |
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
[Unit] | |
Description=Loads the VirtualBox kernel modules | |
[Service] | |
Type=oneshot | |
ExecStart=/sbin/rcvboxdrv setup | |
[Install] | |
RequiredBy=multi-user.target |
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
# This file is part of PulseAudio. | |
# | |
# PulseAudio is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU Lesser General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# PulseAudio is distributed in the hope that it will be useful, but | |
# WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |