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
/** | |
* 任意のシートにkey-valueを保存する | |
*/ | |
class Variables{ | |
constructor (sheet_name="variables") { | |
let app = SpreadsheetApp.getActiveSpreadsheet(); | |
this.sheet = app.getSheetByName(sheet_name); | |
if (!this.sheet) { | |
//シートが存在しない場合は末尾に追加 | |
app.insertSheet(sheet_name, app.getSheets().length); |
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
import android.media.MediaPlayer; | |
public class PlayerExample { | |
MediaPlayer p = null; | |
private void playSound(String fileName) { | |
p = new MediaPlayer(); | |
try { | |
AssetFileDescriptor afd = ctx.getAssets().openFd(fileName); | |
p.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); | |
afd.close(); |
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
public class PhonegapWithAdmobActivity extends DroidGap { | |
private AdView adView; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
adView = new AdView(this, AdSize.BANNER, PUBLISHER_ID); | |
super.loadUrl("file:///android_asset/www/index.html"); | |
((LinearLayout)appView.getParent()).addView(adView); | |
adView.loadAd(new AdRequest()); | |
} |
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
jupyter==1.0.0 | |
pandas==0.21.1 | |
seaborn==0.8.1 | |
lxml==4.1.1 | |
html5lib==1.0.1 | |
beautifulsoup4==4.6.0 | |
requests==2.18.4 |
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
# osx - https://github.com/github/gitignore/blob/master/Global/OSX.gitignore | |
.DS_Store | |
.AppleDouble | |
.LSOverride | |
# Icon must end with two \r | |
Icon | |
# Thumbnails |
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 | |
# searches launchd.plist files from launchd directories | |
grep `launchctl list | grep $1 | cut -f 3` ~/Library/LaunchAgents/* /Library/LaunchAgents/* /Library/LaunchDaemons/* /System/Library/LaunchAgents/* /System/Library/LaunchDaemons/* | cut -d ':' -f 1 | uniq |
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
autoload -U compinit | |
autoload colors | |
compinit | |
colors | |
PS1="%{${fg[green]}%}${USER}@${HOST%%.*}:%~ [%D{%y-%m-%d %H:%m:%S}]%{${reset_color}%} | |
[%!]%(!.#.$) " | |
PATH=$PATH:/usr/local/bin/ | |
alias ls="ls -G" |
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
ADB_PATH=PATH_TO_ADB | |
for f in "$@" | |
do | |
$ADB_PATH install -r "$f" | |
done |
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 | |
#toggle OSX Finder setting to show the hidden dotfiles | |
if [ `defaults read com.apple.finder AppleShowAllFiles` -eq 1 ]; then | |
defaults write com.apple.finder AppleShowAllFiles -bool NO; | |
else | |
defaults write com.apple.finder AppleShowAllFiles -bool YES; | |
fi | |
killall Finder; |
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
public boolean canRespondToIntent(Context ctx, Intent i) { | |
PackageManager pm = ctx.getPackageManager(); | |
List<ResolveInfo> l = pm.queryIntentActivities(i, PackageManager.MATCH_DEFAULT_ONLY); | |
if (l.size()>0) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
NewerOlder