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
$videoFileBaseNames = ls *.mkv | % { $_.BaseName } # adjust file as necessary | |
foreach ($baseName in $videoFileBaseNames) | |
{ | |
$episode = $baseName.Split()[3] # adjust parsing of episode as necessary | |
$subfile = (ls *$episode*.srt)[0] | |
mv "$subfile" "$baseName.srt" | |
} |
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
#Requires AutoHotkey v2.0 | |
#SingleInstance | |
Volume_Up:: | |
{ | |
audio_device := SoundGetName() | |
If InStr(audio_device, "LG TV SSCR2") | |
Run "lgtv --name MyTV --ssl volumeUp", , "Hide" | |
Else |
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
#Requires AutoHotkey v2.0 | |
#SingleInstance | |
#HotIf GetKeyState("CapsLock") | |
{ | |
1:: | |
{ | |
RunWait "lgtv --name MyTV --ssl setInput HDMI_3", , "Hide" | |
ToggleCapsLock() | |
} |
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
local lgtv_path = "~/opt/lgtv/bin/lgtv" -- Full path to lgtv executable | |
local tv_name = "MyTV" -- Name of your TV, set when you run `lgtv auth` | |
local lgtv_cmd = lgtv_path.." --name "..tv_name | |
local my_input = "HDMI_3" | |
local other_input = "HDMI_4" | |
function get_command(command) | |
command = lgtv_cmd.. " " ..command.. " --ssl" | |
return command |
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
#Put this in Export-Chocolatey.ps1 file and run it: | |
#.\Export-Chocolatey.ps1 > packages.config | |
#You can install the packages using | |
#choco install packages.config -y | |
Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>" | |
Write-Output "<packages>" | |
choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" } | |
Write-Output "</packages>" |
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
# Client Bridged / Client Mode / RelayD and IGMPProxy (It works) | |
# RelayD is to redirect packages and IGMP is for redirect IGMP packages | |
# Our network is 192.168.1.0/24 | |
# Steps: | |
# Configure WAN as static | |
# We should edit our wan iface and put static IP | |
uci set network.wan='interface' | |
uci set network.wan.proto='static' | |
uci set network.wan.ipaddr='192.168.1.239' # Main Network IP |
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
####################################################### | |
## | |
## Wake.ps1, v1.0, 2013 | |
## | |
## Adapted by Ammaar Limbada | |
## Original Author: Matthijs ten Seldam, Microsoft (see: http://blogs.technet.com/matthts) | |
## | |
####################################################### | |
<# |
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
lgtv --name MyTV --ssl startApp com.webos.app.homeconnect && sleep 4 && \ | |
lgtv --name MyTV --ssl sendButton up up right enter && sleep 2 && \ | |
lgtv --name MyTV --ssl sendButton enter && sleep 2 && \ | |
lgtv --name MyTV --ssl sendButton down down down left enter && sleep 2 && \ # number of `down`s here depends on the input ID; in this case I'm configuring HDMI 3 | |
lgtv --name MyTV --ssl sendButton down down down down down down down down down enter && sleep 2 && \ | |
lgtv --name MyTV --ssl sendButton up up up right enter && sleep 2 && \ # as noted above, number of `up`s here depends on input ID | |
lgtv --name MyTV --ssl sendButton exit |
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
find . -type d -name $dir -prune -o -name '$file' -execdir pwd \; | |
# Example: find . -type d -name node_modules -prune -o -name 'package.json' -execdir npm install \; |
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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Style | |
x:Key="ButtonFocusVisual"> | |
<Setter | |
Property="Control.Template"> | |
<Setter.Value> | |
<ControlTemplate> | |
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2" /> | |
</ControlTemplate> |
NewerOlder