sudo apt install apache2sudo apt-get install libapache2-mod-php php php-common php-curl php-dev php-gd php-pear php-imagick php-mcrypt php-mysql php-ps php-xsl| /* | |
| * custom pagination with bootstrap .pagination class | |
| * source: http://www.ordinarycoder.com/paginate_links-class-ul-li-bootstrap/ | |
| */ | |
| function bootstrap_pagination( $echo = true ) { | |
| global $wp_query; | |
| $big = 999999999; // need an unlikely integer | |
| $pages = paginate_links( array( |
| { | |
| "quotes": [ | |
| { | |
| "quote":"Life isn’t about getting and having, it’s about giving and being.","author":"Kevin Kruse"}, | |
| { | |
| "quote":"Whatever the mind of man can conceive and believe, it can achieve.","author":"Napoleon Hill"}, | |
| { | |
| "quote":"Strive not to be a success, but rather to be of value.","author":"Albert Einstein"}, | |
| { |
| // *** Request Verification *** | |
| // The currently recommended way is to verify request signature: https://api.slack.com/authentication/verifying-requests-from-slack | |
| // Unfortunately, GAS web apps don"t have means to access request headers. Thus, this example uses the old way to verify requests. | |
| // >>> Settings > Basic Information > App Credentials > Verification Token | |
| const legacyVerificationToken = PropertiesService.getScriptProperties().getProperty("SLACK_VERIFICATION_TOKEN"); | |
| // *** OAuth Access Token *** | |
| // Install your Slack app into its development workspace. | |
| // >>> Settings > Install App > Bot User OAuth Access Token | |
| const token = PropertiesService.getScriptProperties().getProperty("SLACK_BOT_TOKEN"); |
function myFunction() {
const sheetName = "Sheet1";
const [headers, ...rows] = SpreadsheetApp.getActiveSpreadsheet()
.getSheetByName(sheetName)
.getDataRange()
.getValues();| ### Here is the minimul server configuration for the virtual host for the bedrock. | |
| ```shell | |
| # vim: syntax=apache ts=4 sw=4 sts=4 sr noet | |
| <VirtualHost *:80> | |
| ServerAdmin admin@aquapex.localhost | |
| ServerName aquapex.localhost | |
| ServerAlias www.aquapex.localhost | |
| DocumentRoot /var/www/html/aquapex-wp/web |
By doing This you can work on the local environment easily
const LOCAL_DOMAIN = "lcoalhost/project";
const LIVE_DOMAIN = "project_url";
// changes in the Url so we can store images in one place.
add_filter('wp_get_attachment_image_src', 'rewriteImgSrc', 10, 3);