This file contains hidden or 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
FROM ruby:2.4-alpine | |
ENV PATH /root/.yarn/bin:$PATH | |
RUN apk update && apk upgrade && \ | |
apk add --no-cache bash git openssh build-base nodejs tzdata | |
RUN apk update \ | |
&& apk add curl bash binutils tar gnupg \ | |
&& rm -rf /var/cache/apk/* \ |
This file contains hidden or 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 class="hello"> | |
<h1>{{ msg }}</h1> | |
<div class="section"> | |
<el-input type="text" v-model="input" auto-complete="off" style="width:80%;"></el-input> | |
</div> | |
<div class="section"> | |
<el-button type="button" @click="send">SEND</el-button> | |
<el-button type="button" @click="disconnect">DISCONNECT</el-button> | |
</div> |
This file contains hidden or 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> |
This file contains hidden or 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 hidden or 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([email protected]) | |
# @src : https://gist.github.com/gists/3115022 | |
#------- | |
# v1.3.4 | |
# - minor change (display text) | |
# v1.3.3 | |
# - allow '-' character in hostname |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
NewerOlder