Skip to content

Instantly share code, notes, and snippets.

View MarlikAlmighty's full-sized avatar
🏠
Working from home

Marlik Almighty MarlikAlmighty

🏠
Working from home
View GitHub Profile
@MarlikAlmighty
MarlikAlmighty / gist:0d028553096006c4ec14d659890120e1
Created September 15, 2023 03:29
Encrypt/Decrypt with OpenSSL
#include <openssl/rsa.h>
#include <openssl/pem.h>
int encryptData(const unsigned char *plaintext, int plaintextLength, unsigned char *ciphertext, EVP_PKEY *publicKey)
{
EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new(publicKey, NULL);
if (!ctx)
{
// Handle error
return -1;
import React from "react";
import axios from "axios";
import 'semantic-ui-css/semantic.min.css';
import {
Form,
Button,
GridRow,
Grid,
Container,
} from "semantic-ui-react";
FROM golang:1.18 AS builder
# Ignore APT warnings about not having a TTY
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get install -y \
wget build-essential \
pkg-config \
--no-install-recommends \
@MarlikAlmighty
MarlikAlmighty / gist:e340216e6d338a80a47e9f87f8e41163
Created January 16, 2022 01:19
Send email over socks proxy on golang
package main
import (
"crypto/tls"
"fmt"
"io"
"log"
"net"
"net/mail"
"time"
sudo apt-get install autoconf automake libtool curl make g++ unzip -y
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig # refresh shared library cache.
@MarlikAlmighty
MarlikAlmighty / teams_response.go
Created November 28, 2019 02:27
Teams Response
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"strconv"
@MarlikAlmighty
MarlikAlmighty / teams_request.go
Created November 28, 2019 02:24
Teams Request
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"strconv"
#!/usr/bin/perl -w
use strict;
use warnings;
use POSIX;
use File::Pid;
# Имя демона
my $daemonName = "mydaemon";
# Используется в цикле для выхода
my $dieNow = 0;
# Путь к файлу PID, важно добавить свой путь куда есть доступ