Skip to content

Instantly share code, notes, and snippets.

@tvjames
tvjames / Vagrantfile
Last active August 11, 2022 14:27
Prepare a Windows Server 2008 R2 instance for use with vagrant-windows.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@emad-elsaid
emad-elsaid / gtk2_live_wallpaper_from_reddit.rb
Created May 12, 2014 18:34
Auto change wallpaper on linux from reddit this script will get a new image from reddit every period and write it to an ixisting image on you Hard drive, if you set this image as your wallpaper you will have a constantly changing desktop wallpaper from the amazing subreddit called EarthPorn, they post grazy beautiful images of our mother earth. …
#!/usr/bin/env ruby
# Author : Emad Elsaid (https://github.com/blazeeboy)
#
# autochanging wallpaper from reddit images
# you have to point the script to your existing
# file you set it as a wallpaper and it will override
# it with a new image every 5 minutes.
#
# this script works on centos 6 with GNOME/GTK2 interface
require 'open-uri' # we'll need to download image with that
Function WSUSUpdate {
$Criteria = "IsInstalled=0 and Type='Software'"
$Searcher = New-Object -ComObject Microsoft.Update.Searcher
try {
$SearchResult = $Searcher.Search($Criteria).Updates
if ($SearchResult.Count -eq 0) {
Write-Output "There are no applicable updates."
exit
}
else {
@mweisel
mweisel / Get-DiskFree.ps1
Last active December 6, 2023 00:39
PowerShell advanced function (script cmdlet) to query, retrieve, and display local drive/disk information. (https://binarynature.blogspot.com/2010/04/powershell-version-of-df-command.html)
function Get-DiskFree
{
[CmdletBinding()]
param
(
[Parameter(Position=0,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
[Alias('hostname')]
[Alias('cn')]
@psignoret
psignoret / Get-AzureADPSPermissions.ps1
Last active July 18, 2024 14:26
Script to list all delegated permissions and application permissions in Microsoft Entra ID
# THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF
# FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
#Requires -Modules @{ ModuleName="Microsoft.Graph.Authentication" ; ModuleVersion="2.15.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.DirectoryObjects"; ModuleVersion="2.15.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.Identity.SignIns"; ModuleVersion="2.15.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.Applications" ; ModuleVersion="2.15.0" }
#Requires -Modules @{ ModuleName="Microsoft.Graph.Users" ; ModuleVersion="2.15.0" }
<#
@mgeitz
mgeitz / project1999.sh
Last active March 30, 2024 00:58
Linux Project 1999 Launch Manager
#! /bin/bash
#
# Linux Project 1999 Launch Manager
# * Manage logs
# * Launch eqemu-login-helper
# * Launch Project 1999
# * Cleanup
# Dependecies: