Skip to content

Instantly share code, notes, and snippets.

@zmts
zmts / tokens.md
Last active April 25, 2024 15:23
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@derekconjar
derekconjar / wordpress-firebase.php
Last active April 25, 2024 15:21
An example of using Firebase and WordPress together. The idea is to use WP's custom post types and metaboxes to make content management easy, and sync with Firebase so that your websites have access to a real-time JSON feed of your custom data.
<?php
/**
* All custom functions should be defined in this class
* and tied to WP hooks/filters w/in the constructor method
*/
class Custom_Functions {
// Custom metaboxes and fields configuration
@jonnymaceachern
jonnymaceachern / batch-convert-mp4-webm.sh
Created August 28, 2019 14:59
Batch convert mp4 to webm using ffmpeg
for i in *.mp4;
do name=`echo "$i" | cut -d'.' -f1`
echo "$name"
ffmpeg -i "$i" -acodec libvorbis -aq 5 -ac 2 -qmax 25 -threads 2 "${name}.webm"
done
func encode<T>(var value: T) -> NSData {
return withUnsafePointer(&value) { p in
NSData(bytes: p, length: sizeofValue(value))
}
}
func decode<T>(data: NSData) -> T {
let pointer = UnsafeMutablePointer<T>.alloc(sizeof(T.Type))
data.getBytes(pointer)
@Hardikanand1st
Hardikanand1st / Aomei all editions product keys.md
Last active April 25, 2024 15:19
Free Product Keys For Aomei All Editions

Discord Username

Hardik#8032

Logo

Aomei Product Keys.

@dougg0k
dougg0k / edgerouter_doh.md
Last active April 25, 2024 15:18
Edgerouter / EdgeOS / DoH / Security Settings / NextDNS / Cloudflare

Edgerouter / EdgeOS / DoH / Security Settings

Notes

  • It seems that every firmware update, whatever was done to get nextdns into the router, will be gone, so you will have to redo the steps or at least some, if you confirm that it has happened.
  • Make sure to have NTP enabled and configured. To avoid bugs.
  • You can do through the UI CLI or using SSH, if you have enabled it and set a port.
  • You can delete any configuration done, by using delete, e.g., delete firewall all-ping.
  • These steps were confirmed to be working after a complete hardware reset.
@bradtraversy
bradtraversy / docker_wordpress.md
Last active April 25, 2024 15:18
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@Hardikanand1st
Hardikanand1st / Paragon Hard Disk manager Serial Key.txt
Last active April 25, 2024 15:18
Hard Disk Manager™ 25 Anniversary LE Serial Key
For people saying its fake, here are the actual proof: https://pasteboard.co/FYLEVjhn0hQr.png
You need to install from the setup file provided then only the key will work.
-----------------------------------------------------------
Product: Hard Disk Manager™ 25 Anniversary LE
License: PSG-797-FRU
Serial Number: IUCOQ9-FAMGO1-VJJ5FI-8U7PRI-G1AH56
-----------------------------------------------------------
Installer file for 64-bit Windows:
@clarkeben
clarkeben / UIKit-Animations.swift
Last active April 25, 2024 15:17
A list of simple yet effective animation extensions for UIKit
import UIKit
//MARK: - UIButton Animations
extension UIButton {
// Contract and retract animation
func contractRetractBtn(duration: Double) {
let contraction = CASpringAnimation(keyPath: "transform.scale")
contraction.duration = duration
contraction.fromValue = 0.96
@izzyleung
izzyleung / README.md
Last active April 25, 2024 15:17
Run TeamCity agents in your Kubernetes cluster

How to run TeamCity agents in your Kubernetes cluster

For typical CI/CD tasks that don't require Docker daemon access, use the agent.yml pod sepc.

For CI/CD jobs that need Docker daemon to build Docker images, use the privileged-agent.yml pod spec.

Notes

Make sure you are running TeamCity server version >= 2020.1 or have the Kubernetes support plugin installed.