Skip to content

Instantly share code, notes, and snippets.

@wafe
wafe / convertTime.js
Created November 9, 2023 06:49 — forked from g1eb/convertTime.js
Convert seconds to a human readable representation
export function convertTime(seconds) {
var seconds = parseInt(seconds, 10)
var hours = Math.floor(seconds / 3600)
var minutes = Math.floor((seconds - (hours * 3600)) / 60)
var seconds = seconds - (hours * 3600) - (minutes * 60)
if ( !!hours ) {
if ( !!minutes ) {
return `${hours}h ${minutes}m ${seconds}s`
} else {
return `${hours}h ${seconds}s`
@wafe
wafe / excel_xml_spreadsheet_example.md
Created January 4, 2023 03:47 — forked from ilyazub/excel_xml_spreadsheet_example.md
Excel 2003 XML Spreadsheet example

Excel 2003 XML Spreadsheet example

Example

image

spreadsheet.xml

Solved errors

Problem During Load because of wrong ss:ExpandedRowCount.

@wafe
wafe / 한글과유니코드.md
Created August 9, 2019 06:14 — forked from Pusnow/한글과유니코드.md
한글과 유니코드

한글과 유니코드

유니코드에서 한글을 어떻게 다루는지를 정리하였다.

유니코드

  • 유니코드(Unicode)는 전 세계의 모든 문자를 컴퓨터에서 일관되게 표현하고 다룰 수 있도록 설계된 산업 표준 (위키 백과)
  • 단순히 문자마다 번호를 붙임
  • 계속 업데이트되며 현재는 Unicode Version 9.0.0 이 최신이다.

UTF

  • 유니코드를 실제 파일 등에 어떻게 기록할 것인지를 표준화한 것이다.
@wafe
wafe / Import-PfxCertificate.ps1
Last active April 28, 2020 20:56 — forked from deadlydog/Import-PfxCertificate.ps1
PowerShell script that imports a .pfx certificate file. To install pfx certificate on IIS
param($PfxFilePath, $Password)
$absolutePfxFilePath = Resolve-Path -Path $PfxFilePath
Write-Output "Importing store certificate '$absolutePfxFilePath'..."
Add-Type -AssemblyName System.Security
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
$cert.Import($absolutePfxFilePath, $Password, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags] "MachineKeySet, PersistKeySet")
$store = new-object system.security.cryptography.X509Certificates.X509Store -argumentlist "MY", LocalMachine
$store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]::"ReadWrite")
@wafe
wafe / C# php Serializer.cs
Last active July 25, 2016 12:37 — forked from xiangwan/C php Serializer.cs
C# php Serializer
/// <summary>
/// Serializer Class.
/// </summary>
public class PhpSerializer
{
//types:
// N = null
// s = string
// i = int