Skip to content

Instantly share code, notes, and snippets.

View DeNcHiK3713's full-sized avatar

Denis Suchok DeNcHiK3713

View GitHub Profile
using System;
using System.Runtime.InteropServices;
class Program
{
[StructLayout(LayoutKind.Explicit)]
struct Union
{
[FieldOffset(0)]
public string str;
@ericvoid
ericvoid / MultipartFormBuilder.cs
Last active August 1, 2023 21:31
C# WebClient Multipart Form Upload
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace WebClientMultipartExtension
{
public class MultipartFormBuilder
{
static readonly string MultipartContentType = "multipart/form-data; boundary=";
@PolarNick239
PolarNick239 / printerbot.py
Created August 7, 2017 20:58
Telegram bot for printer (Linux)
import os
import pathlib
import logging
from telegram.ext import Updater
from telegram.ext import Filters
from telegram.ext import CommandHandler
from telegram.ext import MessageHandler
# This is the Telegram Bot that prints all input documents. It can print pdf and txt files.
# Before sending files for printing user must enter the password by command "/auth <password>".