# Unbound is a validating, recursive, and caching DNS resolver. | |
https://wiki.archlinux.org/index.php/Unbound | |
# install unbound, expat | |
sudo pacman -Syy --noconfirm unbound expat ldns bind-tools | |
# setup etckeeper | |
sudo pacman -Syy --noconfirm etckeeper | |
git config --global user.email "me@armory" | |
git config --global user.name "Me Myself and I" |
https://stackoverflow.com/a/18003462/348146
None of these suggestions worked for me, because Android was appending a sequence number to the package name to produce the final APK file name (this may vary with the version of Android OS). The following sequence of commands is what worked for me on a non-rooted device:
Determine the package name of the app, e.g.
com.example.someapp
. Skip this step if you already know the package name.
adb shell pm list packages
Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.
https://stackoverflow.com/a/18003462/348146
None of these suggestions worked for me, because Android was appending a sequence number to the package name to produce the final APK file name (this may vary with the version of Android OS). The following sequence of commands is what worked for me on a non-rooted device:
Determine the package name of the app, e.g.
com.example.someapp
. Skip this step if you already know the package name.
adb shell pm list packages
Look through the list of package names and try to find a match between the app in question and the package name. This is usually easy, but note that the package name can be completely unrelated to the app name. If you can't recognize the app from the list of package names, try finding the app in Google Play using a browser. The URL for an app in Google Play contains the package name.
import re | |
import urlparse | |
def linky(url): | |
"""Sanitize link. clean utm parameters on link.""" | |
if not re.match(r'^https?:\/\/', url): | |
url = 'http://%s' % url | |
rv = urlparse.urlparse(url) |
I find the ability to get my android devices' battery info on my desktops via cli to be extremely convenient. I used to be able to this with KDE Connect easily, but things have just changed. Since I can't find any documentation on how to do this, and since I just stumbled on the answer myself, I though I might share what I know here. Please note that in the examples below, I will be using {device-id}
as a placeholder for the string that KDE Connect uses to identify to my devices.
That said, I used to be able to get my various devices' battery status through gdbus through the following:
gdbus call --session --dest org.kde.kdeconnect --object-path /modules/kdeconnect/devices/{device-id} --method org.kde.kdeconnect.device.battery.charge
However on Arch, I now get the following error: Error: GDBus.Error:org.freedesktop.DBus.Error.UnknownInterface: No such interface 'org.kde.kdeconnect.device.battery' at object path '/modules/kdeconnect/devices/b04294f19e8767f5'
. I don't get this message on Ubuntu 2
<?php | |
//How to use it | |
//Just call timthumb.php with appropriate arguments, For example: | |
<img src="/script/timthumb.php?src=/some/path/myimage.png&w=100&h=80" alt="resized image" /> | |
/* http://viralpatel.net/blogs/resize-image-dynamically-php/ */ | |
?> |
You need to run Chrome with two command line flags:
--disable-web-security --user-data-dir
These are kind of documented here: https://peter.sh/experiments/chromium-command-line-switches/
--disable-web-security
is the one that turns off the same-origin policy (the name is scarier than the action). Although the docs don't say this, this flag is ignored unless you also specify --user-data-dir
. That's because --disable-web-security
can be super risky so you shouldn't be surfing in that mode all the time, so Chrome requires you to use an alternative user profile, specified with --user-data-dir
. However, you can get away with just giving --user-data-dir
and not specifying a dir, and it will use the default one (so you get all your bookmarks, cookies, extension, etc. but --disable-web-security
will still feel that honour has been satisfied and tuirn off same-origin policy.