Skip to content

Instantly share code, notes, and snippets.

@babldev
babldev / decode_flask_cookie.py
Last active December 15, 2023 12:02
Decode a Flask Session cookie, given the cookie and secret key
@ebuildy
ebuildy / docker-compose-sentry.yml
Created November 24, 2015 08:12
A simple docker-compose YML to run Sentry.
redis:
image: redis
postgres:
image: postgres:9.4
environment:
- POSTGRES_USER:sentry
- POSTGRES_PASSWORD:sentry
volumes:
- /var/data/sentry/postgre:/var/lib/postgresql/data:rw
@kayssun
kayssun / examples.md
Last active April 11, 2018 13:57
Discourse API example content

Discourse API

Beispiel-Antworten der API

User

URL: /admin/users/{username}.json
Example: /admin/users/kayssun.json

@pionl
pionl / ModelJoinTrait.php
Last active February 29, 2020 13:08
Model join trait with Automatic Join on Laravel 5 Eloquent Models with relations setup. With automatic filling relation object if detected
<?php
namespace Pion\Traits\Models;
use Illuminate\Database\Query\Expression;
use Illuminate\Support\Str;
/**
* Class ModelJoinTrait
*
* Trait to create model join for scope with detection of model in the attributes.
@SuryaSankar
SuryaSankar / M2M_Association_SQLalchemy.py
Last active September 25, 2023 07:30
An example of a many to many relation via Association Object in SQLAlchemy
import sqlalchemy
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import sessionmaker, relationship, backref
from sqlalchemy.ext.associationproxy import association_proxy
import uuid
engine = sqlalchemy.create_engine('sqlite:///:memory:')
Base = declarative_base()