Skip to content

Instantly share code, notes, and snippets.

View BlackHacked's full-sized avatar
📷
Hello World

Latin BlackHacked

📷
Hello World
View GitHub Profile
@paulmach
paulmach / serve.go
Last active July 20, 2024 04:04
Simple Static File Server in Go
/*
Serve is a very simple static file server in go
Usage:
-p="8100": port to serve on
-d=".": the directory of static files to host
Navigating to http://localhost:8100 will display the index.html or directory
listing file.
*/
package main
@rain1024
rain1024 / tut.md
Last active July 26, 2024 01:49
Install pdflatex ubuntu

PdfLatex is a tool that converts Latex sources into PDF. This is specifically very important for researchers, as they use it to publish their findings. It could be installed very easily using Linux terminal, though this seems an annoying task on Windows. Installation commands are given below.

  • Install the TexLive base
sudo apt-get install texlive-latex-base
  • Also install the recommended and extra fonts to avoid running into the error [1], when trying to use pdflatex on latex files with more fonts.
@srmds
srmds / Installing wkhtmltopdf 0.12.6, 0.12.5, 0.12.4 - Ubuntu 22.06 , 18.04, 16.04 x64, 0.12.6 - MacOS Ventura 13.6.md
Last active June 14, 2024 13:47
Installing wkhtmltopdf 0.12.4, 0.12.5 0.12.6 - Ubuntu 22.04 - 0.12.6, 16.04 x64, 0.12.5 - Ubuntu 18.04 x64 - 0.12.5 - macOS Ventura -13.6
@fortis
fortis / .drone.yml
Created January 19, 2018 22:27
drone docker plugins with layers cache
pipeline:
restore-cache:
image: drillster/drone-volume-cache
restore: true
ttl: 7
mount:
- /drone/docker
# Mount the cache volume, needs "Trusted"
volumes:
- /tmp/cache:/cache
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active July 26, 2024 10:08
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@raulqf
raulqf / Install_OpenCV4_CUDA11_CUDNN8.md
Last active July 24, 2024 08:42
How to install OpenCV 4.5 with CUDA 11.2 in Ubuntu 22.04

How to install OpenCV 4.5.2 with CUDA 11.2 and CUDNN 8.2 in Ubuntu 22.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@dcchambers
dcchambers / md2pdf.md
Last active July 7, 2024 14:16
Generate a PDF from Markdown files with Pandoc

Generate a PDF from a Markdown file with Pandoc

Easy Steps For Mac OS

  1. Have Homebrew installed and a markdown file you want to render to PDF.
  2. Install Pandoc brew install pandoc
  3. Install basictex brew cask install basictex - needed for the pdflatex tool.
  4. Symlink the pdflatex to your /usr/local/bin so pandoc can easily find it. ln -s /Library/TeX/Root/bin/x86_64-darwin/pdflatex /usr/local/bin/pdflatex
  5. Use Pandoc to generate a PDF from a Markdown file. pandoc input.md -o output.pdf
  • By default the margins are pretty large. To optionally change the margins: pandoc input.md -o output.pdf -V geometry:margin=1in
@BoWang816
BoWang816 / ubuntu中文支持,及中文乱码问题
Created October 8, 2019 10:25
[ubuntu中文支持,及中文乱码问题] #日常安装总结
ubuntu中文支持,及中文乱码问题
该篇博文,是本人踩了一下午的坑的成果,亲测有效。对服务器同样有效。
状况:所用的ubuntu系统不支持中文,遇见中文就????。ORZ…
目标:使系统/服务器支持中文,能够正常显示。
首先,安装中文支持包language-pack-zh-hans:
@ptantiku
ptantiku / setup-python3.8-via-ppa.sh
Last active April 14, 2023 12:31
Setup Python3.8 in Ubuntu Xenial (16.04 LTS). The python version was fixed at Python 3.5.1
#!/bin/sh
# install PPA
sudo add-apt-repository ppa:deadsnakes/ppa
# update and install
sudo apt update
sudo apt install python3.8 python3.8-dev python3.8-venv
# setup alternatives
@nkhitrov
nkhitrov / logger.py
Last active July 3, 2024 03:12
Configure uvicorn logs with loguru for FastAPI
"""
WARNING: dont use loguru, use structlog
https://gist.github.com/nkhitrov/38adbb314f0d35371eba4ffb8f27078f
Configure handlers and formats for application loggers.
"""
import logging
import sys
from pprint import pformat