//npm modules
const express = require('express');
const uuid = require('uuid/v4')
const session = require('express-session')
const FileStore = require('session-file-store')(session);
const bodyParser = require('body-parser');
const passport = require('passport');
const LocalStrategy = require('passport-local').Strategy;
const axios = require('axios');
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
| <?php | |
| //Automatically login a single WordPress user upon arrival to a specific page. | |
| //Redirect to home page once logged in and prevent viewing of the login page. | |
| //Tested with WP 3.9.1. Used in functions.php | |
| //Updated 2014-07-18 to resolve WP_DEBUG notice: "get_userdatabylogin is deprecated since version 3.3! Use get_user_by('login') instead." | |
| //From http://tourkick.com/2014/wordpress-demo-multisite-db-reset/ | |
| function auto_login() { | |
| //change these 2 items | |
| $loginpageid = '1234'; //Page ID of your login page |
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
| /* This is a small sampling of the various approaches to media queries. The | |
| point is: they're all over the board. Part of the "issue" (if you can call | |
| it that) may be due to the intended audience of each site/framework. Another | |
| may be that it's really difficult to test for a lot of different devices. | |
| Regardless, it would be really nice if there was standard baseline that | |
| could be used as a starting point for maximum compatibility and coverage. */ | |
| /* ========================================================================== | |
| Frameworks | |
| ========================================================================== */ |
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
| import passport from 'passport'; | |
| module.exports = app => { | |
| app.get('/findUser', (req, res, next) => { | |
| passport.authenticate('jwt', { session: false }, (err, user, info) => { | |
| if (err) { | |
| console.log(err); | |
| } | |
| if (info != undefined) { | |
| console.log(info.message); |
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
| import os | |
| import sys | |
| import re | |
| import boto3 | |
| import zipfile | |
| def parse_s3_uri(url): | |
| match = re.search('^s3://([^/]+)/(.+)', url) | |
| if match: | |
| return match.group(1), match.group(2) |
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
| version: '3' | |
| services: | |
| nginx: | |
| image: awsdemo-nginx:latest | |
| ports: | |
| - "80:80" | |
| volumes: | |
| - static_volume:/usr/src/app/staticfiles | |
| - media_volume:/usr/src/app/mediafiles |
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 | |
| # Delete Archived Applications | |
| rm -r ~/Library/Developer/Xcode/Archives/*/ | |
| # Delete Devired Data | |
| rm -r ~/Library/Developer/Xcode/DerivedData/*/ | |
| # Delete Apple cached files | |
| rm -r ~/Library/Developer/CoreSimulator/Caches/dyld/*/*/ |
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
| version: '3.5' | |
| services: | |
| proxy: | |
| image: traefik:v2.1 | |
| # The official v2.0 Traefik docker image | |
| container_name: proxy | |
| networks: | |
| - traefik | |
| ports: |
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
| import 'package:flutter/material.dart'; | |
| import 'custom_labeled_checkbox.dart'; | |
| class ParentChildCheckboxes extends StatefulWidget { | |
| static const String routeName = 'parent-child-checkbox'; | |
| @override | |
| _ParentChildCheckboxesState createState() => _ParentChildCheckboxesState(); | |
| } |
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
| import 'package:flutter/material.dart'; | |
| class GoogleMapsClonePage extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| body: Stack( | |
| children: <Widget>[ | |
| CustomGoogleMap(), | |
| CustomHeader(), |