What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-13 05:00:38
rails jwt create
hmac_secret = 'my$ecretK3y' token = JWT.encode payload, hmac_secret, 'HS256' # eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjoidGVzdCJ9.pNIWIL34Jo13LViZAJACzK6Yf0qnvT_BuwOxiMCPE-Y puts token decoded_token = JWT.decode token, hmac_secret, true, { algorithm: 'HS256' } ... Add solution -
Other 2022-03-02 19:00:09
IDAutomation_Uni_C128
Public Function IDAutomation_Uni_C128(DataToEncode As String, Optional applyTilde As Boolean = False) As StringDim myOut As String'Variable to be populated by DLL method with formatted dataDim iSize As Long 'The size of the formatted data. Also, populated... Add solution -
PHP 2022-02-18 18:45:12
generate jwt token in php
// Create token header as a JSON string $header = json_encode(['typ' => 'JWT', 'alg' => 'HS256']); // Create token payload as a JSON string $payload = json_encode(['user_id' => 123]); // Encode Header to Base64Url String $base64UrlHeader = str_... Add solution -
CSS 2021-10-19 12:52:05
background url ss svg
/* if you have file image svg like below */ <svg> <circle r="50" cx="50" cy="50" fill="tomato"/> <circle r="41" cx="47" cy="50" fill="orange"/> <cir... Add solution -
PHP 2021-09-23 12:45:04
interview php questions
# 27 basics questions for php Interview 1) What is PHP? PHP is a web language based on scripts that allow developers to dynamically create generated web pages. 2) What do the initials of PHP stand for? PHP means PHP: Hypertext Preprocessor. 3) Which pr... Add solution -
PHP 2021-09-10 10:12:02
php interview questions
# 27 basics questions for php Interview 1) What is PHP? PHP is a web language based on scripts that allow developers to dynamically create generated web pages. 2) What do the initials of PHP stand for? PHP means PHP: Hypertext Preprocessor. 3) Which pr... Add solution -
Python 2021-09-05 16:31:02
byte strings python
It is a common misconception that text is ascii or utf8 or cp1252, and therefore bytes are text. Text is only text, in the way that images are only images. The matter of storing text or images to disk is a matter of encoding that data into a sequence of ... Add solution