This file contains hidden or 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 convertSheetToJson(sheet) { | |
var titleRange = sheet.getRange(1, 1, 1, sheet.getLastColumn()); | |
var titles = titleRange.getValues()[0]; | |
var rowRange = sheet.getRange(2, 1, sheet.getLastRow(), sheet.getLastColumn()); | |
var rows = rowRange.getValues(); | |
// create json | |
var result = []; | |
for(var i = 0; i < rows.length; i++) { |
This file contains hidden or 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
# get latest DVTPlugInCompatibilityUUID from your Xcode.app and append it into plugin's info plist | |
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist | xargs -IFILE defaults write FILE DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID` |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
This file contains hidden or 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. 初めてのGAS | |
// メッセージボックスにHello, Worldを表示します。 | |
function myFirstGAS() { | |
Browser.msgBox('Hello World!'); | |
Logger.log('Hello World!'); | |
} | |
// シートから値を取得して表示します。 | |
function getValueFromSheet() { | |
var book = SpreadsheetApp.getActive(); |
This file contains hidden or 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
# merge into BASE | |
git checkout "$DEVELOP_BRANCH" | |
if [ "$(git rev-list -n2 "$DEVELOP_BRANCH..$BRANCH" | wc -l)" -eq 1 ]; then | |
git merge --ff "$BRANCH" | |
else | |
git merge --no-ff "$BRANCH" | |
fi |
This file contains hidden or 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/sh | |
curl -T "$FILE_NAME" -u $USER:$PASS "https://$SPACE.backlog.jp/dav/$PROJECT/$DIR" | |
curl -X POST -H "X-ChatWorkToken: $API_TOKEN" -d "body=$MESSAGE" "https://api.chatwork.com/v1/rooms/$ROOM_ID/messages" |
This file contains hidden or 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 | |
# According to https://developer.apple.com/library/ios/#qa/qa1686/_index.html | |
# Install ImageMagick with MacPort: sudo port install ImageMagick | |
convert $1 -resize 512x512 iTunesArtwork.png # Ad Hoc iTunes | |
convert $1 -resize 60x60 Icon.png # Home screen on non-Retina | |
convert $1 -resize 120x120 [email protected] # Home screen for Retina display | |
convert $1 -resize 180x180 [email protected] # Home screen for Retina display(iPhone6+) | |
convert $1 -resize 76x76 Icon-ipad.png # Home screen on iPad | |
convert $1 -resize 152x152 [email protected] # Home screen on iPad Retina | |
convert $1 -resize 40x40 Icon-spotlight.png # Spotlight icon for non-Retina display |
This file contains hidden or 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
nokogiri ${FILE_NAME} -e 'puts $_.css("body").to_s' | html2slim |
This file contains hidden or 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
apply plugin: 'com.android.application' | |
apply plugin: 'android-apt' | |
def AndroidAnnotationsVersion = '3.2' | |
android { | |
compileSdkVersion 21 | |
buildToolsVersion "21.0.2" | |
defaultConfig { | |
applicationId "com.example.app_name" |
This file contains hidden or 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 | |
echo apk-util v0.0.1 | |
package-name() { | |
aapt dump badging $1 | grep "package: name" | sed "s/[^']*'\([^']*\)'.*/\1/" | |
} | |
uninstall() { | |
adb uninstall `package-name $1` |