Skip to content

Instantly share code, notes, and snippets.

View beshkenadze's full-sized avatar

Aleksandr Beshkenadze beshkenadze

View GitHub Profile
#!/bin/sh
LATEST=$(wget -qO- "https://api.github.com/repos/docker/buildx/releases/latest" | jq -r .name)
wget https://github.com/docker/buildx/releases/download/$LATEST/buildx-$LATEST.linux-amd64
chmod a+x buildx-$LATEST.linux-amd64
mkdir -p ~/.docker/cli-plugins
mv buildx-$LATEST.linux-amd64 ~/.docker/cli-plugins/docker-buildx
echo "Done!"
!
! Title: My Custom filter
docker volume create rancher-data
docker run -d --name rancher --restart=unless-stopped -p 80:80 -p 443:443 -v rancher-data:/var/lib/rancher rancher/rancher --acme-domain domain.ltd
<?php
$srcImage = "./test.jpg";
list($width, $height) = getimagesize($srcImage);
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($srcImage);
imagecopyresampled($image_p,$image,0,0,0,0,100, 100, $width, $height);
imagejpeg($image_p, "./test2.jpg", 100);
@beshkenadze
beshkenadze / Dockerfile
Created April 8, 2019 17:58
PHP7 with gd (jpeg enabled)
FROM php:fpm-alpine
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \
freetype \
libpng \
libjpeg-turbo \
freetype-dev \
libpng-dev \
{
"name": "token_frontender_magazine",
"version": "1.0.0",
"private": false,
"scripts": {
"start": "node ./build/server.js",
"build:dev": "babel source -s true -d build --ignore __tests__/**,__mocks__/**",
"build": "babel source --minified -s true -d build --ignore __tests__/**,__mocks__/**",
"watch": "babel source --watch --minified -s true -d build --ignore __tests__/**,__mocks__/**"
},
@beshkenadze
beshkenadze / test_front.md
Last active September 29, 2018 13:49
Тестовое задание для Frontend-разработчика

##Погодное одностраничное веб-приложение

(!) Данные можно взять с сайта openweathermap.org или с любого другого сервиса.

Приложение должно уметь:

  • Добавлять/удалять города
  • Сохранять локально данные
  • Автоматически запрашивать погоду по координатам пользователя - это город/место по умолчанию.
/**
* Module Dependencies
*/
const errors = require('restify-errors');
/**
* Model Schema
*/
const Message = require('../models/message');
19:57:21.035 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'Switch_Plug' received command OFF
19:57:21.035 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d000124511a on channel mihome:sensor_plug:158d000124511a:power received command OFF
19:57:21.036 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while calling handler: java.lang.NullPointerException
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at org.eclipse.smarthome.core.common.SafeMethodCaller.executeDirectly(SafeMethodCaller.java:220)[98:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:189)[98:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)[98:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)[98:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core
{
"errors: [
{
"error_code": "1001", // любой индитификатор ошибки, необходим для точного опознования ошибки
"error_description": "Поле bet может содержать только цифры" // общий текст ошибки для показа пользователю.
}
]
}