Skip to content

Instantly share code, notes, and snippets.

View mugifly's full-sized avatar
🏠
Working from home

Masanori Ohgita mugifly

🏠
Working from home
View GitHub Profile
@hayajo
hayajo / .gitignore
Last active August 29, 2015 14:06
HerokuでWebsocket
.*
!.gitignore
*~
local/
log/
*.pid
@novi
novi / gist:1682639
Created January 26, 2012 12:53
TeX関連 on Arch Linux

インストール

dvipdfmx

  • フォントを埋め込まない $ dvipdfmx -f ptex-noEmbed.map -f utf-noEmbed.map -f otf-noEmbed.map hoge.dvi
  • updmapでMapファイルを更新
@mugifly
mugifly / daemon.pl
Created January 23, 2013 16:50
How to use the Morbo (include Mojolicious) as a simple http daemon. For example, it will be useful for doing development with XMLHTTPRequest(Javascript) on localhost.
#!/usr/bin/env perl
use Mojolicious::Lite;
push @{app->static->paths}, 'site/'; # File path
app->start('daemon');
# Execute this script on terminal: perl daemon.pl
# Then, let's access to http://localhost:3000/***
@mugifly
mugifly / gist-clone-ssh.pl
Last active December 26, 2015 11:59
Gist ssh-clone script (git clone via ssh)
#! /usr/bin/env perl
# Gist ssh-clone script
# Help: $ perl git-clone-ssh.pl --help
# (c) Masanori Ohgita (http://ohgita.info/) - 2013, MIT License.
use warnings;
use strict;
use utf8;
use File::Basename qw//;
for i in `git branch -r|grep -v HEAD|grep -v master|sed 's:origin/::g'`
do
git checkout --track -b $i origin/$i
done
git checkout master
@xonecas
xonecas / githubFollow.html
Created May 5, 2011 19:05
Github follow me icon/badge/button
<!-- Just replace **USERNAME** by your github username :-) -->
<style>
#followGithub {
color: #121516;
text-shadow: 0 1px 1px #ccc;
padding: 0.2em 0.4em;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;

redcaretとgithub-markdownの違い

  • 両者のソースは割りと似ている(github-markdownがredcarpetを元にしたのか、あるいは両者のもとになったC実装があるとかかな)

オプションについて

github-markdownは、redcapetの提供するオプションの一部をデフォルトで有効化します。 (ちなみに有効化するオプションを選ぶAPIはない模様。用途を考えるとそれで正しいが)

★がついているのが有効化されるもの。gfmモード(.render_gfmメソッド)の場合のみ、★★も有効化される。

@anzfactory
anzfactory / SquareView.java
Last active May 4, 2018 06:06
縦(あるいは横)にあわせる形で正方形にするView
public class SquareView extends View {
private boolean mAdjustWidth;
public SquareView(Context context) {
super(context, null);
}
public SquareView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
@gheesung
gheesung / image-classification-with-sipeed-maix-using-mobilenetv1.ipynb
Created July 18, 2019 08:52
Image Classification With Sipeed Maix using Mobilenetv1
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Niigata.ll 発表(?)資料 「Perl なめんな」

猫型です。Niigata.llの開催おめでとうございます。行けなくてくやしいです。資料だけここに公開します。タイトルは「Perlなめんな」です。dis られがちなオブジェクトシステムと例外機構の貧弱さについて現代的な Perl の視点から回答します。

「Perl は可読性が〜」とか 「Perl はオブジェクトシステムがぶっ壊れてる〜」とかうるせえよ CPAN なめんなって話

「素のPerlのオブジェクトシステムは貧弱すぎる」。その通りです、でも Mouse とかを使えば結構素直に書けるのです。

Mouseってなに