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 Event < ActiveRecord::Base | |
has_many :days_infos | |
has_many :participants | |
# has_many :users | |
attr_accessible :event_name, :explanation, :password, :url | |
end | |
class Participant < ActiveRecord::Base | |
belongs_to :event | |
belongs_to :user |
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
# config/routes.rb | |
resources :events {do |event| | |
resources :participants | |
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 bash | |
#[OpenSSLのインストール] | |
{ | |
yum -y install zlib zlib-devel ; | |
yum -y install openssl-devel ; | |
yum install gcc make ; | |
} || exit 1 | |
#[readline-develのインストール] |
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
fsdfsdf |
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 python | |
# step-1 | |
# will mount an FS, but useless beyond that | |
import errno | |
import fuse | |
import os # import os for current uid/gid | |
import stat # import stat, ExampleFS_Stat class, ExampleFS.getattr | |
from datetime import date |
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 python | |
# Copyright (C) 2001 Jeff Epler <jepler@unpythonic.dhs.org> | |
# Copyright (C) 2006 Csaba Henk <csaba.henk@creo.hu> | |
# | |
# This program can be distributed under the terms of the GNU LGPL. | |
# See the file COPYING. | |
# | |
import os, sys |
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
################################################################################ | |
# Copyright (C) 2012-2013 Leap Motion, Inc. All rights reserved. # | |
# Leap Motion proprietary and confidential. Not for distribution. # | |
# Use subject to the terms of the Leap Motion SDK Agreement available at # | |
# https://developer.leapmotion.com/sdk_agreement, or another agreement # | |
# between Leap Motion and you, your company or other organization. # | |
################################################################################ | |
import Leap, sys, thread, time, math | |
from Leap import CircleGesture, KeyTapGesture, ScreenTapGesture, SwipeGesture |
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
watchfor /error:/ | |
pipe "./forward_fluent.sh swatch.err" | |
echo red | |
watchfor /warning:/ | |
pipe "./forward_fluent.sh swatch.warn" | |
echo yellow | |
watchfor /no problem/ | |
# nothing to do | |
echo | |
watchfor /.*/ |
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 | |
# pipeで受け取った標準入力をfluent-catで送り出す | |
tag=$1 | |
if [ $# -ne 1 ]; then | |
echo "$0: specify tag name" | |
exit 0 | |
fi | |
if [ -p /dev/stdin ]; 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
from smtpd import SMTPServer | |
import asyncore | |
class RejectSMTPServer(SMTPServer): | |
def process_message(self, peer, mailfrom, rcpttos, data): | |
return '500 Error' | |
def start_smtpd(): | |
server = RejectSMTPServer(('127.0.0.1', 1025), None) | |
asyncore.loop() |
OlderNewer