Skip to content

Instantly share code, notes, and snippets.

User authentication system

Your task is now to create a user authentication system.

This document will guide you through all the features and implication of such system, so that you don't have to search them yourself.

We will focus on web/browser-technologies, however similar concept can be widely applied. This guide, is a work in progress, feel free to comment and provide feedbacks.

Expected Workflows

@paulolorenzobasilio
paulolorenzobasilio / git-is-merged
Last active May 23, 2024 16:57
Check if source branch has been already merged into destination branch
#!/usr/bin/env bash
#
# Check if source branch has been already merged into destination branch
# https://stackoverflow.com/questions/226976/how-can-i-know-if-a-branch-has-been-already-merged-into-master
#
git_is_merged () {
merge_destination_branch=$1
merge_source_branch=$2
@scotticles
scotticles / timer.sh
Last active May 3, 2020 16:58
A simple linux cli timer that alerts with sound and notification. ./timer.sh -m <minutes or -s <seconds> or by default if nothing is passed it will do 30 minutes.
#!/bin/bash
# ./timer.sh -h 1
# ./timer.sh -m 30
# ./timer.sh -s 10 for 10 seconds
# ./timer.sh -e 1h10m30s
# ./timer.sh -m <message>
seconds=1800;
message="Times Up!!!!"
#checks for -s or -m else defaults to 30 minutes
@flowstate
flowstate / MessageStore.js
Created September 14, 2018 01:29
MST / FireStore syncing approach
import { Person } from "./PersonStore";
const Message = t.model("MessageModel", {
id: t.identifier,
author: t.late(() => t.reference(Person)),
body: t.string,
title: t.string,
toPeople: t.array(t.late(() => t.reference(Person))),
read: false
})
@gricard
gricard / webpack4upgrade.md
Last active February 29, 2024 20:23
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here: https://cdgd.tech

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on https://webpack.js.org. I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
@worawit
worawit / eternalblue8_exploit.py
Last active March 16, 2024 18:38
Eternalblue exploit for Windows 8/2012
#!/usr/bin/python
# This file has no update anymore. Please see https://github.com/worawit/MS17-010
from impacket import smb, ntlm
from struct import pack
import sys
import socket
'''
EternalBlue exploit for Windows 8 and 2012 by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
@hvanderlaan
hvanderlaan / ansible-vault.md
Last active August 31, 2021 12:57
Ansible-vault example

Ansible vault example

New in Ansible 1.5, “Vault” is a feature of ansible that allows keeping sensitive data such as passwords or keys in encrypted files, rather than as plaintext in your playbooks or roles. These vault files can then be distributed or placed in source control. To enable this feature, a command line tool, ansible-vault is used to edit files, and a command line flag –ask-vault-pass or –vault-password-file is used. Alternately, you may specify the location of a password file or command Ansible to always prompt for the password in your ansible.cfg file. These options require no command line flag usage.

Requirements

@bonsi
bonsi / Makefile
Created November 26, 2016 11:28
Makefile - more enjoyable (shorter) docker management commands
# work in progress. inspired by serverforhackers example.
.PHONY: up down log tinker artisan test
# Set dir of Makefile to a variable to use later
MAKEPATH := $(abspath $(lastword $(MAKEFILE_LIST)))
PWD := $(dir $(MAKEPATH))
up:
docker-compose -f laradock/docker-compose.yml up -d
image: my/nodejs-dockerfile
stages:
- test
- build
- deploy
before_script:
- ln -s /node_modules node_modules
- npm set progress=false
@htp
htp / curl-websocket.sh
Last active May 14, 2024 21:24
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/