パッケージ(Package)はAtomのコアです。エディターのメイン機能以外のほぼすべては、パッケージによって扱われます。これには、ファイルツリー、ステータスバー、シンタックスハイライトのような「コア」の部分が含まれています。
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
/** | |
* @see http://www.bloggingdeveloper.com/post/JavaScript-QueryString-ParseGet-QueryString-with-Client-Side-JavaScript.aspx | |
*/ | |
<script type="text/jscript" language="javascript"> | |
function getQuerystring(key, default_) | |
{ | |
if (default_==null) default_=""; | |
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); | |
var regex = new RegExp("[\\?&]"+key+"=([^&#]*)"); | |
var qs = regex.exec(window.location.href); |
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
#!/bin/bash | |
SOURCEINSTANCE=${SOURCEINSTANCE:-''} | |
SOURCEUSER=${SOURCEUSER:-'admin'} | |
SOURCEPORT=${SOURCEPORT:-'5439'} | |
SOURCEDB=${SOURCEDB:-'db'} | |
SOURCESCHEMA=${SOURCESCHEMA:-'public'} | |
SCHEMA=${SCHEMA:-'public'} | |
echo "CREATE TABLE ${SCHEMA}.${TABLE} (" | |
psql -h ${SOURCEINSTANCE} -U ${SOURCEUSER} -p ${SOURCEPORT} ${SOURCEDB} -t -c "select (\"column\" || ' ' || type || ' ENCODE ' || encoding || ',' ) from pg_table_def where schemaname='$SCHEMA' and tablename = '$TABLE'" | sed 's/ENCODE none/ENCODE RAW/' | sed '$d' | sed '$ s/,$//' | |
echo ")" |
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
# Note (November 2016): | |
# This config is rather outdated and left here for historical reasons, please refer to prerender.io for the latest setup information | |
# Serving static html to Googlebot is now considered bad practice as you should be using the escaped fragment crawling protocol | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name yourserver.com; | |
root /path/to/your/htdocs; |
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
// $ rails new fuga --skip-bundle --skip-test-unit -d sqlite3 | |
$ cd fuga | |
$ bundle install --path vendor/bundle --without production |
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
[treasuredata] | |
name=TreasureData | |
baseurl=http://td-agent-repository.s3-website-us-east-1.amazonaws.com/redhat/$releasever/$basearch | |
gpgcheck=1 | |
gpgkey=http://packages.treasure-data.com/redhat/RPM-GPG-KEY-td-agent |
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
class Account < ActiveRecord::Base | |
has_many :users | |
end |
- Install SIMBL http://culater.net/software/SIMBL/SIMBL.php
- Copy SpotlightSIMBL.bundle to /Library/Application Support/SIMBL/Plugins/ (a)
- Copy Flashlight.osax to ~/Library/ScriptingAdditions/ (b)
- Disable Flashlight
- Enable Flashlight
- Open Script Editor on your Mac (look for "Script Editor In Spotlight") and paste the following code (don't change Snow Leopard for Yosemite)
tell application "Spotlight" to inject SIMBL into Snow Leopard
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
# Login to AWS registry (must have docker running) | |
docker-login: | |
$$(aws ecr get-login --no-include-email --region us-east-1 --profile=mycompany) | |
# Build docker target | |
docker-build: | |
docker build -f Dockerfile --no-cache -t mycompany/myapp . | |
# Tag docker image | |
docker-tag: |
OlderNewer