Skip to content

Instantly share code, notes, and snippets.

View viktorfa's full-sized avatar

Viktor Andersen viktorfa

  • Trondheim
View GitHub Profile
@viktorfa
viktorfa / serverless.yml
Last active February 17, 2023 20:53
Serverless config for Strapi Serverless
service: sls-strapi
provider:
name: aws
runtime: nodejs12.x
profile: <your-aws-profile>
logRetentionInDays: ${self:custom.vars.logRetentionInDays, 1}
environment:
ADMIN_JWT_SECRET: "Just using dummy"
@viktorfa
viktorfa / s3cache.py
Created September 7, 2019 10:54
S3 HTTP Cache for Scrapy
# my_sls_scraper/extensions/s3cache.py
import boto3
import gzip
import json
import logging
import os
from botocore.exceptions import ClientError
from botocore.stub import Stubber
from time import time
@viktorfa
viktorfa / CSRF_Pokedex_categories.html
Created April 19, 2018 13:01
Test the Pokedex categories page for CSRF attacks
<html>
<head>
</head>
<body>
<script>
const headers = new Headers({
'Content-Type': 'application/x-www-form-urlencoded',
'Referer': 'http://tdt4237.idi.ntnu.no:5017/categories/add',
'Origin': 'http://tdt4237.idi.ntnu.no:5017',