Skip to content

Instantly share code, notes, and snippets.

View danmaq's full-sized avatar
:octocat:
:)

Shuhei Nomura danmaq

:octocat:
:)
View GitHub Profile
@danmaq
danmaq / __CreateCommonData.dnh
Created November 11, 2019 14:13
Text pack generator for Touhou CtC: Deploy to th_dnh/script/thC/ folder.
#東方弾幕風[Stage]
#Title[THC/CommonData作成]
#Text[
夢終劇データ作成用
めったくそに重いので注意
]
#ScriptVersion[2]
#BGM[]
script_stage_main{
@danmaq
danmaq / heif2jpg.sh
Created August 7, 2018 05:51
Convert HEIF(.heic) format photos to JPEG(.jpg) format.
#!/bin/sh
brew install libheif
# The “heif-convert” command is included in the libheif package.
heif-convert image.heic image.jpg
@danmaq
danmaq / showMarkdown.html
Last active April 30, 2018 06:41
If you embed Markdown, you can preview on browser only this HTML. Using: chjj/marked
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0" />
<title>Markdown preview</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/2.8.0/github-markdown.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.6/marked.min.js" integrity="sha384-aP8BvMiS2buEdB040zV1ZNg4Yz3vzmY0biq0UhB05amexdPMAx3uPjIvFWKa7Jnz" crossorigin="anonymous"></script>
<script type="text/template" id="source">
# Hello, world
@danmaq
danmaq / yarn_publish.exp
Created February 27, 2018 00:45
The Expect script for publishing package on npmjs.
#!/usr/bin/expect
set NPM_USER [lindex $argv 0]
set NPM_EMAIL [lindex $argv 1]
set NPM_PASS [lindex $argv 2]
set PROMPT "\[#%>\]"
spawn yarn publish
expect {
"New version" {
@danmaq
danmaq / hello-world.pl
Last active January 27, 2018 07:24
💡 Hello World without using literals.
#!/usr/bin/perl -w
use IO::File; #####################< MY BODY WIDTH EQUALS THE ASCII CODE. >#########################
my $hello_txt = IO::File->new(__FILE__, O_RDONLY); ########################################################
foreach ($hello_txt->getlines()) ##########################################################################
{ ############################################################################################################
my $length = length; ######
my $character = chr $length; #####################################################
print $character; ########################################################################################
} ###############################################################################################################
$hello_txt->close(); ######################################################################################
@danmaq
danmaq / kemoyuri.fs
Last active January 27, 2018 07:20
😺💡 サーバル関数とあかり関数の組み合わせ https://twitter.com/danmaq/status/828743554574880768 #ゆるゆり #けものフレンズ
let サーバル x = sprintf "きみは%sなフレンズなんだね!" x
let あかり x = sprintf "わぁい%sあかり%sだいすき!" x x
let Mixed x = サーバル (あかり (サーバル (あかり x)))
[<EntryPoint>]
let main argv =
printfn "%A" (Mixed "カバンちゃん")
0
// Question: https://twitter.com/danmaq/status/828743554574880768
@danmaq
danmaq / file0.txt
Last active January 8, 2018 12:45
jwilder/nginx-proxy で Qualys SSL Labs テストを 400 点満点にする ref: https://qiita.com/danmaq/items/bc70f609eb3177e40979
$ openssl dhparam -out dhparam.pem 4096
@danmaq
danmaq / call_windows_update.cmd
Last active November 19, 2017 22:30
Script of apply Windows Update automatically. (includes: http://www.vwnet.jp/Windows/PowerShell/FullAutoWU.htm )
@echo off
whoami /groups | Find "High Mandatory Level" > NUL
if not errorlevel 1 goto RUN
powershell -Command Start-Process -Verb runas "%0"
exit /b %errorlevel%
:RUN
powershell -NoProfile -ExecutionPolicy Unrestricted "$s=[scriptblock]::create((gc \"%~f0\"|?{$_.readcount -gt 9})-join\"`n\");&$s" %*
exit /b 0
Set-StrictMode -Version 2.0
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean --force && npm install && npm start -- --reset-cache
@danmaq
danmaq / danmaq.eetheme
Created July 31, 2017 10:42
My theme for EmEditor
[danmaq]
MaxFind=1
Normal=#ffffff,#595959,normal
Sel=transparent,#0080c0,normal
CurrentLine=transparent,#4d4d4d,normal
Quoted=#00c0c0,transparent,normal
Find=#000000,#40ff40,normal
URL=#ff8040,transparent,dotted
Mail=#00ff00,transparent,dotted