This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 実行例1:sssh を実行すると ~/bin/server_list の一覧からserver選択して自動ssh接続 | |
# 実行例2:sssh $server を実行すると ssh $ssh_user@$server を実行する | |
ssh_user="ssh user" | |
ssh_pass="ssh password" | |
ssh_login(){ | |
if [ $# -ne 1 ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreatePdmRevisions < ActiveRecord::Migration | |
def self.up | |
create_table :pdm_revisions do |t| | |
t.column :commit_message, :string | |
t.column :attachment, :string | |
t.column :created_by, :string | |
t.column :created_date, :datetime | |
t.column :document_type, :string | |
t.column :pdm_document_id, :int | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tableless < ActiveRecord::Base | |
def self.column(name, sql_type = nil, default = nil, null = true) | |
columns << ActiveRecord::ConnectionAdapters::Column.new( name.to_s, default, sql_type.to_s, null ) | |
end | |
def self.columns() | |
@columns ||= []; | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Git commit-msg hook. If your branch name is in the form "US1234-postfix", or | |
# "US1234_postfix", it automatically adds the prefix "[US1234]" to commit | |
# messages. | |
# | |
# Example | |
# ======= | |
# | |
# git checkout -b US1234-some-cool-feature |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "github_api" | |
# スター数を知りたいリポジトリ user/name | |
repos = %W{ | |
allaboutapps/A3GridTableView | |
AlanQuatermain/AQGridView | |
norsez/BDDynamicGridViewController | |
hirohisa/BrickView | |
phranck/CNGridView | |
gmoledina/GMGridView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "VPC knowhow template", | |
"Parameters": { | |
"KeyName": { | |
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances", | |
"Type": "String", | |
"MinLength": "1", | |
"MaxLength": "64", | |
"AllowedPattern": "[-_ a-zA-Z0-9]*", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def call_rake(task, options = {}) | |
options[:rails_env] = Rails.env | |
args = options.map { |n, v| "#{n.to_s.upcase}='#{v}'" } | |
system "bundle exec rake #{task} #{args.join(' ')} >> #{Rails.root}/log/rake.log &" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#============================================================================== | |
# GW-Kit | |
# @author : yunsang.choi(oddpoet@gmail.com) | |
# @src : https://gist.github.com/gists/3115022 | |
#------- | |
# v1.3.4 | |
# - minor change (display text) | |
# v1.3.3 | |
# - allow '-' character in hostname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# seconds | |
t = 236 | |
Time.at(t).utc.strftime("%H:%M:%S") | |
=> "00:03:56" | |
# unix time | |
t = 1450236594 | |
Time.at(t).utc.strftime("%Y/%d/%d %H:%M:%S") | |
=> "03:29:54" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<div v-if="$responsive.mobile">Mobile</div> | |
<div v-else-if="$responsive.tablet">Tablet</div> | |
<div v-else>Desktop</div> | |
</div> | |
</template> |
OlderNewer