Skip to content

Instantly share code, notes, and snippets.

@devster31
devster31 / swap.yml
Last active June 5, 2024 11:24 — forked from manuelmeurer/swap.yml
Ansible role for creating a Swap file
- name: set swap_file variable
set_fact:
swap_file: /{{ swap_space }}.swap
- name: check if swap file exists
stat:
path: "{{ swap_file }}"
register: swap_file_check
- name: create swap file
@devster31
devster31 / etc-apt-apt.conf.d-02nocache
Last active October 9, 2015 22:19 — forked from anonymous/etc-apt-apt.conf.d-02nocache
Customization for rpi minimal images
Dir::Cache {
srcpkgcache "";
pkgcache "";
}
@devster31
devster31 / hhvminfo.php
Last active August 29, 2015 14:22 — forked from ck-on/hhvminfo.php
hhvminfo
<?php
/*
HHVMinfo - phpinfo page for HHVM HipHop Virtual Machine
Author: _ck_
License: WTFPL, free for any kind of use or modification, I am not responsible for anything, please share your improvements
Version: 0.0.6
* revision history
0.0.6 2014-08-02 display fix for empty vs zero
0.0.5 2014-07-31 try to determine config file from process command line (may not always work), style improvements
@devster31
devster31 / serf
Last active August 29, 2015 14:21
serf init script
#!/bin/sh
### BEGIN INIT INFO
# Provides: serf
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the serf agent
# Description: starts serf agent using start-stop-daemon
@devster31
devster31 / 0_reuse_code.js
Last active August 29, 2015 14:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
@devster31
devster31 / nginx.conf
Last active July 9, 2021 09:35 — forked from spikegrobstein/nginx.conf
to add plex as a subdomain
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.