This file contains 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
// Install ImageMagick | |
$ yum install ImageMagick ImageMagick-devel | |
// Install php imagick extension | |
$ yum --enablerepo=remi,remi-test install php-pecl-imagick |
This file contains 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
<?php | |
class SubdomainComponent extends Object { | |
var $__settings = array( | |
'base' => 'example.com', | |
'domains' => array(), | |
'param' => 'subdomain', | |
'redirect' => true, | |
'redirectTo' => 'http://example.com', | |
'model' => 'DomainPrefix', |
This file contains 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
######################### | |
# This gist is meant to be used to install everything needed to get up and running with the Ionic Framework on Windows using Chocolatey (http://chocolatey.org) | |
# Read "How to use this Gist File" section below for instructions. | |
######################### | |
######################### | |
# NOTE : for those familiar with Chocolatey, there are a couple of custom packages used as part of the install that are not published and are waiting on maintainers to make updates to their packages. | |
######################### |
This file contains 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
sudo yum update | |
php -v | |
sudo yum install yum-utils | |
sudo yum-config-manager --enable remi-php71 | |
sudo yum update | |
After the process has finished your server will now have PHP 7.1 installed, we need to restart our web server for it to take effect however. | |
If you have Apache and NGINX installed, or just Apache installed run | |
sudo service httpd restart |
This file contains 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
public class LogOutTimerUtil { | |
public interface LogOutListener { | |
void doLogout(); | |
} | |
static Timer longTimer; | |
static final int LOGOUT_TIME = 600000; // delay in milliseconds i.e. 5 min = 300000 ms or use timeout argument | |
public static synchronized void startLogoutTimer(final Context context, final LogOutListener logOutListener) { |
This file contains 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
function abbreviate($string){ | |
$abbreviation = ""; | |
$string = ucwords($string); | |
$words = explode(" ", "$string"); | |
foreach($words as $word){ | |
$abbreviation .= $word[0]; | |
} | |
return $abbreviation; | |
} |
This file contains 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
How to Install Python 3.6.4 on CentOS 7 | |
======================== | |
We’ll show you how to install Python 3.6.4 on CentOS 7. Python is at the core of many popular websites and programs – YouTube, | |
Instagram, and even Yum on CentOS, to name a few. They all rely on Python’s reliability and performance to complete many tasks at a time. | |
Python is a general-purpose object-oriented | |
programming language designed to be used as a software solution for almost all kinds of problems. | |
However, the pre-installed version of Python found on CentOS 7 is a much older version. | |
In order to have the latest version of Python, the user will have to install it manually. |
This file contains 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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} -d [OR] | |
RewriteCond %{REQUEST_FILENAME} -f | |
RewriteRule ^ ^$1 [N] |
This file contains 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
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
This file contains 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
# create assets folder in the current project | |
$ mkdir android/app/src/main/assets | |
# create bundle script | |
$ react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ | |
# execute command to run android to create debug apk | |
$ react-native run-android | |
# Or change to android folder |
OlderNewer