Skip to content

Instantly share code, notes, and snippets.

View Tosainu's full-sized avatar
🌸
ヾ( ╹◡╹ 🌸 )ノ"

Kenta Sato Tosainu

🌸
ヾ( ╹◡╹ 🌸 )ノ"
View GitHub Profile
@Tosainu
Tosainu / live
Created March 10, 2014 05:33
ffmpegでLive配信
#!/bin/sh
RTMP_URL=''
STREAM_KEY=''
VIDEO_SOURCE='/dev/video0'
VIDEO_INPUT_SIZE='1280x720'
VIDEO_OUTPUT_SIZE='640x360'
VIDEO_FRAMERATE=10
VIDEO_BITRATE=288
VIDEO_BUFFER=500
@Tosainu
Tosainu / stap.cc
Last active August 29, 2015 14:02
例のアレ
#include <iostream>
#include <random>
auto main() -> int {
std::mt19937 rd{std::random_device()()};
std::uniform_int_distribution<const char> stuff('A', 'Z');
unsigned long long int cnt;
std::string cell;
@Tosainu
Tosainu / cute_AA.txt
Last active October 25, 2024 04:38
顔文字詰め合わせ
あせ (・_・;) 顔文字
あせ (・∀・;) 顔文字
あせ (^ω^;;) 顔文字
あせ (゚∀゚ ;) 顔文字
あせ (゚∀゚ ;)タラー 顔文字
あたふた ヽ(´・ω・`ヽ) 顔文字
あつい (。>﹏<) 顔文字
あつい (。>﹏<)あㄘ”ゅい 顔文字
あつい (>﹏<。Ξ。>﹏<) 顔文字
あつい ι(´Д`υ) 顔文字
@Tosainu
Tosainu / niconico.js
Created August 14, 2014 04:27
ニコ動にログインしてデフォルトのマイリスト(とりあえずマイリスト)を取得
var request = require('request').defaults({jar: true});
var options_login = {
url: 'https://secure.nicovideo.jp/secure/login?site=niconico',
form: {
mail_tel: 'YOUR MAIL ADDR',
password: 'YOUR PASSWORD'
}
};
@Tosainu
Tosainu / PKGBUILD
Last active September 13, 2020 09:09
My Vim PKGBUILD.
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Anatol Pomozov <[email protected]>
# Contributor: Thomas Dziedzic <[email protected]>
# Contributor: Jan "heftig" Steffens <[email protected]>
# Contributor: tobias [ tobias at archlinux org ]
# Contributor: Daniel J Griffiths <[email protected]>
# Contributor: Christian Hesse <[email protected]>
# Contributor: Eli Schwartz <[email protected]>
# Customized: Tosainu <[email protected]>
@Tosainu
Tosainu / fizzbuzz.cc
Last active August 29, 2015 14:10
g++ -std=c++11 -Wall -Wextra `pkg-config ruby-2.1 --cflags --libs` fizzbuzz.cc
#include <iostream>
#include <ruby.h>
auto main() -> int {
ruby_init();
ruby_init_loadpath();
int status;
rb_eval_string_protect(R"(
1.upto(100) do |x|
@Tosainu
Tosainu / Makefile
Last active August 29, 2015 14:11
twitppを使ったC++11製update_name. Tosainu/twitppとdropbox/json11, 最新のBoostと(gcc|clang)が要ります.
update_name: update_name.cc json11/json11.cpp
clang++ -Wall -Wextra -std=c++14 -ltwitpp $^ -o $@
"ponymix decrease 1"
XF86AudioLowerVolume
"ponymix increase 1"
XF86AudioRaiseVolume
"ponymix toggle"
XF86AudioMute
"brillo -q -s intel_backlight -u 100000 -U 1"
@Tosainu
Tosainu / jsobject.h
Last active November 21, 2021 23:54
QWebViewの中の<button>からC++のコードを呼び出すテスト
#ifndef JSOBJ_H
#define JSOBJ_H
#include <QtCore>
#include <QDebug>
class JsObj : public QObject {
Q_OBJECT
public:
QT += core gui webkitwidgets
TEMPLATE = app
TARGET = QWebView_example
INCLUDEPATH += .
SOURCES += main.cc
CONFIG += c++11