centos8でcpanm DBD::mysqlがインスコできないとき

yum install mysql-devel で解決したぽ

てす

アイモバイル(i-mobile)の収益がめちゃ下がっとる件

i-mobile(アイモバイル)の収益が数年前と比べて クリック単価は3分の1くらい、収益も連動して半分以下くらいになった。 表示回数&クリック数にはそこまで変動ないのに、 年々バナーの1クリック単価が急降下。 あまりにも下がりすぎてるので なんかペナル…

CludFlare port

The HTTP ports that Cloudflare support are:80808088802052208220862095 The HTTPs ports that Cloudflare support are:44320532083208720968443

てふてふ

てst

https失敗するcentos6系さばーでやること

https失敗するcentos6系さばーでやること yum -y install gcc openssl-devel perl-Net-SSLeay; cd /usr/bin/ ; curl -LOk http://xrl.us/cpanm ; chmod +x cpanm ; cpanm LWP::Protocol::https::Socket

順番が変になったカラムを特定のキー順に振りなおしてやりなおせるSQL@

ALTER TABLE `subject` CHANGE num num int(11) NOT NULL; alter table subject drop primary key; SET @i := 0; UPDATE subject SET num = (@i := @i +1) ORDER BY created; ALTER TABLE subject CHANGE num num int auto_increment, ADD PRIMARY KEY(num);…

nes resources ..

https://www.spriters-resource.com/nes/ファミコン系ゲームつくりたいとき用の素材サイト

perlからphpのsession read

いまさらperlつかってるひとなんて化石なんだろうなあとおもいつつーperlだいすき https://www.h-fj.com/blog/archives/2013/02/27-152952.phpuse Data::Dumper use CGI::Cookie; use PHP::Serialization qw( unserialize );my %ck = fetch CGI::Cookie;; my…

when https disabled memo

yum -y install perl-Net-SSLeay perl-Crypt-SSLeay perl-IO-Socket-SSL cpanm LWP::Protocol::https

mecab memo

yum -y install mecab mecab-ipadic mecab-devel cpanm Text::MeCab

並列処理 Parallel::ForkManager @ perl

時間のかかる処理を{}で括って$pm->start and next;と$pm->finish;で待機させる count1は10秒で終わる、count2は5秒で終わる処理を並列処理するサンプル #!/usr/bin/perl use Parallel::ForkManager; my $pm = Parallel::ForkManager->new(2); ## 処理1 { $p…

coincheck-API perl

#!/usr/bin/perl use HTTP::Tiny; use Digest::SHA qw/hmac_sha256_hex/; use strict; my $ACCESS_KEY = ACCESS_KEY; my $SECRET_KEY = SECRET_KEY; my $dt = time*10000; my $url = "https://coincheck.com/api/ticker"; my $signature = hmac_sha256_hex($…

node-js memo (for self)

memo que NodeJS Socket.io : Many connections in state CLOSE_WAIT and FIN_WAIT2 without release https://stackoverflow.com/questions/20777827/nodejs-socket-io-many-connections-in-state-close-wait-and-fin-wait2-without-re ans Also, it appears…

'X-Frame-Options' to 'sameorigin'でpdfをiframeできない時の対処法

クリックジャッキング対策の対策 Refused to display '[pdfのURL]' in a frame because it set 'X-Frame-Options' to 'sameorigin'. と出てiframe内で外部サイトのPDFを表示できない場合の対処法 解決法 googleのPDFビュアーを通してembedのパラメータonにし…

裁判が開始する10分前になるとツイート『傍聴bot』リリース

裁判の開始をツイートしてくれる『傍聴bot @bocho_bot』リリースしました。 事件番号、法廷、罪名、審議を法廷開始の10分前になると自動ツイートするよー 裁判傍聴のお供にどうぞ

当日の裁判の日程を検索できる「裁判.in」をつくってみた

サイトの運営をしていると、裁判所からのお呼び出しが結構ある。 そんで、裁判が始まるまで暇なのでほかの裁判の傍聴でもしようかなー と思った時、当日に裁判所どんな裁判がやってるのかググっても出てこない。なぜなら、裁判の日程は裁判所内の紙でしか公…

1年近くブログしんでた

コメント欄に犯行予告?みたいのがあったらしく はてな運営から削除依頼来てたのをスルーしてたら いつのまにか強制的に非公開設定されてたことに1年ぶりに気づいてブログ復活

mecab install

mecab install centos yum -y install gcc-c++ cd /usr/local/src/ wget http://mecab.googlecode.com/files/mecab-0.996.tar.gz tar xzvfp mecab-0.996.tar.gz cd mecab-0.996/ ./configure make ; make install cd /usr/local/src/ wget http://mecab.goog…

memo

#!/usr/bin/perl use re 'eval'; my $key = "192.168.[0-100].*"; my $re = make_re($key); print "[$re]\n"; my @lines = grep {$_} split /\n/,qq{ 192.168.99.112 - - [10/Jul/2013:13:53:15 +0900] "GET /top.html HTTP/1.1" 404 1426 "http://facebook.…

red5のログを日本時間で出力する(centOS/海外サーバ)

海外サーバのcentOS時にred5を使うと、ログの日時がずれる。 sudo cp -p /usr/share/zoneinfo/Japan /etc/localtimeをしても効かない。サーバ再起動してもだめ。/etc/timezoneを設置したら反映された。 $ echo "Asia/Tokyo" > /etc/timezonejavaは/etc/timez…

CloudFlareのmod_cloudflareのupdate

確認 ls -al /etc/httpd/conf.d/cloudflare.conf 更新 sudo rpm --import http://pkg.cloudflare.com/pubkey.gpg yum update mod_cloudflare ip情報 https://www.cloudflare.com/ips/ https://www.cloudflare.com/ips-v4 https://www.cloudflare.com/ips-v6

xcode / first pointが消えて追加したい時

"View Controller" 項目の "Initial Scene" の "Is Initial View Controller”をチェックで復活。

swift / appdeligateでページ越しで共通変数を使う

AppDelegate.swiftとは? アプリをつくった段階でデフォルトでつくられるファイルのひとつ。 アプリ全体のライフタイムイベントを管理するためのクラス。 http://qiita.com/SoyaTakahashi/items/cc8f48af792c353cd9f3共通関数やら変数をページ越しで管理する…

swift / modalで開いた画面を閉じる

@IBAction func closeTapped(){ self.dismissViewControllerAnimated(true, completion: nil); }

swift / URLエンコード

let query = "ニュース"; let encoded = query.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet()) let url = "https://ajax.googleapis.com/ajax/services/search/news?v=1.0&hl=ja&rsz=8&q=" + encoded!;…

swift / 文字列置換

<b>タグを抜く例 var title = newsDic["title"] as? String; title = title?.stringByReplacingOccurrencesOfString("<b>", withString: ""); title = title?.stringByReplacingOccurrencesOfString("</b>", withString: "");</b>

xcode / httpサイトを見れるようにする設定

プロジェクトアイコンをクリックして、設定画面から「Info」のタブ [+] App Transport Security Settings を追加 その中に、[+] Allow Arbitrary Loads で Boolean を True

swift / JSON取得&リスト表示&タイトルクリックでURLに飛ぶ

世界一受けたいiphoneアプリの授業から転載 import UIKit import Alamofire class ViewController: UIViewController,UITableViewDataSource,UITableViewDelegate { @IBOutlet var table: UITableView! var newsDataArray = NSArray(); func tableView(table…

swift / jsonをhttp経由で取得

Download https://github.com/Alamofire/Alamofire Download後、[Alamofire.xcodeproj]をライブラリメニューにペースト setting general > embed Binary で[+]で追加。 [Alamofile iOS]を選択して追加 code let requestUrl = "https://ajax.googleapis.com/…