Skip to content

Instantly share code, notes, and snippets.

View siketyan's full-sized avatar
🍖
Hungry

Naoki Ikeguchi siketyan

🍖
Hungry
View GitHub Profile
@siketyan
siketyan / wikipedia.php
Last active September 10, 2017 14:41
Wikipediaでキーワード検索して、タイトルと概要部分を返すサンプル
<?php
$keyword = "キーワード";
$json = file_get_contents("https://ja.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&redirects=1&explaintext=1&titles=".urlencode($keyword));
$wiki = json_decode($json, true);
$page = current(array_slice($wiki['query']['pages'], 0, 1, true));
$title = $page['title'];
$body = rtrim(strstr($page['extract'], "==", true), "\n");
// 例
@siketyan
siketyan / WebSocketClient.cs
Last active December 31, 2019 08:12
Event-driven WebSocket Client on .NET
using System;
using System.Linq;
using System.Net.WebSockets;
using System.Text;
using System.Threading;
namespace WebSocketClient
{
public class WebSocketClient : IDisposable
{
@siketyan
siketyan / .editorconfig
Last active August 12, 2018 07:20
Common EditorConfig of C#.NET projects
# Suppress: EC112
root = true
################################
## File Formats and Indents
################################
[*]
charset = utf-8
@siketyan
siketyan / Recast.cs
Created December 9, 2018 06:26
Twitcasting Recorded Live Downloader with Password (Requires AngleSharp)
/*
*
* The MIT License (MIT)
*
* Copyright (C) 2018 Siketyan
*
* 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
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
from sys import exit
from tkinter import *
class Janken:
HANDS = ["g", "c", "p"]
STRINGS = ["グー", "チョキ", "パー"]
QUIT = ["q", "終了"]
@siketyan
siketyan / Problem.cs
Created March 24, 2019 14:13
Competitive Programming Template
using System;
using System.Collections.Generic;
using System.Linq;
namespace Contest
{
internal class Problem
{
public static void Main()
{
@siketyan
siketyan / TwiGrab.cs
Created April 6, 2019 14:03
Simple Twitter Media Grabbing App w/ 30-day Search API
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using CoreTweet;
using Newtonsoft.Json;
namespace TwiGrab
import sys
import tkinter
import wiringpi
LED_GPIO = 26
PWM_MAX = 100
class Led:
def __init__(self):
self.isEnabled = False

Keybase proof

I hereby claim:

  • I am siketyan on github.
  • I am siketyan (https://keybase.io/siketyan) on keybase.
  • I have a public key ASAF5wj0TiV9jND57lUEbqMzhZ5L_l-FiNFW4yrltKHjKwo

To claim this, I am signing this object:

FROM openjdk:8-jre-alpine
MAINTAINER Naoki Ikeguchi <siketyan@sikeserver.com>
ENV MINECRAFT_VERSION=1.13.2
RUN apk --update add curl git && \
rm -rf /var/cache/apk/*
RUN mkdir -p /src && \
mkdir -p /build && \