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
| <?php | |
| // http://oauth.googlecode.com/svn/code/php/OAuth.php を使用 | |
| require_once 'OAuth.php'; | |
| // api.php の URL | |
| $baseUri = 'http://sns.example.com/api.php'; | |
| // http://sns.example.com/pc_backend.php/connection/new で発行 | |
| // 使用するAPIに「OpenSocial API: メンバー/フレンド情報の取得」を選択 |
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
| { | |
| "created_at": "Sun Oct 12 08:29:05 +0000 2014", | |
| "event": "user_update", | |
| "source": { | |
| "contributors_enabled": false, | |
| "created_at": "Thu Aug 19 19:01:26 +0000 2010", | |
| "default_profile": false, | |
| "default_profile_image": true, | |
| "description": "https://t.co/SLFC3SuxO7 <>\"", | |
| "favourites_count": -1, |
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
| stable-3.8.x の分岐点以降に続く master ブランチのコミットで、2012/02/08 (stable-3.8.x ブランチが分岐した最初の 543738d5 のコミット日時) までにコミットされた履歴を抽出する | |
| git log stable-3.8.x...master --until="Wed Feb 8 08:58:52 2012 +0900" | |
| -- | |
| Bug (バグ) #2408: サイドバナーのRSSリーダーでURLに特殊文字が含まれる場合に正しいRSSフィードが得られない | |
| https://redmine.openpne.jp/issues/2408 | |
| * cherry-pick: 済み (543738d5) コミットメッセージ修正ミス |
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
| it.ScreenName = "自分のスクリーンネーム" && it.RetweetedId != 0 |
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
| this.LabelScreenName.DataBindings.Add("Text", this.bindingSource, "ScreenName"); | |
| var binding = new Binding("Text", this.bindingSource, "Name"); | |
| binding.Format += (o, e) => e.Value = WebUtility.HtmlDecode(e.Value); | |
| this.LabelName.DataBindings.Add(binding); | |
| // ↑これを | |
| // ↓ こんな感じに書きたい | |
| BindToText(this.LabelScreenName, this.bindingSource, |
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
| --- a/OpenTween/Thumbnail/Services/ImgAzyobuziNet.cs | |
| +++ b/OpenTween/Thumbnail/Services/ImgAzyobuziNet.cs | |
| @@ -152,6 +152,7 @@ namespace OpenTween.Thumbnail.Services | |
| { | |
| ImageUrl = url, | |
| ThumbnailUrl = this.ApiBase + "redirect?size=large&uri=" + Uri.EscapeDataString(url), | |
| + FullSizeImageUrl = this.ApiBase + "redirect?size=full&uri=" + Uri.EscapeDataString(url), | |
| TooltipText = 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
| <?php | |
| class Filter | |
| { | |
| const REGEX_TRIM = "[\\x0-\x20\x7f]"; | |
| const REGEX_FTRIM = "[\\x0-\x20\x7f\xc2\xa0\xe3\x80\x80]"; | |
| public static function presetUtf8($default = '') | |
| { | |
| return function($tainted) use ($default) |
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
| <?php | |
| $input = new SplFileObject('php://stdin'); | |
| $line = $input->fgets(); | |
| list($curKey, $sum) = explode(',', $line); | |
| while (!$input->eof()) | |
| { | |
| $line = $input->fgets(); |
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
| ' コンパイルも通してない適当コード | |
| ' 参考: https://github.com/opentween/OpenTween/blob/456c6d3b30a6731b1b9dde151da4a4d1752fad5f/OpenTween/Thumbnail/Services/TonTwitterCom.cs | |
| Private Function TonTwitterCom_GetUrl(ByVal args As GetUrlArgs) As Boolean | |
| Dim url As String = If(String.IsNullOrEmpty(args.extended), args.url, args.extended) | |
| Return url.StartsWith("https://ton.twitter.com/1.1/ton/data/") | |
| End Function | |
| Private Function TonTwitterCom_CreateImage(ByVal args As CreateImageArgs) As Boolean | |
| Dim oauth As New HttpOAuthApiProxy() |
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
| <?php | |
| // こんなの | |
| class HogeIterator implements IteratorAggregate | |
| { | |
| private | |
| $innerIterator, | |
| $callback; | |
| public function __construct(Traversable $innerIterator, $callback) |