Skip to content

Instantly share code, notes, and snippets.

@kpietralik
kpietralik / Boxstarter.txt
Last active January 7, 2020 22:09
Boxstarter and Chocolatey Script
#### Boxstarter and Chocolatey
## Restore AppData before running
## RUN AS ADMIN!
## choco install - install
## choco upgrade - install or upgrade
## cinst - install
## cinstm - install or upgrade
## Cmd run with reboot START http://boxstarter.org/package/url?C:\boxstarter.txt
## Cmd run without reboot START http://boxstarter.org/package/nr/url?C:\boxstarter.txt
## START http://boxstarter.org/package/url?https://gist.githubusercontent.com/Quass1m/8e690015146a064cac47578f0e0ef835/raw/084d6e12c1c908d125e7459e3188c080ac7cf83f/Boxstarter.txt
@kpietralik
kpietralik / Boxstarter_Toolbar.txt
Last active March 31, 2018 16:41
Boxstarter - Toolbar
# Taskbar items
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Google\Chrome\Application\chrome.exe"
Install-ChocolateyShortcut `
-ShortcutFilePath "C:\Users\Admin\Desktop\Notepad++.lnk" `
-TargetPath "C:\Program Files\Notepad++\notepad++.exe" `
-WindowStyle 3 `
-RunAsAdmin `
-PinToTaskbar
@kpietralik
kpietralik / himawari.ps1
Created July 9, 2017 18:38 — forked from jbolster/himawari.ps1
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
@kpietralik
kpietralik / logstash.conf
Created January 13, 2018 16:26
Logstash configuration file for ingesting Stack Exchange events data from Kafka topic to Elasticsearch index
input {
kafka {
bootstrap_servers => "KAFKA_ADDRESS_AND_PORT"
group_id => "logstash"
topics => ["posts"]
codec => "json"
type => "posts"
consumer_threads => 2
}
}
@kpietralik
kpietralik / temp.sh
Created April 25, 2018 22:33
Linux temperature
#! /bin/sh
echo "CPU temp :"
sysctl -a |egrep -E "cpu\.[0-9]+\.temp"
echo
echo "HDD temp :"
for i in $(sysctl -n kern.disks)
do
DevTemp=`smartctl -a /dev/$i | awk '/Temperature_Celsius/{print $0}' | awk '{print $10 "C"}'`
DevSerNum=`smartctl -a /dev/$i | awk '/Serial Number:/{print $0}' | awk '{print $3}'`
DevName=`smartctl -a /dev/$i | awk '/Device Model:/{print $0}' | awk '{print $3}'`
@kpietralik
kpietralik / temp.out
Created April 25, 2018 22:33
Linux temperature - out
CPU temp :
dev.cpu.3.temperature: 72.0C
dev.cpu.2.temperature: 72.0C
dev.cpu.1.temperature: 64.0C
dev.cpu.0.temperature: 64.0C
HDD temp :
ada4 41C ZA501S76 ST3000DM001-1ER166
ada3 42C 857ASPVGS TOSHIBA
ada2 38C WD-WCC4N1DDXX47 WDC
#! /bin/sh
echo "--- Start"
timestamp() {
date +"%T"
}
timestamp
timestamp2=$(date +%s)
echo $timestamp2
#### Boxstarter and Chocolatey
## Restore AppData before running
## RUN AS ADMIN!
## choco install - install
## choco upgrade - install or upgrade
## cinst - install
## cinstm - install or upgrade
## Cmd run with reboot START http://boxstarter.org/package/url?C:\Boxstarter.ps1
## Cmd run without reboot START http://boxstarter.org/package/nr/url?C:\Boxstarter.ps1
## START http://boxstarter.org/package/url?https://gist.githubusercontent.com/Quass1m/00baa565a774c4f3b9a2e35feefe700c/raw/
@kpietralik
kpietralik / mesh_rp.linux.json
Last active July 17, 2018 21:01
Service Fabric Mesh - Minecraft
{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"metadata": {
"description": "Location of the resources."
}
}
# Re-set git url's using new name
$remoteName = "origin"
$oldName = "AAA"
$newName = "BBB"
$folders = Get-ChildItem -Directory
$renamedCount = 0
$reposCount = 0