Skip to content

Instantly share code, notes, and snippets.

@psyray
psyray / release-android-debuggable.md
Created April 28, 2024 16:29 — forked from nstarke/release-android-debuggable.md
How to make a Release Android App debuggable

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable
@psyray
psyray / clean-prestashop-db.sql
Created August 29, 2020 10:31 — forked from julienbourdeau/clean-prestashop-db.sql
Clean PrestaShop database - Drop old and unless data
# Delete all logs
TRUNCATE ps_log;
# Delete old connection data (only used for stats)
# change 2016-02-01 00:00:00 according to you needs
DELETE c, cs
FROM ps_connections c
LEFT JOIN ps_connections_source cs ON (c.id_connections = cs.id_connections)
WHERE c.date_add < '2016-02-01 00:00:00';
@psyray
psyray / letsencrypt_2018.md
Created October 17, 2018 16:23 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@psyray
psyray / install_ispconfig3_debian.sh
Created April 12, 2018 09:36
Install ISPConfig 3.x on Debian 8/9 64Bits
#!/bin/bash
## Install ISPConfig 3.x on Debian 8/9 64Bits
## ISPConfig3 3.x + Apache2 + Debian 8/9 64Bits
## VM HD 50GB, swap 2GB, / 20GB, /var/www all
## Filesystem ext4
## Run as root
## Link: https://www.howtoforge.com/tutorial/perfect-server-debian-8-4-jessie-apache-bind-dovecot-ispconfig-3-1/
# Check if user has root privileges
@psyray
psyray / jailkit
Last active February 28, 2022 22:04
Jailkit for Debian Stretch (add PHP, Drush, Composer, NodeJS, NPM, Ruby, Gem, Compass)
[php]
comment = the php interpreter and libraries
executables = /usr/bin/php,/usr/bin/php5.6,/usr/bin/php7.0,/usr/bin/php7.1
directories = /usr/lib/php, /usr/share/php, /usr/share/php5, /etc/php, /usr/share/php-geshi, /usr/share/zoneinfo, /etc/snmp, /usr/share/snmp
includesections = env
[env]
comment = environment variables
executables = /usr/bin/env
@psyray
psyray / jdeletefiles.sh
Last active September 3, 2019 12:06
Find and delete unused joomla images
#!/bin/bash
if [ -z "$1" ]; then
echo -e "Usage: $(basename $0) FILE\n"
exit 1
fi
if [ ! -e "$1" ]; then
echo -e "$1: File doesn't exist.\n"
exit 1
@psyray
psyray / jfindfiles
Last active December 6, 2017 18:41 — forked from renekreijveld/jfindfiles
Find unused and used content files in your Joomla website
#!/bin/sh
# jfindfiles -- Find used and unused content files in your Joomla website
#
# This scripts supports Joomla versions 2.5 - 3.x
#
# Copyright 2014 Rene Kreijveld - [email protected]
#
# This program is free software; you may redistribute it and/or modify it.
#