Skip to content

Instantly share code, notes, and snippets.

@Seefin
Seefin / Set-UserDesktopPreferences.ps1
Created February 16, 2020 02:22
Set up Windows explorer the way I like - Disable searchbar, Cortana and Bing integration
#Set-UserDesktopPreferences - Set up Explorer environment the way I like
Function Set-UserDesktopPreferences {
<#
.Synopsis
Set up the windows Explorer environment the way I prefer
.Description
Windows Blue (8.1) and Redstone (10 v1607+) introduced a far closer coupling of their
Bing and Cortana services to the standard Operating System experience - i.e. the search
bar, Cortana ("Hey, Cortana"), and bing search results in the start menu.
@Seefin
Seefin / commentTr
Created May 31, 2015 04:29
CommentTr script for translateing comments to C89 from C11
#!/bin/bash
# Translate between C89 and C11 comment styles. The default is to take C11 comments
# and turn them into C89 comments, but this can be changed with the -89 flag when
# invoking the script.
# Usage of the script is as follows:
# commentTr [-89] <list_of_files>
#
#TODO:
# Implement -89 switch
@Seefin
Seefin / startPythonServer.sh
Created May 11, 2015 12:17
A Bash wrapper for a Python server.
#!/bin/bash
# Start a python server here.
#What version python are we?
py_ver=$(python -c "import sys;o='{v[0]}'.format(v=list(sys.version_info[:1]));sys.stdout.write(o);")
if [[ $py_ver -lt 3 ]]; then
#Is the server running?
pid=$(ps aux | awk '/[p]ython -m SimpleHTTPServer/ {print $2}') || 0
if [[ $pid -eq 0 ]]; then
python -m SimpleHTTPServer >>server.log 2>>server.err &
@Seefin
Seefin / backup.sh
Created March 23, 2015 09:41
A backup script using rsync and etckeeper, written in bash.
#!/bin/bash
# Backs stuff up. This script uses rsync to back stuff up to the backup drive. It
# is *not* version control, so it only has a single copy of the tree; this increases
# speed and keeps the file IO time to a minimum.
# !!!
# THIS SCRIPT CAN AND WILL DELETE THINGS FROM THE DESTINATION.
# !!!
# To pass in a non-standard source and destination, run this script like so:
# backup.sh <SRC> <DEST>
#