Skip to content

Instantly share code, notes, and snippets.

View Jiab77's full-sized avatar
🤖
Search, Hack and Dev

Doctor Who Jiab77

🤖
Search, Hack and Dev
View GitHub Profile
gpg --gen-key
git config --global user.signingkey <KEY>
git config --global commit.gpgsign true
#!/usr/bin/env python2
import BaseHTTPServer
import SocketServer
import base64
import httplib
import mimetypes
import os
import shutil
import ssl
@Brainiarc7
Brainiarc7 / ffmpeg-qsv-enabled-build-ubuntu-18.04lts-testbed.md
Last active July 14, 2024 13:29
This gist will generate an Intel QSV-enabled FFmpeg build using the open source Intel Media SDK. Testbed used: Ubuntu 18.04LTS. A fallback is also provided for the intel vaapi driver where needed.

Build FFmpeg with Intel's QSV enablement on an Intel-based validation test-bed:

Build platform: Ubuntu 18.04LTS

Ensure the platform is up to date:

sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade

Install baseline dependencies first (inclusive of OpenCL headers+)

@Brainiarc7
Brainiarc7 / ubuntu-1804lts-ocl-preparedness.md
Last active September 12, 2024 05:37
Preparing Ubuntu 18.04LTS as an OpenCL development platform, with a sample build target provided by Pyrit to demonstrate OpenCL ICD coexistence.

Preparing Ubuntu 18.04LTS as an OpenCL development platform:

With OpenCL, the installable client drivers (ICDs) are normally issued with the accelerator's device drivers, namely:

  1. The NVIDIA CUDA toolkit (and the device driver) for NVIDIA GPUs.
  2. AMD's RoCM for GCN-class AMD hardware.
  3. Intel's beignet and the newer Neo compute runtime.

The purpose of the installable client driver model is to allow multiple OpenCL platforms to coexist on the same platform. That way, multiple OpenCL accelerators, be they discrete GPUs paired with a combination of FPGAs and integrated GPUs can all coexist.

@Brainiarc7
Brainiarc7 / intel-opencl-neo-build.md
Last active April 30, 2024 21:43
Build Intel's Neo OpenCL platform on Ubuntu 18.04LTS

Intel OpenCL stack enablement on Ubuntu 18.04LTS.

Here's how to build and install Intel's new OpenCL enablement stack, Neo, which replaces the legacy Beignet ICD.

Install the dependencies:

Build dependencies:

sudo apt-get install ccache flex bison clang-4.0 cmake g++ git patch zlib1g-dev autoconf xutils-dev libtool pkg-config libpciaccess-dev
#!/bin/sh
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@wesinator
wesinator / AUTOEXEC.BAT
Created April 29, 2018 02:09
IBM PC DOS config
@echo off
rem ********************************************************************************
rem * Setup base environment
rem ********************************************************************************
SET DIRCMD=/O
SET PROMPT=$p$g
SET PATH=\;\DOS;
CD \
@arcturus011
arcturus011 / jsx
Created April 23, 2018 02:06
narp comment
// import React from 'react'
// import {_, _c, _p, _cp} from 'i18n-utils'
var nodeGettext = require('node-gettext')
window.ifrxGT = window.ifrxGT || new nodeGettext()
function GetText(props) {
let {args, message, children, messagePlural, context} = props
let msg = message || children
let isPlural = props.messagePlural && args.count
let hasContext = props.context
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");