Skip to content

Instantly share code, notes, and snippets.

View tarhan's full-sized avatar

Dmitriy Lekomtsev tarhan

  • Moscow, Russian Federation
View GitHub Profile
@rise-worlds
rise-worlds / build_ffmpeg_aarch64_cross.sh
Last active April 18, 2024 15:44
build ffmpeg with openssl rtmp x264 fdk-aac opus
#!/bin/bash
# sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
# sudo apt install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
# sudo apt install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
dpkg-query -l gcc-aarch64-linux-gnu > /dev/null || sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
dpkg-query -l aria2 > /dev/null || sudo apt install -y aria2
export LOCAL_PATH=$(pwd)
@elmot
elmot / CMakeLists.txt
Last active March 10, 2025 15:58
CMake template for dual-core STM32 MCU
# CMakeLists.txt for dual-core STM32H7xx MCUs and CLion IDE
#
# DISCLAIMER: Experimental version, based on undocumented assumptions how STM32CubeMX works
# DISCLAIMER: THIS FILE IS PROVIDED UNDER "The Unlicense" LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND
#
# Requirements:
# Toolchain binaries have to be in system path
# STM32CubeMX field "Project Manager | Code Generator | Target IDE" must be set to "STM32CubeIDE"
#
# Tested under environment:
@val-ms
val-ms / win32-test-with-dlls.cmake
Last active November 18, 2024 08:49
An example using CMake/CTest to collect runtime DLL dependencies prior to testing
lib/lib.h:
lib/lib_private.h:
lib/lib.c:
#
# Assume some C library that makes use of OpenSSL
#
lib/CMakeLists.txt:
#
# Test executables
@jamesfulford
jamesfulford / useLocalStorage.js
Last active December 2, 2021 08:32
useLocalStorage() React Hook (from https://usehooks.com/useLocalStorage/)
import { useState } from "react";
export function useLocalStorage<T>(key: string, initialValue: T): [T, (s: T) => void] {
// State to store our value
// Pass initial state function to useState so logic is only executed once
const [storedValue, setStoredValue] = useState<T>(() => {
try {
// Get from local storage by key
const item = window.localStorage.getItem(key);
// Parse stored json or if none return initialValue
@dragolabs
dragolabs / ubuntu-vnc-without-monitor.md
Created April 29, 2020 20:09
Run VNC without connected monitor to ubuntu Desktop

Install Video Dummy Package

sudo apt-get install xserver-xorg-video-dummy

Create Default X Windows Configuration File

Create / Edit xorg.conf file Rename file if already exists for backup

@cristianadam
cristianadam / bundle_static_library.cmake
Created January 17, 2020 00:30
CMake function which bundles multiple static libraries into one
# MIT License
#
# Copyright (c) 2019 Cristian Adam
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@raulqf
raulqf / Install_OpenCV4_CUDA12.6_CUDNN8.9.md
Last active April 10, 2025 17:27
How to install OpenCV 4.10 with CUDA 12 in Ubuntu 24.04

Install OpenCV 4.10 with CUDA 12.6 and CUDNN 8.9 in Ubuntu 24.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@akabe1
akabe1 / frida_multiple_unpinning.js
Last active April 10, 2025 05:32
Another Android ssl certificate pinning bypass for various methods
/* Android ssl certificate pinning bypass script for various methods
by Maurizio Siddu
Run with:
frida -U -f <APP_ID> -l frida_multiple_unpinning.js [--no-pause]
*/
setTimeout(function() {
Java.perform(function() {
console.log('');
@zodman
zodman / Steps to Obtain Client Secret.md
Created October 4, 2018 00:27 — forked from darthShadow/Steps to Obtain Client Secret.md
Mega Account Creator. Handles registration using megareg. Handles verification using Google Client API.
  1. Use this wizard to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, then Go to credentials.
  2. On the Add credentials to your project page, click the Cancel button.
  3. At the top of the page, select the OAuth consent screen tab. Select an Email address, enter a Product name (Mega Account Creator) if not already set, and click the Save button.
  4. Select the Credentials tab, click the Create credentials button and select OAuth client ID.
  5. Select the application type Other, enter the name "Mega Account Creator", and click the Create button.
  6. Click OK to dismiss the resulting dialog.
  7. Click the Download JSON button to the right of the client ID.
  8. Move this file to your working directory and rename it client_secret.json.