Skip to content

Instantly share code, notes, and snippets.

View KuninoriKunimoto's full-sized avatar
🏠
Working from home

Kuninori Kunimoto KuninoriKunimoto

🏠
Working from home
View GitHub Profile
#!/bin/bash
YEAR=`date "+%Y"`
MONTH=`date "+%m"`
DAY=`date "+%d"`
BACKUP_NAME=$YEAR-$MONTH-$DAY
DATABASES="template1 postgres target_database_name1"
BACKUP_DIR=/backups/data/postgresql
DAYS=3
@charset "UTF-8";
.jp-audio {
width: 100%;
background: #FFFFFF;
}
.jp-controls li,
.jp-toggles li,
.jp-playlist li {
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>jPlayer for Bootstrap</title>
<!-- Bootstrap core CSS -->
@KuninoriKunimoto
KuninoriKunimoto / random_filename_paperclip
Last active December 24, 2015 01:29
Random Filename in Paperclip
class Picture < ActiveRecord::Base
before_create :randomize_file_name
pt = ':rails_root/documents/:class/:id_partition/:style/:basename.:extension'
if Rails.env.production?
pt = '/documents/:class/:id_partition/:style/:basename.:extension'
end
has_attached_file :file, {
url: '/:class/detail/:id/:hash',