This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PID=$(pgrep gnome-session | tail -n1) | |
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ | tr '\0' '\n' |cut -d= -f2-) | |
current_image=$(gsettings get org.gnome.desktop.background picture-uri | xargs echo) | |
if [ "$1" == "echo" ]; then | |
echo $current_image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.ecspresso</groupId> | |
<artifactId>${appName}</artifactId> | |
<version>${version}</version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.ImageIcon; | |
public class ImageHandler { | |
/** | |
* Returns an ImageIcon, or null if the path was invalid. | |
* https://docs.oracle.com/javase/tutorial/uiswing/components/icon.html | |
* @param path Path to image file. | |
* @return A new ImageIcon | |
*/ | |
protected static ImageIcon createImageIcon(String path) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
F12::ToggleTerminal() | |
ShowAndPositionTerminal() | |
{ | |
WinShow ahk_class CASCADIA_HOSTING_WINDOW_CLASS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[System.Security.Principal.NTAccount]::new($(whoami.exe)).Translate([System.Security.Principal.SecurityIdentifier]).Value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$updateurl = 'https://firebasestorage.googleapis.com/v0/b/rookiestyle-43398.appspot.com/o/versioninfo.txt?alt=media&token=89da60c0-f331-4334-94bb-0dccf617818f' | |
$iwr = (New-Object System.Net.WebClient).DownloadString($updateurl) | |
$version = ($iwr.split() | Select-String '^KeePassOTP') -replace 'KeePassOTP:','' | |
if(-not (Test-Path -Path 'HKCU:\Software\keepass')) { | |
New-Item -Path 'HKCU:\Software\keepass' -ItemType Directory | |
} | |
try { | |
$keepassotp = (Get-ItemProperty -Path 'HKCU:\Software\keepass\' -Name 'keepassotp' -ErrorAction Stop).keepassotp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Format-KeePass { | |
param( | |
[Parameter(Mandatory=$true, ValueFromPipeLine=$true)] | |
[String]$update_information | |
) | |
# Split data on new line | |
$split = $update_information.split() | |
# Save delimiter | |
$delimiter = $split[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Join-Array { | |
param ( | |
[int]$ItemsPerLine, | |
[string]$separator, | |
[string[]]$array | |
) | |
for($i = 0; $i -lt $array.length; $i = $i + $ItemsPerLine) { | |
$array[$i..($i + $ItemsPerLine)] -join $separator | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyautogui | |
# valuta = 154, 636 # jewellersOrb | |
# valuta = 216, 637 # fusing | |
# valuta = 736, 338 # gemcutter | |
valuta = 591, 329 # arm, eq | |
# valuta = 495, 332 # black, vapen | |
item = 453, 671 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$path = "$PSScriptRoot\drscripto_LastSeen.txt" | |
$apikey = '' # Secure String | |
if(-not (Test-Path -Path $path)) { | |
$null | Out-File $path | |
} | |
$latest = Get-Content $path | |
$rss = Invoke-RestMethod -Uri 'https://blogs.technet.microsoft.com/heyscriptingguy/feed/' | Select-Object -First 1 |
NewerOlder