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 java.security.MessageDigest | |
import javax.crypto.Mac | |
import javax.crypto.spec.SecretKeySpec | |
fun checkSignature(token: String, initData: String): Boolean { | |
// Convert the data string to a map | |
val initDataMap = initData.split('&') | |
.map { it.split('=') } | |
.associate { it[0] to it[1] } | |
.toMutableMap() |
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
VPN_IPSEC_PSK=secret | |
VPN_USER=user | |
VPN_PASSWORD=pass | |
VPN_ADDL_USERS=user2 user3 | |
VPN_ADDL_PASSWORDS=pass2 pass3 |
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
FROM node:16-alpine AS builder | |
WORKDIR /app | |
COPY package.json yarn.lock ./ | |
RUN yarn | |
COPY . ./ |
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
# Zakupy | |
# Sign in into system | |
POST {{host}}/v1/auth/signin | |
Accept: application/json | |
Content-Type: application/json | |
{ | |
"email": "email", | |
"password": "password" |
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
const fs = require("fs"); | |
const json = fs.readFileSync("out.json"); | |
const content = JSON.parse(json); | |
content.responses[0].hits.hits.map(function (obj) { | |
console.log('type', obj._source.type); | |
console.log('date', obj._source.date); | |
console.log('sequence', obj._source.sequence); | |
console.log(''); | |
}); |
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 | |
// Look for token | |
$token = (isset($_GET['token']) && preg_match('/^[0-9a-f]{8}$/', $_GET['token'])) ? $_GET['token'] : false; | |
if (!$token) { | |
$token = sprintf('%08x', crc32(microtime())); | |
} | |
// get current minute, build APC key |
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
CREATE TABLE cbrf | |
( | |
cbrf_id SERIAL NOT NULL | |
CONSTRAINT "PK_cbrf" | |
PRIMARY KEY, | |
start_date DATE NOT NULL, | |
refinancing_rate DOUBLE PRECISION, | |
created TIMESTAMP DEFAULT now() NOT NULL | |
); |
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
#! /bin/sh | |
# /etc/init.d/ices | |
# | |
case "$1" in | |
start) | |
echo "Starting IceS..." | |
screen -A -m -d -S ices ices -c /usr/local/etc/ices.conf | |
echo "IceS started" | |
;; |
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
$customer = Customers::find() | |
->where(['Customer_id' => $customer_id]) | |
->with('Orders') | |
->asArray() | |
->all(); | |
[ | |
{ | |
"Customer_id": "3", | |
"Serial_number": "102", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<link href="https://rawgit.com/Semantic-Org/Semantic-UI/next/dist/semantic.css" rel="stylesheet" type="text/css"> | |
<script src="https://code.jquery.com/jquery-3.1.1.js" type="text/javascript"></script> | |
<script src="https://rawgit.com/Semantic-Org/Semantic-UI/next/dist/semantic.js" type="text/javascript"></script> | |
<style type="text/css"> | |
.ui.image { | |
width: 120px; |
NewerOlder