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
function SporeTracking(clientID) | |
{ | |
this._address = "http://trackingpic.marten-online.com/trac/tracking.gif?"; | |
this._clientID = clientID; | |
this.DebugElement = null; | |
this._prefixTime = "smdt"; | |
if (!this._defined) | |
{ | |
SporeTracking.prototype._defined = true; |
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.15.1-alpine3.16 | |
# Create app directory | |
WORKDIR /usr/src/app | |
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true | |
ENV NODE_ENV production | |
ENV PORT 5000 | |
EXPOSE 5000 |
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 | |
WORKDIR /app/ | |
RUN yarn build | |
FROM nginx:1.11.1 | |
RUN rm /etc/nginx/conf.d/default.conf | |
ADD nginx.conf /etc/nginx/conf.d/web.conf | |
COPY --from=builder /app/build /www/static |
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 path from "path"; | |
import fs from "fs"; | |
import React from "react"; | |
import ReactDOMServer from "react-dom/server"; | |
import express from "express"; | |
import App from "../src/App"; | |
const PORT = process.env.PORT || 3000; |
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 { useEffect, useRef } from 'react'; | |
import isEqual from 'lodash/isEqual'; | |
export const useCompare = (value) => { | |
const prevValue = usePrevious(value); | |
return !isEqual(prevValue, value); | |
}; | |
export const usePrevious = (value) => { | |
const ref = useRef(); |
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
Problem: Customer complained that he is not able to log in to the system. His credentials: | |
username: El'Jose | |
Password: si"ai^#i | |
When the developer saw the code, he got hearthattack. Why? What is wrong with the code | |
PS: This was maybe for PHP 5.6, so take that to the account. | |
<?php | |
ini_set('display_errors', 1); | |
ini_set('register_globals', 1); |
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
function resizeBase64Img(base64Str: string, maxWidth = 500, maxHeight = 500) { | |
return new Promise<string>((resolve) => { | |
const img = new Image(); | |
img.src = base64Str; | |
img.onload = () => { | |
const canvas = document.createElement('canvas'); | |
const MAX_WIDTH = maxWidth; | |
const MAX_HEIGHT = maxHeight; | |
let {width, height} = img; |
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
#!/usr/local/bin/bash | |
apt-get update | |
apt-get upgrade | |
apt-get install -y vim mc unzip | |
# Docker | |
apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release | |
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<map><branch branch_id="200900001" branch_name="Administrativa" profession_id="201100451" profession_name="Referent"/><branch branch_id="200900001" branch_name="Administrativa" profession_id="201100452" profession_name="Vkládání dat do počítače"/><branch branch_id="200900001" branch_name="Administrativa" profession_id="201100453" profession_name="Pracovník back office"/><branch branch_id="200900001" branch_name="Administrativa" profession_id="201100002" profession_name="Administrativní pracovník"/><branch branch_id="200900001" branch_name="Administrativa" profession_id="201100017" profession_name="Asistentka"/><branch branch_id="200900001" branch_name="Administrativa" profession_id="201100058" profession_name="Fakturantka"/><branch branch_id="200900001" branch_name="Administrativa" profession_id="201100197" profession_name="Office Manager"/><branch branch_id="200900001" branch_name="Administrativa" profession_id="201100264" profession_name="Recepční"/><branch branch_id=" |
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
version: "3" | |
services: | |
php: | |
build: | |
context: ./ | |
dockerfile: Dockerfile | |
depends_on: | |
- vpn | |
# This container can access services which are in VPN |
NewerOlder