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 / AlbumRatingReset.scpt
Created December 3, 2015 05:07 — forked from dhiraj/AlbumRatingReset.scpt
This AppleScript may allow you to remove or set the album rating on one or more of your tracks to a value you decide. If you use Smart Playlists based on the track rating field, this may be *the* AppleScript you were looking for. If not, then consider moving on, this is probably not what you were looking for. I've modified the script in this fil…
(*
"Album Rating Reset" for iTunes
written by Doug Adams
dougadams@mac.com
v1.0 sept 6 2007
-- initial release
v2.0 mar 6 2013
updated by Dhiraj Gupta (http://www.dhirajgupta.com)
@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 ""
@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 / 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
Aujourd'hui, certes, nous ne voyons que d'une manière indirecte, comme dans un miroir. Alors, nous verrons directement. Dans le temps présent, je connais d'une manière partielle, mais alors je connaîtrai comme vous me connaît.
En somme, trois choses demeurent: la foi, l'espérance et l'amour, mais la plus grande d'entre elles, c'est l'amour.
#!/usr/bin/env bash
# Kick off with sudo request
sudo -v
# Keep-alive: update existing sudo time stamp if set, otherwise do nothing.
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Kill sudo when done, no password required:
sudo -k