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
(function($){ | |
$.fn.disable = function(){ | |
$(this).on("contextmenu mousedown", function(){ | |
return false; | |
}); | |
}; | |
})(jQuery); |
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
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
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
(function(){ | |
const ZIP = "#user_zip"; | |
const ADDRESS = "#user_address"; | |
var insert_addr = function(zip_code){ | |
$.ajax({ | |
url: "http://zipcloud.ibsnet.co.jp/api/search", | |
data: { zipcode: zip_code }, | |
dataType: "jsonp", | |
success: function(data){ |
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 | |
# Backup database | |
host='localhost' | |
user='backup' | |
passwd='secret' | |
db_array=(dbname) | |
bk_dir=/usr/local/backup | |
for db in ${db_array[@]}; do |
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 | |
# coding: utf-8 | |
require 'date' | |
require 'net/ssh' | |
require 'net/sftp' | |
module BackupDatabase | |
class Task | |
def initialize(name) |
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 | |
set -e | |
TIMEOUT=${TIMEOUT-60} | |
APP_ROOT=`cd \`dirname $0\`/..; pwd` | |
PID=$APP_ROOT/log/unicorn.pid | |
RAILS_ENV=production | |
CMD="bundle exec unicorn -D -c $APP_ROOT/config/unicorn.rb -E $RAILS_ENV" | |
INIT_CONF=$APP_ROOT/config/init.conf |