Skip to content

Instantly share code, notes, and snippets.

View josy1024's full-sized avatar

josef lahmer josy1024

View GitHub Profile
@anthonyeden
anthonyeden / FontInstallation.ps1
Last active April 11, 2024 03:35
Font User Installation - Powershell (No Admin Password Needed)
# Run this as a Computer Startup script to allow installing fonts from C:\InstallFont\
# Based on http://www.edugeek.net/forums/windows-7/123187-installation-fonts-without-admin-rights-2.html
# Run this as a Computer Startup Script in Group Policy
# Full details on my website - https://mediarealm.com.au/articles/windows-font-install-no-password-powershell/
$SourceDir = "C:\InstallFont\"
$Source = "C:\InstallFont\*"
$Destination = (New-Object -ComObject Shell.Application).Namespace(0x14)
$TempFolder = "C:\Windows\Temp\Fonts"
@josy1024
josy1024 / flipflop-mouse-scrolling.ps1
Last active November 11, 2022 07:28
natural maus scrolling (flipflop mouse wheel scrolling)
# author: josef lahmer
# http://josy1024.blogspot.co.at/2013/11/touch-scrolling-for-windows-reverse.html
# natural scrolling
# natürliche scroll-richtung für die maus
#setup:
# @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/josy1024/f2cca5e49ec60ae7ed3c514bb2159051/raw/d66997f73296f7f66fc027e940d84dbcf0f86f73/flipflop-mouse-scrolling.ps1'))"
Get-ChildItem HKLM:\SYSTEM\CurrentControlSet\Enum\HID\ -recurse -ErrorAction SilentlyContinue |
Get-ItemProperty |
@asadrefai
asadrefai / LargeFileUpload.ps1
Last active December 19, 2022 17:53
Large file upload in SharePoint Online with CSOM PowerShell
Try{
Add-Type -Path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll'
Add-Type -Path 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll'
}
catch {
Write-Host $_.Exception.Message
Write-Host "No further parts of the migration will be completed"
}
Function UploadFileInSlice ($ctx, $libraryName, $fileName, $fileChunkSizeInMB) {
@ctigeek
ctigeek / PowershellAes.ps1
Last active March 25, 2024 23:16
Aes Encryption using powershell.
function Create-AesManagedObject($key, $IV) {
$aesManaged = New-Object "System.Security.Cryptography.AesManaged"
$aesManaged.Mode = [System.Security.Cryptography.CipherMode]::CBC
$aesManaged.Padding = [System.Security.Cryptography.PaddingMode]::Zeros
$aesManaged.BlockSize = 128
$aesManaged.KeySize = 256
if ($IV) {
if ($IV.getType().Name -eq "String") {
$aesManaged.IV = [System.Convert]::FromBase64String($IV)
}
@netmarkjp
netmarkjp / install_otrs_on_centos7.md
Last active June 21, 2016 13:56
Install OTRS 4.0.7, Apache, MariaDB on CentOS7
@jmiserez
jmiserez / export_google_music.js
Last active December 20, 2023 01:45
(fixed/updated 2016-05-10) Export your Google Music Library and Playlists (Google Play Music All Access) (see http://webapps.stackexchange.com/questions/50311/print-playlist-from-google-play-music for more)
// Copyright 2016 Jeremie Miserez <jeremie@miserez.org>
//
// MIT License
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF O
@pierresetteskog
pierresetteskog / SearchAllTables
Created February 4, 2015 09:02
SearchAllTables
CREATE PROC [dbo].[SearchAllTables]
(
@SearchStr nvarchar(100),@ColName nvarchar(128)=NULL
)
AS
BEGIN
-- Copyright © 2002 Narayana Vyas Kondreddi. All rights reserved.
-- Purpose: To search all columns of all tables for a given search string
@matt448
matt448 / slack_nagios.sh
Last active February 13, 2023 15:38
Script to post Nagios notifications into a Slack channel
#!/bin/bash
# This script is used by Nagios to post alerts into a Slack channel
# using the Incoming WebHooks integration. Create the channel, botname
# and integration first and then add this notification script in your
# Nagios configuration.
#
# All variables that start with NAGIOS_ are provided by Nagios as
# environment variables when an notification is generated.
# A list of the env variables is available here:
@fleeting
fleeting / simpleWeather.usage.js
Created October 30, 2012 20:57
Full usage example for simpleWeather.js
// Docs at http://simpleweather.monkeecreate.com
$.simpleWeather({
zipcode: '76309',
woeid: '',
location: '',
unit: 'f',
success: function(weather) {
html = '<h2>'+weather.city+', '+weather.region+' '+weather.country+'</h2>';
html += '<p><strong>Today\'s High</strong>: '+weather.high+'&deg; '+weather.units.temp+' - <strong>Today\'s Low</strong>: '+weather.low+'&deg; '+weather.units.temp+'</p>';
html += '<p><strong>Current Temp</strong>: '+weather.temp+'&deg; '+weather.units.temp+' ('+weather.tempAlt+'&deg; C)</p>';