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/sh | |
# | |
# NDK Standalone Toolchain: | |
# $HOM#/Android/Sdk/ndk-bundle/build/tools/make_standalone_toolchain.py --arch x86 --api 22 --stl gnustl -v --install-dir $HOME/workspace/ndk-toolchain --force | |
# cp $HOME/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a $HOME/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86/libandroid_support.a $HOME/workspace/ndk-toolchain/i686-linux-android/lib | |
# | |
# NDK | |
export TARGET='i686-linux-android' | |
export TOOLCHAIN=${HOME}/workspace/ndk-toolchain |
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
FROM ubuntu | |
RUN apt-get update | |
RUN apt-get install -y sudo git curl | |
RUN useradd -m -s /bin/bash louis | |
RUN echo "louis ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | |
USER louis | |
WORKDIR /home/louis | |
RUN git clone https://github.com/louisje/outland.git | |
RUN outland/bin/ol-build | |
ENTRYPOINT [ "/bin/bash", "--login" ] |
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
FROM ubuntu | |
RUN apt-get update | |
RUN apt-get install -y curl jq | |
WORKDIR /root | |
RUN curl -ksL https://gist.github.com/louisje/86a6c382b0a89db7f97d/raw/vision-adult.sh > vision-adult.sh | |
RUN chmod a+x vision-adult.sh | |
ENTRYPOINT [ "./vision-adult.sh" ] | |
CMD [ "--help" ] |
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/sh | |
num=3 | |
set -e | |
if test -n "$SWARM_NUM"; then | |
num="$SWARM_NUM" | |
fi | |
create() { |
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
version: '2' | |
services: | |
hephaestus: | |
build: ./hephaestus | |
depends_on: | |
- queue | |
- redis | |
environment: | |
- P_APP_ID=3eeeUbYPJdftJ9Q777awM6QiVDcKPY9f9cARopBM |
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 | |
# | |
# <pre> | |
# | |
# Copyright (c) 2016 Louis Jeng <louisje@gmail.com> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to | |
# deal in the Software without restriction, including without limitation the | |
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
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 | |
# morse.sh - generate morse code from ascii | |
# you can contact me at: | |
# --. .-. ..- .-.. --- ... .--.-. --. -- .- .. .-.. | |
# .-.-.- -.-. --- -- | |
# if you don't like my "dots" and "dashes" | |
# you can change them | |
# dot=. | |
# dash=_ |
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/sh | |
export DISPLAY=":2" | |
#sudo apt-get install -y tightvncserver | |
sudo apt-get install -y psmisc | |
#vncserver -kill $DISPLAY | |
sudo pkill x11vnc | |
sudo pkill Xvfb | |
### x-window ### | |
sudo apt-get install -y xfonts-cyrillic xfonts-100dpi xfonts-75dpi xvfb x11vnc xfce4 | |
#vncserver $DISPLAY -geometry 1372x874 -depth 24 |
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/sh | |
# usage: ./date_of_year.sh [ {year} ] | |
year=$1 | |
if test -z "$year"; then | |
year=`date +'%Y'` | |
fi | |
next_year=`echo "$year + 1" | bc` | |
now=`date +"%Y-%m-%d" -d "$year-01-01"` | |
end=`date +"%Y-%m-%d" -d "$next_year-01-01"`; |
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
package acloudsvc.hadoop.examples; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import org.apache.commons.io.IOUtils; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.fs.FileSystem; |