Skip to content

Instantly share code, notes, and snippets.

View Leopere's full-sized avatar
💭
I'm sending you a message from the past and this is it.

Leopere Leopere

💭
I'm sending you a message from the past and this is it.
View GitHub Profile
@Leopere
Leopere / cloudflare.sh
Last active December 13, 2016 02:39 — forked from anonymous/-
#!/bin/sh
## Inspired by
## http://epistrephe.in/2016-09-21/cloudflare-dynamic-dns/
## Load config
if [ -L $0 ]
then
source `readlink -e $0 | sed "s:[^/]*$:config:"`
else
source `echo $0 | sed "s:[^/]*$:config:"`
@Leopere
Leopere / -
Last active August 29, 2015 14:18 — forked from anonymous/-
# docker ps |grep data
2afa8917717e local_discourse/data:latest "/sbin/boot" 5 minutes ago Up 5 minutes 0.0.0.0:5432->5432/tcp, 0.0.0.0:6379->6379/tcp data
I, [2015-04-01T03:12:12.686184 #43] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
URGENT: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
Failed to initialize site default
rake aborted!
Redis::CannotConnectError: Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED)
@Leopere
Leopere / mc.conf
Last active November 26, 2020 20:13 — forked from nathanielc/gist:9b98350ccbcbf21256d7
Systemd unit for minecraft-spigot server
#!/bin/bash
#
# Settings file for minecraft-init
# ================================
#
# Make a copy of this file named config
# and edit the variables to your needs.
#
### ChamCode
# Name of this server instance
@Leopere
Leopere / glpc.sh
Created February 28, 2014 07:25 — forked from roblabla/glpc.sh
#!/bin/bash
# /etc/init.d/mcl
### BEGIN INIT INFO
# Provides: minecraft
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
@Leopere
Leopere / _service.md
Last active August 29, 2015 13:56 — forked from naholyr/_service.md

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)

MacOS

Download from here:

http://d.pr/f/QE3d

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to:

#!/bin/bash
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin # modify if you need
DAEMON_ARGS="/home/hastebin/haste-server/server.js" # path to your node.js server/app
DESC="node.js pastebin server" # whatever fancy description you like
NODEUSER=hastebin:hastebin # USER who OWNS the daemon process (no matter whoever runs the init script)
LOCAL_VAR_RUN=/var/run # in case the init script is run by non-root user, you need to
NAME=node # name of the node.js executable
DAEMON=/usr/local/bin/$NAME # this SHOULD POINT TO where your node executable is

This is a guide for the recommended method of installing Ruby.

Learn more about Ruby.

Ruby 1.8.7

RHEL 6.4 currenly only supports ruby 1.8.7 in the repositories which has been completely dropped. Therefore it's recommended to manage ruby outside of the yum package management and build completely from source.

Install libyaml from source