Skip to content

Instantly share code, notes, and snippets.

View letenkov's full-sized avatar
😀
Focusing

Eugene Letenkov letenkov

😀
Focusing
View GitHub Profile
#!/usr/bin/env python3
import usb.core
import struct
from collections import namedtuple
APPLE_VID = 0x05ac
Target = namedtuple("Target", ["vid", "pid", "name", "model", "total_size"])
@vfarcic
vfarcic / 238-cue.sh
Last active December 21, 2023 06:26
# Source: https://gist.github.com/vfarcic/a5cb2e8dcd1cf9c14194db3310d5c282
#########################################################
# Is CUE The Perfect Language For Kubernetes Manifests? #
# https://youtu.be/Z-fdFEvgNss #
#########################################################
# Additional Info:
# - Cue: https://cuelang.org
# - Helm vs Kustomize - The Fight Between Templating and Patching in Kubernetes: https://youtu.be/ZMFYSm0ldQ0
@sidpalas
sidpalas / maintenance-page.yaml
Last active July 10, 2024 18:29
Kubernetes temporary maintenance page
apiVersion: v1
kind: ConfigMap
metadata:
name: maintenance-page
data:
maintenance.html: |-
<!--HTML GOES HERE-->
<!doctype html>
<title>Site Maintenance</title>
<link rel="stylesheet" href="maintenance.css">
@tuannvm
tuannvm / python-cheatsheet.md
Last active September 11, 2022 00:05
python cheatsheet! #cheatsheet

Introduction

Set

a = {1, 2, 3}

a.add(1)

{1,2,3}

@elnygren
elnygren / ansible_module.py
Created April 15, 2017 13:10
Ansible module boilerplate
DOCUMENTATION = '''
---
module: boilerplate
short_description: This is an example boilerplate module.
description:
- Boilerplate ansible module
- Use as a base for building your own modules and learning about how ansible modules work.
author: "Elias Nygren (@elnygren)"
options:
state:
@zmts
zmts / tokens.md
Last active July 28, 2024 08:03
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@Brainiarc7
Brainiarc7 / ffmpeg-howto-localfiles-manipulation.md
Created July 25, 2016 13:43
This is a standard how-to for FFmpeg's usage with local files and streams. Small hand-book detailing common encode scenarios in a standard workflow.

Standard FFmpeg How-to

Table of Contents

* Generic Syntax

* Main Options

* Encoding :
@sosedoff
sosedoff / 1_simple.go
Created July 16, 2016 18:45
Golang Custom Struct Tags Example
package main
import (
"fmt"
"reflect"
)
// Name of the struct tag used in examples
const tagName = "validate"