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
" display | |
set number | |
set title | |
set showcmd | |
" color | |
syntax enable | |
set background=dark | |
"colorscheme solarized |
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
yum -y install ntp | |
chkconfig ntpd on | |
/etc/init.d/ntpd start | |
#install package | |
yum -y --enablerepo=remi,epel install libyaml libyaml-devel zlib zlib-devel readline readline-devel openssl openssl-devel libxml2 libxml2-devel libxslt libxslt-devel gcc gcc-c++ make git wget subversion mysql mysql-server mysql-devel | |
chkconfig mysqld on | |
/etc/rc.d/init.d/mysqld start |
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
#install rbenv | |
cd /usr/local | |
git clone git://github.com/sstephenson/rbenv.git rbenv | |
groupadd rbenv | |
chgrp -R rbenv rbenv | |
chmod -R g+rwxXs rbenv | |
#install rbenv-build |
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
namespace :unicorn do | |
## | |
# Tasks | |
desc "Start unicorn" | |
task(:start) { | |
config = rails_root + "config/unicorn.rb" | |
env = ENV['RAILS_ENV'] || "development" | |
sh "bundle exec unicorn_rails -D -c #{config} -E #{env}" |
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
<script> | |
;(function ($) { | |
window.dataLayer = window.dataLayer || []; | |
$(function () { | |
var each_slice = function(arr, num, fn) { | |
if(fn === undefined) fn = function(){}; | |
for(var i=0,l=arr.length,count=0,slice=[],ret=[]; i<l; i++) { | |
if(count >= num) { | |
fn.apply(slice); | |
ret.push(slice); |
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
function main () { | |
// Name = '除外プレースメント名' の「除外プレースメント名」はアカウントに合わせて変更 | |
var excludedPlacementList = AdWordsApp.excludedPlacementLists().withCondition("Name = '除外プレースメント'").get().next(); | |
var placements = []; | |
// Where/Duringで指定している条件は抽出したいものに変更する。下記は、「過去30日間でクリック11以上、CTR 1.00%以上」のプレースメントを抽出している | |
var rows = AdWordsApp.report("SELECT Criteria, Clicks, Cost, Ctr FROM PLACEMENT_PERFORMANCE_REPORT Where Clicks > 10 AND Ctr > 0.01 During LAST_30_DAYS").rows(); | |
while (rows.hasNext()) { | |
var row = rows.next(); | |
placements.push(row['Criteria']); | |
} |
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
/** | |
使い方: | |
1. 最初にexport()を実行してキャンペーン/広告グループのデータをスプレッドシートに書き出します。 | |
書き出すスプレッドシートは、下記のsheetIDで設定したIDのスプレッドシートとなります。 | |
2. export()を実行したあとに、スプレッドシートにキャンペーン/広告グループのデータが出力された | |
ことを確認します。 | |
3. 出力されたキャンペーン/広告グループのデータを書き換えます。このとき、ID列を変更しないように | |
してください(この値で既存のデータとマッチングさせます)。 | |
4. もう一度スクリプトを実行します。このとき、exportの行はコメントアウトし、importの行のコメント |
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
<script type="text/javascript"> | |
var dataLayer = dataLayer || []; | |
dataLayer.push({ | |
'site_type':'d', | |
'page_type' : 'TOPページ', | |
'customer': { | |
'id': 'C12345', | |
'hashed_email': '1234abcd' | |
}, | |
'product': { // 商品詳細ページでなければこのプロパティは空 |
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
function () { | |
var element = {{gtm.element}}; | |
while (!element.hasAttribute('data-no')) { | |
element = element.parentElement; | |
} | |
return element.getAttribute('data-no'); | |
} |
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
-- プロジェクト名、データセット名は自身のものに置き換えること。 | |
SELECT | |
* | |
FROM | |
`プロジェクト名.データセット名.events_20210201` | |
WHERE | |
TRUE | |
AND MOD(ABS(FARM_FINGERPRINT(user_pseudo_id)), 10) = 0 |
OlderNewer