今日話さないこと JavaScriptの基礎知識、jQueryの導入 気持ちいいUIやUXがうんちゃら CanvasやWebGLを使ったリッチでイケてるゲームの作り方
今日話さないこと JavaScriptの基礎知識、jQueryの導入 気持ちいいUIやUXがうんちゃら CanvasやWebGLを使ったリッチでイケてるゲームの作り方
目次 当サイトについて bash シェルスクリプト入門 -シェルスクリプトのいろは- コマンド Tips シェルスクリプト Tips 変数を使用する 配列を使用する 入力と出力 if 文と test コマンド for 文の使用方法 while 文の使用方法 case 文の使用方法 関数の使用方法 引数を処理する 終了ステータス シグナルと trap コマンド フィルタを使用した文字列操作 1 フィルタを使用した文字列操作 2 日付を取得する 文字コードと改行コード シェルスクリプトのデバッグ AWK リファレンス (Deprecated) シェルスクリプト ライブラリ 『ether.sh』 お知らせ Bluesky を始めました @sunone.me 変更履歴 2023.10.07 ページ内リンクを修正した。 2021.02.01 このサイトに「もう 1 ページ追加しよう」と思ってから、も
クラッカーな奴らからバックドアを作成されないようにするのは当然のことだが、鯖に侵入させないことが重要!鯖に侵入されて、管理者権限を奪われてしまったら、クラッカーはその鯖に対して何でも出来てしまう。ここでは、そのバックドアを見つけ出すのに役に立つツールlsofについてそのセットアップと使い方について説明する。たとえば、inetdを利用したバックドア等、多くのバックドアはTCPもしくはUDPをLISTENする。また、ここより詳しい説明は、ゆみどんの ゆみどんサイト の ここ が詳しいので見ていただきたい。ソースの解凍からコンパイル・インストールまでつぶさに書かれている。 通常、鯖でどのポートがLISTEN状態になってるかは、netstatコマンドで調べることが出来る。以下参照、 # netstat -an Active Internet connections (servers and
「いますぐ実践! Linux システム管理」はこちらです。 メルマガの解除、バックナンバーなども、以下からどうぞ。 https://www.usupi.org/sysad/ (まぐまぐ ID:149633) その他、作者に関するページは、概ね以下にございます。 https://www.usupi.org/kuri/ (まぐまぐ ID:126454) http://usupi.seesaa.net/ (栗日記ブログ) https://twitter.com/kuriking/ (twitter) https://facebook.com/kuriking3 (facebook) https://jp.pinterest.com/kuriking/pinterest) https://www.instagram.com/kuri_king_/ (instagram) [バックナンバーのトップへ
Twitter でつぶやいたら意外と知られて無かったので記事にしておきます。 Linux とかで巨大なログファイルとかを扱うときに、head や tail というコマンドで先頭から何行とか 末尾から何行を見たい時があると思います。 例えばアクセスログで末尾から 10000000 行目辺りをみたいとかいうときに $ tail -n 10000000 access_log | head とかするとかなり遅いと思います。これはログの後ろの方から読み込みながら 行数を計算しているからで、10000000 行分数えないとどこから表示すればいいのかわからないので なかなか結果が返ってこなくてヤキモキしてしまいます。 こんなときに、-cというオプションを使うと超高速で結果が返ってきます。-cというのは -c, --bytes=N output the last N bytes とある様に、ファイルの末尾
#!/bin/bash ########################################################### # このスクリプトの特徴 # # 受信・通過については基本的に破棄し、ホワイトリストで許可するものを指定する。 # 送信については基本的に許可する。ただし、サーバが踏み台になり外部のサーバに迷惑をかける可能性があるので、 # 心配な場合は、送信も受信同様に基本破棄・ホワイトリストで許可するように書き換えると良い。 ########################################################### ########################################################### # 用語の統一 # わかりやすさのためルールとコメントの用語を以下に統一する # ACCEPT :
以前(2010年)に「アプリケーションがマルチスレッドでもマルチコアCPUを活かせない件」というエントリにてCPUのコアが増えても割り込み処理が分散されないのでスケールされないと書いたけど、その後Linux KernelにRPS/RFSなる機能が追加され、割り込み処理が分散できるようになり、CentOS 6.2 でも使えるらしいので試してみました。 RPS/RFSについての紹介は VIOPS06で「RPS・RFS等最新Linux Kernel事例」と題してお話してきました http://d.hatena.ne.jp/syuu1228/20110722/1311322653 Linux内核 RPS/RFS功能详细测试分析 http://www.igigo.net/archives/204 が詳しい。2番目のはほぼ読めないけど、性能比較のグラフが分かりやすい。 今回試したサーバは、 OS: C
はてなグループの終了日を2020年1月31日(金)に決定しました 以下のエントリの通り、今年末を目処にはてなグループを終了予定である旨をお知らせしておりました。 2019年末を目処に、はてなグループの提供を終了する予定です - はてなグループ日記 このたび、正式に終了日を決定いたしましたので、以下の通りご確認ください。 終了日: 2020年1月31日(金) エクスポート希望申請期限:2020年1月31日(金) 終了日以降は、はてなグループの閲覧および投稿は行えません。日記のエクスポートが必要な方は以下の記事にしたがって手続きをしてください。 はてなグループに投稿された日記データのエクスポートについて - はてなグループ日記 ご利用のみなさまにはご迷惑をおかけいたしますが、どうぞよろしくお願いいたします。 2020-06-25 追記 はてなグループ日記のエクスポートデータは2020年2月28
チャリンコ通勤による滝のような汗で、朝からTシャツがシースルーになってしまうmikioです。さて今回は、Tokyo Cabinet(TC)のデータベースを各種のアルゴリズムで圧縮して利用する方法についてご紹介します。 圧縮B+木 B+木とは、比較関数の値による順序が近いレコード群を単一のページにまとめ、各ページにB木(multiway balanced treeの略であり、二分木(binary tree)とは違います)の索引を張ったものです。理論的にはレコードの探索も更新も O(log n) の時間計算量で行え、内部ノード(B木)の操作をキャッシュすると実質的には O(1) の時間計算量で探索や更新が行えるという、かなり安定した性能を備えるデータ構造です。その上、レコードが一定の順序に基づいて並べられているので、数値の範囲検索や文字列の前方一致検索が高速に行えたり、カーソルによって順序に基
OpenPNE の管理画面からメンバー情報を CSV ファイルとしてダウンロードする機能があります。その CSV ダウンロードが IE6 でエラーになってダウンロードできない問題がありました。 原因はマイクロソフトのサイト Content-Disposition: attachemnt と Cache-Control: no-cache によるダウンロードの問題 に書かれていました。 対処方法として、 webapp/modules/admin/do/csv_member.php を webapp_ext/modules/admin/do/csv_member.php にコピーして header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=member
こんにちは熊谷です。 前回は簡単なWEBブラウザを作成しましたが、今回はそこからちょっと離れて、Android 2.2以降から使えるC2DM(Cloud to Device Messaging)でメッセージの受信を試してみたいと思います。 今現在、C2DMを使うには http://code.google.com/intl/ja/android/c2dm/signup.html ここで登録を行う必要があります。登録フォームで必要な情報を入力し送信して、しばらく待っていると登録完了したよ的なメールが送られてきます。 そのメールが来たら早速使ってみましょう。 まずはC2DMを使って端末にメッセージを送信するため、認証Tokenを取得します。 <?php $url = 'https://www.google.com/accounts/ClientLogin'; // signupページで入力したg
Android2.2ではAndroid Cloud to Device Messaging(C2DM)という機能があります。 サーバでインテントを発行し端末へデータを投げる。という機能ですね。 今回は、この機能を試してみました。 参考:http://code.google.com/intl/ja/android/c2dm/index.html Android側です。 まず、端末側でRegistrationIDを獲得する必要があります。 これは、Googleが発行するもので、端末がリクエストを発行して受け取る必要があります。 以下はリクエストの発行部分です。 今回は、MAIN_ACTIVITYのonCreateで処理をさせてます。 // C2DM 登録(RegistrationIDの要求かな?) Intent registrationIntent = new Intent("com.goog
C2DM(プッシュ)方式について。(サーバサイド寄り) ブログには直接書いてませんが、GoodMoorningTweet(以下、GMT)というアプリを出してます。 簡単に説明すると、twitterで誰かが自分に対し ping と打てば設定した音が鳴る というアプリです。 で、この現在はアプリ、Twitterサーバに対し一定間隔でTLの取得 を行ってるわけですが… 例えば1分間隔で毎回TL取得しに行くと電池の消費量がどうしても増えちゃうわけです。 そこで今回、ポーリング方式からC2DM(プッシュ)方式 に変えてみようと考えてます。(まだ作ってません!) 最初はGoogleののC2DMサーバを使用する方法を検討していたわけですが Sign in - Google Accounts ・googleのアカウント情報が必須 ・Android2.2以上必須 ・定期的に登録IDがリフレッシュされる ・A
■ C2DMに必要なもの ・Mobile Device (デバイス) ・Marketアプリがインストールされている ・2.2以上のAndroidが走っている ・Googleアカウントと紐付いている ・C2DMを利用するAndroidアプリをインストールする ・Third-Party Application Server (アプリケーションサーバ) ・開発者が用意 ・デバイス上のAndroidアプリに、C2DM Server経由でデータを送る ・C2DM Servers (C2DMサーバ) ・Third-Party Application Serverからメッセージを取り出し、 それをデバイスに送る役割を果たすGoogleのサーバ ■ C2DMの認証に必要なもの ・Sender ID (Android app用) ・アプリの開発者にひもづいたemailアカウント ・デバイスにメッセージを送る
Android Blogを斜め読みするとこんな感じ。ちょびっと複雑。 端末をC2DMサーバ(@Google)に登録する お返しにregistration IDをもらえる(人にバレちゃだめ) 自分で作ったapp server(GAEで作れる)にuserアカウントとregistration IDを対応付けて保存する browserからapp serverにuser account情報と送信したデータをPOST app serverはuser accountからregistration IDを求めて、データと併せてC2DMサーバへPOST C2DMサーバはregistration IDと対応付けていたデバイスに向けてデータをPUSH これのサンプルとしてChrome to PhoneというAndroidアプリがある。 お気軽に試したい場合はこれを使ってみると良さげ。 実際試した人のブログ→
ローカルまたはリモートのIPアドレスとポート番号を指定して通信時の帯域を制限できるソフト「NEGiES」v1.01が公開された。パケットを遮断することもできるため、簡易ファイヤーウォールとしても利用可能。Windows 2000/XPに対応するフリーソフトで、現在作者のベクターのライブラリページからダウンロードできる。なお、動作には「Visual C++ .NET」ランタイムが必要。 「NEGiES」は、IPアドレスとポート番号を指定して通信時の帯域を制限したり、パケットを遮断することができるタスクトレイ常駐型のソフト。Windows 2000/XPではローカルとリモートのIPアドレスとポート番号を、Windows XPではさらにアプリケーションのプロセス名も指定でき、パケットを遮断するのか帯域を制限するのか、アップまたはダウンのどちらの転送方向を制限するのかというルールを自由に追加するこ
ファイルディスクリプタは、プログラムの外部との入出力を行う抽象的なインタフェースです。Unix/Linuxのファイルディスクリプタは、一般的なファイルだけでなくデバイスやソケットやパイプも対象としています。当連載は、ファイルディスクリプタの機能や管理方法などを提示します。第1回では、ファイルディスクリプタの概要を紹介します。 はじめに ファイルディスクリプタ(Windowsではファイルハンドル)は、プロセスや実行ファイルにとって外部の資源にアクセスしたりアクセスされたりする際に使用される抽象的なインターフェースです。 今日のプログラムは必ずと言っていいほど外部とのインターフェースを持っていますが、新しいディスクリプタや効率的な使い方がそれほど明確ではなかったりします。 当連載では、ファイルディスクリプタに関する調査・試行錯誤した結果、新しいディスクリプタを使用した感想や効率的な管理方法など
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く