View wget
#!/bin/bash
#Spider Websites with Wget – 20 Practical Examples
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute.
1. Download a single file from the Internet
wget http://example.com/file.iso
2. Download a file but save it locally under a different name
View install_debug_android_kivy.sh
VERBOSITY = 1
# Change Package name to suit that
PACKAGE_NAME=org.kivy.launcher
echo $PACKAGE_NAME
echo "Loading the app onto to the debug mode device."
adb install -r $PACKAGE_NAME-debug.apk
View raspberry_pi_car.py
import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False) # enable warning from GPIO
GPIO.setmode(GPIO.BCM) # GPIO numbering
class RasPiRCCar():
def __init__(self, motor_dir_pin, motor_pwm_pin, steering_pwm_pin, debug=False):
self.debug = debug
if self.debug:
View build_debug_android_kivy.sh
VERBOSITY = 1
# Change Package name to suit that
PACKAGE_NAME=org.test.kivytestapp
echo $PACKAGE_NAME
echo "Building the android app in debug mode."
buildozer -v android debug
echo "Loading the app onto to the debug mode device."
View kivygtk.kv
#:kivy 1.8.0
<Root>:
orientation: "vertical"
Button:
text: "Start GTK thread" if not app.gtk_started else "Stop GTK thread"
on_release: app.start_gtk_thread()
View client.py
#!/usr/bin/env python
import dbus
class Client():
def __init__(self):
bus = dbus.SessionBus()
service = bus.get_object('com.example.service', "/com/example/service")
self._message = service.get_dbus_method('get_message', 'com.example.service.Message')
self._quit = service.get_dbus_method('quit', 'com.example.service.Quit')
View x11vnc@.service
# This is dinamyc x11vnc service listening only to localhost (intended to use it with ssh tunnel)
# I do use that along realvnc-vnc-server because i do tweak geometry for vnn while having full resolution on hdmi screen
# To create password file run "x11vnc -storepasswd in /etc/x11vnc.pass" or even "x11vnc -storepasswd yourpassword /etc/x11vnc.pass"
# Once created, enable this service with "sudo systemctl enable x11vnc" restart or "sudo service x11vnc start"
[Unit]
Description=Scaled remote desktop service (x11vnc)
After=syslog.target network.target
View x11vnc.service
# This is hardcoded x11vnc at port 5901 listening only to localhost (intended to use it with ssh tunnel)
# I do use that along realvnc-vnc-server because i do tweak geometry for vnn while having full resolution on hdmi screen
# To create password file run "x11vnc -storepasswd in /etc/x11vnc.pass" or even "x11vnc -storepasswd yourpassword /etc/x11vnc.pass"
# Once created, enable this service with "sudo systemctl enable x11vnc" restart or "sudo service x11vnc start"
[Unit]
Description=Scaled remote desktop service (x11vnc)
After=syslog.target network.target
[Service]
View android-select-device
#! /bin/bash
#=====================================================================
# Selects an android device
# Copyright (C) 2012-2013 Diego Torres Milano. All rights reserved.
#
# See:
# - http://dtmilano.blogspot.ca/2013/01/android-select-device.html
# - http://dtmilano.blogspot.ca/2012/03/selecting-adb-device.html
# for details on usage.
#=====================================================================
View adb+
#!/bin/bash
# Script adb+
# Usage
# You can run any command adb provides on all your currently connected devices
# ./adb+ <command> is the equivalent of ./adb -s <serial number> <command>
#
# Examples
# ./adb+ version
# ./adb+ install apidemo.apk
# ./adb+ uninstall com.example.android.apis