Skip to content

Instantly share code, notes, and snippets.

Isao Sugimoto d6rkaiz

Block or report user

Report or block d6rkaiz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@d6rkaiz
d6rkaiz / gist:826259
Created Feb 14, 2011
lingr api bot post sample.
View gist:826259
#-*- coding: utf-8 -*-
require 'rubygems'
require 'uri'
require 'digest/sha1'
require 'curb'
bot_id=BOT_ID
bot_secret=BOT_SECRET
sayroom=SAYROOM
text='post test'
@d6rkaiz
d6rkaiz / gist:826291
Created Feb 14, 2011
twitter stream api to lingr room
View gist:826291
#-*- coding: utf-8 -*-
require 'digest/sha1'
require 'uri'
require 'rubygems'
require 'tweetstream'
require 'curb'
# --- settings ---
# lingr bot settings.
bot_id=BOT_ID
@d6rkaiz
d6rkaiz / gist:836774
Created Feb 21, 2011
JavaScript Alert & Confirm
View gist:836774
- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message
{
NSRunAlertPanel(@"JavaScript alert", message, @"OK", nil, nil);
}
- (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message
{
int choice = NSRunAlertPanel(@"JavaScript confirm", message, @"OK", @"Cancel", nil);
return choice == NSAlertDefaultReturn;
}
View gist:856563
<?php
$flag = 1;
if ( $flag ) {
echo "aki is fool.";
} else {
echo "aki is aho.";
}
@d6rkaiz
d6rkaiz / gist:873974
Created Mar 17, 2011
SHOW CREATE TABLE location;
View gist:873974
| location | CREATE TABLE `location` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`location_name` varchar(255) DEFAULT NULL,
`country_id` int(11) DEFAULT NULL,
`latitude` double NOT NULL DEFAULT '0',
`longitude` double NOT NULL DEFAULT '0',
`location_visible` tinyint(4) NOT NULL DEFAULT '1',
`location_date` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3877 DEFAULT CHARSET=utf8 |
@d6rkaiz
d6rkaiz / apache2
Created Mar 18, 2011
apache2.conf
View apache2
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
View php5
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@d6rkaiz
d6rkaiz / gist:879050
Created Mar 21, 2011
Lingrマニュアル(草案)
View gist:879050
Lingr chatの機能の説明
設定画面
Settings
Account
ユーザのアカウント情報を設定します。
Facebook以外からサインアップしたばかりの時は、Display name、Profileは設定されていません。
View gist:880481
set :cron, false
(ENV["SINSAI_TO"]||"").split(/,/).each do |e|
case e
when "cronsv"
role :app,"ec2-175-41-222-1.ap-northeast-1.compute.amazonaws.com"
set :cron, true
end
end
You can’t perform that action at this time.