Skip to content

Instantly share code, notes, and snippets.

View mystasly48's full-sized avatar
🍣
Eating Sushi

Maisu mystasly48

🍣
Eating Sushi
View GitHub Profile
@mystasly48
mystasly48 / Hashtags.json
Last active April 7, 2020 21:21
Twitter hashtags for AGQR(超!A&G+)
[
{
"title": "&CAST!!!アワー ゴッドイーターフェンリル広報部",
"hashtag": "アンキャス"
},
{
"title": "&CAST!!!アワー ちょっとはんなり!",
"hashtag": "アンキャス"
},
{
@mystasly48
mystasly48 / ToshitaiRecorder.sh
Last active November 19, 2019 15:32
A script that records "Seven Eleven Presents - Sakura Toshitai Onishi". DO NOT UPLOAD any videos which recorded by this script. ONLY FOR PERSONAL USE.
#!/bin/bash
# toshitai starts at 23:30, and ends at 23:59, so duration is 1740 secs
now_date=`date +%Y%m%d`
start_time=`date --date "$now_date 23 hours 30 minutes" +%s`
#start_time=`date --date "$now_date 16 hours 35 minutes" +%s` # debug
now_time=`date +%s`
duration=1743
echo "Now : " `date +"%Y/%m/%d %H:%M:%S"`
@mystasly48
mystasly48 / MaxAndMinValue.cs
Last active June 3, 2018 12:55
doubleの最大値
using System;
using System.Numerics;
public class MaxAndMinValue {
public static void Main() {
BigInteger i = (BigInteger)double.MaxValue;
string j = i.ToString();
int k = j.Length - 1;
double l = int.Parse(j[0].ToString()) + (double)int.Parse(j[1].ToString())/10;
string m = (l == 1) ? "" : l + "*";
Console.WriteLine("double.MaxValue = {0}{1}≒ {2}10^{3}", i, Environment.NewLine, m, k);
@mystasly48
mystasly48 / FibonacciLarge.cs
Last active May 25, 2018 16:26
フィボナッチ数列の10000までに対応。応用すれば1000の階乗ぐらいまで行けるんじゃないかと思ってる。
using System;
using System.Linq;
public class FibonacciLarge {
public static void Main() {
int count = int.Parse(Console.ReadLine());
if (count > 10000 || count < 1) {
Console.WriteLine("Invalid value");
return;
}
if (count == 1) {
@mystasly48
mystasly48 / README.md
Last active February 25, 2021 15:26
SaveWindowsWallpaper 2 - Windows10 のロック画面に表示されたことのある WindowsSpotlight の画像を保存するプログラム 修正版

SaveWindowsWallpaper 2

Windows10 のロック画面に表示されたのとのある WindowsSpotlight の壁紙を保存するプログラム。

SaveWindowsWallpaper の問題点を修正したバージョンになります。

使い方

  1. csc.exe などを用いて自力でコンパイルしてください。
@mystasly48
mystasly48 / run.csx
Last active August 8, 2017 12:19
Slack の ShiritoriBot
#r "Newtonsoft.Json"
#r "System.Web.Extensions"
#r "System.Web"
#r "System.Xml.Linq"
using System;
using System.Net;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Web;
@mystasly48
mystasly48 / README.md
Last active May 8, 2017 12:00
Save Windows Wallpaper - Win10のロック画面に表示されたことのあるWindowsSpotlightの画像を保存するプログラム

Save Windows Wallpaper

Windows 10 のロック画面に表示されたのとのある Windows Spotlight の壁紙を保存するプログラム。

今このように README を書きながら、「Windows Spotlight ってなんだろう?」と思い調べてみたら、とても高機能な SpotBright とか言うアプリを見つけてとてもショック。

使い方

  1. csc.exe などで自力でコンパイルしてください。分からんって人は連絡くれれば送ります。
@mystasly48
mystasly48 / MaisuAverage.cs
Last active November 9, 2019 16:31
Average Methods
using System;
public class MaisuMath {
public static Int64 Average(params Int64[] values) {
if (values.Length == 0) throw new ArgumentException();
Int64 average;
for (Int64 i = 0; i < values.Length; i++) {
average += values[i];
}
average /= values.Length;
return average;
@mystasly48
mystasly48 / DriveOpenAndClose.vbs
Created January 29, 2017 07:31
DVD/CD ドライブの開閉
Dim wmp
Set wmp = CreateObject("WMPlayer.OCX")
wmp.cdromcollection.item(0).eject() 'OPEN
WScript.Sleep 1000 'WAIT A SECOND
wmp.cdromcollection.item(0).eject() 'CLOSE
WScript.Quit(eLevel)
while (true) { Beep(new Random().Next(40, 3000), new Random().Next(50, 1000)); System.Threading.Thread.Sleep(new Random().Next(1000, 3000)); }