Skip to content

Instantly share code, notes, and snippets.

@brombres
brombres / AutoscaleRichTextLabel.gd
Created August 5, 2023 13:15
A Godot script to auto-scale the text of a RichTextLabel node as the RTL size changes.
# AutoscaleRichTextLabel.gd
#
# ABOUT
# 2023.08.04 by Brom Bresenham
# Tested on Godot 4.2-dev2
#
# USAGE
# 1. [Inspector] Create a RichTextLabel node and attach this script to it.
# 2. [Editor] Save and reload the scene to activate this as a @tool script
# that will automatically set the Node Reference Height.
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active September 29, 2024 08:31
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@haosdent
haosdent / x_layout.keylayout
Last active November 11, 2024 09:34
Mac OS X Keyboard layout file, works in 10.11
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--
Data generated Wed Mar 23 01:35:41 2022
Generated by kluchrtoxml_64 build 203
-->
<!--Last edited by Ukelele version 351 on 2022-03-23 at 01:45 (GMT+8)-->
@sivel
sivel / better-ssh-authorized-keys-management.md
Last active October 3, 2024 16:46
Better SSH Authorized Keys Management

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server:

@oxtopus
oxtopus / history.txt
Last active June 10, 2024 16:28 — forked from anonymous/history.txt
Installing NuPIC from scratch on Ubuntu 13.10
sudo apt-get update
sudo apt-get install python-dev git python-pip automake libtool libssl-dev
git clone https://github.com/numenta/nupic.git
mkdir -p nta/eng
echo "
export NTA=$HOME/nta/eng
export NUPIC=$HOME/nupic
export BUILDDIR=/tmp/ntabuild
export MK_JOBS=3
source $HOME/nupic/env.sh" >> ~/.bashrc

Guide to how fucked is SSL?

Thanks to Jacob Kaplan-Moss, Donald Stufft, David Reid, Allen Short, Zain Memon, and Chris Armstrong for review.

This is a guide for technical individuals to understand in what circumstances SSL communications are secure against an observer-in-the-middle (for all intents and purposes: the NSA).

@quchen
quchen / trolling_haskell
Last active November 12, 2024 00:10
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now
@sturadnidge
sturadnidge / tmux-1.8-on-CentOS-6.x.txt
Last active May 10, 2021 18:31
Install tmux 1.8 on CentOS 6.x minimal (64bit)
# download latest libevent2 and tmux sources, and extract them somewhere
# (thx bluejedi for tip on latest tmux URL)
#
# at the time of writing:
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
# http://sourceforge.net/projects/tmux/files/latest/download?source=files
#
# install deps
yum install gcc kernel-devel make ncurses-devel
@benthor
benthor / hyperboria.sh
Created October 13, 2012 11:20 — forked from cantor/hyperboria.sh
cjdns Init Script (start|stop|restart|status|flush|update|install|delete)
#!/bin/sh -e
### BEGIN INIT INFO
# hyperboria.sh - An init script (/etc/init.d/) for cjdns
# Provides: cjdroute
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Cjdns router
# Description: A routing engine designed for security, scalability, speed and ease of use.
@thefinn93
thefinn93 / README.md
Last active October 22, 2015 10:08
Hyperboira Init Script

Note: This is old, sysvinit sucks. There used to be an updated version of this in the cjdns git, but it's gone now. Use systemd or upstart

Installation:

  1. Place hyperboria.sh in /etc/init.d/hyperboria
  2. chmod +x /etc/init.d/hyperboria
  3. update-rc.d hyperboria defaults

This will cause it to automatically start with your computer. You can control it with /etc/init.d/hyperboria . Some systems (Ubuntu, not sure about others) allow you to use the service command, which shortens the command to `service hyperboria