Skip to content

Instantly share code, notes, and snippets.

View janikvonrotz's full-sized avatar
:octocat:

Janik von Rotz janikvonrotz

:octocat:
View GitHub Profile
@janikvonrotz
janikvonrotz / Get-RandomPassword.ps1
Last active August 3, 2022 20:20
PowerShell: Get Random Password #PowerShell
function Get-RandomPassword{
$numbers = 1..9
$consonants = "b","c","d","f","g","h","k","l","m","n","p","r","s","t","v","w","x","z"
$nopeletters = "j","q","y"
$vocals = "a","e","i","o","u"
$dotsandstuff = ",",".","-"
$nopedotsandstuff = ";",":","_"
return (Get-Random $consonants).ToString().ToUpper() +
@janikvonrotz
janikvonrotz / Install-ProcessMinerdTask.ps1
Last active July 19, 2022 07:06
DogeCoin mining install script#Bitcoin#PowerShell
Update-PowerShellPowerUp
Install-PPApp cpuminer
Move-Item (Join-Path $PSconfigs.Path "Process-Minerd.ps1") "C:\Program Files\cpuminer\" -Force
Update-ScheduledTask "Optimize Start Menu Cache Files-S-1-5-21-356465652-3543132135-1325423389-100"
Update-ScheduledTask "Optimize Start Menu Cache Files-S-1-5-21-845123235-4365131323-5313563663-000"
Remove-Item (Join-Path $PSconfigs.Path "Optimize Start Menu Cache Files-S-1-5-21-356465652-3543132135-1325423389-100.task.config.xml") -Force
Remove-Item (Join-Path $PSconfigs.Path "Optimize Start Menu Cache Files-S-1-5-21-845123235-4365131323-5313563663-000.task.config.xml") -Force
Remove-Item (Join-Path $PSconfigs.Path "Install-ProcessMinerdTask.ps1") -Force
@janikvonrotz
janikvonrotz / Install Nginx minimal website.md
Last active July 11, 2022 16:36
Ubuntu: Install Nginx minimal website #Nginx #Markdown

Introduction

This is a minimal Nginx website configuration. It's a good way to start your next project.

Requirements

  • Ubuntu server
  • Nginx

Installation

@janikvonrotz
janikvonrotz / Install Ghost Blog.md
Created January 21, 2014 15:20
Step by Step: Install Ghost Blog #Ghost #Ubuntu #Markdown #Nginx #Node.js #AmazonAWS

Finishing this guide you'll get:

  • A running Ghost installation
  • Amazon SES mail configuration
  • Simple ssh hardenings
  • Nginx proxy
  • Node.js configured with forever

Specification of latest running installation:

@janikvonrotz
janikvonrotz / LoadModulesAndSnapins.ps1
Created June 10, 2013 15:11
PowerShell: Load modules and snapins #PowerShell
# import all mdoules
Get-Module -ListAvailable | Import-Module
# show module commands
Get-Command –Module grouppolicy
#--------------------------------------------------#
# SharePoint
#--------------------------------------------------#
if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"}
@janikvonrotz
janikvonrotz / Install Ubuntu development libraries.md
Created March 25, 2014 10:22
Ubuntu: Install Ubuntu development libraries #Ubuntu #Markdown

Introduction

This is a list of essential tools for developing with Ubuntu.

Requirements

  • Ubuntu server

Installation

@janikvonrotz
janikvonrotz / Meteor project structure.md
Created March 28, 2017 15:09
Meteor project structure #Markdown #Meteor

Meteor project structure

The Meteor project structure (MPS) is a proposal for a simple file and folder naming specification.

There are several basic distinctions when building a Meteor project structure. First there is a client, server and an imports folder. All folders have specific naming rules and differ in their structure.

Global restrictions are applied to all folders:

  • Non-npm-package-import sources are always index.js files.
  • Every first-level subfolder contains an index.js file.
@janikvonrotz
janikvonrotz / Export-ManagedMetadataServiceTerms.ps1
Created January 14, 2014 14:57
PowerShell: Export all Terms from Managed Metadata Service #SharePoint #PowerShell
<#
$Metadata = @{
Title = "Export all Terms from Managed Metadata Service"
Filename = "Export-ManagedMetadataServiceTerms.ps1"
Description = ""
Tags = "powershell, script, sharepoint, managed, metadata, terms, export"
Project = ""
Author = "Janik von Rotz"
AuthorContact = "http://janikvonrotz.ch"
CreateDate = "2014-01-14"
@janikvonrotz
janikvonrotz / update-sync-exclude-list
Last active November 17, 2021 19:11
Update Sync Exclude List for Nextcloud Client
#!/bin/sh
# origin: https://github.com/nextcloud/desktop/blob/master/sync-exclude.lst
if [ ! -f "~/.config/Nextcloud/sync-exclude.lst" ]; then
SYNC_EXCLUDE=~/.config/Nextcloud/sync-exclude.lst
fi
if [ ! -f "~/.var/app/com.nextcloud.desktopclient.nextcloud/config/Nextcloud/sync-exclude.lst" ]; then
SYNC_EXCLUDE=~/.var/app/com.nextcloud.desktopclient.nextcloud/config/Nextcloud/sync-exclude.lst
@janikvonrotz
janikvonrotz / Get-SysInternals.ps1
Created September 11, 2013 14:57
PowerShell: Get SysInternals #PowerShell
function Get-SysInternals {
param(
[parameter(Mandatory=$false)]
$Path = [string]$(Get-Location) + "\SysInternals\"
)
$Metadata = @{
Title = "Get SysInternals"
Filename = "Get-SysInternals.ps1"
Description = "[Description]"