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
apiVersion: console.openshift.io/v1 | |
kind: ConsoleQuickStart | |
metadata: | |
name: serverless-cli | |
spec: | |
displayName: Serverless CLI | |
description: todo | |
durationMinutes: 10 | |
tags: | |
- knative |
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 | |
IFS=$(echo -en "\n\b") | |
# Ensure we are in a git repo with gitignore. | |
if [ ! -d .git ]; then echo "Current working directory is not a git repository."; exit -1; fi | |
#if [ ! -f .gitignore ]; then echo "Current working directory has no .gitignore file."; exit -2; fi | |
# Sort (by date) and save new files | |
for file in `git status --porcelain --untracked-files=all | grep -v '.log$' | grep '^?? ' | sed 's/^?? //g'` | |
do |
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
<?xml version="1.0" encoding="utf-8"?> | |
<TabHost xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@android:id/tabhost" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<LinearLayout | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent"> | |
<TabWidget |
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 | |
#set -e | |
jail="jail" | |
if [ -e "$jail" ]; then | |
echo Folder already exists: "$jail" | |
exit -1 | |
fi |
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
// javascript reimplementation of | |
// https://github.com/hellozimi/HCYoutubeParser/blob/master/YoutubeParser/Classes/HCYoutubeParser.m | |
var url = require('url'); | |
var http = require('http'); | |
var videoId = '7qpvjsMaXPE'; | |
var infoUrl = 'http://www.youtube.com/get_video_info?video_id=' + videoId; |
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
private String getSdcardFolder() { | |
File externalStorage = Environment.getExternalStorageDirectory(); | |
if (externalStorage.exists() && externalStorage.canWrite()) { | |
File trySubDir1 = new File(externalStorage, "external_sd"); | |
File trySubDir2 = new File(externalStorage, "sd"); | |
if (trySubDir1.exists() && trySubDir1.canWrite()) { | |
return trySubDir1.getAbsolutePath(); | |
} else if (trySubDir2.exists() && trySubDir2.canWrite()) { | |
return trySubDir2.getAbsolutePath(); | |
} else { |
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
# Add npm-shrinkwrap.json to get a working react-native version (0.22) | |
rm -rf node_modules | |
npm install | |
# Optional: Remove it again to install your other dependencies | |
rm npm-shrinkwrap.json | |
npm install | |
npm start -- --reset-cache |
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 java.io.IOException; | |
public interface ContentWidth { | |
public float getContentWidth(String text) throws IOException; | |
} |
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
if ! pgrep "iPhone Simulator"; then | |
exit 0; | |
fi | |
pids=$(pgrep "iPhone Simulator") | |
osascript -e 'tell app "iPhone Simulator" to quit' | |
sleep 1 | |
for pid in $pids; do | |
if ps $pid; then |
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 | |
allgits=`find ~/.cocoapods/CUSTOMERNAME ~/git/CUSTOMERNAME -name .git | sed 's_/.git__'` | |
filter=$* | |
filter="$filter --author=jerolimov" | |
filter="$filter --date=iso" | |
filter="$filter --after=2013-05-01" | |
filter="$filter --before=2013-05-31" | |
for i in $allgits |
NewerOlder