Skip to content

Instantly share code, notes, and snippets.

# Retrieves all packages present on the device as .apk files
# Useful for application backup for a device that is not anymore supported in Google Play Store
.\adb shell pm list packages |% {if($_){$_; $a=$(.\adb shell pm path $_.Substring(8)); $b=$a[0].Substring(8); .\adb pull $b; }}
#include <AutoItConstants.au3>
#include <MsgBoxConstants.au3>
; Press Esc to terminate script, Pause/Break to "pause"
Global $g_bPaused = False
Global $m_pos
HotKeySet("{PAUSE}", "HotKeyPressed")
HotKeySet("{ESC}", "HotKeyPressed")
@malpka
malpka / cmd-skip-parameters.bat
Created June 4, 2020 06:02
Skipping call arguments, when they are ending with specified string
@echo off
SETLOCAL EnableDelayedExpansion
rem SETLOCAL ENABLEEXTENSIONS
set args=%1
shift
:start
if [%1] == [] goto done
if [%1] == [-i] (
set test_var=%2
echo %test_var%
@malpka
malpka / cmd-skip-parameters.bat
Created June 4, 2020 06:02
Skipping call arguments, when they are ending with specified string
@echo off
SETLOCAL EnableDelayedExpansion
rem SETLOCAL ENABLEEXTENSIONS
set args=%1
shift
:start
if [%1] == [] goto done
if [%1] == [-i] (
set test_var=%2
echo %test_var%
@malpka
malpka / jogger2octopress.py
Last active January 2, 2016 07:59
Skrypt konwertujący XML z danymi wpisów wyeksportowanymi z panelu administracyjnego Joggera na pliki .markdown gotowe do katalogu postów w Octopresie
import re
from xml.dom import minidom
from html.parser import HTMLParser
XMLFILENAME = 'jogger_eksport.xml'
def createFileName(date, permalink, subject):
"""Data wymagana, w formacie YYYY-mm-dd"""
fileName = date[:10] + '-'
if permalink != None: