Skip to content

Instantly share code, notes, and snippets.

@jborean93
jborean93 / Get-ServiceCredential.ps1
Last active March 21, 2025 16:18
Get's the username and password for installed Windows services
# Copyright: (c) 2019, Jordan Borean (@jborean93) <[email protected]>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Function Get-ServiceCredential {
<#
.SYNOPSIS
Retrieve the username and plaintext password for all services installed on the local computer.
.DESCRIPTION
Will retrieve the username and plaintext password for the service(s) specified. This must be run as an
@ssmereka
ssmereka / plexDatabaseBackupScript.sh
Last active March 21, 2025 16:18
Plex Media Server database backup script.
#!/bin/bash
# Backup a Plex database.
# Author Scott Smereka
# Version 1.0
# Script Tested on:
# Ubuntu 12.04 on 2/2/2014 [ OK ]
# Plex Database Location. The trailing slash is
@slykar
slykar / docker-compose-hackintosh.md
Last active March 21, 2025 16:18
Docker and Docker Compose on AMD OSX Hackintosh via Docker Machine

Introduction

Docker.app will complain about incompatible processor, so we will use Docker Machine.

Instalation

Download Docker for Mac (Docker.app). It contains some binaries that are necessary.

brew install virtualbox docker-machine
@kaimi-
kaimi- / gist:6b3c99538dce9e3d29ad647b325007c1
Last active March 21, 2025 16:15
Possible IP Bypass HTTP Headers
CACHE_INFO: 127.0.0.1
CF_CONNECTING_IP: 127.0.0.1
CF-Connecting-IP: 127.0.0.1
CLIENT_IP: 127.0.0.1
Client-IP: 127.0.0.1
COMING_FROM: 127.0.0.1
CONNECT_VIA_IP: 127.0.0.1
FORWARD_FOR: 127.0.0.1
FORWARD-FOR: 127.0.0.1
FORWARDED_FOR_IP: 127.0.0.1
@pekka
pekka / TaskObserver.php
Last active March 21, 2025 16:14
Addition to Laravel Daily's mini tutorial "Filament & Laravel: Delete Unused Files if Model is Updated/Deleted" - a "saved()" method that can handle the image field set to multiple
public function saved(Task $task): void
{
if ($task->isDirty('attachment')) {
$originalFieldContents = $task->getOriginal('attachment');
$newFieldContents = $task->attachment;
# We attempt to JSON decode the field. If it is an array, this is an indication we have ->multiple() activated
$originalFieldContentsDecoded = json_decode($task->getOriginal('attachment'));
@simonsmith
simonsmith / hotkeys.md
Created May 16, 2014 11:05
List of Bash hotkeys for Mac

Bash Keyboard Shortcuts - Mac

Enable Option Key as Meta in iTerm. Set as Esc+ - http://stackoverflow.com/a/438892

Moving the cursor

  • Ctrl + a Go to the beginning of the line (Home)
  • Ctrl + e Go to the End of the line (End)
  • Ctrl + p Previous command (Up arrow)
  • Ctrl + n Next command (Down arrow)
@gdarchen
gdarchen / set-saved-replies.js
Last active March 21, 2025 16:11
Conventional Gitmoji review comments
(async function generateReplies(document) {
/**
* Those saved replies are a mix of the "conventional comments" and the
* "code review emoji guide".
* Refer to the following resources:
* - https://conventionalcomments.org
* - https://github.com/axolo-co/code-review-emoji-guide
*/
const LABEL = {
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active March 21, 2025 16:10 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active March 21, 2025 16:07
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@0xdevalias
0xdevalias / accessing-apple-screen-time-data.md
Last active March 21, 2025 16:06
Some notes on accessing / exporting Apple's Screen Time data