One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| # Change to the project directory | |
| cd $FORGE_SITE_PATH | |
| # Turn on maintenance mode | |
| php artisan down || true | |
| # Pull the latest changes from the git repository | |
| # git reset --hard | |
| # git clean -df | |
| git pull origin $FORGE_SITE_BRANCH |
| FROM php:7.1-apache | |
| ADD . /var/www | |
| ADD ./site.conf /etc/apache2/sites-enabled/000-default.conf | |
| RUN apt-get update && apt-get install -y libmcrypt-dev mysql-client && \ | |
| docker-php-ext-install mcrypt pdo_mysql opcache && \ | |
| pecl install redis-3.1.2 && docker-php-ext-enable redis && \ | |
| a2enmod rewrite |
| <?php | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Laravel 5, Bootstrap 4 Pagination | |
| |-------------------------------------------------------------------------- | |
| | | |
| | A partial view to handle pagination for collections in Laravel's query | |
| | builder or Eloquent ORM, styled with Bootstrap 4. | |
| | | |
| | The pagination displays like the following, where * denotes the current |
| package com.shouttag.mothership; | |
| import android.app.Activity; // Need for constants | |
| import android.content.DialogInterface; // Needed for building out dialog box | |
| import android.content.Intent; // Needed for intent interaction (camera) | |
| import android.graphics.Color; // Needed for alert dialog option coloring | |
| import android.support.annotation.NonNull; | |
| import java.io.File; // Needed for storing image in temp file on device | |
| import java.io.IOException; // Needed for storing image in temp file on device | |
| import java.text.SimpleDateFormat; // Needed for date formatting |
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /Users/YOUR_USERNAME/Sites; | |
| access_log /Library/Logs/default.access.log main; | |
| location / { | |
| include /usr/local/etc/nginx/conf.d/php-fpm; | |
| } |
| $countries = array("Afghanistan" => "Afghanistan", "Albania" => "Albania", "Algeria" => "Algeria", "American Samoa" => "American Samoa", "Andorra" => "Andorra", "Angola" => "Angola", "Anguilla" => "Anguilla", "Antarctica" => "Antarctica", "Antigua and Barbuda" => "Antigua and Barbuda", "Argentina" => "Argentina", "Armenia" => "Armenia", "Aruba" => "Aruba", "Australia" => "Australia", "Austria" => "Austria", "Azerbaijan" => "Azerbaijan", "Bahamas" => "Bahamas", "Bahrain" => "Bahrain", "Bangladesh" => "Bangladesh", "Barbados" => "Barbados", "Belarus" => "Belarus", "Belgium" => "Belgium", "Belize" => "Belize", "Benin" => "Benin", "Bermuda" => "Bermuda", "Bhutan" => "Bhutan", "Bolivia" => "Bolivia", "Bosnia and Herzegowina" => "Bosnia and Herzegowina", "Botswana" => "Botswana", "Bouvet Island" => "Bouvet Island", "Brazil" => "Brazil", "British Indian Ocean Territory" => "British Indian Ocean Territory", "Brunei Darussalam" => "Brunei Darussalam", "Bulgaria" => "Bulgaria", "Burkina Faso" => "Burkina Faso", "Burund |
| private static final int PICK_PHOTO_FOR_AVATAR = 0; | |
| public void pickImage() { | |
| Intent intent = new Intent(Intent.ACTION_GET_CONTENT); | |
| intent.setType("image/*"); | |
| startActivityForResult(intent, PICK_PHOTO_FOR_AVATAR); | |
| } | |
| @Override | |
| public void onActivityResult(int requestCode, int resultCode, Intent data) { |
| Issue this command to terminal with your device connected : | |
| $ adb shell pm list packages | |
| If that doesn't work, then: | |
| $ adb shell | |
| $ su | |
| $ pm list packages |
| import android.support.v7.widget.LinearLayoutManager; | |
| import android.support.v7.widget.RecyclerView; | |
| public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
| public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName(); | |
| private int previousTotal = 0; // The total number of items in the dataset after the last load | |
| private boolean loading = true; // True if we are still waiting for the last set of data to load. | |
| private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more. | |
| int firstVisibleItem, visibleItemCount, totalItemCount; |