//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 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 'package:go_router/go_router.dart'; | |
void main() { | |
WidgetsFlutterBinding.ensureInitialized(); | |
GoRouter.setUrlPathStrategy(UrlPathStrategy.path); | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
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 | |
/** | |
* Plugin Name: WPO | SAMESITE | |
* Plugin URI: https://www.wpo365.com/downloads/wordpress-office-365-samesite/ | |
* Description: Plugin for WordPress websites that require a user to sign in (e.g. with Microsoft) and that are loaded inside an iframe (e.g. inside a Microsoft Teams App / Tab or similar). The plugin overrides the pluggable WordPress function wp_set_auth_cookie to set SameSite=None to enable third-party usage. | |
* Version: 1.0 | |
* Author: support@wpo365.com | |
* Author URI: https://www.wpo365.com/ | |
* License: GPL2+ | |
*/ |
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
import 'package:flutter/material.dart'; | |
class GoogleMapsClonePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Stack( | |
children: <Widget>[ | |
CustomGoogleMap(), | |
CustomHeader(), |
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
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 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 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 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 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 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); |
NewerOlder