This file contains 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
#!/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 |
This file contains 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
#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; |
This file contains 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
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' | |
} | |
}; |
This file contains 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
#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| |
This file contains 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
update_name: update_name.cc json11/json11.cpp | |
clang++ -Wall -Wextra -std=c++14 -ltwitpp $^ -o $@ |
This file contains 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
#include <QCoreApplication> | |
#include <QJsonDocument> | |
#include <QJsonObject> | |
#include <QDebug> | |
int main(int argc, char *argv[]) { | |
QCoreApplication a(argc, argv); | |
auto json = QJsonDocument::fromJson(QByteArray(R"( | |
{ |
This file contains 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
#include <QCoreApplication> | |
#include <QJsonDocument> | |
#include <QJsonObject> | |
#include <QJsonValue> | |
#include <QString> | |
#include <QDebug> | |
class JsonValue : public QJsonValue { | |
public: | |
JsonValue(QJsonValue&& value) : QJsonValue(value) {} |
This file contains 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
#if !defined HELPER_HPP | |
#define HELPER_HPP | |
#include <codecvt> | |
#include <locale> | |
#include <string> | |
namespace helper { | |
std::string to_string(const std::wstring& src) { |
This file contains 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
#include <iostream> | |
#include <boost/asio.hpp> | |
auto main(int argc, char** argv) -> int { | |
if (argc != 3) { | |
std::cerr << "Usage: " << argv[0] << " <ip> <port>" << std::endl; | |
return 1; | |
} | |
boost::asio::io_service io; |
This file contains 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
# nyan! | |
TARGET = out | |
SRC = http_client.cc | |
# compiler configs | |
CFLAGS = /nologo /c /EHsc /GL /GS /Gy /MD /MP /O2 /W3 /Zi /sdl /Fd:$(TARGET).pdb | |
INCPATH = /I"$(BOOST_INCLUDEDIR)" /I"$(OPENSSL_INCLUDEDIR)" | |
DEFINES = /D_WIN32_WINNT=0x0601 |
OlderNewer