Skip to content

Instantly share code, notes, and snippets.

View danijeljw's full-sized avatar
🏠
Staying at home

Danijel-James Wynyard danijeljw

🏠
Staying at home
View GitHub Profile
@danijeljw
danijeljw / adwuaserv.bat
Last active May 2, 2016 14:06
Advanced Windows Update Fix
:: Advanced Windows Update Service Clean v2.01
:: ===========================================
::
:: Copyright (c) 2016, Danijel James
:: All rights reserved.
::
:: Redistribution and use in source and binary forms, with or without
:: modification, are permitted provided that the following conditions are met:
::
:: 1. Redistributions of source code must retain the above copyright notice, this
@danijeljw
danijeljw / no-ip_uninstall.sh
Last active December 24, 2015 17:39
No-IP DUC Uninstall Script for Mac OS X
#!/bin/bash
###############################################################################
# Load All Functions #
###############################################################################
# Function Show script help
function showHelp() {
echo "No-IP Uninstaller v2.0a"
echo ""
#!/bin/bash
function readName {
echo "Enter your full name:"
read fullName
clear
}
function cmprsName {
comp=${ echo "$fullName" } | sed 's/ //g';
@danijeljw
danijeljw / addmygit.sh
Created October 13, 2013 05:27
Install Git (req. cURL) on Linux in 1-step
#!/bin/bash
# Linux Auto-Install Git
#
# Copyright (c) 2012 Danijel James http://danijelj.com
#
# Licensed under MIT
# version number
version="1.0.5"
#!/bin/sh
# Detects which OS and if it is Linux then it will detect which Linux Distribution.
OS=`uname -s`
REV=`uname -r`
MACH=`uname -m`
GetVersionFromFile()
{
VERSION=`cat $1 | tr "\n" ' ' | sed s/.*VERSION.*=\ // `
@danijeljw
danijeljw / batVBdwnldr.bat
Created October 24, 2013 13:59
Use BATCH to download a file by creating then executing the VBScript
@echo off
rem Windows has no built-in wget or curl, so generate a VBS script to do it:
rem -------------------------------------------------------------------------
set DLOAD_SCRIPT=download.vbs
echo Option Explicit > %DLOAD_SCRIPT%
echo Dim args, http, fileSystem, adoStream, url, target, status >> %DLOAD_SCRIPT%
echo. >> %DLOAD_SCRIPT%
echo Set args = Wscript.Arguments >> %DLOAD_SCRIPT%
echo Set http = CreateObject("WinHttp.WinHttpRequest.5.1") >> %DLOAD_SCRIPT%
@danijeljw
danijeljw / icndispdiag.applescript
Created October 26, 2013 08:34
AppleScript display dialog box with icon
Display dialog box with custom icon called _icon.icns_
```
display dialog "My custom icon " buttons {"Cancel", "Continue"} default button "Continue" with icon file "Contents:Resources:icon.icns"
```
```
set x to ((path to me as text) & "Contents:Resources:myicon.icn­s") as alias
display dialog "your text here" with icon x
```
@danijeljw
danijeljw / MacProtector.sh
Created October 30, 2013 08:33
MacDefender Removal Tool in Shell Script
#!/bin/sh
# MacProtector Removal Tool (Super-Simple) 1.0 - http://www.icrontic.com/
# (C) 2011 All Rights Reserved, Phillip R. Jaenke (phil@icrontic.com)
#
# LICENSE IS AS FOLLOWS:
# - This software is completely free to use or redistribute for personal use,
# HOWEVER:
# -- It must retain the above copyright notice and reference to Icrontic!
# - This software is completely free to use or redistribute for commercial use,
# HOWEVER:
tell application "System Events"
-- Careful of things we DON'T want to remove...
get the name of every login item
-- Check for both.
if login item "MacProtector" exists then
delete login item "MacProtector"
display dialog "Removed MacProtector from Login Items."
else
display dialog "No MacProtector infection found."
end if
@danijeljw
danijeljw / dock3d2d.sh
Created November 18, 2013 04:47
Bash script to change the Dock from 2D to 3D and vice-versa. Works in OS X 10.8.x and below.
#!/bin/bash
dock2d3d=$(defaults read com.apple.dock | grep "no-glass")
if [ $dock2d3d == "\"no=glass\" = 0;" ]
then
defaults write com.apple.dock no-glass -boolean YES && killall Dock
else
defaults write com.apple.dock no-glass -boolean NO && killall Dock
fi