Skip to content

Instantly share code, notes, and snippets.

@alinastorm
alinastorm / Untitled-2
Created January 27, 2019 19:25
ПРАВИЛА ОФОРМЛЕНИЯ ФАЙЛА README.MD НА GITHUB
**ПРАВИЛА ОФОРМЛЕНИЯ ФАЙЛА README.MD НА GITHUB*
<GITHUB></GITHUB>
Если вы начали работу на GitHub, решили загрузить туда свой проект для совместной работы с единомышленниками, то, скорее всего, в первую очередь перед вами встанет проблема создания первого файла – файла «readme.md».
Можно, конечно, просто выложить простой, неформатированный текстовой файл. Но вам захочется сделать его удобочитаемым, чтобы ссылки были выделены, блоки кода, присутствовали таблицы и так далее…
Эта статья поможет вам в этом.
Для форматирования текста на GitHub используются достаточно простые правила. Я перечислю основные и достаточные, так как не претендую на полноту официального руководства.
Текст можно обработать в любом простом текстовом редакторе, например в Notepad++, которым пользуюсь сам. А можно и прямо на GitHub редактировать файл в он-лайн режиме.
@jerodg
jerodg / windows_and_office_kms_setup.adoc
Last active April 16, 2024 20:41
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

@markscottwright
markscottwright / gist:d3330f76e89ee5cc0e51c155920285ff
Last active April 16, 2024 20:41
How to verify a detached pkcs7 signature
# how to verify the signature if you have the CAs certificate. This doesn't seem to work if you specify
# a subordinate CA, even if that CA is the one that issued the cert that created the signature.
openssl smime -verify -inform der -in signature-file -content signed-file -CAfile ca-certificate-in-pem-format
# how to verify everything except the certificate - so the signatures are checked, but no attempt is made
# to verify that the CAs certificate is trusted
openssl smime -verify -noverify -inform der -in signature-file -content signed-file
#!/bin/bash
# API keys for ZeroSSL and Digital Ocean
# These particular keys are fake random hex
ZEROSSL_KEY='0f027ac0f3b24ddb3c4412f11fa1e746'
DO_KEY='a3e6ee004fd7c352af61f0465765030b5d162acc94c24fdbb42f7a8c81e897a3'
# Set root domain and take CN from params
DOMAIN=subdomain.example.com
CERT_NAME="$1"."$DOMAIN"
@alexander-zap
alexander-zap / install-python.bash
Last active April 16, 2024 20:40 — forked from sumanthratna/install-python.bash
How to install Python 3.10.8 on Linux without sudo access (with SSL support)
# Updated https://gist.github.com/sumanthratna/17a265ffbcc846259ee7e59e80c2b8a4 to Python 3.10.8 and added SSL support
# Install OpenSSL locally
# Adapted from https://help.dreamhost.com/hc/en-us/articles/360001435926-Installing-OpenSSL-locally-under-your-username
mkdir openssl
cd openssl
wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz
tar zxvf openssl-1.1.1w.tar.gz
rm openssl-1.1.1w.tar.gz
cd openssl-1.1.1w
@inexorabletash
inexorabletash / @ Indexed DB - N-Dimensional Select.md
Last active April 16, 2024 20:38
Indexed DB - N-dimensional selection

Indexed DB - N-Dimensional Selection

The problem

We have an index with keys of the form:

[ dim1, dim2, dim3, ... ]

e.g. created with:

@cobitwork
cobitwork / noVNCCopyPasteProxmox.user.js
Last active April 16, 2024 20:37 — forked from amunchet/noVNCCopyPasteProxmox.user.js
Copy/Paste for noVNC Proxmox
// ==UserScript==
// @name noVNC Paste for Proxmox
// @namespace http://tampermonkey.net/
// @version 0.31
// @description Pastes text into a noVNC window (for use with Proxmox specifically), LastUpdate: 03/27/2024
// @author Chester Enright, Thor Yamaguchi
// @match https://*
// @include /^.*novnc.*/
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none
@assiless
assiless / MagiskSupport.md
Last active April 16, 2024 20:37
MagiskOnRedroid
setup variables for commands
echo -e "\n
export image=redroid/redroid:11.0.0-amd64
export image_tar=${HOME}/redroid:11.0.0-amd64" >> ${HOME}/.bashrc
source ${HOME}/.bashrc
nodes:
- id: webcam
custom:
source: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/opencv_stream.py
outputs:
- image
- id: idefics2
operator:
python: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/idefics2_op.py
inputs:
@gd3kr
gd3kr / embeddings.py
Created February 15, 2024 20:35
compute embeddings for tweets in tweets.json
"""
a simple script that reads tweets inside a json file, uses openai to compute embeddings and creates two files, metadata.tsv and output.tsv, which cam be used to visualise the tweets and their embeddings in TensorFlow Projector (https://projector.tensorflow.org/)
"""
# obtain tweets.json from https://gist.github.com/gd3kr/948296cf675469f5028911f8eb276dbc
import pandas as pd
import json
from openai import OpenAI