2014-01-01から1年間の記事一覧

対象要素スクロール時点に表示

$(window).scroll(function () { var disp_target = $("#target_id"); var topOffset = $('#xy_html').offset().top; if ($(this).scrollTop() > topOffset) { disp_target.fadeIn(200); } else { disp_target.fadeOut(200); } });

attrとpropの取得の違い

//チェックした値を取得する $(":checkbox").click(function() { alert($(this).prop('checked')); alert($(this).attr('checked')); }); チェック時 prop→true attr→checked 非チェック時 prop→false attr→undefined 返却される結果が異なります。

skype bot 環境構築

skype bot 環境構築 参考URL: http://gitpub.hatenablog.com/entry/2013/07/13/224437 http://www.if-not-true-then-false.com/2012/install-skype-on-fedora-centos-red-hat-rhel-scientific-linux-sl/ ライブラリインストール $ sudo yum install -y glibc…

アイコン作成お勧めサイト

http://iconizer.net/en/free_icons

zend server symfony 2

PHP

http://www.backtheweb.com/symfony2/instalar-symfony-2-en-zend-server-ce-con-mac-os-lion-y-actualizar-apc-y-intl/

Bash脆弱性対応

yumコマンドで実行 # yum update bash # /sbin/ldconfig 下記のコマンドで検証 AHO='() { baka; }; echo manuke' bash -c 'echo Hi' ※manuke表示されなかったら、OK

Centos6.2にpython2.7入れる

python2.7、python3.3をインストールするために、以下のリポジトリを追加します。 rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/ius-release-…

git fetch --prune

git

git fetch リモードのブランチは最新にならない場合、pruneのオプションをつける git fetch --prune

GITコミットコメント修正

git

直前のコミットのコメントだけを修正したい git commit --amend インデックスにファイルを登録していない状態で --amend オプションを指定して再コミットを行います。コメントの入力画面が表示されるので、コメントを修正します。

正規表現で重複要素削除

◆検索文字列 (^[^\r]+\r)\1+ ◆置換文字列 $1

Fireworksで簡単!写真風画像加工

apacheのサーバにnginx導入

インストール $ sudo rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm $ sudo cat /etc/yum.repos.d/nginx.repo # nginx.repo [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/6/…

Macでターミナル ショートカットキー

mac

基本ショートカットキー一覧 ショートカットキー 説明 Ctrl + A カーソルを行頭へ Ctrl + E カーソルを行末へ ESC + F カーソルを1単語先に進める ESC + B カーソルを1単語戻す Ctrl + K カーソル位置から行末までを削除 Ctrl + U カーソル位置から行頭まで…

git設定

git

$ git config --global color.diff auto $ git config --global color.branch auto $ git config --global color.status auto $ git config --global color.interactive auto $ git config --global alias.st status $ git config --global alias.br branch …

MacからNFS でCentOSをマウント

mac

CentOS側 yum install rpcbind yum install nfs-utils ファイル編集 vi /etc/exports 下記の内容で編集して保存 /var/www/ 192.168.1.1/24(rw,insecure,no_root_squash,sync) 起動する /etc/init.d/rpcbind start /etc/init.d/nfslock start /etc/init.d/nfs…

Pythonインストール

http://blog.marsbar.us/blog/2013/02/25/python-environment/

mac git バージョンアップ

参考URL:http://qiita.com/d_nishiyama85/items/d63da1e50405abc0929c アップデート前のバージョンは、 $ git --version git version 1.7.9.6 (Apple Git-31.1) ・公式サイト http://git-scm.com/ に行き、"Download for Mac" のボタンから .dmg ファイルを…

redis ランキング取得する方法

200は全体の何位にあるのか zcount key_t (200 +inf

Redisポートによるサーバ管理(mac)

=====Redisポートによるサーバ管理(mac)===== 1)新設ポート番号のRedis起動 /opt/local/bin/redis-server /opt/local/etc/redis.conf --port 6380 --pidfile /opt/local/var/run/redis.pid --logfile /opt/local/var/log/redis.log --dbfilena…

Finderのタイトルバーにフォルダのフルパスを表示する方法

mac

ターミナルを使って、フルパスを表示する まず、「起動ディスク(Macintosh HDなど)」→「アプリケーション」→「ユーティリティ」と移動し「ターミナル」を起動します。 次に、ターミナルに下のように入力します。 defaults write com.apple.finder _FXShowP…

~/.bashrc

[ -s "$HOME/.pythonbrew/etc/bashrc" ] && source "$HOME/.pythonbrew/etc/bashrc" PATH=$PATH:~/opt/mysql/5.6.16/bin export DYLD_LIBRARY_PATH=~/opt/mysql/5.6.16/lib/

AngularJS おすすめサイト

http://js.studio-kingdom.com/jqueryui/widgets/widget_factory

python タプルとリストの違い

<span class="synComment"># リストとタプルの違い</span> a = [10, 20, 30] <span class="synComment"># リスト</span> b = (10, 20, 30) <span class="synComment"># タプル</span> <span class="synComment"># 中身が同じでも等しくないと判定される</span> <span class="synStatement">assert</span> <span class="synStatement">not</span> a == b

git 管理しないファイル・フォルダ削除

git

ファイル削除する場合 git clean -f フォルダ削除する場合 git clean -df

.zshrc 設定サンプル

zsh

# コマンドのエリアス設定 # workspace hash -d w=/var/www (d) is default on ------------------------------ General Settings ------------------------------ export EDITOR=vim # エディタをvimに設定 export LANG=ja_JP.UTF-8 # 文字コードをUTF-8に…

Mac Aptana 日本語化手順

1.Aptana Studio 3.4.0をダウンロードする http://www.aptana.com/products/studio3/download で「DOWNLOAD APTANA STUDIO 3」を押してダウンロードする。 2.Pleiadesをダウンロードする http://mergedoc.sourceforge.jp/ で「安定版 1.4.0」を押してダウン…

mac 隠しファイル表示・非表示

mac

隠しファイルを表示する ターミナルで下記コマンドを実行する defaults write com.apple.finder AppleShowAllFiles true killall Finder 隠しファイルを非表示する ターミナルで下記コマンドを実行する defaults write com.apple.finder AppleShowAllFiles f…

Windows用USBキーボードをMacで使う

mac

http://www.geocities.jp/mac_scripter/

python PrototypeStore

-- coding: utf-8 -- class PrototypeStore(dict): """ x.prototype.XXXの値を保存するためのクラス """ def setattr(self, name, value): self[name] = value def __getattr__(self, name): return self[name] class PrototypeMeta(type): """ Prototypeメ…

PHP出身のpyhton入門サイト

http://phpy.readthedocs.org/en/latest/index.html