adb install {yourapk.apk}
get list of running process, android app will also be listed here by the package name
ps
##Get list of installed packages
| # remove repo versions | |
| sudo apt-get remove -y nodered nodejs nodejs-legacy npm | |
| sudo apt-get autoremove -y | |
| # use nodesource | |
| curl -sL https://deb.nodesource.com/setup_4.x | sudo bash - | |
| # necessary dependencies (e.g for node-gyp) and ofcourse the node itself | |
| sudo apt-get install -y build-essential python-dev nodejs |
| #!/bin/bash | |
| curl -sS -o /dev/null -X GET http://10.0.1.200:9018/notify/transmission?name=$TR_TORRENT_NAME&time=$TR_TIME_LOCALTIME > /dev/null 2>&1 | |
| # Save the file - for example to /var/scripts/notify-transmission.sh | |
| # Change the file permission to be executable | |
| # stop transmission daemon first by | |
| # | |
| # sudo service transmission-daemon stop | |
| # |
| # base ssl | |
| ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
| ssl_session_cache shared:SSL:10m; | |
| ssl_session_timeout 10m; | |
| ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; | |
| ssl_prefer_server_ciphers on; | |
| ssl_dhparam /etc/nginx/keys.d/dhparam.pem; | |
| # tweak | |
| client_max_body_size 30M; |
| # make sure to get all dependencies of imagemagick | |
| sudo apt-get build-dep imagemagick | |
| # Add webp and jpeg (explicitly doing this incase the above does not enough) | |
| sudo apt-get install libwebp-dev libjpeg-dev devscripts | |
| # get latest imagick | |
| wget http://www.imagemagick.org/download/ImageMagick.tar.gz | |
| tar xf ImageMagick.tar.gz | |
| cd ImageMagick-*/ |
| # Wifi | |
| ro.wifi.channels= | |
| ro.config.ringtone=Ring_Synth_04.ogg | |
| ro.config.notification_sound=pixiedust.ogg | |
| ro.config.alarm_alert=Alarm_Classic.ogg | |
| wifi.interface=wlan0 | |
| wifi.supplicant_scan_interval=15 |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project name="name-of-project" default="build"> | |
| <target name="build" | |
| depends="prepare,lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpdox,phpunit"/> | |
| <target name="build-parallel" | |
| depends="prepare,lint,tools-parallel,phpunit"/> | |
| <target name="tools-parallel" description="Run tools in parallel"> | |
| <parallel threadCount="2"> |
| # https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source | |
| # prepare some prerequisites | |
| sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip libssl libssl-dev g++-4.8 | |
| # modern psol need these on ubuntu 14 | |
| sudo apt-get install python-software-properties | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
| sudo apt-get update | |
| sudo apt-get install g++-4.8 gcc |
| <?php | |
| /** | |
| * getRandomWeightedElement() | |
| * Utility function for getting random values with weighting. | |
| * Pass in an associative array, such as array('A'=>5, 'B'=>45, 'C'=>50) | |
| * An array like this means that "A" has a 5% chance of being selected, "B" 45%, and "C" 50%. | |
| * The return value is the array key, A, B, or C in this case. Note that the values assigned | |
| * do not have to be percentages. The values are simply relative to each other. If one value | |
| * weight was 2, and the other weight of 1, the value with the weight of 2 has about a 66% |