Skip to content

Instantly share code, notes, and snippets.

Avatar

Aleksandr Beshkenadze beshkenadze

View GitHub Profile
View buildx-install.sh
#!/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!"
View Untitled-1
#!/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!"
View Rancher with the persist volume
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
View test.php
<?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 Apr 8, 2019
PHP7 with gd (jpeg enabled)
View Dockerfile
FROM php:fpm-alpine
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \
freetype \
libpng \
libjpeg-turbo \
freetype-dev \
libpng-dev \
View package.json
{
"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__/**"
},
View server.js
/**
* Module Dependencies
*/
const errors = require('restify-errors');
/**
* Model Schema
*/
const Message = require('../models/message');
View crash.log
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
View error_response.json
{
"errors: [
{
"error_code": "1001", // любой индитификатор ошибки, необходим для точного опознования ошибки
"error_description": "Поле bet может содержать только цифры" // общий текст ошибки для показа пользователю.
}
]
}