Skip to content

Instantly share code, notes, and snippets.

View ziguzagu's full-sized avatar

Hiroshi Sakai ziguzagu

View GitHub Profile
@hatsusato
hatsusato / kmc-advent-2017.md
Last active November 5, 2024 06:48
gpg のはなし

gpg のはなし

この記事は [KMC Advent Calendar 2017][advent] の 10 日目の記事です。 昨日の記事は tron 君 ([id:tron_kmc][tron-id]) の[今年の活動を振り返る - tron-Factory 業務日誌][tron]でした。 はたち:tada:めでたい:congratulations:

はじめに

KMC 6 回生の hatsusato です。 修士 2 回生ともなると研究にかまけて KMC 活動がおろそかになっているので、この場を借りて申し訳程度に KMC 活動をしようと思います。

@andyjack
andyjack / installing-net-ssleay-with-homebrew-openssl.md
Last active August 18, 2022 14:29
Installing Net::SSLeay with openssl from homebrew (OS X)

Installing Net::SSLeay with openssl from homebrew (macOS)

You don't need to do anything fancy other than running cpanm - with the most recent Net::SSLeay things should Just Work.

Updated 2020-Mar-10

I realized that since Net::SSLeay is looking in known places (including homebrew's install locations) for openssl, it means that my instructions that set up environment variables are no longer necessary! The following will install the module:

# openssl 1.0.2d
@garthk
garthk / profile
Created June 21, 2015 23:51
boot2docker 1.7.0 cert fix
wait4eth1() {
CNT=0
until ip a show eth1 | grep -q UP
do
[ $((CNT++)) -gt 60 ] && break || sleep 1
done
sleep 1
}
wait4eth1
@miyagawa
miyagawa / deploy.rb
Last active December 18, 2015 14:59
Capistrano template to run carton exec plackup with start_server (Server::Starter). Change to use Starman/Starlet/Monoceros if you want more concurrency.
require 'capistrano/ext/multistage'
set :stages, %w(vagrant)
set :default_stage, "vagrant"
set :application, "cpanmetadb"
set :repository, "git://github.com/miyagawa/cpanmetadb-perl.git"
set :scm, :git
set :use_sudo, false
;;; vcl-mode.el - Syntax highlighting for Varnish Command Language
;;;
;;; Copyright (c) 2008-2009 Linpro AS
;;; All rights reserved.
;;;
;;; Author: Stig Sandbeck Mathisen <[email protected]>
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
@miyagawa
miyagawa / gist:3131370
Created July 17, 2012 19:15
Heroku deployment with cpanfile
➜ heroku-hello git:(master) cat app.psgi
require 'app.pl';
➜ heroku-hello git:(master) cat app.pl
use Mojolicious::Lite;
get '/' => sub {
my $self = shift;
$self->render(text => "Hello Heroku");
};
Starman:
- Preforking standalone HTTP server
- Based on Catalyst::Engine::HTTP::Prefork by Andy Grundma
- Ported to Plack by Tatsuhiko Miyagawa
- Uses Net::Server::PreFork
- Supports HTTP/1.1
- Pipelined requests
- Chunked request/response
- Keep-Alives
- Graceful restart with HUP (No shutdown with QUIT yet)
#!/usr/bin/perl -w
use strict;
use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
use MT::Bootstrap ();
use MT::App::CMS;
use CGI::PSGI;
use Plack::Builder;
use Plack::App::URLMap;
use Plack::App::File;