Skip to content

Instantly share code, notes, and snippets.

View qt.rb
# Patches for Qt must be at the very least submitted to Qt's Gerrit codereview
# rather than their bug-report Jira. The latter is rarely reviewed by Qt.
class Qt < Formula
desc "Cross-platform application and UI framework"
homepage "https://www.qt.io/"
url "https://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz"
mirror "https://www.mirrorservice.org/sites/download.qt-project.org/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz"
sha256 "05ffba7b811b854ed558abf2be2ddbd3bb6ddd0b60ea4b5da75d277ac15e740a"
head "https://code.qt.io/qt/qt5.git", :branch => "5.10", :shallow => false
View lib.rs
extern crate nng;
extern crate hidapi;
use hidapi::HidApi;
use std::os::raw::{c_int, c_char, c_void};
use std::ptr;
use std::ffi::CString;
use std::io::{self, Write};
use std::process::Command;
View gist:463b97fb971f114eb7dd4a4d401bd99c
extern crate nng;
extern crate hidapi;
use hidapi::HidApi;
use std::os::raw::{c_int, c_char, c_void};
use std::ptr;
use std::ffi::CString;
use std::io::{self, Write};
use std::process::Command;
View lib.rs
use std::os::raw::{c_int, c_char, c_void};
use std::ptr;
use std::ffi::CString;
use std::io::{self, Write};
#[repr(C)] // ensures that the memory layout of the struct is the same in Rust as in C.
pub struct obs_module_t {
pub mod_name: *mut c_char,
pub file: *const c_char,
pub bin_path: *mut c_char,
View clock.lua
obs = obslua
source_name = ""
last_text = ""
time_format = ""
function set_time_text()
text = os.date(time_format)
if text ~= last_text then
View resize.lua
obs = obslua
local bit = require("bit")
source_name = ""
function resize(pressed)
if not pressed then
return
end
View shitty_source.lua
-- haha you can only create sources in lua, python will never be allowed
-- because of its dumb global lock
obs = obslua
source_def = {}
source_def.id = "shitty_source"
source_def.output_flags = bit.bor(obs.OBS_SOURCE_VIDEO, obs.OBS_SOURCE_CUSTOM_DRAW)
source_def.get_name = function()
@DDRBoxman
DDRBoxman / minimal_vst2x_host.cpp
Created Jan 2, 2017 — forked from t-mat/minimal_vst2x_host.cpp
WIN32 : Minimal VST 2.x host in C++11.
View minimal_vst2x_host.cpp
// Win32 : Minimal VST 2.x Synth host in C++11.
//
// This is a simplified version of the following project by hotwatermorning :
// A sample VST Host Application for C++ Advent Calendar 2013 5th day.
// https://github.com/hotwatermorning/VstHostDemo
//
// Usage :
// 1. Compile & Run this program.
// 2. Select your VST Synth DLL.
// 3. Press QWERTY, ZXCV, etc.
View gist:4da3c6f07f915da85b91485499d05ef6
func highlight(conn *irc.Conn, channel string, user string, line string, args []string) {
rconn := pool.Get()
defer rconn.Close()
if !isMod(rconn, channel, user) {
log.Printf("User %s tried to access !quote on %s add and wasn't a mod\n", user, channel)
return
}
c := channel[1:]
resp, err := twitchClient.GetChannelVideos(c, true, 1)
View gist:2dbc4d38d4ae747a7a21c12e057e3e0d
public class SigningClient implements Client {
final Client wrapped;
public SigningClient(Client client) {
wrapped = client;
}
@Override public Response execute(Request request) {
Request newRequest = sign(request);
return wrapped.execute(newRequest);
You can’t perform that action at this time.