Skip to content

Instantly share code, notes, and snippets.

View CmST0us's full-sized avatar

eki CmST0us

  • DJI
  • Shenzhen, China
View GitHub Profile
@Lauszus
Lauszus / os-release-bionic
Last active October 31, 2023 12:52
Nvidia SDKManager on Ubuntu 20.04
# Put in "/usr/lib/os-release-bionic"
NAME="Ubuntu"
VERSION="18.04 (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04"
VERSION_ID="18.04"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
# update pacman dbs
# sudo pacman -Syy
# install 950q driver if missing
# https://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-HVR-950Q
if [[ ! -f /lib/firware/dvb-fe-xc5000-1.6.114.fw ]]; then
wget http://www.kernellabs.com/firmware/xc5000/dvb-fe-xc5000-1.6.114.fw
mv dvb-fe-xc5000-1.6.114.fw /lib/firmware/
@djarek
djarek / send_fd.cpp
Created December 6, 2018 01:59
send_fd.cpp
#include <boost/asio/coroutine.hpp>
#include <boost/asio/local/connect_pair.hpp>
#include <boost/asio/local/stream_protocol.hpp>
#include <iostream>
#include <sys/wait.h>
std::size_t
send_fd(boost::asio::local::stream_protocol::socket& socket,
int fd,
boost::system::error_code& ec)
@Miouyouyou
Miouyouyou / drm-prime-dumb-kms.c
Last active October 25, 2024 06:17
Simple example showing how to use DRM to : allocate a Dumb buffer on the GPU, use it as a framebuffer, use this CRTC on the currently connected screen (expecting 1 connected screen), export the buffer, reimport it implicitly with mmap and write in it.
// This will works on Embedded GPU that implements .gem_prime_mmap like Rockchip ones.
// This will fail on most DRM drivers for GPU with dedicated memory as they tend to NOT implement .gem_prime_mmap.
#include <stdio.h>
#include <libdrm/drm.h>
#include <stdint.h>
#include <sys/mman.h>
#include <string.h>
@MikuAuahDark
MikuAuahDark / HonokaMiku.cpp
Last active July 20, 2019 13:14
SIF Decryption (prototype). The fully working project is in https://github.com/MikuAuahDark/HonokaMiku
// HonokaMiku.cpp
// Loads SIF libGame.so and execute it's decrypt function
// 10/15/2015: JP is now supported. Requires SIF JP v2.0.5 x86 libGame.so
#if !defined(_M_IX86) && !defined(__i386__)
#error "Only x86 targets are supported!"
#endif
#include <cstdlib>
@irazasyed
irazasyed / homebrew-permissions-issue.md
Last active October 6, 2025 14:03
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*