Skip to content

Instantly share code, notes, and snippets.

View v3c70r's full-sized avatar
🐱
Cats typing ...

QGu v3c70r

🐱
Cats typing ...
View GitHub Profile
@Justasic
Justasic / test.cpp
Created June 4, 2013 19:54
Use C++11 features to implement a function queue which calls functions later but queues them up in a FIFO queue. Compile with: clang -std=c++11 -stdlib=libc++
#include <iostream>
#include <functional>
#include <queue>
// These includes are for later experimentation
#include <thread>
#include <atomic>
std::queue<std::function<void()>> funcs;
@JosefJezek
JosefJezek / how-to-use-pelican.md
Last active May 12, 2024 11:19
How to use Pelican on GitHub Pages
@Rod-Persky
Rod-Persky / CMakeLists.txt
Last active January 31, 2024 12:57
Example cmake for windows including auto copy dll
# _______ __ __ _______ ______ _______ _______ _______ ______ #
#| || | | || || | | _ || || || | #
#| _ || | | ||_ _|| _ || |_| ||_ _|| ___|| _ |#
#| | | || |_| | | | | | | || | | | | |___ | | | |#
#| |_| || | | | | |_| || | | | | ___|| |_| |#
#| || | | | | || _ | | | | |___ | |#
#|_______||_______| |___| |______| |__| |__| |___| |_______||______| #
# #
# Modern CMake practices and importing the QT scripts by adding it to #
# your module path makes things a lot better than it used to be #
@domenic
domenic / 0-github-actions.md
Last active May 26, 2024 07:43
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@akshayloke
akshayloke / RGBtoI420.frag
Created October 7, 2016 16:36
Implementation for converting RGB data to YUV I420 data. Very useful when you want to encode RGB video feed for writing to file or sending over WebRTC..
varying lowp vec2 vUV;
uniform sampler2D compositeTexture;
uniform highp vec2 screenSize;
uniform highp vec2 halfScreenSize;
uniform highp vec2 doubleScreenSize;
uniform highp vec2 invScreenSize;
uniform highp vec3 numYUVPixels;
@LiteCoder
LiteCoder / CCTV5
Created June 29, 2018 14:17
CCTV5直播源
★ 代表个人推荐度————海外人士首选,来自huarenTV——————
★★★★★★CCTV5 http://lcok.net/live/tao.m3u8
★★★★★★CCTV5 http://lcok.net/live/tao2.m3u8
★★★★★★CCTV 5+http://lcok.net/live/jia.m3u8
★★★★★★CCTV 5+http://lcok.net/live/jia2.m3u8
———————只能用播放器,如遇无法打开,依次继续用下面的链接,6月29日更新:下面链接随时会挂,不定时恢复———————————
★★★★★★CCTV5 蓝光 (四川电信,延迟10秒,所有浏览器&#10008;,海外党√,Windows 用 potplayer,Mac和安卓用 MPV)
rtsp://118.123.56.56:554/PLTV/88888893/224/3221227219/10000100000000060000000001366244_0.smil
rtsp://118.123.56.55:554/PLTV/88888893/224/3221227219/10000100000000060000000001366244_0.smil
rtsp://118.123.56.54:554/PLTV/88888893/224/3221227219/10000100000000060000000001366244_0.smil
@manuelbl
manuelbl / README.md
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on