Generate ssh key pair
ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa_github -C "127.0.0.1"
ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa_gitlab -C "127.0.0.1"
Upload the *.pub to Github / Gitlab respectively.
Map ssh keys
<?php | |
// .............................................. | |
// V2 | |
// .............................................. | |
use Spatie\DataTransferObject\DataTransferObject; | |
class Item extends DataTransferObject | |
{ |
#!/bin/bash | |
encryptedPayloadFile="" | |
privateKeyFile="" | |
outputFile="" | |
function diy() { | |
cat <<EOF | |
openssl enc -base64 -A -d -in payload.cipher.base64 -out payload.cipher |
bash arguments options stdin flags | |
required | |
optional | |
./cmd arg1 agr2 --debug --output=test.txt | |
Args: | |
- arg1 |
#!/bin/bash | |
payload="" | |
privateKey="" | |
base64EncodedSignatureFile="" | |
function diy() { | |
cat <<EOF | |
printf %s "jdoe:23571113" > payload.txt |
#!/bin/bash | |
# Sign a file with a private key using OpenSSL | |
# Encode the signature in Base64 format | |
# | |
# Usage: sign <file> <private_key> | |
# | |
# NOTE: to generate a public/private key use the following commands: | |
# | |
# openssl genrsa -aes128 -passout pass:<passphrase> -out private.pem 2048 | |
# openssl rsa -in private.pem -passin pass:<passphrase> -pubout -out public.pem |
C:\Users\bmatovu\putty_logs\&H\&Y&M&D | |
Ref: https://youtu.be/aFSmwCXXKPM |
import { Ability, subject } from "@casl/ability"; | |
const editorRole = { id: 1, name: 'Editor'}; | |
const adminRole = { id: 2, name: 'Admin' }; | |
const user = { id: 1, alias: "jdoe", name: "John Doe", role_id: 1 }; | |
const ability = new Ability(); | |
const rules = [ | |
{ |
select | |
first_name, | |
last_name | |
from | |
users | |
left join | |
companies on companies.id = users.company_id | |
where ( | |
companies.name like 'TERM%' or | |
first_name like 'TERM%' or |
<?php | |
interface StateMachineInterface | |
{ | |
public function getTransitions(): array; | |
public function setTransitions(array $transitions): void; | |
public function getState(): string; | |
public function setState(string $state): void; | |
public function getStates(): array; | |
public function getActions(): array; |