Skip to content

Instantly share code, notes, and snippets.

View mayuki's full-sized avatar
🍣
時すでに - That sushi has sailed.

Mayuki Sawatari mayuki

🍣
時すでに - That sushi has sailed.
View GitHub Profile
@mayuki
mayuki / CredentialUI.cs
Created March 22, 2010 10:22
Windows Common Credential UI Helper for .NET Framework
/*
* CredentialUI.cs - Windows Credential UI Helper
*
* License: Public Domain
*
*/
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Security;
@mayuki
mayuki / Program.cs
Created January 22, 2012 08:46
Get Display Size
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
"manifest_version": 2,
"name": "Dummy Extension",
"version": "1.0",
"background": {
"page": "background.html"
},
"permissions": [
"activeTab",
"alarms",
@mayuki
mayuki / Program.cs
Created January 14, 2016 12:22
ChakraCore Sample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ChakraHost.Hosting;
namespace ConsoleApplication2
{
class Program
C:\>type Get-Hoge.ps1
$args | %{ Write-Host $_ }
C:\>powershell -File Get-Hoge.ps1 "foo bar" "hauhau maumau"
foo bar
hauhau maumau
C:\>powershell -Command "&{ $args | %{ Write-Host $_ } }" "foo bar" "hauhau maumau"
foo
bar
<!DOCTYPE html>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>HTMLOptionElement: 全角スペース</title>
<script>
function showText() {
var E = document.querySelector('option');
alert([
'E.text: ' + E.text,
'E.textContent: ' + E.textContent,
@mayuki
mayuki / gist:3864931
Created October 10, 2012 11:26
リソースファイルをひねり出す。
dir -r *.resx | %{ $xmldoc = [xml](Get-Content $_); $xmldoc.root.data | ?{ -not [System.String]::IsNullOrWhiteSpace($_.name)} | %{ $_.value = ("[EN]" + $_.value + "[/EN]") }; $xmldoc.Save($_.FullName.Substring(0,$_.FullName.Length-4)+"en.resx") }
@mayuki
mayuki / Web.config
Created April 3, 2012 14:38
Web.config
<?xml version="1.0" encoding="utf-8"?>
<!--
ASP.NET アプリケーションの構成方法の詳細については、
http://go.microsoft.com/fwlink/?LinkId=152368 を参照してください
-->
<configuration>
<system.webServer>
<serverSideInclude ssiExecDisable="true" />
@helper TestHelper() {
{<text>@DateTime.Now.Ticks</text>}
}
@mayuki
mayuki / PHPE9568F34-D428-11d2-A769-00AA001ACF42Module.cs
Created September 12, 2011 10:17
PHPE9568F34-D428-11d2-A769-00AA001ACF42 for ASP.NET / IIS7
using System;
using System.Collections.Generic;
using System.Web;
namespace PHPE9568F34_D428_11d2_A769_00AA001ACF42
{
/// <summary>
/// PHPE9568F34-D428-11d2-A769-00AA001ACF42
/// http://phpsadness.com/sad/11
/// </summary>