Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Masanori Ohgita mugifly

🏠
Working from home
View GitHub Profile
@gheesung
gheesung / image-classification-with-sipeed-maix-using-mobilenetv1.ipynb
Created Jul 18, 2019
Image Classification With Sipeed Maix using Mobilenetv1
View image-classification-with-sipeed-maix-using-mobilenetv1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aerialist
aerialist / switchbot_bluepy.py
Created May 1, 2017
Activate switchbot by python with bluepy on Raspberry Pi
View switchbot_bluepy.py
# Activate switchbot by python with bluepy on Raspberry Pi
# https://github.com/IanHarvey/bluepy
#
# Switchbot's API is taken from this
# https://github.com/OpenWonderLabs/python-host
import binascii
from bluepy.btle import Peripheral
# find your switchbot address by
@hayajo
hayajo / .gitignore
Last active Aug 29, 2015
HerokuでWebsocket
View .gitignore
.*
!.gitignore
*~
local/
log/
*.pid
@anzfactory
anzfactory / SquareView.java
Last active May 4, 2018
縦(あるいは横)にあわせる形で正方形にするView
View SquareView.java
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);
@mugifly
mugifly / gist-clone-ssh.pl
Last active Dec 26, 2015
Gist ssh-clone script (git clone via ssh)
View gist-clone-ssh.pl
#! /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//;
View redcarpetとgithub-markdownの違い.md

redcaretとgithub-markdownの違い

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

オプションについて

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

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

@plentz
plentz / nginx.conf
Last active Sep 26, 2020
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@gsainio
gsainio / gist:6322375
Created Aug 23, 2013
Sample perl code to use service accounts and oauth2 with Google's Admin SDK API.
View gist:6322375
#!/usr/public/bin/perl -w
use strict;
use JSON;
use JSON::WebToken;
use LWP::UserAgent;
use HTML::Entities;
my $private_key_string = q[-----BEGIN PRIVATE KEY-----
@focusaurus
focusaurus / ep_app.js
Created Jun 14, 2013
Example of how a main express app can mount sub-applications on a mount point with app.use('/mount-point', subapp); If you GET /, you'll see the main_app's '/' response. If you GET /ep_app, you'll see the ep_app's '/' response.
View ep_app.js
var express = require("express");
var app = express();
app.get('/', function (req, res) {
res.send("This is the '/' route in ep_app");
});
module.exports = app;
View niigata.ll.md

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

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

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

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

Mouseってなに

You can’t perform that action at this time.