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
$ adb shell | |
am broadcast -a android.intent.action.ACTION_POWER_CONNECTED | |
am broadcast -a android.intent.action.ACTION_POWER_DISCONNECTED | |
am broadcast -a android.intent.action.BATTERY_OKAY | |
am broadcast -a android.intent.action.BATTERY_LOW |
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
$ adb shell | |
#sample | |
am start -a android.intent.action.CALL -d tel://000-0000 | |
am start -a android.intent.action.SEND -d "some message" -t text/plain | |
am start -a android.intent.action.VIEW -d geo:0,0?q=Tokyo | |
am start -n com.android.browser/.BrowserActivity |
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
Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT); | |
intent.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE); | |
intent.putExtra(ContactsContract.Intents.Insert.EMAIL, "[email protected]"); | |
startActivity(intent); |
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
sub _get_day_of_week { | |
my($y,$m,$d) = @_; | |
my @wdays = qw(日 月 火 水 木 金 土); | |
if ($m < 3) {$y—; $m+=12;} | |
my $w = ($y+int($y/4) - int($y/100) + int($y/400) + int((13*$m+8)/5) + $d) % 7; |
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
!!! XML UTF-8 | |
!!! | |
%html{html_attrs('ja')} | |
%head | |
%meta{ 'http-equiv' => 'content', :content => 'text/html; charset=utf-8'} | |
%title test | |
%script{:src => 'http://code.jquery.com/jquery-latest.js'} | |
:javascript | |
$(function(){ | |
alert('hello world!') |
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
<!DOCTYPE html> | |
<html lang='ja' xml:lang='ja' xmlns='http://www.w3.org/1999/xhtml'> | |
<head> | |
<meta content='text/html; charset=utf-8' http-equiv='content'> | |
<title>test</title> | |
<script src='http://code.jquery.com/jquery-latest.js'></script> | |
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" media="screen" rel="stylesheet" type="text/css" /> | |
<style type="text/css"> | |
body { | |
padding-top: 60px; |
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 "bundler/capistrano" | |
require "capistrano/ext/multistage" | |
require "capistrano_colors" | |
require "railsless-deploy" | |
require "capcake" | |
set :stages, %w(production staging private) | |
set :default_stage, "private" | |
set :use_sudo, false |
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
{{html.docType('html5')|raw}} | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>{{title_for_layout}} | SITE_NAME</title> | |
{{html.meta('favicon.ico', '/favicon.ico', {'type':'icon'})|raw}} | |
<meta name="Keywords" content="KEYWORD_FOR_SITE" /> | |
<meta name="Description" content="DESCRIPTION_FOR_SITE" /> | |
{{_view.fetch('meta')|raw}} | |
{{_view.fetch('css')|raw}} |
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
<div class="pagination pagination-centered"> | |
<ul> | |
<?php | |
echo $this->Paginator->prev( | |
'前へ', | |
array( | |
'tag' => 'li', | |
'disabledTag' => 'a' | |
), | |
null, |
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
# ctp -> tpl の例 | |
$ for nm in *.ctp; do git mv $nm ${nm%.ctp}.tpl; done |