Skip to content

Instantly share code, notes, and snippets.

@BohdanLevchenko
BohdanLevchenko / GraphController.java
Created June 16, 2020 18:21 — forked from khill/GraphController.java
Example of a Spring MVC Controller which Displays a Graph from JFreeChart
package org.khill.dashboard.controller;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.awt.Color;
@BohdanLevchenko
BohdanLevchenko / Win10-DisableLockScreen.ps1
Created September 11, 2016 12:57 — forked from NickCraver/Win10-DisableLockScreen.ps1
Disable the lock screen (the one before the password prompt) in Windows 10 for faster login and not dropping the first password character.
# Disable the Lock Screen (the one before password prompt - to prevent dropping the first character)
If (-Not (Test-Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization)) {
New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows -Name Personalization | Out-Null
}
Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization -Name NoLockScreen -Type DWord -Value 1 -Force
@BohdanLevchenko
BohdanLevchenko / Windows10-Setup.ps1
Created September 11, 2016 12:56 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@BohdanLevchenko
BohdanLevchenko / _new.md
Last active August 29, 2015 14:15 — forked from timyates/_new.md
@BohdanLevchenko
BohdanLevchenko / _new.md
Last active August 29, 2015 14:15 — forked from timyates/_new.md
@Grab( 'org.apache.poi:poi:3.9' )
import static org.apache.poi.ss.usermodel.CellStyle.*
import static org.apache.poi.ss.usermodel.IndexedColors.*
import org.apache.poi.hssf.usermodel.HSSFWorkbook
new HSSFWorkbook().with { workbook ->
def styles = [ LIGHT_BLUE, LIGHT_GREEN, LIGHT_ORANGE ].collect { color ->
createCellStyle().with { style ->
fillForegroundColor = color.index
fillPattern = SOLID_FOREGROUND