This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
date_default_timezone_set("UTC"); | |
class ShopifyMultipass { | |
private $encryption_key; | |
private $signature_key; | |
public function __construct($multipass_secret) { | |
// Use the Multipass secret to derive two cryptographic keys, | |
// one for encryption, one for signing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package app | |
import ( | |
"crypto/rand" | |
"encoding/hex" | |
"fmt" | |
"net/http" | |
"strings" | |
"time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Note: Use of this list tag implementation requires that `autoCloseTags` be set to true. | |
// Example use: | |
// [list] | |
// [*] Item 1 | |
// [*] Item 2 | |
// [/list] | |
compiler.SetTag("list", func(node *bbcode.BBCodeNode) (*bbcode.HTMLTag, bool) { | |
out := bbcode.NewHTMLTag("") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module PSReadLine | |
Import-Module posh-git | |
Set-PSReadLineOption -HistoryNoDuplicates:$True | |
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward | |
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward | |
# Revert posh-git prompt to default | |
function prompt { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import numpy as np | |
import time | |
# Define the initial states as strings | |
INITIAL_STATES = { | |
"glider": ".X\n" | |
"..X\n" | |
"XXX", |