Skip to content

Instantly share code, notes, and snippets.

View hongquan's full-sized avatar
🏠
Working from home

Nguyễn Hồng Quân hongquan

🏠
Working from home
View GitHub Profile
@danyanya
danyanya / gist:b0d1a04af9a89ffbc0a4dfa9f19c6374
Created April 29, 2022 15:37
qcom-ipq4019-yuncore-xd6800.dts
#include "qcom-ipq4019.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
model = "Yuncore XD6800";
compatible = "yuncore,xd6800", "qcom,ipq4019";
soc {
mdio@90000 {
@dteoh
dteoh / command.md
Created September 15, 2021 00:26
Interactively delete git branches locally

Delete multiple Git branches with a UI

This assumes you have installed [fzf][1].

$ git branch --no-color | fzf -m | xargs -I {} git branch -D '{}'

Press tab to mark a branch, shift-tab to unmark. Press enter and all marked branches will be deleted.

@jonasl
jonasl / gst_fullscreen_wayland.py
Created November 12, 2019 19:31
Fullscreen GTK window with GStreamer glimagesink on Wayland
import gi
gi.require_version('Gdk', '3.0')
gi.require_version('GObject', '2.0')
gi.require_version('Gst', '1.0')
gi.require_version('GstGL', '1.0')
gi.require_version('GstVideo', '1.0')
gi.require_version('Gtk', '3.0')
from gi.repository import Gdk, GObject, Gst, GstGL, GstVideo, Gtk
Gst.init(None)
@edoput
edoput / main.vala
Last active April 12, 2020 04:15
an approach to Gstreamer with Vala
using Gst;
public int main(string args[])
{
Gst.init(ref args);
Gst.Element screen = Gst.ElementFactory.make ("ximagesrc", "source");
Gst.Element color_convert = Gst.ElementFactory.make ("videoconvert", "convert");
Gst.Element encoder = Gst.ElementFactory.make ("x264enc","encoder");
Gst.Element flv_muxer = Gst.ElementFactory.make ("flvmux", "muxer");
@willurd
willurd / web-servers.md
Last active July 5, 2024 18:32
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000