Skip to content

Instantly share code, notes, and snippets.

@comoc
comoc / scantest.cpp
Created February 22, 2024 14:03 — forked from bertrandmartel/scantest.cpp
Bluez BLE scanning example (port of https://github.com/carsonmcdonald/bluez-experiments in C++)
// g++ scantest.cpp -lbluetooth
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <iostream>
#include <signal.h>
#include <bluetooth/bluetooth.h>
@mminer
mminer / VerticallyFlipRenderTexture.cs
Created February 18, 2021 21:39
Unity function to vertically flip a render texture.
/// <summary>
/// Vertically flips a render texture in-place.
/// </summary>
/// <param name="target">Render texture to flip.</param>
public static void VerticallyFlipRenderTexture(RenderTexture target)
{
var temp = RenderTexture.GetTemporary(target.descriptor);
Graphics.Blit(target, temp, new Vector2(1, -1), new Vector2(0, 1));
Graphics.Blit(temp, target);
RenderTexture.ReleaseTemporary(temp);
function doPost(e) {
// トークンの確認
var VERIFY_TOKEN = "XXXXXXXXXXXXXXXXXXXXXXXX"; // 1. トークン
if (VERIFY_TOKEN != e.parameter.token) {
throw new Error("invalid token.");
}
var googleCalenderId = "[email protected]"; // 2. GoogleカレンダーのID
var scheduleWords = '俺のスケジュール'; // 3. この後の数字が最大日数になる
var maxDay = 14; // 4. デフォルト最大日数
var startHour = 11; // 5. 予定可能開始時間(この時間から〜)
@voluntas
voluntas / open_momo.rst
Last active August 17, 2024 07:04
OpenMomo プロジェクト
@RangelReale
RangelReale / gist:3e6392289d8ba1a52b6e70cdd7e10282
Last active June 22, 2024 23:08
How to compile ffmpeg + x264 using Visual Studio 2015
##### How to compile ffmpeg + x264 using Visual Studio 2015 #####
##### Building this way will make the DLLs compatible with SEH, so there will be no need to use /SAFESEH:NO when compiling your code #####
##### SOURCES:
### https://pracucci.com/compile-ffmpeg-on-windows-with-visual-studio-compiler.html
### https://gist.github.com/sailfish009/8d6761474f87c074703e187a2bc90bbc
### http://roxlu.com/2016/057/compiling-x264-on-windows-with-msvc
* Download "MSYS2 x86_64" from "http://msys2.github.io" and install into "C:\workspace\windows\msys64"
@jhorology
jhorology / gist:f05a0f00cfeb12c3751dfcd9f047c72c
Created September 15, 2016 00:24
Compiling Ableton/link with Qt on OSX
brew install qt5
brew linkapp qt5
brew link --force qt5
ln -s /usr/local/opt/qt5/mkspecs /usr/local/mkspecs
ln -s /usr/local/opt/qt5/plugins /usr/local/plugins
git clone https://github.com/Ableton/link.git
cd link
git submodule update --init --recursive
mkdir build
cd build
@asus4
asus4 / GraphAttribute.cs
Last active June 13, 2024 10:47
Show graph as unity custom attribute
/*
MIT License
Copyright (c) 2021 Koki Ibukuro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@fishkingsin
fishkingsin / build.sh
Created July 25, 2016 08:05
script to build ffmpeg and x264 for android
#!/bin/bash
#
# Author: Renato L. F. Cunha <[email protected]>
# This file is available according to the MIT license. Please refer to the
# LICENSE file for details.
#
# This script builds a version of FFmpeg with h.264 support enabled by means of
# the libx264 library.
#
@yohhoy
yohhoy / ff2cv.cpp
Last active July 24, 2024 14:05
Read video frame with FFmpeg and convert to OpenCV image
/*
* Read video frame with FFmpeg and convert to OpenCV image
*
* Copyright (c) 2016 yohhoy
*/
#include <iostream>
#include <vector>
// FFmpeg
extern "C" {
#include <libavformat/avformat.h>
@JasonGhent
JasonGhent / pi_qemu.sh
Last active March 24, 2024 14:36
OSX raspberry pi emulation via QEMU. v2 attempt @ https://gist.github.com/JasonGhent/922f38f57c8cb77b10f3
# pulled from http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/
# expanded via http://superuser.com/questions/690060/how-to-enable-network-with-a-raspberry-pi-emulated-on-qemu
# tested with 2015-02-16-raspbian-wheezy.zip on OSX Mavericks
# OSX terminal
brew install qemu
# kernel-qemu is a linux kernel compiled with ARM1176 support.
# learn more here: http://xecdesign.com/compiling-a-kernel/
curl -OL http://xecdesign.com/downloads/linux-qemu/kernel-qemu
curl -o raspbian_latest.zip -L http://downloads.raspberrypi.org/raspbian_latest