Skip to content

Instantly share code, notes, and snippets.

@altercation
altercation / archdual.sh
Last active October 4, 2021 15:38
arch-dual drive config
#!/bin/sh
#----------------------------------------------------------------------
# Arch Linux Installation Script
#
# This installs, with no intervention (other than initial edit to change
# RAID array drive values), Arch Linux on an encrypted btrfs raid1 array.
#----------------------------------------------------------------------
set -eu
@burningTyger
burningTyger / arch.sh
Last active February 3, 2023 01:52
Install Arch
# This guide is based on https://wiki.archlinux.org/index.php/User:Altercation/Bullet_Proof_Arch_Install
# compare for more details on each step. It's a great guide and seems to get frequent updates.
# This guide has a few changes that helped me to get thew bootloader running
# Start up the Live USB/CD and enable SSH:
# set a password for root to enable ssh login
# *
passwd
systemctl start sshd.service
@altercation
altercation / bulletproof_arch.txt
Last active August 30, 2022 16:21
Bulletproof Arch - Minimal Clean Install
------------------------------
IMPORTANT NOTE:
Please see @craSH's update to this. He has updated and reformatted these working notes and his version is what I recommend you start with (as of 2021 or later).
-Ethan
@craSH fork & update (also listed in the forks on this gist above):
@dkittell
dkittell / PictureRename.ps1
Last active May 2, 2024 15:54
PowerShell – Rename Pictures to Image Taken Date/Time with Dimensions
<#
.SYNOPSIS
Renames pictures.
.DESCRIPTION
The Rename-Pictures cmdlet to rename pictures to a format where the file creation time is first
in the name in this format: . The idea is that
.PARAMETER Path
Specifies the path to the folder where image files are located. Default is current location (Get-Location).
@carld
carld / arch-linux-macbook-pro-5-5
Last active July 14, 2021 19:16
Arch Linux on Macbook Pro 5,5 notes
# Some notes on my Arch Linux install... not quite complete but something to go on
# I needed rEFInd?
# After booting from arch ISO image (from CD)
# Partition disk etc
fdisk /dev/sda
n # new partition
t # set type, 1 is EFI partition
# Install EFI bootloader
@russellds
russellds / Rename-PictureToDateTaken.ps1
Created July 28, 2014 02:39
Rename pictures to date taken using Powershell
function Rename-PictureToDateTaken {
param(
[string]$Path
)
$assemblyLoaded = [appdomain]::currentdomain.getassemblies() |
where { $_ -match 'System.Drawing' }
if( -not $assemblyLoaded ) {
@kennwhite
kennwhite / hash.ps1
Last active October 4, 2017 06:36
Simple Win7/8 PowerShell script to compute md5, sha, and sha256 hash for a file
# Simple powershell (built-in to Win7/8) utility script
# to compute sha256 (or md5, sha1 or sha512) of a file
#
# Usage:
# C:\> powershell
# PS .\hash filename.ext [sha|md5|sha256|sha512]
#
# May require: Control Panel/System/Admin/Windows Power Shell Modules, then: set-executionpolicy remotesigned
#
# Based on James Manning's and Mike Wilbur's get-hashes and get-sha256 MSDN scripts
# Show message box popup.
Add-Type -AssemblyName System.Windows.Forms
$result = [System.Windows.Forms.MessageBox]::Show("My message", "Window Title", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::None)
# Show input box popup.
Add-Type -AssemblyName Microsoft.VisualBasic
$inputText = [Microsoft.VisualBasic.Interaction]::InputBox("Enter some value:", "Window Title", "Default value")
# Show an Open File Dialog and return the file selected by the user.
function Read-OpenFileDialog([string]$InitialDirectory, [switch]$AllowMultiSelect)
#!/bin/bash
echo '# Linux mod for RK3188 rooting script - Zepheus #'
echo 'Rooting device...'
adb shell mv /data/local/tmp /data/local/tmp.bak
adb shell ln -s /data /data/local/tmp
adb reboot
read -p "--- Reboot 1/3 - Press Space Bar once the device has rebooted"
adb shell rm /data/local.prop > nul
@return1
return1 / trim_enabler.txt
Last active August 25, 2023 02:59
TRIM Enabler for OS X Yosemite 10.10.3
#
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs
# just run "sudo trimforce enable" to activate the trim support from now on!
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/