Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@urasandesu
urasandesu / Get-SqliteTableColumns.ps1
Created January 20, 2024 02:07
This script gets the columns info (cid, type, notnull, ...) of the SQLite tables that are contained in the specified DB file.
#
# File: Get-SqliteTableColumns.ps1
#
# Author: Akira Sugiura ([email protected])
#
#
# Copyright (c) 2024 Akira Sugiura
#
# This software is MIT License.
#
@urasandesu
urasandesu / TwitterSearchBookmarklet.js
Created April 6, 2023 05:27
The bookmarklet to search urasandesu last 1 month's tweets with retweets.
javascript: (function () {
let user = 'urasandesu';
let today = new Date();
let lastMonth = new Date();
lastMonth.setMonth(today.getMonth() - 1);
let since = lastMonth.toISOString().slice(0, 10);
let until = today.toISOString().slice(0, 10);
location.href = 'https://twitter.com/search?q=' + encodeURIComponent(`from:${user} include:nativeretweets since:${since} until:${until}`);
})();
@urasandesu
urasandesu / Start-JupyterLab.ps1
Created September 23, 2022 10:10
PowerShell script to start JupyterLab with workspace URL directly. Now, the using browser is fixed by Chrome, so rewrite line 24 if you want to change to another one.
[CmdletBinding()]
param (
[Parameter(Mandatory = $True)]
[string]
$Workspace
)
Write-Verbose ('Workspace : {0}' -f $Workspace)
$psi = New-Object System.Diagnostics.ProcessStartInfo
@urasandesu
urasandesu / Program.cs
Last active January 4, 2018 04:12
This is the sample checking kernel progress for Alea GPU
using Alea;
using Alea.CSharp;
using System;
using System.Threading;
namespace AleaCheckKernelProgressSample
{
class Program
{
static void Main(string[] args)
@urasandesu
urasandesu / Program.cs
Created December 21, 2017 12:11
Using F# Data as a runtime type inferencer for a csv file
using FSharp.Data;
using FSharp.Data.Runtime;
using FSharp.Data.Runtime.StructuralTypes;
using Microsoft.FSharp.Collections;
using System;
using System.Globalization;
using System.Linq;
class Program
{
@urasandesu
urasandesu / Synq.cs
Last active September 2, 2017 12:48
Compositable Synchronization Primitives
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
namespace Synq
{
class Program
{
static void Main(string[] args)
@urasandesu
urasandesu / Class1.cs
Created April 29, 2017 00:39
Visual Studio 2017 does not load .runsettings file. The following sample works fine in Visual Studio 2013.
using NUnit.Framework;
using System.Diagnostics;
namespace RunSettings2017
{
[TestFixture]
public class Class1
{
[Test]
public void ProcessNameTest()
@urasandesu
urasandesu / dd_setup_20170409151449_errors.log
Created April 9, 2017 07:30
This is the error log when I executed Visual Studio 2017 (15.1.0+26403.0) installer to create the offline layout.
[12d8:0001][2017-04-09T16:02:12] Error 0x80041643:
Package 'Win10SDK_10.0.15063.UWP,version=10.0.15063.15' failed to create layout cache. The return code of the layout creation is: 1.
[12d8:0001][2017-04-09T16:02:13] Error 0x80041643:
Package 'Win10SDK_10.0.15063.UWP.Native,version=10.0.15063.14' failed to create layout cache. The return code of the layout creation is: 1.
[12d8:0001][2017-04-09T16:02:14] Error 0x80041643:
Package 'Win10_Emulator_10.0.15063,version=10.0.15063.12,chip=x64' failed to create layout cache. The return code of the layout creation is: 1.
[12d8:0001][2017-04-09T16:02:15] Error 0x80041643:
Package 'Win10SDK_10.0.14393.795,version=10.0.14393.79504' failed to create layout cache. The return code of the layout creation is: 1.
[12d8:0001][2017-04-09T16:02:17] Error 0x80041643:
Package 'Win10SDK_10.0.10586.212,version=10.0.10586.21211' failed to create layout cache. The return code of the layout creation is: 1.
@urasandesu
urasandesu / Dbghelp_lib_hangs_up.cpp
Last active April 1, 2017 02:26
Debug Help Library hangs up - About SymGetSymFromAddr of Debug Help Library, we found it hangs up in the application that is built by Visual Studio 2017. It was no problem in Visual Studio 2013. I attached the solution files of 2013, 2017 and the mini dump that is in hanging up.
// DbgHelp2013.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Dbghelp.h>
#include <iostream>
#include <string>
int _tmain(int argc, _TCHAR* argv[])
{