This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
obs = obslua | |
source_name = "" | |
last_text = "" | |
time_format = "" | |
function set_time_text() | |
text = os.date(time_format) | |
if text ~= last_text then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
obs = obslua | |
local bit = require("bit") | |
source_name = "" | |
function resize(pressed) | |
if not pressed then | |
return | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GameWispResponse<T> { | |
List<T> data; | |
Result result; | |
} | |
public class Result { | |
int status; | |
String message; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
import unicodecsv as csv | |
r = requests.get("https://www.txdirectory.com/online/txsenate/") | |
c = r.content | |
soup = BeautifulSoup(c, "html.parser") | |
reps = [] |