Skip to content

Instantly share code, notes, and snippets.

@saetia
saetia / gist:1623487
Last active July 16, 2024 05:56
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@NeQuissimus
NeQuissimus / gist:3139407
Created July 18, 2012 22:33
ArchLinux + Awesome WM in VMware Fusion 4
# 1. Install NetInstall from ISO
# 2. Add non-root user (let's call it "nequi")
adduser
# 3. Initialize pacman-key (hit random characters on keyboard until done)
pacman-key --init
# 4. Populate signatures
pacman-key --populate archlinux
# 5. Install awesome
pacman -Sy awesome
# 6. Install X and Xterm
@NeQuissimus
NeQuissimus / ..install.sh
Created July 23, 2012 14:16
ArchLinux on MacBook Pro 5,5
# 1. Install from NetInst CD, via Ethernet, minimal set of packages, use syslinux boot loader!
# 2. Initialize Pacman, hit random keys during init
pacman-key --init
pacman-key --populate archlinux
# 3. Install X and Awesome WM
pacman -Sy xorg-server xorg-xinit xorg-utils xorg-server-utils xterm awesome xf86-video-vesa
# 4. Install nvidia drivers
@return1
return1 / trim_enabler.txt
Last active May 26, 2024 11:01
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/
#!/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
# 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)
@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
@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 ) {
@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
@dkittell
dkittell / PictureRename.ps1
Last active July 6, 2024 18:38
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).