Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#include <gst/gst.h>
typedef struct _AppElements {
GMainLoop *loop;
GstElement *pipeline;
GstElement *source;
GstElement *demuxer;
GstElement *convert;
@stylesuxx
stylesuxx / trick.c
Created September 30, 2014 20:27
gst trick player
#include <stdio.h>
#include <stdlib.h>
#include <gst/gst.h>
typedef struct _AppElements {
GMainLoop *loop;
GstElement *pipeline;
GstElement *source;
GstElement *demuxer;
GstElement *convert;
-- ExportSQLite: SQLite export plugin for MySQL Workbench
-- Copyright (C) 2009 Thomas Henlich
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
@stylesuxx
stylesuxx / FullWindowWidthScrollArea.cpp
Last active July 1, 2019 23:13
Expand the widgets inside a scrollArea to the maximum possible size, or the window to the minimum possible size.
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QVBoxLayout>
#include <QScrollArea>
#include <QSlider>
#include <QWidget>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
@stylesuxx
stylesuxx / x4convert.sh
Last active August 29, 2015 13:57
Convert the faulty avi files that the X4 quadrocopter saves on the remote
#!/bin/bash
#
# Convert the (broken) avi files saved by the hubsan x4 H107D remote.
#
# This gstreamer pipeline reindexes the avi file, crops the broken parts of the
# image to the right and left and fixes the aspect ratio. The new files are
# saved into the 'fixed' folder.
#
# <chris@1337.af>
# Place in the folder where all the libdrc dependencies are.
#
# Remove the mac80211 module and load the patched one
# For this to work we need to first unload all the wifi modules, load
# the patched mac80211 stack and then load back the wifi modules.
# After this hostappd and netboot are started. One can connect to both of them via sudo screen.
WLAN=wlan1 # Interface Name
BSSID=34:af:2c:4d:a7:65 # BSSID of the WiiU pad
DOMAIN=AT # The regulatory domain for WiFi
@stylesuxx
stylesuxx / jhr.js
Created October 4, 2013 18:11 — forked from Zirak/jhr.js
//this is a tiny helper method for making JSON Http Requests
//if you want a more comprehensive solution, write it yourself
//
//the callback function will receive two arguments: the response,
// parsed as JSON, and the xhr object used inside jhr, with an added
// responseJSON property (you can probably guess what it is)
//
//this always sends a POST request, and the data is always serialized to JSON
//
//returns the xhr object used