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
<?php | |
mb_internal_encoding('UTF-8'); | |
function totsuzen_no_shi($str, $retstr = "\n") { | |
$len = mb_strlen($str, 'UTF-8'); | |
$line1 = '_人'; | |
$line2 = '> '.$str.' <'; | |
$line3 = ' ̄'; | |
for ($i = 0; $i < $len; $i++) { | |
$line1 .= '人'; |
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
<?php | |
mb_internal_encoding('UTF-8'); | |
if (isset($_POST['check']) && isset($_POST['src']) && $_POST['src']) { | |
$src = htmlspecialchars($_POST['src']); | |
$src_array = explode("\r\n", $src); | |
$cnv_array = array(); | |
if (isset($_POST['opt_mail'])) { | |
// ドメイン部分は小文字に変換 | |
foreach($src_array as $line) { |
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
def totsuzenno(string,returnstr): | |
strbytes = len(string) | |
if strbytes % 2: | |
count = strbytes - 2 | |
else: | |
count = strbytes - 1 | |
line1 = '_人' | |
line2 = '> ' + string + ' <' + returnstr | |
line3 = ' ̄^' | |
for i in range(count): |
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
# Twitter To HatenaHaiku. | |
import os | |
import sys | |
import json | |
import tweepy | |
import requests | |
from requests.auth import HTTPBasicAuth | |
consumer_key = "" |
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 | |
# コンパクトなRaspbianを作るやつを要約しつつちょっと追加したりしたもの | |
# 元: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/ | |
sudo apt-get update | |
rm -rf python_games | |
sudo rm -rf /opt/* | |
sudo apt-get remove -y x11-common midori lxde python3 python3-minimal lxde-common lxde-icon-theme omxplayer gcc-4.4-base:armhf gcc-4.5-base:armhf gcc-4.6-base:armhf ca-certificates libraspberrypi-doc xkb-data fonts-freefont-ttf locales manpages `sudo dpkg --get-selections | grep "\-dev" | sed s/install//` `sudo dpkg --get-selections | grep -v "deinstall" | grep python | sed s/install//` `sudo dpkg --get-selections | grep -v "deinstall" | grep x11 | sed s/install//` `sudo dpkg --get-selections | grep -v "deinstall" | grep sound | sed s/install//` `sudo dpkg --get-selections | grep -v "deinstall" | grep ssh | sed s/install//` | |
sudo apt-get install -y dropbear |
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
<?php | |
$in = ""; | |
$out = ""; | |
$num = ""; | |
if(isset($_POST['gogo'])) { | |
$in = $_POST['input']; | |
$num = intval($_POST['num']); | |
$suffix = $_POST['suffix']; | |
$text = split("\n", $in); | |
foreach($text as $line) { |
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
Plugin.create(:test) do | |
tab(:test, 'TEST') do | |
timeline :test | |
end | |
user = User.new({ | |
:id => 1, | |
:idname => "Akkiesoft", | |
:name => "akkiesoft", | |
:profile_image_url => "http://8639.tk/hello.png", |
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
# -*- coding:utf-8 -*- | |
require 'net/http' | |
require 'uri' | |
require 'json' | |
require 'time' | |
Plugin.create(:mikutter_haiku) do | |
def reload |
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
# -*- coding: utf-8 -*- | |
class ::Gdk::MiraclePainter | |
# 名前のあとにスクリーンネームを表示たい。 | |
# また、スクリーンネームの前には @ をつけておきたい。 | |
def header_left_markup | |
user = message.user | |
if user.respond_to?(:idname) | |
Pango.parse_markup("<b>#{Pango.escape(user.name || '')}</b> @#{Pango.escape(user.idname)}") | |
else |
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
/* <system section="theme" selected="cocoa"> */ | |
@import "/css/theme/cocoa/cocoa.css"; | |
/* </system> */ | |
/* <system section="background" selected="default"> */ | |
/* default */ | |
/* </system> */ | |
#container,#footer {width:1000px;} | |
#wrapper {width:700px;} |
OlderNewer