Skip to content

Instantly share code, notes, and snippets.

@edwardstock
edwardstock / gcc 5 on ubuntu 14.04
Created July 1, 2017 12:03 — forked from beci/gcc 5 on ubuntu 14.04
use gcc 5.x on ubuntu 14.04
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
@edwardstock
edwardstock / filter.regexp
Last active May 28, 2020 18:11
Strict ADB logging (only app logs and few important android)
^(?!(FA|Settings|ea|MultiDex|OpenGLRenderer|art|FirebaseApp|System\.out|FirebaseInitProvider|Adreno\-EGL|ApplicationLoaders|dalvikvm|eglCodecCommon|SQLiteDatabase|NativeCrypto|Surface|MALI|GraphicBuffer|MultiWindow|HttpUrlPinger|FeatureProxyBase|InputMethodManager|libc\-netbsd|AudioCapabilities|VideoCapabilities|Proxy|InstantRun|PhoneWindow|ViewRootImpl|PhoneWindow|ResourceManager|OpenSSLLib|ResourcesManager|AnalyticsService|cr\_BindingManager|AccessibilityManager|ProgramBinary|\[MALI\]\[Gralloc\]|MPlugin|Posix|WifiManager|cr\_LibraryLoader|CellLocation|MaliEGL|WebView|linked|cr_BrowserStartup|ExifInterface\_JNI|cr\_Ime|FirebaseInstanceId|InputTransport|TelephonyManager|mali\_winsys|PlayCommon|Places|ExifInterface|ThermalEngine|WifiHAL|BatteryStatsService|OcrModelUpStIntentOp|LightsService|tigonliger|NetRec|Finsky|SingleFileAttributeStore|cr_media|libEGL|NetworkSecurityConfig|AppMetrica|HostConnection|DynamiteModule|GAv4|inter.bipwalle|EGL_emulation|libc|skia|Gralloc3))
^(?!(Accessing hidden))
@edwardstock
edwardstock / buildphp_deb.sh
Last active March 19, 2017 10:43
How to build PHP 7 (nginx + fpm+cli) on debian/ubuntu
#!/usr/bin/env bash
# getting deps
apt-get install -y git make gcc g++ autoconf re2c bison \
libxml2 libxml2-dev \
libevent-2.0* libevent-dev \
libssl1.0.0 libssl-dev \
libzip2 libzip-dev \
libbz2-dev \
libgd3 libgd-dev \
libmcrypt4 libmcrypt-dev \
@edwardstock
edwardstock / drive_backup.sh
Last active August 10, 2017 21:19
GoogleDrive files backup with "gdrive" https://github.com/prasmussen/gdrive
#!/bin/sh
# Example cron usage:
# 0 12 * * MON /usr/bin/drive_backup /var/www/public/ >> /var/log/drive_backup.log
# ^every monday at 12:00PM ^path to backup on google drive ^stream redirect ^path to backup log
# Basic manual usage
# drive_backup /path/to/directory/or/file
# File names will contains full path and date for uniqueness.