Skip to content

Instantly share code, notes, and snippets.

View majorsilence's full-sized avatar
🐢
I may be slow to respond.

Peter Gill majorsilence

🐢
I may be slow to respond.
View GitHub Profile
@rikka0w0
rikka0w0 / Dockerfile.ubuntu_wine.md
Created February 9, 2019 12:20
Dockerfile-Ubuntu+Wine

For those who need to run a Windows-only game server on a linux server with docker. Build with sudo docker build --rm -t ubuntu_wine:latest .. Run it with sudo docker run -ti ubuntu_wine.

Util scripts are in the root's home folder. setvnc.sh is for setting up a VNC server (runs forever) and XVFB environment, this works on servers without a graphic card. explorer_wine.sh launches a file explorer on that deskop. This Dockerfile installs nano wget xfce4-terminal by default, if you don't need the graphical terminal emulator or the utilities, you can remove them.

@superseb
superseb / cleanup.sh
Last active June 19, 2023 10:03
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
# OUTDATED: please refer to the link below for the latest version:
# https://github.com/rancherlabs/support-tools/blob/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

<Query Kind="Program">
<NuGetReference>Octokit</NuGetReference>
<NuGetReference>Octokit.Reactive</NuGetReference>
<NuGetReference>Rx-Main</NuGetReference>
<Namespace>Octokit</Namespace>
<Namespace>System.Linq</Namespace>
<Namespace>System.Reactive.Linq</Namespace>
<Namespace>System.Threading.Tasks</Namespace>
</Query>
@xrstf
xrstf / letsencrypt.md
Last active April 18, 2023 05:01
Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.

As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).

Configuration

For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:

@tenowg
tenowg / RedisJobQueue.cs
Last active January 17, 2024 07:22
A Message/Job Queue based on StackExchange.Redis and Redis Server
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using StackExchange.Redis;
namespace CitySurvival.Redis
{
@nadar
nadar / PostMessageToSlackChannel.php
Last active June 5, 2024 17:05
Post a message to a slack channel with PHP
<?php
/**
* Send a Message to a Slack Channel.
*
* In order to get the API Token visit:
*
* 1.) Create an APP -> https://api.slack.com/apps/
* 2.) See menu entry "Install App"
* 3.) Use the "Bot User OAuth Token"
@maurizi
maurizi / ansible-galaxy.bat
Last active May 21, 2024 02:10
Running Ansible on Windows
@echo off
cygwin-shim.bat /bin/ansible-galaxy %*
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active June 10, 2024 15:37
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert