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/sh | |
if [ -z $HGL_BOTTLE_NAME ]; then | |
echo "NO HGL_BOTTLE_NAME?" | |
exit 1 | |
fi | |
if [ $# -eq 0 ]; then | |
echo "NO EXE?" | |
exit 1 |
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 | |
# VS Code updater | |
# get installed version | |
installed=$($HOME/bin/VSCode-linux-x64/bin/code -v 2>/dev/null | head -n 1) | |
# get latest release from Github | |
latest=$(curl -s https://github.com/Microsoft/vscode/releases/latest | grep -Po 'tag/\K[0-9\.]*') | |
if [ "$installed" == "$latest" ] |
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 locale | |
import struct | |
def __readLink(path): | |
# http://stackoverflow.com/a/28952464/1119602 | |
with open(path, 'rb') as stream: | |
content = stream.read() | |
# skip first 20 bytes (HeaderSize and LinkCLSID) | |
# read the LinkFlags structure (4 bytes) | |
lflags = struct.unpack('I', content[0x14:0x18])[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
import sys | |
from gi.repository import Granite | |
from gi.repository import Gtk | |
from gi.repository import Gio | |
class LightWindow(Gtk.Dialog): | |
def __init__(self): | |
super(LightWindow, self).__init__() |