Skip to content

Instantly share code, notes, and snippets.

View khorsmann's full-sized avatar

Karsten Horsmann khorsmann

  • Germany / Hanover
View GitHub Profile
---
- hosts: legacyservers
gather_facts: yes
become: yes
tasks:
# Use a block to perform tasks conditionally—only if running Ubuntu 18.04.
- block:
@AjkayAlan
AjkayAlan / WSLWindows10Setup.md
Last active April 29, 2024 15:43
Windows SubSystem For Linux setup that I like with some developers stuff mixed in

Setting Up WSL

Install A Distro:

  1. Run the following in powershell as admin Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

  2. Install a distro (ex: Ubuntu 18.04 LTS - https://www.microsoft.com/store/apps/9N9TNGVNDL3Q)

  3. Open your distro you installed via the start menu, let it setup

  4. Update and upgrade

sudo apt-get update
@AmazingTurtle
AmazingTurtle / how-to-restore.md
Last active May 30, 2024 09:18
restore access to unifi controller

Restore access to a unifi controller

When you are unable to login to the unifi controller or forgot admin password, you can restore access using SSH and manipulating mongodb directly.

Warning

Do not uninstall unifi controller - most of the data is not stored in mongodb. In case you thought a mongodb backup would be sufficient, you may have fucked up already, just like me. However I managed to write this "tutorial" for anyone to not run into the same trap.

Apparently this guide no longer works with recent unifi controller versions (starting nov/dec 2022). Since I no longer use unifi hardware in my home system, I can not update the guide myself. In case you've gotten here to recover your data, you're likely doomed. But giving it a try won't hurt anyway, therefore: good luck.

# Connect IO25 to DIN
import machine, neopixel, time
np = neopixel.NeoPixel(machine.Pin(25), 8)
for i in range(65):
np[(i + 7) % 8] = (0,0,0)
np[i % 8] = ((i * 4) % 64, (i * 8) % 64, (i * 16) % 64)
np.write()
time.sleep_ms(40)
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@drm00
drm00 / update_check.sh
Created October 10, 2015 12:06
update installed ports and notify about updates in src/xenocara
#!/bin/sh
#
# update_check.sh
#
# check for new -stable code and update installed packages if nececcary.
# read http://www.openbsd.org/faq/faq15.html#PkgSig to self-sign your
# newly built packages.
# -- config
@ashrithr
ashrithr / graphite.md
Last active September 27, 2020 20:10
Installing graphite 0.10, collectd and grafana on centos 6

Installing Graphite:

Graphite does two things:

  1. Store numeric time-series data
  2. Render graphs of this data on demand

What Graphite does not do is collect data for you, however there are some tools out there that know

@plentz
plentz / nginx.conf
Last active May 17, 2024 09:08
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048