Skip to content

Instantly share code, notes, and snippets.

View kamataryo's full-sized avatar
🦢
winter season

Kamata, Ryo kamataryo

🦢
winter season
View GitHub Profile
@elebescond
elebescond / gist:1433137
Created December 5, 2011 10:24
Generate a pot template from a wordpress theme - xgettext
find . -iname "*.php" > /tmp/my_theme_file_list.txt
# new template
xgettext --from-code=utf-8 -d my_theme -f /tmp/my_theme_file_list.txt --keyword=__ -o languages/my_theme.pot
# update template
xgettext --from-code=utf-8 -d my_theme -j -f /tmp/my_theme_file_list.txt --keyword=__ -o languages/my_theme.pot
@wakamsha
wakamsha / memo.md
Last active October 11, 2021 01:40
VirtualBox 内のゲスト OS からホスト OS にアクセスしたい

VirtualBox仮想マシンのネットワークはデフォルトでNATとなっている。 VirtualBox の場合、NAT ネットワークアダプタには 10.0.2.0/24 の IP アドレスが割り当てられ、ゲスト OS から見える ホスト OS の IP アドレスには 10.0.2.2 が設定される仕様。

したがってホストOS上に建てたサーバーにゲストOSからアクセスしたい場合は、http://10.0.2.2とアクセスすれば普通に見ることができる。

参考

@kjunichi
kjunichi / node.js_stl.md
Last active May 11, 2023 00:21
Node.jsで簡単にSTLファイルを作る

Node.jsで簡単にSTLファイルを作る

背景

Dockerで遊んでいたらDocker Meetup Tokyo #3 を開催しましたというページを見つけ、このページにDockerのマスコットがポリゴン化されている画像が貼ってあり、ページにリンクを辿ると、そこはGithubのページでこのDockerのマスコットがグリグリ回っており、ここでSTLファイルなるものの存在を初めて知りました。

Hogan.jsを使えば超簡単にSTLが吐ける

STLのフォーマットはアスキー形式でもOKであり、形状の情報のみなので、かなり単純です。Hogan.jsに限らずテンプレート化が超簡単です。

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" id="sgvzlr_script" src="http://sgvizler.googlecode.com/svn/release/0.5/sgvizler.js"></script>
<script type="text/javascript">
$(document).ready(sgvizler.go());
</script>
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 27, 2024 07:37
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@voluntas
voluntas / webrtc.rst
Last active June 27, 2024 02:25
WebRTC コトハジメ
@lukas-h
lukas-h / license-badges.md
Last active July 27, 2024 13:38
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@nownabe
nownabe / .commit_template
Created July 5, 2016 06:54
Emojiで楽しく綺麗なコミットを手に入れる
# ==== Emojis ====
# 🐛 :bug: バグ修正
# 👍 :+1: 機能改善
# ✨ :sparkles: 部分的な機能追加
# 🎉 :tada: 盛大に祝うべき大きな機能追加
# ♻️ :recycle: リファクタリング
# 🚿 :shower: 不要な機能・使われなくなった機能の削除
# 💚 :green_heart: テストやCIの修正・改善
@teppeis
teppeis / es-class-fields.md
Last active March 13, 2022 13:57
ES Class Fieldsのプライベートフィールドがハッシュな変態記法なのは何でなんだぜ?

ES Class Fields (Stage 2 now)

プライベートフィールドがハッシュな変態記法なのは何でなんだぜ?

class Point {
    #x;
    #y;
 constructor(x = 0, y = 0) {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<main></main>
<script crossorigin src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>