Skip to content

Instantly share code, notes, and snippets.

@jogeshpi03
jogeshpi03 / Bucket-Properties.md
Created February 12, 2021 11:36 — forked from patric-boehner/Bucket-Properties.md
Amazon AWS S3 User Policy for Updraft Plus

#Bucket Properties for Versioning and Lifecycle

###Versioning

Turn on versioning. This allows us to preserve, reterieve and restore versions of each backup file. This is important incase a backup file is ever overwritten with a bad or corupted file.

###Lifecycle

We will create a lifecycle rule tp ultimelty deal with deleating old backups, since the user we have assigned to updraft can no longer autoamticaly delate old backups based on the plugins settings. For this example I set the limit to 30 days.

const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
entry: "./src/index.js",
output: {
path: path.join(__dirname, "/dist"),
filename: "index-bundle.js"
},
module: {
import React from "react";
import ReactDOM from "react-dom";
import App from "./components/App.js";
ReactDOM.render(<App />, document.getElementById("root"));
h1 {
color: #38236F;
text-align: center;
}
import React, { Component } from "react";
import '../styles/App.css';
class App extends Component {
render() {
return (
<div>
<h1>React App</h1>
</div>
const path = require("path");
module.exports = {
entry: "./src/index.js",
output: {
path: path.join(__dirname, "/dist"),
filename: "index_bundle.js"
},
module: {
rules: [
const path = require("path");
module.exports = {
entry: "./src/index.js",
output: {
path: path.join(__dirname, "/dist"),
filename: "index_bundle.js"
}
};
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>React App</title>
</head>
<body>
<div id="root"></div>
@jogeshpi03
jogeshpi03 / Laravel-Container.md
Created May 21, 2018 05:29
Laravel's Dependency Injection Container in Depth

Laravel's Dependency Injection Container in Depth

Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.

Introduction to Dependency Injection

I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).

Accessing the Container

@jogeshpi03
jogeshpi03 / gist:19cef8720f36b1c41192b55444751f66
Last active May 11, 2019 08:38
Facebook Data-Mining Using Python
import requests
import pandas as pd
import os, sys
token = ""
try:
token = os.environ['FB_TOKEN']
except:
print "Set FB_TOKEN variable"
sys.exit(-1)