Skip to content

Instantly share code, notes, and snippets.

View jrd's full-sized avatar
:octocat:
Working

Cyrille Pontvieux jrd

:octocat:
Working
View GitHub Profile
#!/bin/bash
# Bug report to introduce the feature in pamac:
# https://gitlab.manjaro.org/applications/pamac/-/issues/131
# how many version parts shall be compared? Default to 1 (only major versions)
N=${1-1}
{
pamac checkupdates
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active May 23, 2024 07:35
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@ragnraok
ragnraok / iframe-probe.py
Created September 9, 2019 07:24 — forked from alastairmccormack/iframe-probe.py
Shows GOP structure for video file using ffmpeg --show-frames output
#!/usr/bin/env python
#
# Shows GOP structure of video file. Useful for checking suitability for HLS and DASH packaging.
# Example:
#
# $ iframe-probe.py myvideo.mp4
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
@Skinner927
Skinner927 / classproperty.py
Last active October 12, 2020 23:01
Properties for Python Classes. Supports get and set.
"""
To use simply copy ClassPropertyMeta and classproperty into your project
"""
class ClassPropertyMeta(type):
def __setattr__(self, key, value):
obj = self.__dict__.get(key, None)
if type(obj) is classproperty:
return obj.__set__(self, value)
@Geekfish
Geekfish / patch_with_reload.py
Last active July 27, 2023 08:44
Same as patch, but allows you to pass a module object which will be reloaded when entering/leaving the context.
import imp
from functools import partial
from mock.mock import _patch, _get_target, DEFAULT
class PatchWithReload(_patch):
def __init__(self, module_to_reload, *args, **kwargs):
self.module_to_reload = module_to_reload
super(PatchWithReload, self).__init__(*args, **kwargs)
@mosquito
mosquito / README.md
Last active May 22, 2024 17:17
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@mixja
mixja / Dockerfile
Last active September 17, 2019 11:06
Docker Health Check using Make
FROM nginx
HEALTHCHECK --interval=3s --retries=20 CMD curl -fs http://localhost:${HTTP_PORT:-8000}
@5310
5310 / .XCompose
Last active October 3, 2022 18:38
[Defunct] My sequences for use with the Compose key. Based off of kragen/xcompose and then overridden. Now part of Bash-It dotfiles repo. #dotfile
# ~/.XCompose
### Based on the en_US.UTF locale. ###
include "/usr/share/X11/locale/en_US.UTF-8/Compose"
### Populated with Kragen's additions. ###
@leonidessaguisagjr
leonidessaguisagjr / py-git-cat-file.py
Last active July 30, 2023 06:46
Studying git internals: implement `git cat-file` in Python
#!/usr/bin/env python3
"""Implementation of git cat-file in Python.
This Gist is published under the MIT License:
MIT License
Copyright (c) 2019 Leonides T. Saguisag, Jr.
Permission is hereby granted, free of charge, to any person obtaining a copy
@kalbasit
kalbasit / debug info
Last active July 8, 2018 09:04
Nginx Reverse Proxy
$ docker --version
Docker version 1.11.1, build 5604cbe
$ uname -a
Linux hermes 4.5.1-1-ARCH #1 SMP PREEMPT Thu Apr 14 19:19:32 CEST 2016 x86_64 GNU/Linux
$ cat /etc/os-release
NAME="Arch Linux"
ID=arch
PRETTY_NAME="Arch Linux"
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"