Skip to content

Instantly share code, notes, and snippets.

@sakadonohito
sakadonohito / sample_arg_ref.pl
Created October 8, 2012 01:21
Arguments and Reference
#!/usr/bin/perl
# -*- coding:utf-8 -*-
use strict;
use warnings;
use feature 'say';
use encoding 'utf-8';
sub responseScalar {
my $a = shift;
@sakadonohito
sakadonohito / sampleScope.pl
Created October 9, 2012 00:48
perl scope test
#!/usr/bin/perl
# -*- coding:utf-8 -*-
#use strict;
#strictつけてるとエラーが出てしまうのでコメントアウト
use warnings;
use feature 'say';
my $file_scope = 'File Scope';
@sakadonohito
sakadonohito / sampleRef2.pl
Created October 9, 2012 04:32
Reference and DeReference
#!/usr/bin/perl
# -*- coding:utf-8 -*-
use strict;
use warnings;
use feature 'say';
use encoding 'utf-8';
my @array = (1,2,3);
my %hash = (
@sakadonohito
sakadonohito / image_download.py
Created October 22, 2012 00:43
特定のURL内の画像が数字の連番の場合の画像取得サンプル
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys, urllib
import os.path
def download(url):
img = urllib.urlopen(url)
localfile = open( os.path.basename(url), 'wb')
localfile.write(img.read())
@sakadonohito
sakadonohito / comment.rb
Created October 24, 2012 14:27
for blog
require 'rfm'
class FMServer
def initialize()
@FM_CONFIG = {
:host => "FileMakerServerの接続先IP",
:account_name => "FileMakerFileのログインアカウント",
:password => "FileMakerFileのログインパスワード",
:database => "FileMakerFileの名前",
:ssl => false,
:root_cert => false,
@sakadonohito
sakadonohito / fmbbs.haml
Created October 24, 2012 14:32
for blog
%form{:method=>"POST",:action => '/fmcomment'}
%input{:type=>"hidden",:name=>"_method",:value=>"PUT"}
%table
%tr
%td 名前
%td
%input{:type=>"text",:name=>"name"}
%tr
%td タイトル
%td
@sakadonohito
sakadonohito / start.rb
Created October 24, 2012 14:35
for blog
#/usr/bin/ruby
require 'rubygems'
require 'sinatra'
require 'model/comment.rb'
require 'sass'
helpers do
include Rack::Utils;alias_method :h, :escape_html
#追加
@sakadonohito
sakadonohito / win8shortcuts.md
Last active December 14, 2015 04:39
Windows8のwindowsキーと組み合わせのショートカット

Windows8 ショートカット集

※英字配列での記述[]内が日本語配列

起動

  • win+ ret ナレーターモード起動
  • win+1~10 タスクバーに登録されているものの左から1,2,,,で起動
  • win+ =[^] 画面拡大モード起動 ※使い方不明
  • win+ e エクスプローラー起動
@sakadonohito
sakadonohito / responsive-body.css
Created August 25, 2013 02:32
for blog windowサイズに応じてCSSを変化させる
body {
padding-top: 60px;
}
/* ブラウザの横幅が980px以下の時 */
@media (max-width: 980px){
body {
padding-top: 0px;
}
}
@sakadonohito
sakadonohito / inVisible.css
Created August 25, 2013 02:39
for blog 表示させない要素を簡単に作るクラス指定
.inVisible {
display: none;
}