Skip to content

Instantly share code, notes, and snippets.

View xreiju's full-sized avatar

Reiju xreiju

View GitHub Profile
#!/usr/bin/rdmd
import std.regex;
import std.net.curl;
import std.stdio;
int main() {
char[] content;
try {
@xreiju
xreiju / Misskey.md
Last active December 24, 2016 02:10
The document of Misskey.xyz.

Postの扱い方

Swiftではこのようにプロパティを用意してあげる

var created_at: Date = Date.distantPast
var media_ids: [String]?
var reply_to_id: String?
var repost_id: String?
var text: String?
@xreiju
xreiju / knh.d
Created February 25, 2017 11:53
import std.stdio, std.format;
class KNH {
private bool _burn = false;
void burn() {
this._burn = true;
}
}
@xreiju
xreiju / Contents.swift
Last active July 13, 2020 11:59
オタクの過激発言の再現を可能にするコードです。
//: Playground - noun: a place where people can play
let クチャクチャ = 0
let 早口 = 0
let アディダスの財布 = 0
let ドヤ顔 = 0
let ギトギトの髪 = 0
let 運動靴 = 0
let 細い目 = 0
let 汚いメガネ = 0
import std.stdio : writeln;
import std.json : parseJSON, JSONValue;
import std.net.curl : get;
import std.parallelism : parallel;
import core.atomic : atomicOp;
import std.array : uninitializedArray;
void main()
{
immutable string KNH_URL = "http://api.knh.uno:8080/v1/challenge.json";
@xreiju
xreiju / montecarloPi.d
Created May 7, 2017 02:36
Calculate Pi with Monte Carlo Method in D
import std.stdio, std.random, std.math;
const POINT_AMOUNT = 1000;
struct Point {
real x, y;
bool isInCircle() {
real num = pow(x, 2) + pow(y, 2);
return num <= 1;
}
@xreiju
xreiju / app.d
Created December 26, 2017 08:21
import std.stdio;
import derelict.sdl2.sdl;
void main()
{
DerelictSDL2.load();
SDL_Init(SDL_INIT_VIDEO);
scope(exit) SDL_Quit();
SDL_Window* window;
@xreiju
xreiju / test.c
Last active December 26, 2017 08:28
#include <stdio.h>
#include <SDL2/SDL.h>
int main() {
SDL_Init(SDL_INIT_VIDEO);
SDL_Window* window;
SDL_Renderer* renderer;
SDL_CreateWindowAndRenderer(300, 300, SDL_RENDERER_PRESENTVSYNC, &window, &renderer);
int running = 1;

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@xreiju
xreiju / app.d
Created August 5, 2018 04:47
dependency: vibe-d
import vibe.http.websockets;
import vibe.core.log;
import vibe.core.core;
import vibe.inet.url;
import std.json;
import std.net.curl;
import std.parallelism;
import std.random;
import std.concurrency;
import std.stdio;