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 / Backup server installations.md
Last active August 31, 2015 07:34
Ubuntu: Backup server installations #Ubuntu #Markdown

Introduction

This article shows a list of the most important files and folders of your VPC installations, you definitely should backup. It assumes you'll run a daily backup for this ressources.

Requirements

@janikvonrotz
janikvonrotz / Increase Max Memory for php5-fpm website.md
Last active August 29, 2015 14:06
Ubuntu: Increase Max Memory for php5-fpm website #PHP #Nginx #Markdown

Introduction

In some cases the default memory allocation for php is not enough to run an application properly.

Requirements

  • Ubuntu server
  • Nginx
  • php5-fpm
  • Nginx minimal website
@janikvonrotz
janikvonrotz / Change-DataPathCryptoWallets.ps1
Last active August 29, 2015 14:01
Change data path for crypto wallets #PowerShell #Cryptocurrenc
New-Hardlink -LiteralPath (Get-Path "%APPDATA%\Litecoin\wallet.dat") -TargetPath "H:\SkyDrive\Shared\Data\Litecoin\wallet.dat"
New-Hardlink -LiteralPath (Get-Path "%APPDATA%\PPcoin\wallet.dat") -TargetPath "H:\SkyDrive\Shared\Data\PPcoin\wallet.dat"
New-Hardlink -LiteralPath (Get-Path "%APPDATA%\Bitcoin\wallet.dat") -TargetPath "H:\SkyDrive\Shared\Data\Bitcoin\wallet.dat"
Remove-Item -Path (Get-Path "%APPDATA%\Dogecoin\wallet.dat")
New-Hardlink -LiteralPath (Get-Path "%APPDATA%\Dogecoin\wallet.dat") -TargetPath "C:\OneDrive\Shared\Data\Dogecoin Core\wallet.dat"
@janikvonrotz
janikvonrotz / Rename-SelectedADGroups.ps1
Created May 8, 2014 09:28
PowerShell: Renaming Multiple Active Directory Groups #ActiveDirectory #PowerShell
Import-Module ActiveDirectory
Get-ADGroup -Filter * -SearchBase "OU=Intranet,OU=SharePoint,OU=Services,OU=vblusers2,DC=vbl,DC=ch" | ForEach-Object{
if($_.Name.EndsWith("#Edit")){
# rename
$_ | Rename-ADObject -NewName ($_.Name -replace "#Edit", "#Contribute") -Verbose
}
@janikvonrotz
janikvonrotz / Mining Hardware.md
Created May 7, 2014 10:43
DogeCoin Mining Hardware #Bitcoin

Hardware

GPU

Cgminer is the simplest and most effective miner to use. That's why you should buy a AMD GPU.

MSI Computer Corp. Video Graphics Card R9 270 GAMING 2G
This is a good GPU with an average performance. A good thing to start.
Amazon $184
Digitec 186.–

@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 / Default system variables.md
Last active April 3, 2023 07:11
Windows: Default system variables #Windows
@janikvonrotz
janikvonrotz / Preventing form spam with honeytrap.php
Created April 28, 2014 06:28
Preventing form spam with honeytrap #PHP
<?php //post the form fields from below
$name = $_POST['name'];
$machine = $_POST['machine'];
if ($machine != "")
{
exit(); //if a spambot filled out the "machine"
//field, we don't proceed
}
else
{
@janikvonrotz
janikvonrotz / Install Varnish.md
Created April 25, 2014 09:09
Ubuntu: Install Varnish #Varnish
@janikvonrotz
janikvonrotz / Install Ruby And RubyGems from source.md
Created April 23, 2014 13:34
Ubuntu: Install Ruby and RubyGems with RVM #Ruby #RubyGems

First let's see which is latest relase of ruby.

Download Ruby from the offical ftp server where [version] has to replaced with the latest release.

cd /usr/local/src
sudo wget http://ftp.ruby-lang.org/pub/ruby/ruby-[version].tar.gz

Untar the downloaded package.

sudo tar -xzvf ruby-[version].tar.gz