- sudo apt-get install apache2 -y
- sudo apt-get install apt-transport-https lsb-release ca-certificates
- wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
- echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
- sudo apt-get update
- sudo apt-get install apache2 php7.0 php7.0-curl php7.0-gd php7.0-json php7.0-mcrypt php7.0-mysql php7.0-opcache libapache2-mod-php7.0
- sudo a2dismod php5 (in case php5 is already installed)
- sudo a2enmod php7.0
- mkdir /home/pi/noip
- cd /home/pi/noip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define bg_dispatch_main_async_safe(block)\ | |
| if ([NSThread isMainThread]) {\ | |
| block();\ | |
| } else {\ | |
| dispatch_async(dispatch_get_main_queue(), block);\ | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #LDPI should be 36 x 36. | |
| #MDPI should be 48 x 48. | |
| #TVDPI should be 64 x 64. | |
| #HDPI should be 72 x 72. | |
| #XHDPI should be 96 x 96. | |
| #XXHDPI should be 144 x 144. | |
| #XXXHDPI should be 192 x 192. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSString *vowels = @"abcdefghijlmnopqrstuvwxyz1234567890"; | |
| NSMutableString *str = [NSMutableString new]; | |
| for(int i=0; i<10; i++){ | |
| [str appendString:[vowels substringWithRange:NSMakeRange(arc4random_uniform([vowels length]), 1)]]; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int *x = NULL; *x = 42; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT table_schema "Data Base Name", | |
| sum( data_length + index_length ) / 1024 / | |
| 1024 "Data Base Size in MB", | |
| sum( data_free )/ 1024 / 1024 "Free Space in MB" | |
| FROM information_schema.TABLES | |
| GROUP BY table_schema ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| qlmanage -t -s 1000 -o . picture.svg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| final Context context_t = cntxt; | |
| Handler mainHandler = new Handler(cntxt.getMainLooper()); | |
| Runnable locRunnable = new Runnable() { | |
| @Override | |
| public void run() { | |
| // Code | |
| } | |
| }; | |
| mainHandler.post(locRunnable); |