Skip to content

Instantly share code, notes, and snippets.

View incyclum's full-sized avatar
😷
Stay safe!

David Delobel incyclum

😷
Stay safe!
View GitHub Profile
@incyclum
incyclum / keybase.md
Created November 22, 2018 22:41
Keybase proof

Keybase proof

I hereby claim:

  • I am incyclum on github.
  • I am incyclum (https://keybase.io/incyclum) on keybase.
  • I have a public key ASBW7VBviQVd6qXKs7ZPzmmx7srvzh-fYXRdxSZYCdBj3Ao

To claim this, I am signing this object:

@incyclum
incyclum / liferea.scss
Created July 30, 2018 15:30
Liferea custom Sass stylesheet for a better reading experience (compile it to ~/.config/liferea/liferea.css, restart Liferea)
div.content {
margin: 10px auto 10px 10px;
max-width: 60em;
line-height: 1.4;
h1, h2, h3, h4, h5, h6 {
line-height: 1.2;
color: green;
}
@incyclum
incyclum / AWS IAM Policy - AmazonS3AccessToSpecificBucket.json
Created April 29, 2018 16:50
AWS IAM Policy - S3 bucket access - Give read/write/delete access to a specific bucket (replace <BUCKET_NAME>), works also via AWS Web Console
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:ListAllMyBuckets"
],
"Resource": "*"
@incyclum
incyclum / AWS IAM Policy - ForceMFA.json
Last active April 2, 2020 20:02
AWS IAM Policy - Force MFA - This policy allows users to manage their own passwords and MFA devices but nothing else unless they authenticate with MFA -- *EDIT*: I forgot where I found it in the 1st place. In fact this policy is explained statement by statement in AWS docs: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_users-self-man…
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAllUsersToListAccounts",
"Effect": "Allow",
"Action": [
"iam:ListAccountAliases",
"iam:ListUsers",
"iam:GetAccountPasswordPolicy",
@incyclum
incyclum / postgresql_updated_at.sql
Last active May 1, 2018 07:28
PostgreSQL - Automatically update a timestamp
CREATE FUNCTION update_updated_at_column()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated_at = now();
RETURN NEW;
END;
$$ language 'plpgsql';
CREATE TABLE account (
account_id SERIAL PRIMARY KEY,