What this will cover
- Host a static website at S3
- Redirect
www.website.comtowebsite.com - Website can be an SPA (requiring all requests to return
index.html) - Free AWS SSL certs
- Deployment with CDN invalidation
| // Load Dependencies | |
| var express = require('express'); | |
| // Define App Using Express | |
| var app = express(); | |
| // Define Routes | |
| app.get('/', function(req, res) { | |
| res.send('message to send'); | |
| }); |
| var express = require('express'); | |
| var mongodb = require('mongodb'); | |
| var app = express(); | |
| var db; | |
| var whateverColl; | |
| // Make sure database connection initialized before satrting app | |
| mongodb.MongoClient.connect('mongodb://127.0.0.1:27017/dbname', function(err, database) { |
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):
| <?php // database/migrations/2014_10_12_000000_create_users_table.php | |
| use Illuminate\Database\Schema\Blueprint; | |
| use Illuminate\Database\Migrations\Migration; | |
| class CreateUsersTable extends Migration | |
| { | |
| /** | |
| * Run the migrations. | |
| * |
| # see https://github.com/cmaessen/docker-php-sendmail for more information | |
| FROM php:fpm | |
| RUN apt-get update && apt-get install -q -y ssmtp mailutils && rm -rf /var/lib/apt/lists/* | |
| RUN docker-php-ext-install mysql mysqli | |
| RUN echo "hostname=localhost.localdomain" > /etc/ssmtp/ssmtp.conf | |
| RUN echo "root=root@example.com" >> /etc/ssmtp/ssmtp.conf |
| /**************************************************************/ | |
| /****** "Gurkenfinder"-Script für Google AdWords *******/ | |
| /**************************************************************/ | |
| /* v1.3 2017 Markus Baersch (@mbaersch) | |
| Reduzierte Non-MCC-Fassung | |
| gandke marketing & software - www.gandke.de */ | |
| /*********** Start Setup **********************/ | |
| var emailAddress = "mailadresse@hier.eintragen"; |
| function main() { | |
| var report = AdWordsApp.report( | |
| 'SELECT OfferId, Cost, ConversionValue, Conversions ' + | |
| 'FROM SHOPPING_PERFORMANCE_REPORT ' + | |
| 'WHERE ConversionValue > 0 ' + | |
| 'DURING LAST_30_DAYS'); | |
| var longtailSum = 0; |
As the official installation packages of most linux distributions are usually totally out of date (but that’s pure intention, to provide extremely stable versions only) it might sense to install the latest version of certain package. Install the latest version of PHPMyAdmin via:
sudo add-apt-repository ppa:nijel/phpmyadmin
| <?php | |
| public function get_checkin_poll() | |
| { | |
| $filepath = 'storage/work/checkin_poll_' . Auth::user()->id; | |
| $last_cycle = File::get($filepath); | |
| $break = false; | |
| $thread = uniqid(); | |