Skip to content

Instantly share code, notes, and snippets.

@sakadonohito
sakadonohito / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@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 / 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 / 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 / win8shortcuts.md
Last active December 14, 2015 04:39
Windows8のwindowsキーと組み合わせのショートカット

Windows8 ショートカット集

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

起動

  • win+ ret ナレーターモード起動
  • win+1~10 タスクバーに登録されているものの左から1,2,,,で起動
  • win+ =[^] 画面拡大モード起動 ※使い方不明
  • win+ e エクスプローラー起動
@sakadonohito
sakadonohito / adjust-size.js
Created August 25, 2013 02:43
ヘッダ固定でボディだけスクロールさせる
$(function(){
function table_adjust(){
var width_arr = new Array();
var tbody_tds = $('#estimateList tbody tr:first-child td');
var thead_ths = $('#estimateList thead tr:first-child th');
$.each($(tbody_tds),function(i){
width_arr.push($(this).width());
});
$.each($(thead_ths),function(i){
$(this).width(width_arr[i]);