Skip to content

Instantly share code, notes, and snippets.

View cursedcoder's full-sized avatar
🐜
Working from nest

Yevhenii Huselietov cursedcoder

🐜
Working from nest
View GitHub Profile
@ziluvatar
ziluvatar / token-generator.js
Last active April 11, 2024 07:10
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');
@eightyknots
eightyknots / avregex.md
Last active March 20, 2024 20:05
AvReg: Aviation regex match toolkit

AvReg: The Aviation RegEx Match Toolkit

General Tips

  • The PCRE flavour of RegEx is used here.
  • Append the i modifier to the end of the regex to make any pattern case-insensitive.

Aircraft

| Purpose | Description | RegEx | Example |

@cursedcoder
cursedcoder / config.yml
Last active March 20, 2019 22:00
HWIOAuth with FOSUserBundle intergration + phpspec coverage
fos_user:
db_driver: orm
firewall_name: main
user_class: App\Entity\User
service:
user_manager: app.user_manager
hwi_oauth:
firewall_name: main
fosub:
@xeoncross
xeoncross / Requests.php
Created April 11, 2012 21:44
cURL asynchronous requests using curl_multi and callbacks
<?php
/**
* Make asynchronous requests to different resources as fast as possible and process the results as they are ready.
*/
class Requests
{
public $handle;
public function __construct()
{