Skip to content

Instantly share code, notes, and snippets.

View bullshit's full-sized avatar
👨‍🔬
Solutionst

Oskar bullshit

👨‍🔬
Solutionst
View GitHub Profile
@jehrhardt
jehrhardt / build.gradle
Created July 26, 2012 07:24
Groovy 2.0 with invokedynamic in Gradle
apply plugin: "groovy"
sourceCompatibility = 1.7
targetCompatibility = 1.7
compileGroovy {
groovyOptions.metaClass.optionMap = { [indy: true, encoding: "UTF-8"] }
}
compileTestGroovy {
@tancnle
tancnle / setup_mosh_centos.sh
Last active December 5, 2019 03:01
Setup mosh on Centos 6.x
#!/bin/sh
# Update latest epel
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6-8.noarch.rpm
# Download and build mosh
sudo yum -y install rpm-build rpmdevtools protobuf-compiler protobuf-devel libutempter-devel zlib-devel ncurses-devel openssh-clients perl-IO-Tty openssl-devel gcc gcc-c++
rpmdev-setuptree
cd ~/rpmbuild/SOURCES
@uberboom
uberboom / CleanSource.php
Last active December 17, 2019 15:01
TYPO3: Hook to remove the generator meta tag (TYPO3 CMS 6.2)
<?php
namespace Your\Extension\Namespace\Hooks;
/**
* Clean up source
*/
class CleanSource extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
{
/**
@CHTJonas
CHTJonas / UniFi Tunnelbroker.md
Last active April 26, 2022 00:49
Tunnelbroker config for UniFi Security Gateway

UniFi Tunnelbroker Configuration

This GitHub Gist details the manual configuration needed on a UniFi controller to enable IPv6 tunneling with Hurricane Electric's Tunnelbroker service.

Setup

This is what works for me personally. Stuff you'll need to do to adapt this to your ends:

  • Replace "local-ip" with your USG's public IPv4 address.
  • Replace "remote-ip" with the address of your Tunnelbroker tunnel server.
  • Replace "address" with the IPv6 address that your are allocated.
LOGFILE="/var/log/snipeit-backup.log"
echo "**************START*************************" >> $LOGFILE
#---------1. Asset Management backup starting---------
echo "Start Asset Management backup process" >> $LOGFILE
#---------2. Navigate to Asset Management directory ---------
cd /var/www/snipeit/
@gawainXX
gawainXX / Foreman_Puppet_7.x_Raspbian.md
Last active January 25, 2023 07:24 — forked from aaroncoffey/Puppet_6.3_Raspbian.md
How to add a Raspberry Pi 10 (Buster) agent device to Foreman for management and Remote Execution

How to add a Raspberry Pi 10 (Buster) agent device to Foreman for management and Remote Execution

These instructions were tested on a pi 3b and 4b with the latest version of raspbian (Raspbian GNU/Linux 10 (Buster)).

This guide assumes basic competency with the command line. It also assumes your Foreman Proxy/Server and the client device you are going to be managing meet the following criteria.

Raspberry Device Configuration Requirements

  • OS is Raspbian 10 Buster (armhf)
  • Root is enabled with a set password.
  • SSH is enabled with PermitRootLogin is either set to prohibit-password or yes in /etc/ssh/sshd_config
sudo sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
sudo sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
@lsowen
lsowen / check_sig.go
Last active November 23, 2023 23:31
GPG Signature Verification in go (with golang.org/x/crypto/openpgp)
package main
import (
"fmt"
"golang.org/x/crypto/openpgp"
"os"
)
func main() {
keyRingReader, err := os.Open("signer-pubkey.asc.txt")
@depwl9992
depwl9992 / Rendering-the-Nether-Roof.md
Last active April 8, 2024 12:27
A fully comprehensive tutorial for webbukkit/dynmap to render the nether roof in Minecraft

Initial Setup of the Nether Roof Map

  1. Assuming dynmap is already initialized and the folder structure has been generated during a first-time run, <Spigot_Server>/plugins/dynmap/custom-perspectives.txt should exist.
  2. Open custom-perspectives.txt in a text editor.
  3. In this file below the line perspectives: add the following lines of text.
  - class: org.dynmap.hdmap.IsoHDPerspective
    name: nether_top_map_lowres
    maximumheight: 256
    minimumheight: 129
    inclination: 90
@kconner
kconner / macOS Internals.md
Last active April 22, 2024 21:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options: