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 / README.md
Last active February 25, 2021 15:26
SaveWindowsWallpaper 2 - Windows10 のロック画面に表示されたことのある WindowsSpotlight の画像を保存するプログラム 修正版

SaveWindowsWallpaper 2

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

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

使い方

  1. csc.exe などを用いて自力でコンパイルしてください。
@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 / GetCurrentDirectory.cs
Created November 4, 2016 02:18
主要なカレントディレクトリの取得方法
// カレントディレクトリの取得方法に疑問を抱いたので主要な方法をまとめてみた。(大きくは2種類しかないが)
// 以下にデバッグ環境(?)
// ソースファイルのパス C:\GetCurrentDirectory\GetCurrentDirectory.cs
// 実行ファイルのパス C:\GetCurrentDirectory\GetCurrentDirectory.exe
// サンプルファイルのパス C:\GetCurrentDirectory\Sample.txt
// カレントディレクトリ C:\
// 実行 => GetCurrentDirectory\GetCurrentDirectory.exe
public class GetCurrentDirectory {
public static void Main() {
@mystasly48
mystasly48 / GetDesktopDirectory.cs
Last active April 4, 2020 06:50
デスクトップのパスを取得する(環境変数ではなくレジストリだと思われるので確定的)
Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory));
@ochilab
ochilab / GetForegroundWindowProductName.cs
Last active August 25, 2019 21:52
C#:Activeになっているウィンドウのアプリケーション名を取得する
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll", EntryPoint = "GetWindowText", CharSet = CharSet.Auto)]
public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
[DllImport("user32.dll")]
private static extern uint GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId);
int processid;
@naosim
naosim / renameGitBranch.md
Last active May 5, 2024 01:14
ローカルとリモートのブランチ名を変更する

#ローカルとリモートのブランチ名を変更する

以下、ブランチ名を hoge から foo に変更する例

  • ローカルのブランチ名変更
git branch -m hoge foo
  • リモートのブランチを消す
@jogleasonjr
jogleasonjr / SlackClient.cs
Last active October 20, 2023 15:54
A simple C# class to post messages to a Slack channel. You must have the Incoming WebHooks Integration enabled. This class uses the Newtonsoft Json.NET serializer available via NuGet. Scroll down for an example test method and a LinqPad snippet. Enjoy!
using Newtonsoft.Json;
using System;
using System.Collections.Specialized;
using System.Net;
using System.Text;
//A simple C# class to post messages to a Slack channel
//Note: This class uses the Newtonsoft Json.NET serializer available via NuGet
public class SlackClient
{