Skip to content

Instantly share code, notes, and snippets.

View chris18890's full-sized avatar

Chris Murray chris18890

View GitHub Profile
@jauderho
jauderho / gist:6b7d42030e264a135450ecc0ba521bd8
Last active April 18, 2024 00:10
HOWTO: Upgrade Raspberry Pi OS from Bullseye to Bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
@zbalkan
zbalkan / AddTemplateFolders.PS1
Last active October 17, 2023 06:45
A script that creates user folders on a shared folder -preferably on a file server- according to a prepared schema. No RSAT or AD module is needed. https://www.reddit.com/r/PowerShell/comments/orki1b/a_simple_and_verbose_script_for_home_folder/
#Requires -Version 3
# In this scenario, it is assumed that each user will have a home folder, including 3 sub-folders as a template.
# The tree can be visualized like below:
#
# Home
# |_ user1
# |_ user2
# |_ user3
# |_ user4
@mikesouza
mikesouza / binds_on_mount.sh
Created August 12, 2018 15:31 — forked from alexandrusavin/binds_on_mount.sh
Add letsencrypt certificate to dd-wrt web interface
#!/bin/sh
if [ `nvram get https_enable` -gt 0 ] ; then
# get the absolute directory of the executable
SELF_PATH=$(cd -P "$(dirname "$0")" && pwd -P)
echo SELF_PATH: ${SELF_PATH}
# extract the mount path
@iainbrighton
iainbrighton / Dsc101WorkshopPrep.ps1
Created March 11, 2018 20:16
PowerShell DSC 101 Workshop Prep Script
#requires -RunAsAdministrator
#requires -Version 5
<#
For the PowerShell Desired State Configuration 101 Workshop you will need
the following:
1. A Windows 2016 virtual machine. This can be any hypervisor you have
available e.g. Hyper-V, VMware Workstation or VirtualBox.
@alexandrusavin
alexandrusavin / binds_on_mount.sh
Last active February 4, 2024 14:48
Add letsencrypt certificate to dd-wrt web interface
#!/bin/sh
if [ `nvram get https_enable` -gt 0 ] ; then
# get the absolute directory of the executable
SELF_PATH=$(cd -P "$(dirname "$0")" && pwd -P)
echo SELF_PATH: ${SELF_PATH}
# extract the mount path
@enxt
enxt / TuneRPI.sh
Last active August 12, 2017 21:01
Bash script to slimming raspbian image and prepare with nginx and php
#!/bin/sh
sudo apt-get update
sudo apt-get -y upgrade
sudo dpkg-reconfigure tzdata
sudo apt-get -y install console-data locales
sudo dpkg-reconfigure console-data
sudo dpkg-reconfigure locales
@felipelavinz
felipelavinz / apache
Created February 9, 2012 14:00
Canonical redirects for Apache, lighttpd and nginx
## Canonical redirect for Apache
# BEGIN Canonical Redirect
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC] ## will match any domain that's not our main domain
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
</IfModule>
# END Canonical Redirect