Skip to content

Instantly share code, notes, and snippets.

View nuitsjp's full-sized avatar

Atsushi Nakamura nuitsjp

View GitHub Profile
@Grabacr07
Grabacr07 / Counter.cs
Last active August 28, 2018 07:10
LINQPad で KanColleViewer のダウンロード数かぞえるやつ (要 Json.NET)
using (var client = new HttpClient())
{
var url = new Uri("https://api.github.com/repos/Grabacr07/KanColleViewer/releases");
client.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("Grabacr07-LINQPad", "1.0"));
var result = Util.Cache(() => client.GetAsync(url).Result);
var json = await result.Content.ReadAsStringAsync();
var start = new DateTime(2015, 02, 01);
var end = start.AddYears(1).AddMilliseconds(-1.0);
@ko2ic
ko2ic / 00-chocolatey-install.bat
Last active February 5, 2020 20:17
00-chocolatey-install.batだけでOK。古い今は大丈夫→ windowsの環境構築をバッチファイルでやる。chocolatey-install.batで別プロセスでcinst を呼んでも駄目だった。https://github.com/chocolatey/chocolatey/issues/371
powershell Set-ExecutionPolicy RemoteSigned
powershell iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
powershell Set-ExecutionPolicy Restricted
set PATH=%PATH%;C:\Chocolatey\bin;
call cinst .\packages.config
pause
@yoshikazuendo
yoshikazuendo / BackgroundWorkerSample.xaml
Created April 7, 2014 02:11
WPFのBackgroundWorkerのサンプル
<Window x:Class="WpfBackGroundWorker.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<ProgressBar Name="ProgressBar1" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="12,12,0,0" Height="16" Width="254" Minimum="0" Maximum="100" Value="0"/>
<Button Content="START" Height="23" HorizontalAlignment="Left" Margin="12,34,0,0" Name="btnStart" VerticalAlignment="Top" Width="75" Click="btnStart_Click"/>
<Button Content="STOP" Height="23" HorizontalAlignment="Right" Margin="0,34,110,0" Name="btnStop" VerticalAlignment="Top" Width="75" Click="btnStop_Click"/>
</Grid>
</Window>