Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Wern Ancheta anchetaWern

🏠
Working from home
View GitHub Profile
@chetans9
chetans9 / SecureHeadersMiddleware.php
Last active Dec 10, 2020
Laravel Secure Headers Middleware
View SecureHeadersMiddleware.php
<?php
namespace App\Http\Middleware;
use Closure;
class SecureHeadersMiddleware
{
// Enumerate headers which you do not want in your application's responses.
// Great starting point would be to go check out @Scott_Helme's:
// https://securityheaders.com/
@soardex
soardex / gist:8a56f5856bff417a2c96ec1fd26906e5
Created Mar 25, 2017
Use Test User To Test Messenger Bot
View gist:8a56f5856bff417a2c96ec1fd26906e5
To get it to work please follow the steps:
1) Create test user by toggling the Authorize test users for this app and grant permissions "manage_pages" and "page_messaging".
2) Use the Edit Button and get an access token for this user (using v2.6). Please save this for later.
3) Use edit button to login as the test user
4) After login, create page as the test user
5) Use the user access token for the test user to get the page access token for this user. You can do this with the following call:
~~~
https://graph.facebook.com/v2.6/me/accounts?access_token=<TEST_USER_ACCESS_TOKEN>
~~~
@ziadoz
ziadoz / awesome-php.md
Last active Apr 1, 2021
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
View awesome-php.md
@lfalke
lfalke / StripeCardsSection.js
Last active Apr 10, 2021
Usage of react-stripe-elements with Material UI (v1.0) styling
View StripeCardsSection.js
import React, { PureComponent } from 'react'
import Grid from 'material-ui/Grid'
import { CardNumberElement, CardExpiryElement, CardCVCElement } from 'react-stripe-elements'
import StripeElementWrapper from './StripeElementWrapper'
export default class extends PureComponent {
static displayName = 'StripeCardsSection'
@m2sh
m2sh / DOSpacesStorageServiceProvider.php
Last active Apr 16, 2021
How To Use Digitalocean Spaces as Laravel Cloud filesystems
View DOSpacesStorageServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Aws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
use Storage;