Skip to content

Instantly share code, notes, and snippets.

View letenkov's full-sized avatar
💯
Digital Nomad

Eugene Letenkov letenkov

💯
Digital Nomad
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 November 13, 2024 23:08
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 November 18, 2024 13:13
Про токены, 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"