Skip to content

Instantly share code, notes, and snippets.

View swipswaps's full-sized avatar

#swipswaps swipswaps

View GitHub Profile
#/bin/bash
## taking.kr ([email protected])
## 2019-06-11
###########################################
read -p "hostname (ex taking.kr): " uhost
read -p "new username: " uname
read -p "$uname's Password: " upasswd
encrypt_pass=$(perl -e 'print crypt($ARGV[0], "password")' $upasswd)
############ nameserver setting ###############
@swipswaps
swipswaps / mkunpriv.sh
Created January 1, 2020 22:32 — forked from wankdanker/mkunpriv.sh
A script to make Proxmox LXC Containers unprivileged
#!/bin/bash
##
## Warning: do not use this unless you understand and agree with what it does
##
## Based on: https://forum.proxmox.com/threads/convert-privileged-to-unprivileged-container.31066/#post-261883
##
## NOT HANDLED
## * multiple disks
## * if there are backup/snapshot references in the lxc/$vmid.conf the unprivileged:1 will be added to the end of the file and in a backup config not in the active config, that can break the first boot
## * setuid and setgid permissions are not retained
@swipswaps
swipswaps / install-mac.md
Created January 11, 2020 17:45
Install Mac

Setup Catalina

Settings

  • Displays:
    • Arrangement: uncheck mirror
    • For each monitor: select scaled and more space; use sRGB for color
  • Mouse: uncheck scroll direction natural
@swipswaps
swipswaps / How-to-setup-elasticsearch-kibana-logstash-v7-2019.md
Created January 11, 2020 17:51 — forked from hideojoho/How-to-setup-elasticsearch-kibana-logstash-v7-2019.md
How to set up a VM on Mac for Elasticsearch, Kibana, and Logstash ver 7.0 (2019)

Requirements

  • At least 6-8GB of RAM (of those 4GB will be used for a virtual machine)
  • About 3GB of diskspace
  • 1-2 hours of time (depends on your network speed)

Environments

  • MacOSX 10.14.4
  • Homebrew 2.1.1
  • VirtualBox 6.0.6
  • Vagrant 2.2.4
@swipswaps
swipswaps / .gitignore
Created January 11, 2020 17:59 — forked from mathias-muench/How-To.md
Vagrantfile for Fedora31
.vagrant
@swipswaps
swipswaps / Vagrantfile
Created January 11, 2020 18:00
[Boilerplate] Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@swipswaps
swipswaps / readonlyroot.sh
Created January 11, 2020 18:08 — forked from netj/readonlyroot.sh
init.d script for Debian read-only root filesystem
#! /bin/bash
# readonlyroot.sh -- Setup dirs on the tmpfs to keep the root partition read-only
# See-Also: http://roland.entierement.nu/pages/debian-on-soekris-howto.html
# Available-At: https://gist.github.com/1216392
#
# Place this file in /etc/init.d and run:
# sudo update-rc.d readonlyroot.sh start 04 S
#
# To maintain persistent data, place a file at /etc/cron.d/readonlyroot as:
# 0 * * * * root /etc/init.d/readonlyroot.sh save >/dev/null
@swipswaps
swipswaps / .htaccess
Created January 14, 2020 16:32
useful htaccess tips 'n' tricks
# some from: http://www.queness.com/post/5421/17-useful-htaccess-tricks-and-tips
# set timezone:
SetEnv TZ Australia/Melbourne
# SEO Friendly 301 Permanent Redirects
Redirect 301 http://www.queness.com/home http://www.queness.com/
@swipswaps
swipswaps / .htaccess
Created January 14, 2020 16:43 — forked from seoagentur-hamburg/.htaccess
UPDATE 2019/07: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2020
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://seoagentur-hamburg.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@swipswaps
swipswaps / Synology-Diskstation-Git.md
Created January 20, 2020 18:05 — forked from walkerjeffd/Synology-Diskstation-Git.md
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation