Skip to content

Instantly share code, notes, and snippets.

View orgcontrib's full-sized avatar
:octocat:
contributing

Org Contrib orgcontrib

:octocat:
contributing
View GitHub Profile
@orgcontrib
orgcontrib / chjdk
Last active November 3, 2022 18:17 — forked from trmaphi/changeJDK.bash
[Change system wide java version on Mac OS] Inspire by a stackoverflow answer https://stackoverflow.com/a/44169445/6730571 #bash #mac
#!/usr/bin/env bash
JDKS_DIR="/Library/Java/JavaVirtualMachines"
JDKS=( $(ls ${JDKS_DIR}) )
JDKS_STATES=()
# Map state of JDK
for (( i = 0; i < ${#JDKS[@]}; i++ )); do
if [[ -f "${JDKS_DIR}/${JDKS[$i]}/Contents/Info.plist" ]]; then
JDKS_STATES[${i}]=enable
@orgcontrib
orgcontrib / nsschk.c
Created January 27, 2022 23:33
nsschk.c
/* Compile: gcc -o nsschk nsschk.c -ldl */
/* Blog/info: http://tiny.cc/mozbigsig */
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
void bail(char *msg) {
fprintf(stderr,"%s\n",msg);
exit(1);
@orgcontrib
orgcontrib / rpicam_legacy_web_streaming.py
Created November 22, 2021 21:35
RPi Camera (Legacy) Web Streaming
# Original blog post https://randomnerdtutorials.com/video-streaming-with-raspberry-pi-camera/
# Why Legacy? https://www.raspberrypi.com/news/bullseye-camera-system/
# Alternative https://www.tomshardware.com/how-to/stream-live-video-raspberry-pi
# See also https://github.com/jacksonliam/mjpg-streamer
##############################################################################################
# Web streaming example
# Source code from the official PiCamera package
# http://picamera.readthedocs.io/en/latest/recipes2.html#web-streaming
import io
#!/usr/bin/env bash
#
# Author: Markus (MawKKe) [email protected]
# Date: 2018-03-19
#
#
# What?
#
# Linux dm-crypt + dm-integrity + dm-raid (RAID1)
#
"Access public repositories" genügt als Permission
  • Access Token verschlüsseln, auf dem Client
# on macosx
@orgcontrib
orgcontrib / smartctl.ST8000AS0002.txt
Created February 28, 2021 11:37
sudo smartctl -a -d sat /dev/sda > smartctl.ST8000AS0002.txt
smartctl 7.2 2021-01-17 r5171 [x86_64-linux-5.10.18-200.fc33.x86_64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Archive HDD (SMR)
Device Model: ST8000AS0002-1NA17Z
Serial Number: Z8403AYG
LU WWN Device Id: 5 000c50 07b1008d0
Firmware Version: AR13
User Capacity: 8,001,563,222,016 bytes [8.00 TB]
@orgcontrib
orgcontrib / smartctl-a.LaCie1TB.txt
Created February 15, 2021 05:56
sudo smartctl -a -d sat /dev/sda
smartctl 7.2 2021-01-17 r5171 [x86_64-linux-5.10.15-200.fc33.x86_64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Samsung SpinPoint M8 (AF)
Device Model: ST1000LM024 HN-M101MBB
Serial Number: S2ZUJ9BD705411
LU WWN Device Id: 5 0004cf 20aaf0f70
Firmware Version: 2AR20002
User Capacity: 1,000,204,886,016 bytes [1.00 TB]
@orgcontrib
orgcontrib / Menu.ps1
Created November 21, 2020 02:15 — forked from trevren11/Menu.ps1
Macros for powershell development
###############################################################################
# Simple Textbased Powershell Menu
# Author : Michael Albert
# E-Mail : [email protected]
# License: none, feel free to modify
# usage:
# Source the menu.ps1 file in your script:
# . .\menu.ps1
# fShowMenu requieres 2 Parameters:
# Parameter 1: [string]MenuTitle
@orgcontrib
orgcontrib / cpan.md
Last active July 16, 2020 17:35 — forked from darkn3rd/cpan.md
Perl CPAN vs CPANM

What is the difference between cpan and cpanm?

This was explanation by Grant McLean

CPAN CLI

cpan the CPAN shell has been shipped with Perl since about 1997. When you run it the first time it asks a bunch of questions and saves the answers in a config file. Then you can install a module by running:

cpan -i Module::Name

The shell provides other commands for searching CPAN and looking inside distribution files.

@orgcontrib
orgcontrib / vtplayer.rb
Created December 9, 2019 02:56 — forked from redperadot/vtplayer.rb
A simple script to play vt100 animations.
#!/usr/bin/env ruby
#
# vtplayer.rb - A simple script to play vt100 animations.
# Made with ❤︎ by [email protected] - v0.1
#
# Some places to find vt100 animations:
# http://artscene.textfiles.com/vt100/
# http://www.scovetta.com/archives/textfiles/art
require 'open-uri'