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 / 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 / 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
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
@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 / danmaq.terminal
Created May 5, 2017 01:57
My theme for macOS Terminal.app
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BackgroundBlur</key>
<real>0.049349713962891201</real>
<key>BackgroundColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKyxYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMZHSQoVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
@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 / dotEraseRegex.js
Created February 24, 2017 01:16
Delete dots appearing after the second time. example: 10.234.156.78 -> 10.23415678
const re = /(\.)(.*)\1+/;
const replace = s => s.match(re) ? replace(s.replace(re, '$1$2')) : s;