├── .gitignore ├── .gitmodules ├── .travis.yml ├── Howto_Create_Traits.md ├── README.md ├── TODO ├── bin ├── available_profiles └── available_traits ├── bintray.sh ├── copy_profile ├── doc ├── Camkrebs ├── Heckenkrebs.md ├── Instacam.md ├── QUICKSTART ├── TLDR ├── arduino.md ├── lazorcam_druck.svg ├── radio.md └── reveal.js │ ├── .gitignore │ ├── .travis.yml │ ├── Gruntfile.js │ ├── LICENSE │ ├── README.md │ ├── css │ ├── print │ │ ├── paper.css │ │ └── pdf.css │ ├── reveal.css │ ├── reveal.min.css │ └── theme │ │ ├── README.md │ │ ├── beige.css │ │ ├── default.css │ │ ├── moon.css │ │ ├── night.css │ │ ├── serif.css │ │ ├── simple.css │ │ ├── sky.css │ │ ├── solarized.css │ │ ├── source │ │ ├── beige.scss │ │ ├── default.scss │ │ ├── moon.scss │ │ ├── night.scss │ │ ├── serif.scss │ │ ├── simple.scss │ │ ├── sky.scss │ │ └── solarized.scss │ │ └── template │ │ ├── mixins.scss │ │ ├── settings.scss │ │ └── theme.scss │ ├── index.html │ ├── js │ ├── reveal.js │ └── reveal.min.js │ ├── lib │ ├── css │ │ └── zenburn.css │ ├── font │ │ ├── league_gothic-webfont.eot │ │ ├── league_gothic-webfont.svg │ │ ├── league_gothic-webfont.ttf │ │ ├── league_gothic-webfont.woff │ │ └── league_gothic_license │ └── js │ │ ├── classList.js │ │ ├── head.min.js │ │ └── html5shiv.js │ ├── package.json │ └── plugin │ ├── highlight │ └── highlight.js │ ├── markdown │ ├── example.html │ ├── example.md │ ├── markdown.js │ └── showdown.js │ ├── multiplex │ ├── client.js │ ├── index.js │ └── master.js │ ├── notes-server │ ├── client.js │ ├── index.js │ └── notes.html │ ├── notes │ ├── notes.html │ └── notes.js │ ├── postmessage │ ├── example.html │ └── postmessage.js │ ├── print-pdf │ └── print-pdf.js │ ├── remotes │ └── remotes.js │ ├── search │ └── search.js │ └── zoom-js │ └── zoom.js ├── lib ├── append_files ├── init └── init_overlay ├── prepare ├── profiles ├── arduino ├── captive ├── dali_master ├── easybox_simulator ├── heckenkrebs ├── instacam ├── krebs ├── madplayer ├── mpd ├── netem ├── nfc_login ├── overlay_krebs ├── pyserial ├── radio ├── rickroller_advanced ├── rickroller_bare ├── shack_bridge ├── shack_dali ├── shack_instacam ├── shack_streamer ├── shairport └── superheckenkrebs ├── traits ├── .gitignore ├── audio │ ├── MANIFEST │ ├── madplay │ │ └── MANIFEST │ ├── mpd │ │ └── MANIFEST │ ├── radio │ │ ├── MANIFEST │ │ ├── README │ │ └── files │ │ │ ├── etc │ │ │ ├── asound.conf │ │ │ ├── config │ │ │ │ └── radio │ │ │ ├── hotplug.d │ │ │ │ ├── button │ │ │ │ │ └── buttons │ │ │ │ └── usb │ │ │ │ │ └── usb-audio-radio │ │ │ ├── init.d │ │ │ │ └── radio │ │ │ ├── inittab │ │ │ ├── rc.d │ │ │ │ ├── K15radio │ │ │ │ └── S94radio │ │ │ ├── rc.local │ │ │ ├── ser2net.conf │ │ │ └── triggerhappy │ │ │ │ └── triggers.d │ │ │ │ └── radio.conf │ │ │ ├── usr │ │ │ ├── bin │ │ │ │ ├── arduinoflash │ │ │ │ ├── arduinolisten │ │ │ │ ├── arduinoreset │ │ │ │ ├── fritzlisten │ │ │ │ ├── metaebene │ │ │ │ ├── package-local │ │ │ │ ├── play │ │ │ │ ├── radioplayer │ │ │ │ ├── simplesleep │ │ │ │ ├── sleeptimer │ │ │ │ ├── speak │ │ │ │ ├── tune │ │ │ │ └── wifionoff │ │ │ └── lib │ │ │ │ └── lua │ │ │ │ └── luci │ │ │ │ ├── controller │ │ │ │ └── myapp │ │ │ │ │ └── mymodule.lua │ │ │ │ ├── model │ │ │ │ └── cbi │ │ │ │ │ └── myapp-mymodule │ │ │ │ │ ├── radio.lua │ │ │ │ │ └── remote.lua │ │ │ │ └── view │ │ │ │ └── themes │ │ │ │ └── openwrt.org │ │ │ │ └── footer.htm │ │ │ └── www │ │ │ ├── cgi-bin │ │ │ └── radio │ │ │ └── index.html │ └── shairport │ │ └── MANIFEST ├── core │ ├── files │ │ ├── etc │ │ │ ├── dropbear │ │ │ │ └── authorized_keys │ │ │ └── shadow │ │ └── usr │ │ │ └── bin │ │ │ ├── all_led │ │ │ ├── genhostid │ │ │ └── led │ └── firstrun │ │ └── files │ │ ├── etc │ │ └── rc.local │ │ └── usr │ │ └── bin │ │ └── firstrun ├── gui │ └── luci │ │ ├── MANIFEST │ │ └── uhttpd │ │ ├── README │ │ └── files │ │ └── etc │ │ └── firstrun.d │ │ └── 50_enable_luci ├── krebs │ ├── infest │ │ ├── MANIFEST │ │ ├── README │ │ ├── TODO │ │ └── files │ │ │ ├── etc │ │ │ ├── config │ │ │ │ └── system │ │ │ └── firstrun.d │ │ │ │ └── 5krebs_tinc │ │ │ └── usr │ │ │ └── bin │ │ │ ├── autoinfest │ │ │ └── tinc-update │ └── ssh_keys │ │ └── files │ │ └── root │ │ └── .ssh │ │ └── authorized_keys ├── minimal │ ├── README │ ├── no-dnsmasq │ │ └── MANIFEST │ ├── no-firewall │ │ └── MANIFEST │ ├── no-iptables │ │ └── MANIFEST │ ├── no-ipv6 │ │ └── MANIFEST │ └── no-ppp │ │ └── MANIFEST ├── mods │ └── vfd_lcd │ │ ├── MANIFEST │ │ ├── README │ │ └── files │ │ ├── etc │ │ └── rc.local │ │ └── usr │ │ └── bin │ │ └── lcd-write ├── network │ ├── 3g │ │ └── MANIFEST │ ├── aircrack-overlay │ │ └── MANIFEST │ ├── autoconnect │ │ ├── MANIFEST │ │ ├── TODO │ │ ├── autostart │ │ │ ├── MANIFEST │ │ │ └── files │ │ │ │ └── etc │ │ │ │ └── firstrun.d │ │ │ │ └── 30_autostart_autowifi │ │ └── docs │ │ │ └── wpa_supplicant_wps_logs │ ├── autoconnect_old │ │ ├── MANIFEST │ │ └── files │ │ │ ├── etc │ │ │ ├── rc.local │ │ │ ├── wifiblack │ │ │ └── wifipw │ │ │ └── usr │ │ │ └── bin │ │ │ ├── aap │ │ │ └── easybox_keygen │ ├── avahi │ │ ├── MANIFEST │ │ └── files │ │ │ └── etc │ │ │ └── avahi │ │ │ └── avahi-daemon.conf │ ├── captive │ │ ├── MANIFEST │ │ ├── README │ │ └── files │ │ │ └── etc │ │ │ ├── config │ │ │ ├── dhcp │ │ │ ├── firewall │ │ │ ├── network │ │ │ ├── uhttpd │ │ │ └── wireless │ │ │ ├── init.d │ │ │ └── nodogsplash │ │ │ └── nodogsplash │ │ │ └── nodogsplash.conf │ ├── client-mode │ │ ├── MANIFEST │ │ └── files │ │ │ └── etc │ │ │ └── config │ │ │ └── network │ ├── eth-wifi-nat │ │ ├── MANIFEST │ │ ├── README │ │ └── files │ │ │ └── etc │ │ │ ├── config │ │ │ └── firewall │ │ │ └── firstrun.commands │ ├── interactive-tools │ │ └── MANIFEST │ ├── netem │ │ ├── MANIFEST │ │ ├── README │ │ └── etc │ │ │ └── init.d │ │ │ └── netem │ ├── open-wifi-ap │ │ ├── MANIFEST │ │ └── files │ │ │ └── etc │ │ │ └── firstrun.d │ │ │ └── 11_open-wifi-ap │ ├── wifi-client │ │ ├── MANIFEST │ │ └── files │ │ │ └── etc │ │ │ └── firstrun.d │ │ │ └── 10_wifi_client │ ├── wifi-dhcp │ │ └── files │ │ │ └── etc │ │ │ └── firstrun.d │ │ │ └── 01_configure_bridge │ └── wifibridge │ │ └── files │ │ └── etc │ │ └── config │ │ ├── firewall │ │ └── network ├── special_purpose │ ├── arduino │ │ ├── MANIFEST │ │ ├── README │ │ └── files │ │ │ ├── etc │ │ │ ├── avahi │ │ │ │ └── services │ │ │ │ │ └── arduino.service │ │ │ └── ser2net.conf │ │ │ ├── root │ │ │ └── communicate-arduino.py │ │ │ └── usr │ │ │ └── bin │ │ │ ├── merge-bootloader.lua │ │ │ └── run-avrdude │ ├── dali │ │ ├── MANIFEST │ │ └── files │ │ │ ├── etc │ │ │ └── rc.local │ │ │ └── usr │ │ │ └── bin │ │ │ ├── ACK │ │ │ ├── NACK │ │ │ ├── UNKNOWN_MODE │ │ │ ├── daliwrite │ │ │ └── delaywrite │ ├── dali_web │ │ ├── MANIFEST │ │ └── files │ │ │ └── www │ │ │ └── cgi-bin │ │ │ └── index.cgi │ ├── easybox_simulator │ │ ├── MANIFEST │ │ ├── README │ │ └── files │ │ │ ├── etc │ │ │ └── firstrun.d │ │ │ │ └── 11_easybox-wifi-ap │ │ │ └── usr │ │ │ └── bin │ │ │ └── easybox_keygen │ ├── ffmpeg │ │ ├── MANIFEST │ │ └── files │ │ │ └── etc │ │ │ └── rc.local │ ├── instacam │ │ ├── MANIFEST │ │ ├── files │ │ │ └── etc │ │ │ │ └── config │ │ │ │ ├── mjpg-streamer │ │ │ │ └── system │ │ ├── uvc │ │ │ ├── MANIFEST │ │ │ ├── files │ │ │ │ └── etc │ │ │ │ │ ├── config │ │ │ │ │ └── mjpg-streamer │ │ │ │ │ └── rc.local │ │ │ └── yuv │ │ │ │ └── files │ │ │ │ ├── etc │ │ │ │ └── config │ │ │ │ │ └── mjpg-streamer │ │ │ │ └── init.d │ │ │ │ └── mjpg-streamer │ │ └── zc3xx │ │ │ ├── MANIFEST │ │ │ └── files │ │ │ └── etc │ │ │ └── config │ │ │ └── mjpg-streamer │ ├── nfc_login │ │ ├── MANIFEST │ │ ├── README │ │ └── files │ │ │ ├── etc │ │ │ ├── hotplug.d │ │ │ │ └── button │ │ │ │ │ └── buttons │ │ │ ├── hotplug2-common.rules │ │ │ └── rc.local │ │ │ └── usr │ │ │ └── bin │ │ │ ├── lcd-fortune │ │ │ ├── login-125khz │ │ │ ├── login-13mhz │ │ │ └── login-lib │ ├── pyserial │ │ ├── MANIFEST │ │ ├── README │ │ └── files │ │ │ ├── etc │ │ │ └── ser2net.conf │ │ │ └── root │ │ │ └── communicate-arduino.py │ └── rickroller │ │ ├── MANIFEST │ │ ├── advanced │ │ ├── MANIFEST │ │ └── files │ │ │ └── etc │ │ │ ├── firstrun.d │ │ │ ├── 12_aircrack_monitor │ │ │ └── 84_enable_lighttpd │ │ │ ├── lighttpd │ │ │ └── lighttpd.conf │ │ │ └── rc.local │ │ ├── files │ │ ├── etc │ │ │ └── config │ │ │ │ ├── dhcp │ │ │ │ ├── firewall │ │ │ │ └── network │ │ └── www │ │ │ ├── 1x1.gif │ │ │ ├── cgi-bin │ │ │ └── rrhelper │ │ │ ├── index.html │ │ │ ├── library │ │ │ └── test │ │ │ │ └── success.html │ │ │ ├── rick.gif │ │ │ └── rick.ogg │ │ └── uhttpd │ │ ├── MANIFEST │ │ └── files │ │ └── etc │ │ ├── config │ │ └── uhttpd │ │ ├── uhttpd.crt │ │ └── uhttpd.key └── usb │ ├── MANIFEST │ └── root_overlay │ ├── BUGS │ ├── MANIFEST │ ├── files │ └── etc │ │ ├── config │ │ └── fstab │ │ └── firstrun.d │ │ └── 01_init-root-overlay │ └── install_overlay_packages │ ├── MANIFEST │ ├── README │ └── files │ └── etc │ └── firstrun.d │ └── 02_install-overlay-packages └── upgrade /.gitignore: -------------------------------------------------------------------------------- 1 | builder/ 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "traits/network/autoconnect/files"] 2 | path = traits/network/autoconnect/files 3 | url = https://github.com/krebscode/autowifi 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | # TODO: Restructure this so that multiple traits and platforms can be built during one run 4 | # because ImageBuilders can be quite large (rt305x is 1.5 GB) this will increase efficiency 5 | 6 | env: 7 | global: 8 | - TRAIT=radio 9 | # - TRAIT=captive 10 | # - TRAIT=netem 11 | matrix: 12 | # - PLATFORM=DIR505A1 IMAGEBUILDER_URL="https://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64.tar.bz2" 13 | - PLATFORM=TLWR703 IMAGEBUILDER_URL="https://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64.tar.bz2" 14 | # - PLATFORM=TLWR703 IMAGEBUILDER_URL="https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-ImageBuilder-ar71xx-generic.Linux-x86_64.tar.bz2" 15 | # - PLATFORM=TLWR710 IMAGEBUILDER_URL="https://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64.tar.bz2" 16 | # - PLATFORM=A5-V11 IMAGEBUILDER_URL="https://downloads.openwrt.org/chaos_calmer/15.05/ramips/rt305x/OpenWrt-ImageBuilder-15.05-ramips-rt305x.Linux-x86_64.tar.bz2" 17 | 18 | script: 19 | - git clone https://github.com/probonopd/minikrebs.git 20 | - cd minikrebs/ 21 | - ./prepare $TRAIT 22 | - ./builder/init 23 | - ls -lh ./builder/bin/*/*-squashfs-*.bin 24 | - find ./builder/bin -type f -name "*squash*bin" -exec bash -e bintray.sh {} \; 25 | -------------------------------------------------------------------------------- /Howto_Create_Traits.md: -------------------------------------------------------------------------------- 1 | # What are Traits 2 | A trait defines a functionality or feature a minikrebs may have. 3 | Profiles are just a collection of traits which define the behavior of the minikrebs. 4 | 5 | Traits are stored hierarchical and evaluated recursively. 6 | Every folder in traits can be a trait, even if it contains other trait folders. 7 | 8 | For example in traits/special_purpose: 9 | 10 | instacam 11 | instacam/MANIFEST 12 | instacam/zc3xx 13 | instacam/zc3xx/files/etc/config/mjpg-streamer 14 | instacam/zc3xx/MANIFEST 15 | instacam/uvc 16 | instacam/uvc/files/etc/config/mjpg-streamer 17 | instacam/uvc/files/etc/rc.local 18 | instacam/uvc/MANIFEST 19 | instacam/uvc/yuv 20 | instacam/uvc/yuv/files/etc/config/mjpg-streamer 21 | instacam/uvc/yuv/files/init.d/mjpg-streamer 22 | instacam/files 23 | instacam/files/etc/config/mjpg-streamer 24 | 25 | 26 | the instacam folder contains MANIFEST but also subdirectories with special traits for 27 | special hardware or software. 28 | 29 | # Creating Traits 30 | A trait is a folder in the traits/ directory with at least one of the following two things: 31 | 32 | 1. a MANIFEST file 33 | 2. a files/ folder 34 | 35 | ## MANIFEST 36 | The MANIFEST file may contain the following lines: 37 | 38 | PACKAGES="" #space-separated list of openwrt packages 39 | DEPENDS="" #space-separated list of traits which this trait depends on (not yet implemented) 40 | 41 | ## files/ 42 | All files and folders in the files/ folder will be copied in the root folder of the newly formed firmware 43 | 44 | # core/ trait 45 | the core/ trait contains basic simple additions to prepare the minikrebs for direct use 46 | (like setting the password or symlinking the authorized_keys file). 47 | 48 | default password for the minikrebse is 'minikrebs' 49 | 50 | ## core/firstrun 51 | 52 | firstrun is a trait which will run scripts in /etc/firstrun.d/ only on first run (for example 53 | preparing a root overlay, generating ssh keys or that kind of stuff). 54 | 55 | When all scripts exited successfully, a /etc/firstrun.complete is created and the scripts will not be run again. 56 | 57 | If one script failed at the first run ,for example if internet was unreachable but required for a script to run, 58 | ALL scripts will be rerun at the next reboot. Make sure you write robust scripts which will not break when rerun. 59 | 60 | to use firstrun, simply create a new trait and add your run-script in: 61 | 62 | files/etc/firstrun.d/23_my-fancy-trait 63 | 64 | 65 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | - trait for setting wan to lan (or something) 2 | -------------------------------------------------------------------------------- /bin/available_profiles: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # shows available traits 3 | # $1 can be a different trait dir 4 | HERE=$(dirname $(readlink -f $0)) 5 | 6 | indent() { 7 | while read line;do 8 | yes ' ' | head -${1:-4} | tr -d '\n' 9 | echo $line 10 | done 11 | } 12 | usage (){ 13 | cat << EOF 14 | usage: $0 [PROFILE_DIR] 15 | 16 | ENVIRONMENT: 17 | HIDE_TRAITS -- shows all included traits by the profile (default: false) 18 | EOF 19 | } 20 | 21 | [ "$1" = "--help" ] && usage && exit 0 22 | 23 | cd ${1:-${HERE}/../profiles} 24 | shift 25 | echo "Available profiles:" 26 | find * | while read line; do 27 | echo "$line" | indent 2 28 | if [ -z "${HIDE_TRAITS:-}" ];then 29 | #echo " includes:" | indent 2 30 | cat "$line" | indent 4 31 | fi 32 | done 33 | -------------------------------------------------------------------------------- /bin/available_traits: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # shows available traits 3 | # $1 can be a different trait dir 4 | HERE=$(dirname $(readlink -f $0)) 5 | 6 | indent() { 7 | while read line;do 8 | yes ' ' | head -${1:-4} | tr -d '\n' 9 | echo $line 10 | done 11 | } 12 | usage (){ 13 | cat << EOF 14 | usage: $0 [TRAIT_DIR] 15 | 16 | ENVIRONMENT: 17 | SHOW_FILES -- shows all files provided by profile (default: not set) 18 | HIDE_PKGS -- shows all packages included by the profile (default: false) 19 | EOF 20 | } 21 | 22 | [ "$1" = "--help" ] && usage && exit 0 23 | 24 | cd ${1:-${HERE}/../traits} 25 | shift 26 | echo "Available traits:" 27 | find . | while read line; do 28 | if [ -e "$line/MANIFEST" -o -e "$line/files" ];then 29 | echo "$line" | indent 2 30 | if [ -e "$line/MANIFEST" -a -z "${HIDE_PKGS:-}" ];then 31 | . "$line/MANIFEST" 32 | echo "Includes Packages: $PACKAGES" | indent 4 33 | fi 34 | if [ -e "$line/files" -a -n "${SHOW_FILES:-}" ];then 35 | echo "Includes Files: " | indent 4 36 | cd "$line/files" 37 | find * | indent 6 38 | cd - >/dev/null 39 | fi 40 | 41 | fi 42 | done 43 | -------------------------------------------------------------------------------- /bintray.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Push firmware images and related metadata to Bintray 4 | # https://bintray.com/docs/api/ 5 | 6 | trap 'exit 1' ERR 7 | 8 | API=https://api.bintray.com 9 | 10 | if [ -z "TRAIT" ]; then 11 | echo "Need to set TRAIT" 12 | exit 1 13 | fi 14 | TRAIT_URL="https://github.com/probonopd/minikrebs/tree/master/"$(find traits/ -name "$TRAIT" -type d) 15 | echo "$TRAIT_URL" 16 | 17 | # Get description from trait README if it exists 18 | DESCRIPTION=$(cat $(find traits -type f -wholename "*$TRAIT/READM*")) || true 19 | 20 | FILE=$1 21 | [ -f "$FILE" ] || exit 1 22 | 23 | BINTRAY_USER="probono" 24 | BINTRAY_API_KEY=$BINTRAY_API_KEY # env 25 | BINTRAY_REPO="OpenWrt" 26 | PCK_NAME=$TRAIT 27 | WEBSITE_URL="$TRAIT_URL" 28 | ISSUE_TRACKER_URL="https://github.com/probonopd/minikrebs/issues" 29 | VCS_URL="https://github.com/probonopd/minikrebs.git" # Mandatory for packages in free Bintray repos 30 | 31 | which curl || exit 1 32 | which grep || exit 1 33 | 34 | if [ ! $(env | grep BINTRAY_API_KEY ) ] ; then 35 | echo "Environment variable \$BINTRAY_API_KEY missing" 36 | exit 1 37 | fi 38 | 39 | # Do not upload artefacts generated as part of a pull request 40 | if [ $(env | grep TRAVIS_PULL_REQUEST ) ] ; then 41 | if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then 42 | echo "Not uploading since this is a pull request" 43 | exit 0 44 | fi 45 | fi 46 | 47 | CURL="curl -u${BINTRAY_USER}:${BINTRAY_API_KEY} -H Content-Type:application/json -H Accept:application/json" 48 | 49 | VERSION=$(cat ./builder/build_dir/target-*/root-*/etc/banner | grep "(" | cut -d "(" -f 2 | cut -d ")" -f 1 | sed -e 's/, /./g') 50 | # VERSION=$(git rev-list --count HEAD).$(git log -n 1 | head -n 1 | sed -e 's/^commit //' | head -c 8) 51 | 52 | if [ "$VERSION" == "" ] ; then 53 | echo "* VERSION missing, exiting" 54 | exit 1 55 | else 56 | echo "* VERSION $VERSION" 57 | fi 58 | 59 | # exit 0 60 | ########## 61 | 62 | echo "" 63 | echo "Creating package ${PCK_NAME}..." 64 | data="{ 65 | \"name\": \"${PCK_NAME}\", 66 | \"desc\": \"${DESCRIPTION}\", 67 | \"desc_url\": \"auto\", 68 | \"website_url\": [\"${WEBSITE_URL}\"], 69 | \"vcs_url\": [\"${VCS_URL}\"], 70 | \"issue_tracker_url\": [\"${ISSUE_TRACKER_URL}\"], 71 | \"licenses\": [\"MIT\"], 72 | \"labels\": [\"AppImage\", \"AppImageKit\"] 73 | }" 74 | ${CURL} -X POST -d "${data}" ${API}/packages/${BINTRAY_USER}/${BINTRAY_REPO} 75 | 76 | echo "" 77 | echo "Uploading and publishing ${FILE}..." 78 | ${CURL} -T ${FILE} "${API}/content/${BINTRAY_USER}/${BINTRAY_REPO}/${PCK_NAME}/${VERSION}/$(basename ${FILE})?publish=1&override=1" 79 | 80 | if [ $(env | grep TRAVIS_JOB_ID ) ] ; then 81 | echo "" 82 | echo "Adding Travis CI log to release notes..." 83 | BUILD_LOG="https://api.travis-ci.org/jobs/${TRAVIS_JOB_ID}/log.txt?deansi=true" 84 | data='{ 85 | "bintray": { 86 | "syntax": "markdown", 87 | "content": "'${BUILD_LOG}'" 88 | } 89 | }' 90 | ${CURL} -X POST -d "${data}" ${API}/packages/${BINTRAY_USER}/${BINTRAY_REPO}/${PCK_NAME}/versions/${VERSION}/release_notes 91 | fi 92 | 93 | 94 | -------------------------------------------------------------------------------- /copy_profile: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | usage() { 4 | cat << EOF 5 | Usage: $0 PROFILE 6 | 7 | ENVIRONMENT: 8 | PLATFORM -- Set openWRT platform (Default: TLWR703, examples: TLMR3020) 9 | TRAIT_DIR -- Set Trait directory (Default traits/) 10 | EOF 11 | echo 12 | HIDE_TRAITS="true" bin/available_profiles 13 | } 14 | 15 | [ x"${1:-}" = "x" ] && usage && exit 1 16 | 17 | HERE="$(dirname $(readlink -f $0))" 18 | PROFILE_DIR="${HERE}/profiles" 19 | TRAIT_DIR="${TRAIT_DIR:-${HERE}/traits}" 20 | BUILD_DIR="${HERE}/builder/" 21 | PLATFORM="${PLATFORM:-TLWR703}" 22 | PROFILE="$PROFILE_DIR/$1" 23 | PKG_FILE="${BUILD_DIR}/root_packages" 24 | OVERLAY_PKG_FILE="${BUILD_DIR}/overlay_packages" 25 | APPEND_FILES="${HERE}/lib/append_files" 26 | 27 | indent() { 28 | while read line;do 29 | yes ' ' | head -${1:-4} | tr -d '\n' 30 | echo $line 31 | done 32 | } 33 | 34 | handle_append(){ 35 | cat ${APPEND_FILES}| while read i;do 36 | [ -e "$1/files/$i" ] && cat "$1/files/$i" >> "$BUILD_DIR/customfiles/$i" 37 | done 38 | } 39 | handle_trait_dir(){ 40 | if [ "$(readlink -f $TRAIT_DIR )" = "$1" ];then 41 | return 0 42 | else 43 | # higher level traits supersede more general definitions 44 | cd "$1" 45 | #echo "in $CUR" >&2 46 | 47 | handle_trait_dir $(readlink -f ..) ||: 48 | if [ -e "$1/files" ] ;then 49 | rsync -rl --exclude-from="$APPEND_FILES" "$1/files/"* "$BUILD_DIR/customfiles" 50 | handle_append "$1" 51 | fi 52 | if [ -e "$1/MANIFEST" ];then 53 | . "$1/MANIFEST" 54 | printf '%s' "${PACKAGES:-} " >> $PKG_FILE 55 | printf '%s' "${OVERLAY_PACKAGES:-} " >> $OVERLAY_PKG_FILE 56 | fi 57 | fi 58 | 59 | } 60 | 61 | build_custom_make(){ 62 | #hack to avoid newlines in build file 63 | PLATFORM="$1" 64 | 65 | echo "make image PROFILE='$PLATFORM' PACKAGES='`cat $PKG_FILE`' FILES=customfiles/" > \ 66 | "$BUILD_DIR/custom_make" 67 | } 68 | main (){ 69 | rm -rf "$BUILD_DIR/customfiles" 70 | rm -f $OVERLAY_PKG_FILE $PKG_FILE 71 | mkdir -p "$BUILD_DIR/customfiles" 72 | ALL_PACKAGES=`cat "$PROFILE" | while read trait;do 73 | echo "Handling $TRAIT_DIR/$trait" >&2 74 | handle_trait_dir "$(readlink -f $TRAIT_DIR/$trait)" ||: 75 | done` 76 | build_custom_make "$PLATFORM" 77 | } 78 | 79 | main $@ 80 | -------------------------------------------------------------------------------- /doc/Camkrebs: -------------------------------------------------------------------------------- 1 | 2 | # packages 3 | kmod-video-uvc 4 | mjpg-streamer 5 | 6 | # mjpg-streamer 7 | original package not available in snapshot, grab it from old sources 8 | ## opkg.conf 9 | 10 | src/gz attitude_adjustment http://downloads.openwrt.org/attitude_adjustment/12.09-beta2/ar71xx/generic/packages/ 11 | 12 | ## running live 13 | 14 | mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 640x480" -o "output_http.so -p 8080 -w /www/webcam" 15 | 16 | ## running in temp 17 | 18 | opkg install -d ram mjpg_streamer 19 | LD_LIBRARY_PATH=/tmp/lib:/tmp/usr/bin /tmp/usr/bin/mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 640x480" -o "output_http.so -p 8080 -w /tmp/www/webcam" 20 | -------------------------------------------------------------------------------- /doc/Heckenkrebs.md: -------------------------------------------------------------------------------- 1 | # Heckenkrebs 2 | Heckenkrebs is the automatic internet-establish and gateway provider for the 3 | krebs darknet. 4 | 5 | This profile will automatically establish wireless connections to shared wireless networks. If you want the Krebs to connect to your wlan you need to add your wireless credentials to /etc/wifipw. Syntax is $SSID;$PW 6 | W-Lans can be blacklisted by adding the ssid to /etc/wifiblack 7 | 8 | run infest on the system to get into the retiolum darknet (requires internet) 9 | hostsfiles for tinc can be updated with tinc-update 10 | 11 | the LED will turn off after 60 seconds of working internet connection to save power 12 | 13 | # Functionality 14 | The Heckenkrebs will use the aap tool to connect randomly to wireless networks 15 | which are unprotected in some ways. 16 | 17 | aap is patched to calculate default easybox keys in addition to try open 18 | networks. It also provides a blacklist and access-point password list. 19 | 20 | -------------------------------------------------------------------------------- /doc/Instacam.md: -------------------------------------------------------------------------------- 1 | # Project Instacam 2 | 3 | # Description 4 | 5 | The aim of the project is to reliably push a video stream directly to the internets for 6 | everyone to see at a very low price. 7 | 8 | # Hardware 9 | 10 | ## Core (Wifi / Ethernet) 11 | - TP-Link WR703n[Amazon](https://www.amazon.de/dp/B008UNA6FS/?tag=krebsco-21)[Ebay China](http://www.ebay.de/itm/BLUE-Mini-Nano-TP-LINK-TL-WR703N-150Mbps-WiFi-for-iPhone-4S-Wireless-Router-HOT-/360501556127?pt=COMP_EN_Routers&hash=item53ef91339f ) ~ 16 Euro 12 | - USB Webcam 13 | - [Logitech C270 with Autofocus (AZ)](https://www.amazon.de/dp/B003PAOAWG/?tag=krebsco-21) ~ 25 Euro 14 | - [China NoName Cam (DX)](http://dx.com/p/compact-1-3mp-pc-usb-webcam-with-built-in-microphone-black-51874?Utm_rid=93398939&Utm_source=affiliate) ~ 5++ Euro 15 | - [\* List of UVC Supported Devices](http://www.ideasonboard.org/uvc/ ) 16 | - [\* List of GSPCA Supported Devices](http://linuxtv.org/wiki/index.php/Gspca_devices) 17 | ## 4G / 3G / UMTS 18 | Currently Untested: 19 | - usb hub ~ 4 Euro 20 | - [NoName USB 2.0 Hub (DX)](http://dx.com/p/4-port-usb-2-0-hub-7980?Utm_rid=93398939&Utm_source=affiliate) 21 | - [NoName USB 2.0 Hub (Ebay)](http://www.ebay.de/itm/200825754462?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649#ht_2486wt_1366) 22 | - umts stick ~ 20 Euro 23 | - MicroSD card (optional) 24 | 25 | ## Mobile Version 26 | either use (easy mode): 27 | - USB Battery Bank 28 | - [Dealextreme](http://dx.com/p/rechargeable-2000mah-mobile-emergency-power-battery-with-6-adapters-66902?Utm_rid=93398939&Utm_source=affiliate) 29 | or (expert mode): 30 | - DC-DC StepDown Module 31 | - [Ebay](http://www.ebay.de/itm/221162832094?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649#ht_3092wt_1132) 32 | - Battery Pack 33 | - take any battery pack you can find (car battery, model making) 34 | 35 | # Software 36 | 37 | ## Build Firmware 38 | 39 | git clone github.com/krebscode/painload krebs 40 | cd krebs/minikrebs 41 | ./prepare instacam 42 | builder/init 43 | 44 | ## Flash 45 | 46 | # flash image is at: 47 | # builder/bin/ar71xx/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin 48 | 49 | # either flash image directly via web interface or 50 | # after obtaining ssh-access on the router run 51 | 52 | OWN_IP=<> ./upgrade <> 53 | -------------------------------------------------------------------------------- /doc/QUICKSTART: -------------------------------------------------------------------------------- 1 | # Quickstart to get your own own krebs on wr703n 2 | 3 | !important this is pseudo code, so please use your brains 4 | 5 | cd /krebs/minikrebs 6 | ./prepare krebs 7 | builder/init 8 | 9 | # Stock image 10 | connect to krebs 11 | 12 | dhclient eth0 13 | firefox 192.168.1.1 14 | {{goto the firmware-upgrade page}} 15 | {{upload ../builder/bin/ar71xx/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin}} 16 | {{wait}} 17 | {{reconnect power}} 18 | 19 | # Upgrade image 20 | 21 | {{ start krebs in recovery mode}} 22 | ifconfig eth0 192.168.1.3 23 | sysctl net.ipv4.ip_forward=1 24 | iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE #assuming wlan0 provides internet access 25 | telnet 192.168.1.1 26 | mount_root 27 | passwd 28 | /etc/init.d/dropbear start 29 | exit 30 | OWN_IP=192.168.1.3 ./upgrade 192.168.1.1 31 | {{reconnect power}} 32 | {{password is minikrebs}} 33 | 34 | # when minikrebs is in dhcp-client mode 35 | echo 'dhcp-range=192.168.0.50,192.168.0.150,12h' > /etc/dnsmasq.conf 36 | ifconfig eth0 192.168.0.1 && dnsmasq -d 37 | 38 | -------------------------------------------------------------------------------- /doc/TLDR: -------------------------------------------------------------------------------- 1 | This is how you get a cool webcam-streamer image for your WR703N: 2 | ./prepare instacam && builder/init 3 | Use it to flash your minirouter, password is `minikrebs` 4 | -------------------------------------------------------------------------------- /doc/arduino.md: -------------------------------------------------------------------------------- 1 | Arduino server 2 | ============== 3 | 4 | Quick Start 5 | ----------- 6 | 7 | Flash this to your device. Connect an Arduino Uno, Mega, or Leonardo. Connect the device to the same network as your Arduino IDE. Use the Arduino IDE to flash to the device over the network (similar to Arduino Yun). 8 | 9 | Documentation 10 | ============= 11 | 12 | Purpose 13 | ------- 14 | 15 | The purpose of this trait is to connect an Arduino to the network so that it can be flashed and the console can be interacted with over the network using the Arduino IDE. 16 | 17 | Hardware 18 | -------- 19 | 20 | The following hardware is the currently known minimum requirement: 21 | - TP-LINK TP-710n, approximately 20 EUR shipped (8 MB flash) 22 | - Arduino Uno, Mega, or Leonardo 23 | 24 | Operation 25 | --------- 26 | 27 | TODO 28 | ---- 29 | 30 | * Investigate the Yun Bridge and how it could be included here. 31 | -------------------------------------------------------------------------------- /doc/reveal.js/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .svn 3 | log/*.log 4 | tmp/** 5 | node_modules/ 6 | .sass-cache -------------------------------------------------------------------------------- /doc/reveal.js/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | before_script: 5 | - npm install -g grunt-cli -------------------------------------------------------------------------------- /doc/reveal.js/Gruntfile.js: -------------------------------------------------------------------------------- 1 | /* global module:false */ 2 | module.exports = function(grunt) { 3 | 4 | // Project configuration 5 | grunt.initConfig({ 6 | pkg: grunt.file.readJSON('package.json'), 7 | meta: { 8 | banner: 9 | '/*!\n' + 10 | ' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' + 11 | ' * http://lab.hakim.se/reveal-js\n' + 12 | ' * MIT licensed\n' + 13 | ' *\n' + 14 | ' * Copyright (C) 2013 Hakim El Hattab, http://hakim.se\n' + 15 | ' */' 16 | }, 17 | 18 | // Tests will be added soon 19 | qunit: { 20 | files: [ 'test/**/*.html' ] 21 | }, 22 | 23 | uglify: { 24 | options: { 25 | banner: '<%= meta.banner %>\n' 26 | }, 27 | build: { 28 | src: 'js/reveal.js', 29 | dest: 'js/reveal.min.js' 30 | } 31 | }, 32 | 33 | cssmin: { 34 | compress: { 35 | files: { 36 | 'css/reveal.min.css': [ 'css/reveal.css' ] 37 | } 38 | } 39 | }, 40 | 41 | sass: { 42 | main: { 43 | files: { 44 | 'css/theme/default.css': 'css/theme/source/default.scss', 45 | 'css/theme/beige.css': 'css/theme/source/beige.scss', 46 | 'css/theme/night.css': 'css/theme/source/night.scss', 47 | 'css/theme/serif.css': 'css/theme/source/serif.scss', 48 | 'css/theme/simple.css': 'css/theme/source/simple.scss', 49 | 'css/theme/sky.css': 'css/theme/source/sky.scss', 50 | 'css/theme/moon.css': 'css/theme/source/moon.scss', 51 | 'css/theme/solarized.css': 'css/theme/source/solarized.scss' 52 | } 53 | } 54 | }, 55 | 56 | jshint: { 57 | options: { 58 | curly: false, 59 | eqeqeq: true, 60 | immed: true, 61 | latedef: true, 62 | newcap: true, 63 | noarg: true, 64 | sub: true, 65 | undef: true, 66 | eqnull: true, 67 | browser: true, 68 | expr: true, 69 | globals: { 70 | head: false, 71 | module: false, 72 | console: false 73 | } 74 | }, 75 | files: [ 'Gruntfile.js', 'js/reveal.js' ] 76 | }, 77 | 78 | watch: { 79 | main: { 80 | files: [ 'Gruntfile.js', 'js/reveal.js', 'css/reveal.css' ], 81 | tasks: 'default' 82 | }, 83 | theme: { 84 | files: [ 'css/theme/source/*.scss', 'css/theme/template/*.scss' ], 85 | tasks: 'themes' 86 | } 87 | } 88 | 89 | }); 90 | 91 | // Dependencies 92 | grunt.loadNpmTasks( 'grunt-contrib-jshint' ); 93 | grunt.loadNpmTasks( 'grunt-contrib-cssmin' ); 94 | grunt.loadNpmTasks( 'grunt-contrib-uglify' ); 95 | grunt.loadNpmTasks( 'grunt-contrib-watch' ); 96 | grunt.loadNpmTasks( 'grunt-contrib-sass' ); 97 | 98 | // Default task 99 | grunt.registerTask( 'default', [ 'jshint', 'cssmin', 'uglify' ] ); 100 | 101 | // Theme task 102 | grunt.registerTask( 'themes', [ 'sass' ] ); 103 | 104 | }; 105 | -------------------------------------------------------------------------------- /doc/reveal.js/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013 Hakim El Hattab, http://hakim.se 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /doc/reveal.js/css/print/pdf.css: -------------------------------------------------------------------------------- 1 | /* Default Print Stylesheet Template 2 | by Rob Glazebrook of CSSnewbie.com 3 | Last Updated: June 4, 2008 4 | 5 | Feel free (nay, compelled) to edit, append, and 6 | manipulate this file as you see fit. */ 7 | 8 | 9 | /* SECTION 1: Set default width, margin, float, and 10 | background. This prevents elements from extending 11 | beyond the edge of the printed page, and prevents 12 | unnecessary background images from printing */ 13 | 14 | * { 15 | -webkit-print-color-adjust: exact; 16 | } 17 | 18 | body { 19 | font-size: 18pt; 20 | width: auto; 21 | height: auto; 22 | border: 0; 23 | padding: 0; 24 | float: none !important; 25 | overflow: visible; 26 | } 27 | 28 | html { 29 | width: 100%; 30 | height: 100%; 31 | overflow: visible; 32 | } 33 | 34 | @page { 35 | size: letter landscape; 36 | margin: 0; 37 | } 38 | 39 | /* SECTION 2: Remove any elements not needed in print. 40 | This would include navigation, ads, sidebars, etc. */ 41 | .nestedarrow, 42 | .controls, 43 | .reveal .progress, 44 | .reveal.overview, 45 | .fork-reveal, 46 | .share-reveal, 47 | .state-background { 48 | display: none !important; 49 | } 50 | 51 | /* SECTION 3: Set body font face, size, and color. 52 | Consider using a serif font for readability. */ 53 | body, p, td, li, div { 54 | font-size: 18pt; 55 | } 56 | 57 | /* SECTION 4: Set heading font face, sizes, and color. 58 | Diffrentiate your headings from your body text. 59 | Perhaps use a large sans-serif for distinction. */ 60 | h1,h2,h3,h4,h5,h6 { 61 | text-shadow: 0 0 0 #000 !important; 62 | } 63 | 64 | /* SECTION 5: Make hyperlinks more usable. 65 | Ensure links are underlined, and consider appending 66 | the URL to the end of the link for usability. */ 67 | a:link, 68 | a:visited { 69 | font-weight: bold; 70 | text-decoration: underline; 71 | } 72 | 73 | 74 | /* SECTION 6: more reveal.js specific additions by @skypanther */ 75 | ul, ol, div, p { 76 | visibility: visible; 77 | position: static; 78 | width: auto; 79 | height: auto; 80 | display: block; 81 | overflow: visible; 82 | margin: auto; 83 | } 84 | .reveal .slides { 85 | position: static; 86 | width: 100%; 87 | height: auto; 88 | 89 | left: auto; 90 | top: auto; 91 | margin-left: auto; 92 | margin-right: auto; 93 | margin-top: auto; 94 | padding: auto; 95 | 96 | overflow: visible; 97 | display: block; 98 | 99 | text-align: center; 100 | 101 | -webkit-perspective: none; 102 | -moz-perspective: none; 103 | -ms-perspective: none; 104 | perspective: none; 105 | 106 | -webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */ 107 | -moz-perspective-origin: 50% 50%; 108 | -ms-perspective-origin: 50% 50%; 109 | perspective-origin: 50% 50%; 110 | } 111 | .reveal .slides section { 112 | 113 | page-break-after: always !important; 114 | 115 | visibility: visible !important; 116 | position: static !important; 117 | width: 100% !important; 118 | height: auto !important; 119 | min-height: initial !important; 120 | display: block !important; 121 | overflow: visible !important; 122 | 123 | left: 0 !important; 124 | top: 0 !important; 125 | margin-left: 0px !important; 126 | margin-top: 50px !important; 127 | padding: 20px 0px !important; 128 | 129 | opacity: 1 !important; 130 | 131 | -webkit-transform-style: flat !important; 132 | -moz-transform-style: flat !important; 133 | -ms-transform-style: flat !important; 134 | transform-style: flat !important; 135 | 136 | -webkit-transform: none !important; 137 | -moz-transform: none !important; 138 | -ms-transform: none !important; 139 | transform: none !important; 140 | } 141 | .reveal section.stack { 142 | margin: 0px !important; 143 | padding: 0px !important; 144 | page-break-after: avoid !important; 145 | } 146 | .reveal section .fragment { 147 | opacity: 1 !important; 148 | visibility: visible !important; 149 | 150 | -webkit-transform: none !important; 151 | -moz-transform: none !important; 152 | -ms-transform: none !important; 153 | transform: none !important; 154 | } 155 | .reveal img { 156 | box-shadow: none; 157 | } 158 | .reveal .roll { 159 | overflow: visible; 160 | line-height: 1em; 161 | } 162 | .reveal small a { 163 | font-size: 16pt !important; 164 | } 165 | -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/README.md: -------------------------------------------------------------------------------- 1 | ## Dependencies 2 | 3 | Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceding: https://github.com/hakimel/reveal.js#development-environment 4 | 5 | 6 | 7 | ## Creating a Theme 8 | 9 | To create your own theme, start by duplicating any ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source) and adding it to the compilation list in the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js). 10 | 11 | Each theme file does four things in the following order: 12 | 13 | 1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)** 14 | Shared utility functions. 15 | 16 | 2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)** 17 | Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3. 18 | 19 | 3. **Override** 20 | This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding full selectors with hardcoded styles. 21 | 22 | 4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)** 23 | The template theme file which will generate final CSS output based on the currently defined variables. -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/moon.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 2 | /** 3 | * Solarized Dark theme for reveal.js. 4 | * Author: Achim Staebler 5 | */ 6 | @font-face { 7 | font-family: 'League Gothic'; 8 | src: url("../../lib/font/league_gothic-webfont.eot"); 9 | src: url("../../lib/font/league_gothic-webfont.eot?#iefix") format("embedded-opentype"), url("../../lib/font/league_gothic-webfont.woff") format("woff"), url("../../lib/font/league_gothic-webfont.ttf") format("truetype"), url("../../lib/font/league_gothic-webfont.svg#LeagueGothicRegular") format("svg"); 10 | font-weight: normal; 11 | font-style: normal; } 12 | 13 | /** 14 | * Solarized colors by Ethan Schoonover 15 | */ 16 | html * { 17 | color-profile: sRGB; 18 | rendering-intent: auto; } 19 | 20 | /********************************************* 21 | * GLOBAL STYLES 22 | *********************************************/ 23 | body { 24 | background: #002b36; 25 | background-color: #111111; } 26 | 27 | .reveal { 28 | font-family: "Lato", sans-serif; 29 | font-size: 36px; 30 | font-weight: 200; 31 | letter-spacing: -0.02em; 32 | color: #93a1a1; } 33 | 34 | ::selection { 35 | color: white; 36 | background: #d33682; 37 | text-shadow: none; } 38 | 39 | /********************************************* 40 | * HEADERS 41 | *********************************************/ 42 | .reveal h1, 43 | .reveal h2, 44 | .reveal h3, 45 | .reveal h4, 46 | .reveal h5, 47 | .reveal h6 { 48 | margin: 0 0 20px 0; 49 | color: #eee8d5; 50 | font-family: "League Gothic", Impact, sans-serif; 51 | line-height: 0.9em; 52 | letter-spacing: 0.02em; 53 | text-transform: uppercase; 54 | text-shadow: none; } 55 | 56 | .reveal h1 { 57 | text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2); } 58 | 59 | /********************************************* 60 | * LINKS 61 | *********************************************/ 62 | .reveal a:not(.image) { 63 | color: #268bd2; 64 | text-decoration: none; 65 | -webkit-transition: color .15s ease; 66 | -moz-transition: color .15s ease; 67 | -ms-transition: color .15s ease; 68 | -o-transition: color .15s ease; 69 | transition: color .15s ease; } 70 | 71 | .reveal a:not(.image):hover { 72 | color: #78b9e6; 73 | text-shadow: none; 74 | border: none; } 75 | 76 | .reveal .roll span:after { 77 | color: #fff; 78 | background: #1a6091; } 79 | 80 | /********************************************* 81 | * IMAGES 82 | *********************************************/ 83 | .reveal section img { 84 | margin: 15px 0px; 85 | background: rgba(255, 255, 255, 0.12); 86 | border: 4px solid #93a1a1; 87 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); 88 | -webkit-transition: all .2s linear; 89 | -moz-transition: all .2s linear; 90 | -ms-transition: all .2s linear; 91 | -o-transition: all .2s linear; 92 | transition: all .2s linear; } 93 | 94 | .reveal a:hover img { 95 | background: rgba(255, 255, 255, 0.2); 96 | border-color: #268bd2; 97 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 98 | 99 | /********************************************* 100 | * NAVIGATION CONTROLS 101 | *********************************************/ 102 | .reveal .controls div.navigate-left, 103 | .reveal .controls div.navigate-left.enabled { 104 | border-right-color: #268bd2; } 105 | 106 | .reveal .controls div.navigate-right, 107 | .reveal .controls div.navigate-right.enabled { 108 | border-left-color: #268bd2; } 109 | 110 | .reveal .controls div.navigate-up, 111 | .reveal .controls div.navigate-up.enabled { 112 | border-bottom-color: #268bd2; } 113 | 114 | .reveal .controls div.navigate-down, 115 | .reveal .controls div.navigate-down.enabled { 116 | border-top-color: #268bd2; } 117 | 118 | .reveal .controls div.navigate-left.enabled:hover { 119 | border-right-color: #78b9e6; } 120 | 121 | .reveal .controls div.navigate-right.enabled:hover { 122 | border-left-color: #78b9e6; } 123 | 124 | .reveal .controls div.navigate-up.enabled:hover { 125 | border-bottom-color: #78b9e6; } 126 | 127 | .reveal .controls div.navigate-down.enabled:hover { 128 | border-top-color: #78b9e6; } 129 | 130 | /********************************************* 131 | * PROGRESS BAR 132 | *********************************************/ 133 | .reveal .progress { 134 | background: rgba(0, 0, 0, 0.2); } 135 | 136 | .reveal .progress span { 137 | background: #268bd2; 138 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 139 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 140 | -ms-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 141 | -o-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 142 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 143 | -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/night.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 2 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 3 | /** 4 | * Black theme for reveal.js. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | /********************************************* 9 | * GLOBAL STYLES 10 | *********************************************/ 11 | body { 12 | background: #111111; 13 | background-color: #111111; } 14 | 15 | .reveal { 16 | font-family: "Open Sans", sans-serif; 17 | font-size: 30px; 18 | font-weight: 200; 19 | letter-spacing: -0.02em; 20 | color: #eeeeee; } 21 | 22 | ::selection { 23 | color: white; 24 | background: #e7ad52; 25 | text-shadow: none; } 26 | 27 | /********************************************* 28 | * HEADERS 29 | *********************************************/ 30 | .reveal h1, 31 | .reveal h2, 32 | .reveal h3, 33 | .reveal h4, 34 | .reveal h5, 35 | .reveal h6 { 36 | margin: 0 0 20px 0; 37 | color: #eeeeee; 38 | font-family: "Montserrat", Impact, sans-serif; 39 | line-height: 0.9em; 40 | letter-spacing: -0.03em; 41 | text-transform: none; 42 | text-shadow: none; } 43 | 44 | .reveal h1 { 45 | text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2); } 46 | 47 | /********************************************* 48 | * LINKS 49 | *********************************************/ 50 | .reveal a:not(.image) { 51 | color: #e7ad52; 52 | text-decoration: none; 53 | -webkit-transition: color .15s ease; 54 | -moz-transition: color .15s ease; 55 | -ms-transition: color .15s ease; 56 | -o-transition: color .15s ease; 57 | transition: color .15s ease; } 58 | 59 | .reveal a:not(.image):hover { 60 | color: #f3d7ac; 61 | text-shadow: none; 62 | border: none; } 63 | 64 | .reveal .roll span:after { 65 | color: #fff; 66 | background: #d08a1d; } 67 | 68 | /********************************************* 69 | * IMAGES 70 | *********************************************/ 71 | .reveal section img { 72 | margin: 15px 0px; 73 | background: rgba(255, 255, 255, 0.12); 74 | border: 4px solid #eeeeee; 75 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); 76 | -webkit-transition: all .2s linear; 77 | -moz-transition: all .2s linear; 78 | -ms-transition: all .2s linear; 79 | -o-transition: all .2s linear; 80 | transition: all .2s linear; } 81 | 82 | .reveal a:hover img { 83 | background: rgba(255, 255, 255, 0.2); 84 | border-color: #e7ad52; 85 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 86 | 87 | /********************************************* 88 | * NAVIGATION CONTROLS 89 | *********************************************/ 90 | .reveal .controls div.navigate-left, 91 | .reveal .controls div.navigate-left.enabled { 92 | border-right-color: #e7ad52; } 93 | 94 | .reveal .controls div.navigate-right, 95 | .reveal .controls div.navigate-right.enabled { 96 | border-left-color: #e7ad52; } 97 | 98 | .reveal .controls div.navigate-up, 99 | .reveal .controls div.navigate-up.enabled { 100 | border-bottom-color: #e7ad52; } 101 | 102 | .reveal .controls div.navigate-down, 103 | .reveal .controls div.navigate-down.enabled { 104 | border-top-color: #e7ad52; } 105 | 106 | .reveal .controls div.navigate-left.enabled:hover { 107 | border-right-color: #f3d7ac; } 108 | 109 | .reveal .controls div.navigate-right.enabled:hover { 110 | border-left-color: #f3d7ac; } 111 | 112 | .reveal .controls div.navigate-up.enabled:hover { 113 | border-bottom-color: #f3d7ac; } 114 | 115 | .reveal .controls div.navigate-down.enabled:hover { 116 | border-top-color: #f3d7ac; } 117 | 118 | /********************************************* 119 | * PROGRESS BAR 120 | *********************************************/ 121 | .reveal .progress { 122 | background: rgba(0, 0, 0, 0.2); } 123 | 124 | .reveal .progress span { 125 | background: #e7ad52; 126 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 127 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 128 | -ms-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 129 | -o-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 130 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 131 | -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/serif.css: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is darkblue. 4 | * 5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se; so is the theme - beige.css - that this is based off of. 7 | */ 8 | /********************************************* 9 | * GLOBAL STYLES 10 | *********************************************/ 11 | body { 12 | background: #f0f1eb; 13 | background-color: #f0f1eb; } 14 | 15 | .reveal { 16 | font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; 17 | font-size: 36px; 18 | font-weight: 200; 19 | letter-spacing: -0.02em; 20 | color: black; } 21 | 22 | ::selection { 23 | color: white; 24 | background: #26351c; 25 | text-shadow: none; } 26 | 27 | /********************************************* 28 | * HEADERS 29 | *********************************************/ 30 | .reveal h1, 31 | .reveal h2, 32 | .reveal h3, 33 | .reveal h4, 34 | .reveal h5, 35 | .reveal h6 { 36 | margin: 0 0 20px 0; 37 | color: #383d3d; 38 | font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif; 39 | line-height: 0.9em; 40 | letter-spacing: 0.02em; 41 | text-transform: none; 42 | text-shadow: none; } 43 | 44 | .reveal h1 { 45 | text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2); } 46 | 47 | /********************************************* 48 | * LINKS 49 | *********************************************/ 50 | .reveal a:not(.image) { 51 | color: #51483d; 52 | text-decoration: none; 53 | -webkit-transition: color .15s ease; 54 | -moz-transition: color .15s ease; 55 | -ms-transition: color .15s ease; 56 | -o-transition: color .15s ease; 57 | transition: color .15s ease; } 58 | 59 | .reveal a:not(.image):hover { 60 | color: #8b7c69; 61 | text-shadow: none; 62 | border: none; } 63 | 64 | .reveal .roll span:after { 65 | color: #fff; 66 | background: #25211c; } 67 | 68 | /********************************************* 69 | * IMAGES 70 | *********************************************/ 71 | .reveal section img { 72 | margin: 15px 0px; 73 | background: rgba(255, 255, 255, 0.12); 74 | border: 4px solid black; 75 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); 76 | -webkit-transition: all .2s linear; 77 | -moz-transition: all .2s linear; 78 | -ms-transition: all .2s linear; 79 | -o-transition: all .2s linear; 80 | transition: all .2s linear; } 81 | 82 | .reveal a:hover img { 83 | background: rgba(255, 255, 255, 0.2); 84 | border-color: #51483d; 85 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 86 | 87 | /********************************************* 88 | * NAVIGATION CONTROLS 89 | *********************************************/ 90 | .reveal .controls div.navigate-left, 91 | .reveal .controls div.navigate-left.enabled { 92 | border-right-color: #51483d; } 93 | 94 | .reveal .controls div.navigate-right, 95 | .reveal .controls div.navigate-right.enabled { 96 | border-left-color: #51483d; } 97 | 98 | .reveal .controls div.navigate-up, 99 | .reveal .controls div.navigate-up.enabled { 100 | border-bottom-color: #51483d; } 101 | 102 | .reveal .controls div.navigate-down, 103 | .reveal .controls div.navigate-down.enabled { 104 | border-top-color: #51483d; } 105 | 106 | .reveal .controls div.navigate-left.enabled:hover { 107 | border-right-color: #8b7c69; } 108 | 109 | .reveal .controls div.navigate-right.enabled:hover { 110 | border-left-color: #8b7c69; } 111 | 112 | .reveal .controls div.navigate-up.enabled:hover { 113 | border-bottom-color: #8b7c69; } 114 | 115 | .reveal .controls div.navigate-down.enabled:hover { 116 | border-top-color: #8b7c69; } 117 | 118 | /********************************************* 119 | * PROGRESS BAR 120 | *********************************************/ 121 | .reveal .progress { 122 | background: rgba(0, 0, 0, 0.2); } 123 | 124 | .reveal .progress span { 125 | background: #51483d; 126 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 127 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 128 | -ms-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 129 | -o-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 130 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 131 | -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/simple.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); 2 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 3 | /** 4 | * A simple theme for reveal.js presentations, similar 5 | * to the default theme. The accent color is darkblue. 6 | * 7 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 8 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 9 | */ 10 | /********************************************* 11 | * GLOBAL STYLES 12 | *********************************************/ 13 | body { 14 | background: white; 15 | background-color: white; } 16 | 17 | .reveal { 18 | font-family: "Lato", sans-serif; 19 | font-size: 36px; 20 | font-weight: 200; 21 | letter-spacing: -0.02em; 22 | color: black; } 23 | 24 | ::selection { 25 | color: white; 26 | background: rgba(0, 0, 0, 0.99); 27 | text-shadow: none; } 28 | 29 | /********************************************* 30 | * HEADERS 31 | *********************************************/ 32 | .reveal h1, 33 | .reveal h2, 34 | .reveal h3, 35 | .reveal h4, 36 | .reveal h5, 37 | .reveal h6 { 38 | margin: 0 0 20px 0; 39 | color: black; 40 | font-family: "News Cycle", Impact, sans-serif; 41 | line-height: 0.9em; 42 | letter-spacing: 0.02em; 43 | text-transform: none; 44 | text-shadow: none; } 45 | 46 | .reveal h1 { 47 | text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2); } 48 | 49 | /********************************************* 50 | * LINKS 51 | *********************************************/ 52 | .reveal a:not(.image) { 53 | color: darkblue; 54 | text-decoration: none; 55 | -webkit-transition: color .15s ease; 56 | -moz-transition: color .15s ease; 57 | -ms-transition: color .15s ease; 58 | -o-transition: color .15s ease; 59 | transition: color .15s ease; } 60 | 61 | .reveal a:not(.image):hover { 62 | color: #0000f1; 63 | text-shadow: none; 64 | border: none; } 65 | 66 | .reveal .roll span:after { 67 | color: #fff; 68 | background: #00003f; } 69 | 70 | /********************************************* 71 | * IMAGES 72 | *********************************************/ 73 | .reveal section img { 74 | margin: 15px 0px; 75 | background: rgba(255, 255, 255, 0.12); 76 | border: 4px solid black; 77 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); 78 | -webkit-transition: all .2s linear; 79 | -moz-transition: all .2s linear; 80 | -ms-transition: all .2s linear; 81 | -o-transition: all .2s linear; 82 | transition: all .2s linear; } 83 | 84 | .reveal a:hover img { 85 | background: rgba(255, 255, 255, 0.2); 86 | border-color: darkblue; 87 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 88 | 89 | /********************************************* 90 | * NAVIGATION CONTROLS 91 | *********************************************/ 92 | .reveal .controls div.navigate-left, 93 | .reveal .controls div.navigate-left.enabled { 94 | border-right-color: darkblue; } 95 | 96 | .reveal .controls div.navigate-right, 97 | .reveal .controls div.navigate-right.enabled { 98 | border-left-color: darkblue; } 99 | 100 | .reveal .controls div.navigate-up, 101 | .reveal .controls div.navigate-up.enabled { 102 | border-bottom-color: darkblue; } 103 | 104 | .reveal .controls div.navigate-down, 105 | .reveal .controls div.navigate-down.enabled { 106 | border-top-color: darkblue; } 107 | 108 | .reveal .controls div.navigate-left.enabled:hover { 109 | border-right-color: #0000f1; } 110 | 111 | .reveal .controls div.navigate-right.enabled:hover { 112 | border-left-color: #0000f1; } 113 | 114 | .reveal .controls div.navigate-up.enabled:hover { 115 | border-bottom-color: #0000f1; } 116 | 117 | .reveal .controls div.navigate-down.enabled:hover { 118 | border-top-color: #0000f1; } 119 | 120 | /********************************************* 121 | * PROGRESS BAR 122 | *********************************************/ 123 | .reveal .progress { 124 | background: rgba(0, 0, 0, 0.2); } 125 | 126 | .reveal .progress span { 127 | background: darkblue; 128 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 129 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 130 | -ms-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 131 | -o-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 132 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 133 | -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/source/beige.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Beige theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @font-face { 17 | font-family: 'League Gothic'; 18 | src: url('../../lib/font/league_gothic-webfont.eot'); 19 | src: url('../../lib/font/league_gothic-webfont.eot?#iefix') format('embedded-opentype'), 20 | url('../../lib/font/league_gothic-webfont.woff') format('woff'), 21 | url('../../lib/font/league_gothic-webfont.ttf') format('truetype'), 22 | url('../../lib/font/league_gothic-webfont.svg#LeagueGothicRegular') format('svg'); 23 | 24 | font-weight: normal; 25 | font-style: normal; 26 | } 27 | 28 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 29 | 30 | 31 | // Override theme settings (see ../template/settings.scss) 32 | $mainColor: #333; 33 | $headingColor: #333; 34 | $headingTextShadow: none; 35 | $backgroundColor: #f7f3de; 36 | $linkColor: #8b743d; 37 | $linkColorHover: lighten( $linkColor, 20% ); 38 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99); 39 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 40 | 41 | // Background generator 42 | @mixin bodyBackground() { 43 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) ); 44 | } 45 | 46 | 47 | 48 | // Theme template ------------------------------ 49 | @import "../template/theme"; 50 | // --------------------------------------------- -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/source/default.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Default theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @font-face { 17 | font-family: 'League Gothic'; 18 | src: url('../../lib/font/league_gothic-webfont.eot'); 19 | src: url('../../lib/font/league_gothic-webfont.eot?#iefix') format('embedded-opentype'), 20 | url('../../lib/font/league_gothic-webfont.woff') format('woff'), 21 | url('../../lib/font/league_gothic-webfont.ttf') format('truetype'), 22 | url('../../lib/font/league_gothic-webfont.svg#LeagueGothicRegular') format('svg'); 23 | 24 | font-weight: normal; 25 | font-style: normal; 26 | } 27 | 28 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 29 | 30 | // Override theme settings (see ../template/settings.scss) 31 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 32 | 33 | // Background generator 34 | @mixin bodyBackground() { 35 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); 36 | } 37 | 38 | 39 | 40 | // Theme template ------------------------------ 41 | @import "../template/theme"; 42 | // --------------------------------------------- -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/source/moon.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Dark theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @font-face { 16 | font-family: 'League Gothic'; 17 | src: url('../../lib/font/league_gothic-webfont.eot'); 18 | src: url('../../lib/font/league_gothic-webfont.eot?#iefix') format('embedded-opentype'), 19 | url('../../lib/font/league_gothic-webfont.woff') format('woff'), 20 | url('../../lib/font/league_gothic-webfont.ttf') format('truetype'), 21 | url('../../lib/font/league_gothic-webfont.svg#LeagueGothicRegular') format('svg'); 22 | 23 | font-weight: normal; 24 | font-style: normal; 25 | } 26 | 27 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 28 | 29 | /** 30 | * Solarized colors by Ethan Schoonover 31 | */ 32 | html * { 33 | color-profile: sRGB; 34 | rendering-intent: auto; 35 | } 36 | 37 | // Solarized colors 38 | $base03: #002b36; 39 | $base02: #073642; 40 | $base01: #586e75; 41 | $base00: #657b83; 42 | $base0: #839496; 43 | $base1: #93a1a1; 44 | $base2: #eee8d5; 45 | $base3: #fdf6e3; 46 | $yellow: #b58900; 47 | $orange: #cb4b16; 48 | $red: #dc322f; 49 | $magenta: #d33682; 50 | $violet: #6c71c4; 51 | $blue: #268bd2; 52 | $cyan: #2aa198; 53 | $green: #859900; 54 | 55 | // Override theme settings (see ../template/settings.scss) 56 | $mainColor: $base1; 57 | $headingColor: $base2; 58 | $headingTextShadow: none; 59 | $backgroundColor: $base03; 60 | $linkColor: $blue; 61 | $linkColorHover: lighten( $linkColor, 20% ); 62 | $selectionBackgroundColor: $magenta; 63 | 64 | 65 | 66 | // Theme template ------------------------------ 67 | @import "../template/theme"; 68 | // --------------------------------------------- 69 | -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/source/night.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 17 | 18 | 19 | // Override theme settings (see ../template/settings.scss) 20 | $backgroundColor: #111; 21 | 22 | $mainFont: 'Open Sans', sans-serif; 23 | $linkColor: #e7ad52; 24 | $linkColorHover: lighten( $linkColor, 20% ); 25 | $headingFont: 'Montserrat', Impact, sans-serif; 26 | $headingTextShadow: none; 27 | $headingLetterSpacing: -0.03em; 28 | $headingTextTransform: none; 29 | $selectionBackgroundColor: #e7ad52; 30 | $mainFontSize: 30px; 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/source/serif.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is darkblue. 4 | * 5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se; so is the theme - beige.css - that this is based off of. 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Override theme settings (see ../template/settings.scss) 18 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 19 | $mainColor: #000; 20 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 21 | $headingColor: #383D3D; 22 | $headingTextShadow: none; 23 | $headingTextTransform: none; 24 | $backgroundColor: #F0F1EB; 25 | $linkColor: #51483D; 26 | $linkColorHover: lighten( $linkColor, 20% ); 27 | $selectionBackgroundColor: #26351C; 28 | 29 | 30 | 31 | // Theme template ------------------------------ 32 | @import "../template/theme"; 33 | // --------------------------------------------- -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/source/simple.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is darkblue. 4 | * 5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | 22 | // Override theme settings (see ../template/settings.scss) 23 | $mainFont: 'Lato', sans-serif; 24 | $mainColor: #000; 25 | $headingFont: 'News Cycle', Impact, sans-serif; 26 | $headingColor: #000; 27 | $headingTextShadow: none; 28 | $headingTextTransform: none; 29 | $backgroundColor: #fff; 30 | $linkColor: #00008B; 31 | $linkColorHover: lighten( $linkColor, 20% ); 32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99); 33 | 34 | 35 | 36 | // Theme template ------------------------------ 37 | @import "../template/theme"; 38 | // --------------------------------------------- -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/source/sky.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Sky theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic); 17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainFont: 'Open Sans', sans-serif; 22 | $mainColor: #333; 23 | $headingFont: 'Quicksand', sans-serif; 24 | $headingColor: #333; 25 | $headingLetterSpacing: -0.08em; 26 | $headingTextShadow: none; 27 | $backgroundColor: #f7fbfc; 28 | $linkColor: #3b759e; 29 | $linkColorHover: lighten( $linkColor, 20% ); 30 | $selectionBackgroundColor: #134674; 31 | 32 | // Background generator 33 | @mixin bodyBackground() { 34 | @include radial-gradient( #add9e4, #f7fbfc ); 35 | } 36 | 37 | 38 | 39 | // Theme template ------------------------------ 40 | @import "../template/theme"; 41 | // --------------------------------------------- -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/source/solarized.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Light theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @font-face { 16 | font-family: 'League Gothic'; 17 | src: url('../../lib/font/league_gothic-webfont.eot'); 18 | src: url('../../lib/font/league_gothic-webfont.eot?#iefix') format('embedded-opentype'), 19 | url('../../lib/font/league_gothic-webfont.woff') format('woff'), 20 | url('../../lib/font/league_gothic-webfont.ttf') format('truetype'), 21 | url('../../lib/font/league_gothic-webfont.svg#LeagueGothicRegular') format('svg'); 22 | 23 | font-weight: normal; 24 | font-style: normal; 25 | } 26 | 27 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 28 | 29 | 30 | /** 31 | * Solarized colors by Ethan Schoonover 32 | */ 33 | html * { 34 | color-profile: sRGB; 35 | rendering-intent: auto; 36 | } 37 | 38 | // Solarized colors 39 | $base03: #002b36; 40 | $base02: #073642; 41 | $base01: #586e75; 42 | $base00: #657b83; 43 | $base0: #839496; 44 | $base1: #93a1a1; 45 | $base2: #eee8d5; 46 | $base3: #fdf6e3; 47 | $yellow: #b58900; 48 | $orange: #cb4b16; 49 | $red: #dc322f; 50 | $magenta: #d33682; 51 | $violet: #6c71c4; 52 | $blue: #268bd2; 53 | $cyan: #2aa198; 54 | $green: #859900; 55 | 56 | // Override theme settings (see ../template/settings.scss) 57 | $mainColor: $base00; 58 | $headingColor: $base01; 59 | $headingTextShadow: none; 60 | $backgroundColor: $base3; 61 | $linkColor: $blue; 62 | $linkColorHover: lighten( $linkColor, 20% ); 63 | $selectionBackgroundColor: $magenta; 64 | 65 | // Background generator 66 | // @mixin bodyBackground() { 67 | // @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) ); 68 | // } 69 | 70 | 71 | 72 | // Theme template ------------------------------ 73 | @import "../template/theme"; 74 | // --------------------------------------------- 75 | -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/template/mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin vertical-gradient( $top, $bottom ) { 2 | background: $top; 3 | background: -moz-linear-gradient( top, $top 0%, $bottom 100% ); 4 | background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) ); 5 | background: -webkit-linear-gradient( top, $top 0%, $bottom 100% ); 6 | background: -o-linear-gradient( top, $top 0%, $bottom 100% ); 7 | background: -ms-linear-gradient( top, $top 0%, $bottom 100% ); 8 | background: linear-gradient( top, $top 0%, $bottom 100% ); 9 | } 10 | 11 | @mixin horizontal-gradient( $top, $bottom ) { 12 | background: $top; 13 | background: -moz-linear-gradient( left, $top 0%, $bottom 100% ); 14 | background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) ); 15 | background: -webkit-linear-gradient( left, $top 0%, $bottom 100% ); 16 | background: -o-linear-gradient( left, $top 0%, $bottom 100% ); 17 | background: -ms-linear-gradient( left, $top 0%, $bottom 100% ); 18 | background: linear-gradient( left, $top 0%, $bottom 100% ); 19 | } 20 | 21 | @mixin radial-gradient( $outer, $inner, $type: circle ) { 22 | background: $outer; 23 | background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 24 | background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) ); 25 | background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 26 | background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 27 | background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 28 | background: radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 29 | } -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/template/settings.scss: -------------------------------------------------------------------------------- 1 | // Base settings for all themes that can optionally be 2 | // overridden by the super-theme 3 | 4 | // Background of the presentation 5 | $backgroundColor: #2b2b2b; 6 | 7 | // Primary/body text 8 | $mainFont: 'Lato', sans-serif; 9 | $mainFontSize: 36px; 10 | $mainColor: #eee; 11 | 12 | // Headings 13 | $headingFont: 'League Gothic', Impact, sans-serif; 14 | $headingColor: #eee; 15 | $headingLineHeight: 0.9em; 16 | $headingLetterSpacing: 0.02em; 17 | $headingTextTransform: uppercase; 18 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2); 19 | $heading1TextShadow: $headingTextShadow; 20 | 21 | // Links and actions 22 | $linkColor: #13DAEC; 23 | $linkColorHover: lighten( $linkColor, 20% ); 24 | 25 | // Text selection 26 | $selectionBackgroundColor: #FF5E99; 27 | $selectionColor: #fff; 28 | 29 | // Generates the presentation background, can be overridden 30 | // to return a background image or gradient 31 | @mixin bodyBackground() { 32 | background: $backgroundColor; 33 | } -------------------------------------------------------------------------------- /doc/reveal.js/css/theme/template/theme.scss: -------------------------------------------------------------------------------- 1 | // Base theme template for reveal.js 2 | 3 | /********************************************* 4 | * GLOBAL STYLES 5 | *********************************************/ 6 | 7 | body { 8 | @include bodyBackground(); 9 | background-color: $backgroundColor; 10 | } 11 | 12 | .reveal { 13 | font-family: $mainFont; 14 | font-size: $mainFontSize; 15 | font-weight: 200; 16 | letter-spacing: -0.02em; 17 | color: $mainColor; 18 | } 19 | 20 | ::selection { 21 | color: $selectionColor; 22 | background: $selectionBackgroundColor; 23 | text-shadow: none; 24 | } 25 | 26 | /********************************************* 27 | * HEADERS 28 | *********************************************/ 29 | 30 | .reveal h1, 31 | .reveal h2, 32 | .reveal h3, 33 | .reveal h4, 34 | .reveal h5, 35 | .reveal h6 { 36 | margin: 0 0 20px 0; 37 | color: $headingColor; 38 | 39 | font-family: $headingFont; 40 | line-height: $headingLineHeight; 41 | letter-spacing: $headingLetterSpacing; 42 | 43 | text-transform: $headingTextTransform; 44 | text-shadow: $headingTextShadow; 45 | } 46 | 47 | .reveal h1 { 48 | text-shadow: $heading1TextShadow; 49 | } 50 | 51 | 52 | /********************************************* 53 | * LINKS 54 | *********************************************/ 55 | 56 | .reveal a:not(.image) { 57 | color: $linkColor; 58 | text-decoration: none; 59 | 60 | -webkit-transition: color .15s ease; 61 | -moz-transition: color .15s ease; 62 | -ms-transition: color .15s ease; 63 | -o-transition: color .15s ease; 64 | transition: color .15s ease; 65 | } 66 | .reveal a:not(.image):hover { 67 | color: $linkColorHover; 68 | 69 | text-shadow: none; 70 | border: none; 71 | } 72 | 73 | .reveal .roll span:after { 74 | color: #fff; 75 | background: darken( $linkColor, 15% ); 76 | } 77 | 78 | 79 | /********************************************* 80 | * IMAGES 81 | *********************************************/ 82 | 83 | .reveal section img { 84 | margin: 15px 0px; 85 | background: rgba(255,255,255,0.12); 86 | border: 4px solid $mainColor; 87 | 88 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); 89 | 90 | -webkit-transition: all .2s linear; 91 | -moz-transition: all .2s linear; 92 | -ms-transition: all .2s linear; 93 | -o-transition: all .2s linear; 94 | transition: all .2s linear; 95 | } 96 | 97 | .reveal a:hover img { 98 | background: rgba(255,255,255,0.2); 99 | border-color: $linkColor; 100 | 101 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); 102 | } 103 | 104 | 105 | /********************************************* 106 | * NAVIGATION CONTROLS 107 | *********************************************/ 108 | 109 | .reveal .controls div.navigate-left, 110 | .reveal .controls div.navigate-left.enabled { 111 | border-right-color: $linkColor; 112 | } 113 | 114 | .reveal .controls div.navigate-right, 115 | .reveal .controls div.navigate-right.enabled { 116 | border-left-color: $linkColor; 117 | } 118 | 119 | .reveal .controls div.navigate-up, 120 | .reveal .controls div.navigate-up.enabled { 121 | border-bottom-color: $linkColor; 122 | } 123 | 124 | .reveal .controls div.navigate-down, 125 | .reveal .controls div.navigate-down.enabled { 126 | border-top-color: $linkColor; 127 | } 128 | 129 | .reveal .controls div.navigate-left.enabled:hover { 130 | border-right-color: $linkColorHover; 131 | } 132 | 133 | .reveal .controls div.navigate-right.enabled:hover { 134 | border-left-color: $linkColorHover; 135 | } 136 | 137 | .reveal .controls div.navigate-up.enabled:hover { 138 | border-bottom-color: $linkColorHover; 139 | } 140 | 141 | .reveal .controls div.navigate-down.enabled:hover { 142 | border-top-color: $linkColorHover; 143 | } 144 | 145 | 146 | /********************************************* 147 | * PROGRESS BAR 148 | *********************************************/ 149 | 150 | .reveal .progress { 151 | background: rgba(0,0,0,0.2); 152 | } 153 | .reveal .progress span { 154 | background: $linkColor; 155 | 156 | -webkit-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); 157 | -moz-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); 158 | -ms-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); 159 | -o-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); 160 | transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); 161 | } 162 | 163 | 164 | -------------------------------------------------------------------------------- /doc/reveal.js/lib/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | pre code { 9 | display: block; padding: 0.5em; 10 | background: #3F3F3F; 11 | color: #DCDCDC; 12 | } 13 | 14 | pre .keyword, 15 | pre .tag, 16 | pre .django .tag, 17 | pre .django .keyword, 18 | pre .css .class, 19 | pre .css .id, 20 | pre .lisp .title { 21 | color: #E3CEAB; 22 | } 23 | 24 | pre .django .template_tag, 25 | pre .django .variable, 26 | pre .django .filter .argument { 27 | color: #DCDCDC; 28 | } 29 | 30 | pre .number, 31 | pre .date { 32 | color: #8CD0D3; 33 | } 34 | 35 | pre .dos .envvar, 36 | pre .dos .stream, 37 | pre .variable, 38 | pre .apache .sqbracket { 39 | color: #EFDCBC; 40 | } 41 | 42 | pre .dos .flow, 43 | pre .diff .change, 44 | pre .python .exception, 45 | pre .python .built_in, 46 | pre .literal, 47 | pre .tex .special { 48 | color: #EFEFAF; 49 | } 50 | 51 | pre .diff .chunk, 52 | pre .ruby .subst { 53 | color: #8F8F8F; 54 | } 55 | 56 | pre .dos .keyword, 57 | pre .python .decorator, 58 | pre .class .title, 59 | pre .haskell .label, 60 | pre .function .title, 61 | pre .ini .title, 62 | pre .diff .header, 63 | pre .ruby .class .parent, 64 | pre .apache .tag, 65 | pre .nginx .built_in, 66 | pre .tex .command, 67 | pre .input_number { 68 | color: #efef8f; 69 | } 70 | 71 | pre .dos .winutils, 72 | pre .ruby .symbol, 73 | pre .ruby .symbol .string, 74 | pre .ruby .symbol .keyword, 75 | pre .ruby .symbol .keymethods, 76 | pre .ruby .string, 77 | pre .ruby .instancevar { 78 | color: #DCA3A3; 79 | } 80 | 81 | pre .diff .deletion, 82 | pre .string, 83 | pre .tag .value, 84 | pre .preprocessor, 85 | pre .built_in, 86 | pre .sql .aggregate, 87 | pre .javadoc, 88 | pre .smalltalk .class, 89 | pre .smalltalk .localvars, 90 | pre .smalltalk .array, 91 | pre .css .rules .value, 92 | pre .attr_selector, 93 | pre .pseudo, 94 | pre .apache .cbracket, 95 | pre .tex .formula { 96 | color: #CC9393; 97 | } 98 | 99 | pre .shebang, 100 | pre .diff .addition, 101 | pre .comment, 102 | pre .java .annotation, 103 | pre .template_comment, 104 | pre .pi, 105 | pre .doctype { 106 | color: #7F9F7F; 107 | } 108 | 109 | pre .xml .css, 110 | pre .xml .javascript, 111 | pre .xml .vbscript, 112 | pre .tex .formula { 113 | opacity: 0.5; 114 | } 115 | 116 | -------------------------------------------------------------------------------- /doc/reveal.js/lib/font/league_gothic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/doc/reveal.js/lib/font/league_gothic-webfont.eot -------------------------------------------------------------------------------- /doc/reveal.js/lib/font/league_gothic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/doc/reveal.js/lib/font/league_gothic-webfont.ttf -------------------------------------------------------------------------------- /doc/reveal.js/lib/font/league_gothic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/doc/reveal.js/lib/font/league_gothic-webfont.woff -------------------------------------------------------------------------------- /doc/reveal.js/lib/font/league_gothic_license: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /doc/reveal.js/lib/js/classList.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ 2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p 3 | Copyright Tero Piirainen (tipiirai) 4 | License MIT / http://bit.ly/mit-license 5 | Version 0.96 6 | 7 | http://headjs.com 8 | */(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Markdown Demo 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 |
18 | 19 | 20 |
21 | 22 | 23 |
24 | 34 |
35 | 36 | 37 |
38 | 52 |
53 | 54 | 55 |
56 | 67 |
68 | 69 |
70 |
71 | 72 | 73 | 74 | 75 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /doc/reveal.js/plugin/markdown/example.md: -------------------------------------------------------------------------------- 1 | # Markdown Demo 2 | 3 | 4 | 5 | ## External 1.1 6 | 7 | Content 1.1 8 | 9 | 10 | ## External 1.2 11 | 12 | Content 1.2 13 | 14 | 15 | 16 | ## External 2 17 | 18 | Content 2.1 19 | 20 | 21 | 22 | ## External 3.1 23 | 24 | Content 3.1 25 | 26 | 27 | ## External 3.2 28 | 29 | Content 3.2 30 | -------------------------------------------------------------------------------- /doc/reveal.js/plugin/multiplex/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var multiplex = Reveal.getConfig().multiplex; 3 | var socketId = multiplex.id; 4 | var socket = io.connect(multiplex.url); 5 | 6 | socket.on(multiplex.id, function(data) { 7 | // ignore data from sockets that aren't ours 8 | if (data.socketId !== socketId) { return; } 9 | if( window.location.host === 'localhost:1947' ) return; 10 | 11 | Reveal.slide(data.indexh, data.indexv, data.indexf, 'remote'); 12 | }); 13 | }()); 14 | -------------------------------------------------------------------------------- /doc/reveal.js/plugin/multiplex/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var fs = require('fs'); 3 | var io = require('socket.io'); 4 | var crypto = require('crypto'); 5 | 6 | var app = express.createServer(); 7 | var staticDir = express.static; 8 | 9 | io = io.listen(app); 10 | 11 | var opts = { 12 | port: 1948, 13 | baseDir : __dirname + '/../../' 14 | }; 15 | 16 | io.sockets.on('connection', function(socket) { 17 | socket.on('slidechanged', function(slideData) { 18 | if (typeof slideData.secret == 'undefined' || slideData.secret == null || slideData.secret === '') return; 19 | if (createHash(slideData.secret) === slideData.socketId) { 20 | slideData.secret = null; 21 | socket.broadcast.emit(slideData.socketId, slideData); 22 | }; 23 | }); 24 | }); 25 | 26 | app.configure(function() { 27 | [ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) { 28 | app.use('/' + dir, staticDir(opts.baseDir + dir)); 29 | }); 30 | }); 31 | 32 | app.get("/", function(req, res) { 33 | fs.createReadStream(opts.baseDir + '/index.html').pipe(res); 34 | }); 35 | 36 | app.get("/token", function(req,res) { 37 | var ts = new Date().getTime(); 38 | var rand = Math.floor(Math.random()*9999999); 39 | var secret = ts.toString() + rand.toString(); 40 | res.send({secret: secret, socketId: createHash(secret)}); 41 | }); 42 | 43 | var createHash = function(secret) { 44 | var cipher = crypto.createCipher('blowfish', secret); 45 | return(cipher.final('hex')); 46 | }; 47 | 48 | // Actually listen 49 | app.listen(opts.port || null); 50 | 51 | var brown = '\033[33m', 52 | green = '\033[32m', 53 | reset = '\033[0m'; 54 | 55 | console.log( brown + "reveal.js:" + reset + " Multiplex running on port " + green + opts.port + reset ); -------------------------------------------------------------------------------- /doc/reveal.js/plugin/multiplex/master.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | // don't emit events from inside the previews themselves 3 | if ( window.location.search.match( /receiver/gi ) ) { return; } 4 | var multiplex = Reveal.getConfig().multiplex; 5 | 6 | var socket = io.connect(multiplex.url); 7 | 8 | var notify = function( slideElement, indexh, indexv, origin ) { 9 | if( typeof origin === 'undefined' && origin !== 'remote' ) { 10 | var nextindexh; 11 | var nextindexv; 12 | 13 | var fragmentindex = Reveal.getIndices().f; 14 | if (typeof fragmentindex == 'undefined') { 15 | fragmentindex = 0; 16 | } 17 | 18 | if (slideElement.nextElementSibling && slideElement.parentNode.nodeName == 'SECTION') { 19 | nextindexh = indexh; 20 | nextindexv = indexv + 1; 21 | } else { 22 | nextindexh = indexh + 1; 23 | nextindexv = 0; 24 | } 25 | 26 | var slideData = { 27 | indexh : indexh, 28 | indexv : indexv, 29 | indexf : fragmentindex, 30 | nextindexh : nextindexh, 31 | nextindexv : nextindexv, 32 | secret: multiplex.secret, 33 | socketId : multiplex.id 34 | }; 35 | 36 | socket.emit('slidechanged', slideData); 37 | } 38 | } 39 | 40 | Reveal.addEventListener( 'slidechanged', function( event ) { 41 | notify( event.currentSlide, event.indexh, event.indexv, event.origin ); 42 | } ); 43 | 44 | var fragmentNotify = function( event ) { 45 | notify( Reveal.getCurrentSlide(), Reveal.getIndices().h, Reveal.getIndices().v, event.origin ); 46 | }; 47 | 48 | Reveal.addEventListener( 'fragmentshown', fragmentNotify ); 49 | Reveal.addEventListener( 'fragmenthidden', fragmentNotify ); 50 | }()); -------------------------------------------------------------------------------- /doc/reveal.js/plugin/notes-server/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | // don't emit events from inside the previews themselves 3 | if ( window.location.search.match( /receiver/gi ) ) { return; } 4 | 5 | var socket = io.connect(window.location.origin); 6 | var socketId = Math.random().toString().slice(2); 7 | 8 | console.log('View slide notes at ' + window.location.origin + '/notes/' + socketId); 9 | window.open(window.location.origin + '/notes/' + socketId, 'notes-' + socketId); 10 | 11 | // Fires when a fragment is shown 12 | Reveal.addEventListener( 'fragmentshown', function( event ) { 13 | var fragmentData = { 14 | fragment : 'next', 15 | socketId : socketId 16 | }; 17 | socket.emit('fragmentchanged', fragmentData); 18 | } ); 19 | 20 | // Fires when a fragment is hidden 21 | Reveal.addEventListener( 'fragmenthidden', function( event ) { 22 | var fragmentData = { 23 | fragment : 'previous', 24 | socketId : socketId 25 | }; 26 | socket.emit('fragmentchanged', fragmentData); 27 | } ); 28 | 29 | // Fires when slide is changed 30 | Reveal.addEventListener( 'slidechanged', function( event ) { 31 | var nextindexh; 32 | var nextindexv; 33 | var slideElement = event.currentSlide; 34 | 35 | if (slideElement.nextElementSibling && slideElement.parentNode.nodeName == 'SECTION') { 36 | nextindexh = event.indexh; 37 | nextindexv = event.indexv + 1; 38 | } else { 39 | nextindexh = event.indexh + 1; 40 | nextindexv = 0; 41 | } 42 | 43 | var notes = slideElement.querySelector('aside.notes'); 44 | var slideData = { 45 | notes : notes ? notes.innerHTML : '', 46 | indexh : event.indexh, 47 | indexv : event.indexv, 48 | nextindexh : nextindexh, 49 | nextindexv : nextindexv, 50 | socketId : socketId, 51 | markdown : notes ? typeof notes.getAttribute('data-markdown') === 'string' : false 52 | 53 | }; 54 | 55 | socket.emit('slidechanged', slideData); 56 | } ); 57 | }()); 58 | -------------------------------------------------------------------------------- /doc/reveal.js/plugin/notes-server/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var fs = require('fs'); 3 | var io = require('socket.io'); 4 | var _ = require('underscore'); 5 | var Mustache = require('mustache'); 6 | 7 | var app = express.createServer(); 8 | var staticDir = express.static; 9 | 10 | io = io.listen(app); 11 | 12 | var opts = { 13 | port : 1947, 14 | baseDir : __dirname + '/../../' 15 | }; 16 | 17 | io.sockets.on('connection', function(socket) { 18 | socket.on('slidechanged', function(slideData) { 19 | socket.broadcast.emit('slidedata', slideData); 20 | }); 21 | socket.on('fragmentchanged', function(fragmentData) { 22 | socket.broadcast.emit('fragmentdata', fragmentData); 23 | }); 24 | }); 25 | 26 | app.configure(function() { 27 | [ 'css', 'js', 'images', 'plugin', 'lib' ].forEach(function(dir) { 28 | app.use('/' + dir, staticDir(opts.baseDir + dir)); 29 | }); 30 | }); 31 | 32 | app.get("/", function(req, res) { 33 | fs.createReadStream(opts.baseDir + '/index.html').pipe(res); 34 | }); 35 | 36 | app.get("/notes/:socketId", function(req, res) { 37 | 38 | fs.readFile(opts.baseDir + 'plugin/notes-server/notes.html', function(err, data) { 39 | res.send(Mustache.to_html(data.toString(), { 40 | socketId : req.params.socketId 41 | })); 42 | }); 43 | // fs.createReadStream(opts.baseDir + 'notes-server/notes.html').pipe(res); 44 | }); 45 | 46 | // Actually listen 47 | app.listen(opts.port || null); 48 | 49 | var brown = '\033[33m', 50 | green = '\033[32m', 51 | reset = '\033[0m'; 52 | 53 | var slidesLocation = "http://localhost" + ( opts.port ? ( ':' + opts.port ) : '' ); 54 | 55 | console.log( brown + "reveal.js - Speaker Notes" + reset ); 56 | console.log( "1. Open the slides at " + green + slidesLocation + reset ); 57 | console.log( "2. Click on the link your JS console to go to the notes page" ); 58 | console.log( "3. Advance through your slides and your notes will advance automatically" ); 59 | -------------------------------------------------------------------------------- /doc/reveal.js/plugin/notes-server/notes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | reveal.js - Slide Notes 7 | 8 | 87 | 88 | 89 | 90 | 91 |
92 | 93 |
94 | 95 |
96 | 97 | UPCOMING: 98 |
99 |
100 | 101 | 102 | 103 | 104 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /doc/reveal.js/plugin/notes/notes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Handles opening of and synchronization with the reveal.js 3 | * notes window. 4 | */ 5 | var RevealNotes = (function() { 6 | 7 | function openNotes() { 8 | var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path 9 | jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path 10 | var notesPopup = window.open( jsFileLocation + 'notes.html', 'reveal.js - Notes', 'width=1120,height=850' ); 11 | 12 | // Fires when slide is changed 13 | Reveal.addEventListener( 'slidechanged', function( event ) { 14 | post('slidechanged'); 15 | } ); 16 | 17 | // Fires when a fragment is shown 18 | Reveal.addEventListener( 'fragmentshown', function( event ) { 19 | post('fragmentshown'); 20 | } ); 21 | 22 | // Fires when a fragment is hidden 23 | Reveal.addEventListener( 'fragmenthidden', function( event ) { 24 | post('fragmenthidden'); 25 | } ); 26 | 27 | /** 28 | * Posts the current slide data to the notes window 29 | * 30 | * @param {String} eventType Expecting 'slidechanged', 'fragmentshown' 31 | * or 'fragmenthidden' set in the events above to define the needed 32 | * slideDate. 33 | */ 34 | function post( eventType ) { 35 | var slideElement = Reveal.getCurrentSlide(), 36 | messageData; 37 | 38 | if( eventType === 'slidechanged' ) { 39 | var notes = slideElement.querySelector( 'aside.notes' ), 40 | indexh = Reveal.getIndices().h, 41 | indexv = Reveal.getIndices().v, 42 | nextindexh, 43 | nextindexv; 44 | 45 | if( slideElement.nextElementSibling && slideElement.parentNode.nodeName == 'SECTION' ) { 46 | nextindexh = indexh; 47 | nextindexv = indexv + 1; 48 | } else { 49 | nextindexh = indexh + 1; 50 | nextindexv = 0; 51 | } 52 | 53 | messageData = { 54 | notes : notes ? notes.innerHTML : '', 55 | indexh : indexh, 56 | indexv : indexv, 57 | nextindexh : nextindexh, 58 | nextindexv : nextindexv, 59 | markdown : notes ? typeof notes.getAttribute( 'data-markdown' ) === 'string' : false 60 | }; 61 | } 62 | else if( eventType === 'fragmentshown' ) { 63 | messageData = { 64 | fragment : 'next' 65 | }; 66 | } 67 | else if( eventType === 'fragmenthidden' ) { 68 | messageData = { 69 | fragment : 'prev' 70 | }; 71 | } 72 | 73 | notesPopup.postMessage( JSON.stringify( messageData ), '*' ); 74 | } 75 | 76 | // Navigate to the current slide when the notes are loaded 77 | notesPopup.addEventListener( 'load', function( event ) { 78 | post('slidechanged'); 79 | }, false ); 80 | } 81 | 82 | // If the there's a 'notes' query set, open directly 83 | if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) { 84 | openNotes(); 85 | } 86 | 87 | // Open the notes when the 's' key is hit 88 | document.addEventListener( 'keydown', function( event ) { 89 | // Disregard the event if the target is editable or a 90 | // modifier is present 91 | if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return; 92 | 93 | if( event.keyCode === 83 ) { 94 | event.preventDefault(); 95 | openNotes(); 96 | } 97 | }, false ); 98 | 99 | return { open: openNotes }; 100 | })(); 101 | -------------------------------------------------------------------------------- /doc/reveal.js/plugin/postmessage/example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 | 9 | 10 |
11 | 12 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /doc/reveal.js/plugin/postmessage/postmessage.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | simple postmessage plugin 4 | 5 | Useful when a reveal slideshow is inside an iframe. 6 | It allows to call reveal methods from outside. 7 | 8 | Example: 9 | var reveal = window.frames[0]; 10 | 11 | // Reveal.prev(); 12 | reveal.postMessage(JSON.stringify({method: 'prev', args: []}), '*'); 13 | // Reveal.next(); 14 | reveal.postMessage(JSON.stringify({method: 'next', args: []}), '*'); 15 | // Reveal.slide(2, 2); 16 | reveal.postMessage(JSON.stringify({method: 'slide', args: [2,2]}), '*'); 17 | 18 | Add to the slideshow: 19 | 20 | dependencies: [ 21 | ... 22 | { src: 'plugin/postmessage/postmessage.js', async: true, condition: function() { return !!document.body.classList; } } 23 | ] 24 | 25 | */ 26 | 27 | (function (){ 28 | 29 | window.addEventListener( "message", function ( event ) { 30 | var data = JSON.parse( event.data ), 31 | method = data.method, 32 | args = data.args; 33 | 34 | if( typeof Reveal[method] === 'function' ) { 35 | Reveal[method].apply( Reveal, data.args ); 36 | } 37 | }, false); 38 | 39 | }()); 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /doc/reveal.js/plugin/print-pdf/print-pdf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * phantomjs script for printing presentations to PDF. 3 | * 4 | * Example: 5 | * phantomjs print-pdf.js "http://lab.hakim.se/reveal-js?print-pdf" reveal-demo.pdf 6 | * 7 | * By Manuel Bieh (https://github.com/manuelbieh) 8 | */ 9 | 10 | // html2pdf.js 11 | var page = new WebPage(); 12 | var system = require( 'system' ); 13 | 14 | page.paperSize = { 15 | format: 'A4', 16 | orientation: 'landscape', 17 | margin: { 18 | left: '0', 19 | right: '0', 20 | top: '0', 21 | bottom: '0' 22 | } 23 | }; 24 | page.zoomFactor = 1.5; 25 | 26 | var revealFile = system.args[1] || 'index.html?print-pdf'; 27 | var slideFile = system.args[2] || 'slides.pdf'; 28 | 29 | if( slideFile.match( /\.pdf$/gi ) === null ) { 30 | slideFile += '.pdf'; 31 | } 32 | 33 | console.log( 'Printing PDF...' ); 34 | 35 | page.open( revealFile, function( status ) { 36 | console.log( 'Printed succesfully' ); 37 | page.render( slideFile ); 38 | phantom.exit(); 39 | } ); -------------------------------------------------------------------------------- /doc/reveal.js/plugin/remotes/remotes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Touch-based remote controller for your presentation courtesy 3 | * of the folks at http://remotes.io 4 | */ 5 | 6 | (function(window){ 7 | 8 | /** 9 | * Detects if we are dealing with a touch enabled device (with some false positives) 10 | * Borrowed from modernizr: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touch.js 11 | */ 12 | var hasTouch = (function(){ 13 | return ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch; 14 | })(); 15 | 16 | /** 17 | * Detects if notes are enable and the current page is opened inside an /iframe 18 | * this prevents loading Remotes.io several times 19 | */ 20 | var remotesAndIsNotes = (function(){ 21 | return !(window.RevealNotes && self == top); 22 | })(); 23 | 24 | if(!hasTouch && !remotesAndIsNotes){ 25 | head.ready( 'remotes.ne.min.js', function() { 26 | new Remotes("preview") 27 | .on("swipe-left", function(e){ Reveal.right(); }) 28 | .on("swipe-right", function(e){ Reveal.left(); }) 29 | .on("swipe-up", function(e){ Reveal.down(); }) 30 | .on("swipe-down", function(e){ Reveal.up(); }) 31 | .on("tap", function(e){ 32 | Reveal.toggleOverview(); 33 | }); 34 | } ); 35 | 36 | head.js('https://raw.github.com/Remotes/Remotes/master/dist/remotes.ne.min.js'); 37 | } 38 | })(window); -------------------------------------------------------------------------------- /lib/append_files: -------------------------------------------------------------------------------- 1 | etc/rc.local 2 | etc/firstrun.commands 3 | -------------------------------------------------------------------------------- /lib/init: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd $(dirname $(readlink -f $0)) 4 | if [ ! -e Makefile ] ;then 5 | echo "ImageBuilder not checked out yet" 6 | echo "try running ../prepare $$PROFILE" 7 | exit 1 8 | fi 9 | 10 | echo 11 | rm -r bin/ || echo "no bindir, skipping removal" 12 | if [ -e ./custom_make ];then 13 | echo "Starting Custom Make" 14 | sh ./custom_make # 2>/dev/null | while read line; do 15 | # printf "." 16 | # done 17 | else 18 | echo "No Custom Make Script exists, bailing out!" 19 | exit 1 20 | fi 21 | 22 | echo 23 | 24 | FACTORY=$(find bin/ | grep -e "squashfs-factory.bin$" | head -n 1) 25 | SYSUPGRADE=$(find bin/ | grep -e "squashfs-sysupgrade.bin$" | head -n 1) 26 | 27 | if [ "$FACTORY" != "" ]; 28 | then 29 | cat << EOF 30 | finished building 31 | You can use the following images: 32 | Factory : $PWD/$FACTORY 33 | System Upgrade: $PWD/$SYSUPGRADE 34 | EOF 35 | else 36 | cat << EOF 37 | It seems like the factory image has not been created, it could mean 38 | that the image would be too big and does not fit into the tiny FLASH. 39 | 40 | Observe the output above, fix, and retry building. 41 | EOF 42 | fi 43 | -------------------------------------------------------------------------------- /lib/init_overlay: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd $(dirname $(readlink -f $0)) 3 | [ ! -e overlay/ ] && echo "profile data for external overlay does not exist, bailing out" 4 | 5 | [ -e doc/overlay ] && echo "Profile demands the following partitioning of the overlay usb stick:" && cat doc/OVERLAY 6 | 7 | if grep -q $PWD/mnt/overlay /etc/mtab;then 8 | echo "overlay mounted" 9 | echo "[*] copying overlay data:" 10 | find mnt/overlay/ -mindepth 1 -maxdepth 1 | while read data; do 11 | rm -r $data 12 | done 13 | [ -e overlay/ ] && find overlay/ -mindepth 1 -maxdepth 1 | while read data; do 14 | rm -rf mnt/overlay/$(basename $data) 15 | cp -vr $data mnt/overlay 16 | done 17 | echo "[*] adding packages" 18 | for i in `cat overlay_packages`;do 19 | mkdir -p mnt/overlay/packages 20 | cp -vnr packages/${i}_*.ipk mnt/overlay/packages 21 | done 22 | echo 23 | echo "[*] unmounting overlay" 24 | umount mnt/overlay/ 25 | else 26 | mkdir -p $PWD/mnt/overlay 27 | echo "please mount your overlay to $PWD/mnt/overlay" 28 | fi 29 | 30 | -------------------------------------------------------------------------------- /prepare: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # $IMAGEBUILDER_URL can be an environment variable set outside this script 5 | if [ -z "$IMAGEBUILDER_URL" ] ; then 6 | IMAGEBUILDER_URL="https://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/OpenWrt-ImageBuilder-15.05-ar71xx-generic.Linux-x86_64.tar.bz2" 7 | # IMAGEBUILDER_URL="https://downloads.openwrt.org/snapshots/trunk/ramips/generic/OpenWrt-ImageBuilder-ramips-rt305x.Linux-x86_64.tar.bz2" 8 | # Caution: Snapshots are unstable 9 | fi 10 | 11 | cd $(dirname $(readlink -f $0)) 12 | git submodule update --init 13 | if [ -z "${1:-}" ];then 14 | echo "usage: $0 PROFILE" 15 | echo 16 | HIDE_TRAITS="true" sh $(dirname $(readlink -f $0))/bin/available_profiles 17 | exit 1 18 | fi 19 | PROFILE=$1 20 | if [ ! -e builder/init ]; then 21 | wget --trust-server-names -c "$IMAGEBUILDER_URL" 22 | tar xf $(basename "$IMAGEBUILDER_URL") 23 | mv OpenWrt-*-x86_64 builder 24 | echo "Builder successfully downloaded" 25 | else 26 | echo "Builder already installed, skipping download" 27 | fi 28 | echo 29 | echo "copying generic init:" 30 | cp --remove-destination lib/init builder/init 31 | echo " profile/init -> builder/init" 32 | cp --remove-destination lib/init_overlay builder/init_overlay 33 | echo " profile/init_overlay -> builder/init_overlay" 34 | [ -e builder/overlay ] && echo "removing old overlay" && rm -rf builder/overlay 35 | echo 36 | echo "copying profile:" 37 | ./copy_profile "$PROFILE" 38 | 39 | if [ -e builder/overlay ];then 40 | echo 41 | echo "This profile also contains overlay data," 42 | echo 'run `builder/init_overlay` to copy' 43 | fi 44 | -------------------------------------------------------------------------------- /profiles/arduino: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-dnsmasq 4 | minimal/no-iptables 5 | minimal/no-ipv6 6 | minimal/no-firewall 7 | network/client-mode 8 | network/avahi 9 | special_purpose/arduino 10 | -------------------------------------------------------------------------------- /profiles/captive: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-ipv6 4 | network/client-mode 5 | network/avahi 6 | network/captive 7 | -------------------------------------------------------------------------------- /profiles/dali_master: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-dnsmasq 4 | network/client-mode 5 | special_purpose/dali 6 | special_purpose/dali_web 7 | krebs/infest 8 | -------------------------------------------------------------------------------- /profiles/easybox_simulator: -------------------------------------------------------------------------------- 1 | core/firstrun 2 | minimal/no-ppp 3 | network/wifi-dhcp 4 | gui/luci/uhttpd 5 | special_puropose/easybox_simulator 6 | -------------------------------------------------------------------------------- /profiles/heckenkrebs: -------------------------------------------------------------------------------- 1 | core 2 | core/firstrun 3 | minimal/no-ppp 4 | minimal/no-dnsmasq 5 | network/client-mode 6 | network/wifi-client 7 | network/interactive-tools 8 | network/autoconnect/autostart 9 | krebs/infest 10 | krebs/ssh_keys 11 | -------------------------------------------------------------------------------- /profiles/instacam: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-dnsmasq 4 | network/client-mode 5 | special_purpose/instacam 6 | special_purpose/instacam/uvc 7 | -------------------------------------------------------------------------------- /profiles/krebs: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-dnsmasq 4 | network/client-mode 5 | krebs 6 | -------------------------------------------------------------------------------- /profiles/madplayer: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-dnsmasq 4 | network/client-mode 5 | audio/madplay 6 | -------------------------------------------------------------------------------- /profiles/mpd: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-ipv6 4 | minimal/no-dnsmasq 5 | minimal/no-iptables 6 | minimal/no-firewall 7 | network/client-mode 8 | audio/mpd 9 | -------------------------------------------------------------------------------- /profiles/netem: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-dnsmasq 4 | minimal/no-iptables 5 | minimal/no-ipv6 6 | minimal/no-firewall 7 | network/client-mode 8 | network/avahi 9 | network/netem 10 | -------------------------------------------------------------------------------- /profiles/nfc_login: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-dnsmasq 4 | network/client-mode 5 | usb 6 | mods/vfd_lcd 7 | special_purpose/nfc_login 8 | krebs/infest 9 | -------------------------------------------------------------------------------- /profiles/overlay_krebs: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-dnsmasq 4 | network/client-mode 5 | usb/root_overlay 6 | krebs/infest 7 | -------------------------------------------------------------------------------- /profiles/pyserial: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-dnsmasq 4 | minimal/no-iptables 5 | minimal/no-ipv6 6 | minimal/no-firewall 7 | network/client-mode 8 | special_purpose/pyserial 9 | -------------------------------------------------------------------------------- /profiles/radio: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-dnsmasq 4 | minimal/no-iptables 5 | minimal/no-ipv6 6 | minimal/no-firewall 7 | network/client-mode 8 | audio/radio 9 | -------------------------------------------------------------------------------- /profiles/rickroller_advanced: -------------------------------------------------------------------------------- 1 | core/firstrun 2 | minimal/no-ppp 3 | network/open-wifi-ap 4 | usb/root_overlay 5 | usb/root_overlay/install_overlay_packages 6 | network/aircrack-overlay 7 | special_purpose/rickroller 8 | special_purpose/rickroller/advanced 9 | krebs/ssh_keys 10 | -------------------------------------------------------------------------------- /profiles/rickroller_bare: -------------------------------------------------------------------------------- 1 | core/firstrun 2 | minimal/no-ppp 3 | network/open-wifi-ap 4 | special_purpose/rickroller/uhttpd 5 | -------------------------------------------------------------------------------- /profiles/shack_bridge: -------------------------------------------------------------------------------- 1 | core 2 | core/firstrun 3 | minimal/no-ppp 4 | private/shack_maintenancenet 5 | network/eth-wifi-nat 6 | krebs/infest 7 | -------------------------------------------------------------------------------- /profiles/shack_dali: -------------------------------------------------------------------------------- 1 | core 2 | core/firstrun 3 | minimal/no-ppp 4 | minimal/no-dnsmasq 5 | network/client-mode 6 | private/shack_maintenancenet 7 | special_purpose/dali 8 | -------------------------------------------------------------------------------- /profiles/shack_instacam: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-dnsmasq 4 | network/client-mode 5 | special_purpose/instacam 6 | special_purpose/instacam/uvc 7 | private/shack_maintenancenet 8 | -------------------------------------------------------------------------------- /profiles/shack_streamer: -------------------------------------------------------------------------------- 1 | core 2 | core/firstrun 3 | minimal/no-ppp 4 | minimal/no-dnsmasq 5 | network/client-mode 6 | usb/root_overlay/install_overlay_packages 7 | private/shack_maintenancenet 8 | special_purpose/ffmpeg 9 | -------------------------------------------------------------------------------- /profiles/shairport: -------------------------------------------------------------------------------- 1 | core 2 | minimal/no-ppp 3 | minimal/no-dnsmasq 4 | minimal/no-iptables 5 | minimal/no-firewall 6 | network/client-mode 7 | audio/shairport 8 | -------------------------------------------------------------------------------- /profiles/superheckenkrebs: -------------------------------------------------------------------------------- 1 | core 2 | core/firstrun 3 | minimal/no-ppp 4 | minimal/no-dnsmasq 5 | network/client-mode 6 | network/interactive-tools 7 | network/autoconnect 8 | network/aircrack-overlay 9 | krebs/infest 10 | krebs/ssh_keys 11 | usb/root_overlay/install_overlay_packages 12 | -------------------------------------------------------------------------------- /traits/.gitignore: -------------------------------------------------------------------------------- 1 | private 2 | -------------------------------------------------------------------------------- /traits/audio/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="kmod-sound-core kmod-usb-audio" 2 | DEPENDS="usb" 3 | -------------------------------------------------------------------------------- /traits/audio/madplay/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="madplay" 2 | DEPENDS="usb" 3 | -------------------------------------------------------------------------------- /traits/audio/mpd/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="alsa-utils mpd-mini -kmod-gpio-button-hotplug -kmod-leds-gpio -kmod-ledtrig-default-on -kmod-ledtrig-netdev -kmod-ledtrig-timer -swconfig -uboot-envtools" 2 | -------------------------------------------------------------------------------- /traits/audio/radio/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="luci-mod-admin-full uhttpd libiwinfo-lua luci-theme-bootstrap alsa-utils madplay coreutils-stty kmod-hid-generic kmod-usb-hid kmod-input-evdev triggerhappy kmod-usb-acm openssh-sftp-server" 2 | -------------------------------------------------------------------------------- /traits/audio/radio/README: -------------------------------------------------------------------------------- 1 | Provides a web radio player. 2 | See doc/radio.md for more information. 3 | -------------------------------------------------------------------------------- /traits/audio/radio/files/etc/asound.conf: -------------------------------------------------------------------------------- 1 | # We need this line to prevent from stutter on USB sound cards 2 | defaults.dmix."USB-Audio".period_size 2048 3 | 4 | -------------------------------------------------------------------------------- /traits/audio/radio/files/etc/hotplug.d/button/buttons: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # To handle short and long presses, see http://wiki.openwrt.org/doc/howto/hardware.button 3 | logger $BUTTON 4 | logger $ACTION 5 | if [ $BUTTON = reset -a $ACTION = pressed ]; then 6 | TUNE=$(($(uci get radio.next)+1)) 7 | uci set radio.next=$TUNE 8 | killall madplay 9 | fi 10 | -------------------------------------------------------------------------------- /traits/audio/radio/files/etc/hotplug.d/usb/usb-audio-radio: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/radio enabled || exit 0 3 | case "$PRODUCT" in 4 | d8c*) // Only do this if the USB device in question is a C-Media USB audio device 5 | case "$ACTION" in 6 | add) 7 | logger -t button-hotplug Device: $DEVICE / Product: $PRODUCT / Action: $ACTION 8 | logger -t C-Media USB audio device detected, starting Radio 9 | /etc/init.d/radio start 10 | ;; 11 | remove) 12 | logger -t button-hotplug Device: $DEVICE / Product: $PRODUCT / Action: $ACTION 13 | /etc/init.d/radio stop 14 | ;; 15 | esac 16 | ;; 17 | esac 18 | -------------------------------------------------------------------------------- /traits/audio/radio/files/etc/inittab: -------------------------------------------------------------------------------- 1 | ::sysinit:/etc/init.d/rcS S boot 2 | ::shutdown:/etc/init.d/rcS K shutdown 3 | # ttyATH0::askfirst:/bin/ash --login ### apparently this file gets overwritten? NEED to make sure that this line is commented out 4 | -------------------------------------------------------------------------------- /traits/audio/radio/files/etc/rc.d/K15radio: -------------------------------------------------------------------------------- 1 | ../init.d/radio -------------------------------------------------------------------------------- /traits/audio/radio/files/etc/rc.d/S94radio: -------------------------------------------------------------------------------- 1 | ../init.d/radio -------------------------------------------------------------------------------- /traits/audio/radio/files/etc/rc.local: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Is this too early here? Convert to init.d script 4 | cd '/sys/devices/platform/leds-gpio/leds/tp-link:blue:system/' 5 | echo timer > trigger 6 | echo 50 > delay_on 7 | echo 1950 > delay_off 8 | cd - 9 | 10 | # Without this, I get problems on Unitymedia: 11 | # In /etc/config/network 12 | # option dns '8.8.8.8 8.8.4.4' 13 | # for each network listed there 14 | 15 | # fritzlisten & 16 | 17 | ## If we have an IP address via Ethernet, then we don't need WLAN 18 | #RESULT=$(ifconfig br-lan | grep "inet addr") 19 | #if [ "$RESULT" ] ; then 20 | # wifi down 21 | # rmmod ath9k 22 | # rmmod ath9k_common ath9k_hw ath 23 | # rmmod mac80211 cfg80211 compat aes_generic crypto_algapi 24 | #fi 25 | 26 | exit 0 27 | -------------------------------------------------------------------------------- /traits/audio/radio/files/etc/ser2net.conf: -------------------------------------------------------------------------------- 1 | 1234:raw:0:/dev/ttyATH0:57600 2 | -------------------------------------------------------------------------------- /traits/audio/radio/files/etc/triggerhappy/triggers.d/radio.conf: -------------------------------------------------------------------------------- 1 | # This is for the "Virtual7.1Ch Sound USB sound card", "C-Media USB Headphone Set", USB vendor 0x0d8c, USB device 0x000c 2 | KEY_VOLUMEDOWN 1 tune down 3 | KEY_VOLUMEUP 1 tune up 4 | KEY_MIN_INTERESTING 1 tune up 5 | KEY_MIN_INTERESTING+KEY_VOLUMEUP 1 speak "up" 6 | KEY_MIN_INTERESTING 2 speak "hold" 7 | 8 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/bin/arduinoflash: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -v 4 | 5 | killall arduinolisten 6 | 7 | export PATH=/tmp/usr/bin/:$PATH 8 | export LD_LIBRARY_PATH=/tmp/usr/lib/:$LD_LIBRARY_PATH 9 | 10 | # GPIO 29 is on "pin" R17-S (south end of resistor 17) 11 | # This is connected to the Arudino reset pin, hence we need to change it from "grounded" to "isolated" 12 | # so that the Arduino can start running 13 | echo 29 > /sys/class/gpio/export 14 | echo out > /sys/class/gpio/gpio29/direction 15 | echo 1 > /sys/class/gpio/gpio29/value # isolated 16 | 17 | if [ -z "$1" ] ; then 18 | URL=http://arduinocodeinone.googlecode.com/svn-history/r2/trunk/Arduino/Blink/applet/Blink.hex 19 | else 20 | URL="$1" 21 | fi 22 | 23 | wget -c "$URL" -O /tmp/_tmp.hex 24 | 25 | # Reset using "pin" R17-S (south end of resistor 17) 26 | echo 0 > /sys/class/gpio/gpio29/value # grounded 27 | sleep 1 # Is needed to make it reliable 28 | echo 1 > /sys/class/gpio/gpio29/value # isolated 29 | avrdude -v -p atmega328p -c arduino -P /dev/ttyATH0 -b 57600 -D -U flash:w:/tmp/_tmp.hex:i || echo "Is another process accessing the port?" 30 | 31 | rm /tmp/_tmp.hex 32 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/bin/arduinolisten: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This assumes a sketch on the Arduino on ttyATH0 that outputs hashes like 7354AEB4 3 | 4 | # GPIO 29 is on "pin" R17-S (south end of resistor 17) 5 | # This is connected to the Arudino reset pin, hence we need to change it from "grounded" to "isolated" 6 | # so that the Arduino can start running 7 | echo 29 > /sys/class/gpio/export 8 | echo out > /sys/class/gpio/gpio29/direction 9 | echo 1 > /sys/class/gpio/gpio29/value # isolated 10 | 11 | stty -F /dev/ttyATH0 cs8 57600 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts 12 | 13 | SPEAKER=$(amixer scontrols | head -n 1 | cut -d "'" -f 2) 14 | LAST=0 15 | 16 | volume() 17 | { 18 | if [ "$1" == "up" ] ; then 19 | amixer set "$SPEAKER" 2dB+ 20 | fi 21 | if [ "$1" == "down" ] ; then 22 | amixer set "$SPEAKER" 2dB- 23 | fi 24 | } 25 | 26 | while read LINE; do 27 | LINE=$(echo $LINE | sed -e 's|\n||g' | sed -e 's|\r||g' | sed -e 's|\l||g' ) 28 | LENGTH=$(echo "$LINE" | wc -m) 29 | if [ "$LENGTH" == "9" ] ; then 30 | echo $LINE 31 | THISTIME=$(date +"%s") 32 | COMMAND=$(uci get radio.$LINE.command) 33 | echo $COMMAND 34 | REPEATABLE=$(uci get radio.$LINE.repeat) 35 | echo $REPEATABLE 36 | if [ "$LASTCOMMAND" == "$COMMAND" ] ; then 37 | echo "REPEAT" 38 | if [ "$REPEATABLE" == "1" ] ; then 39 | eval $COMMAND 40 | else 41 | if [ $THISTIME -ge $((LASTTIME+2)) ] ; then # At least 2 seconds between repeats 42 | eval $COMMAND 43 | else 44 | echo "REJECTED THIS REPEAT" 45 | fi 46 | fi 47 | else 48 | eval $COMMAND 49 | fi 50 | LASTCOMMAND=$COMMAND 51 | LASTTIME=$THISTIME 52 | fi 53 | 54 | done < /dev/ttyATH0 55 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/bin/arduinoreset: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # GPIO 29 is on "pin" R17-S (south end of resistor 17) 4 | # This is connected to the Arudino reset pin, hence we need to change it from "grounded" to "isolated" 5 | # so that the Arduino can start running 6 | echo 29 > /sys/class/gpio/export 7 | echo out > /sys/class/gpio/gpio29/direction 8 | echo 1 > /sys/class/gpio/gpio29/value # isolated 9 | 10 | echo 0 > /sys/class/gpio/gpio29/value # grounded 11 | sleep 1 12 | echo 1 > /sys/class/gpio/gpio29/value # isolated 13 | sleep 1 14 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/bin/fritzlisten: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Tell the who the caller is 5 | # whenever the Fritz!Box receives a call 6 | # based on reverse lookup 7 | # TODO: Also use the Fritz!Box address book 8 | # 9 | 10 | FRITZBOX=192.168.178.30 11 | 12 | ############################## 13 | 14 | nc $FRITZBOX 1012 | while read LINE; do 15 | echo "Got: $LINE" 16 | case $LINE in 17 | *RING*) 18 | 19 | RUFNR=$(echo $LINE | cut -d ";" -f 4) 20 | 21 | FOUND="" 22 | FOUND=$(wget -q -O - "http://www.dasoertliche.de/Controller?form_name=search_inv&ph=$RUFNR" | grep getItemData) 23 | ORTSNETZ="" 24 | 25 | if [ "" == "$FOUND" ] ; then 26 | ORTSNETZ=$(wget -q -O - "http://www.teltarif.de/festnetz/vorwahl/orte.html?nach=$RUFNR&land=1" | grep -e "<\/B><\/TD>" | grep EEEEEE | head -n 1 | cut -d "<" -f 6 | cut -d ">" -f 2) 27 | speak "Anruf aus $ORTSNETZ. - Ich wiederhole: Anruf aus $ORTSNETZ." 28 | else 29 | # PLZ=$(echo $FOUND | cut -d "'" -f 8) 30 | ORT=$(echo $FOUND | cut -d "'" -f 10) 31 | NAME$(echo $FOUND | cut -d "'" -f 12) 32 | # STRASSE=$(echo $FOUND | cut -d "'" -f 14) 33 | # HAUSNR=$(echo $FOUND | cut -d "'" -f 16) 34 | speak "Anruf von $NAME aus $ORT. - Ich wiederhole: Anruf von $NAME aus $ORT." 35 | fi 36 | ;; 37 | esac 38 | done 39 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/bin/metaebene: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Search for episodes on Metaebene and play the first result 5 | # 6 | 7 | wget -U "" "http://metaebene.me/updates/" -O /tmp/_html 8 | SNIP=$(grep -o -e "thumbnail.*" /tmp/_html | head -n 1) 9 | URL=$(echo $SNIP | cut -d '"' -f 3) 10 | wget -U "" "$URL" -O /tmp/_html 11 | MP3=$(grep -r "og:audio.*.mp3" /tmp/_html | head -n 1 | cut -d '"' -f 4) 12 | wget -U "" "$MP3" -O - | madplay - 13 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/bin/package-local: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # This script will one day generate an installable OpenWRT package 5 | # from all locally changed files on the running OpenWRT system that are not 6 | # known (keep) conf files. This is useful in rapid (scripting) development. 7 | # Currently it "just" creates 2 tar.gz files 8 | # 9 | 10 | cd /overlay 11 | opkg list-changed-conffiles > /tmp/excludes 12 | find /lib/upgrade/keep.d -type f -exec cat {} \; | grep -v "#" >> /tmp/excludes 13 | tar cvz -X /tmp/excludes -f /tmp/overlay.tar.gz * 2>/dev/null 14 | tar cvz -T /tmp/excludes -f /tmp/overlay-excluded.tar.gz 2>/dev/null 15 | rm /tmp/excludes 16 | cd - 17 | ls -lh /tmp/overlay*tar.gz 18 | 19 | exit 0 20 | 21 | ################################################################################## 22 | # Now create the ipkg (untested, probably buggy) 23 | # For this, "ar" would need to be installed (package binutils is relatively large) 24 | ################################################################################## 25 | 26 | mkdir -p /tmp/_ipkg/CONTROL 27 | 28 | cat > /tmp/_ipkg/CONTROL/control <<\EOF 29 | Package: custom-scripts 30 | Version: 0.1 31 | Description: Custom scripts 32 | Architecture: all 33 | Section: extra 34 | Priority: optional 35 | Maintainer: user 36 | Homepage: 37 | Depends: busybox 38 | Source: Inside this file 39 | EOF 40 | 41 | cd /tmp/_ipkg/CONTROL 42 | tar cvz -f /tmp/_ipkg/control.tar.gz * 2>/dev/null 43 | cd - 44 | 45 | mv /tmp/overlay.tar.gz /tmp/_ipkg/data.tar.gz 46 | 47 | echo "2.0" > /tmp/_ipkg/debian-binary 48 | 49 | ar -r /tmp/custom-scripts.ipk ./debian-binary ./data.tar.gz ./control.tar.gz 50 | 51 | rm -rf /tmp/_ipkg 52 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/bin/play: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | wget -U "" "$1" -O - | \ 4 | madplay --fade-in=0.1 -a +10 -o wave:- - | aplay -Dplug:dmix 5 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/bin/simplesleep: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MINS=90 4 | SECS=$(($MINS*60)) 5 | # SECS=60 ### For testing 6 | 7 | NUM=$( ps | grep "sleep $SECS" | wc -l ) 8 | echo $NUM 9 | 10 | # Only if we are not already in the sleep state, we start to sleep 11 | if [ $NUM == 1 ]; then 12 | # Sleep in the subshell 13 | ( sleep $SECS && /etc/init.d/radio stop ) & 14 | fi 15 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/bin/sleeptimer: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Find all PIDs of processes with the same name as myself 4 | PIDS=$(echo $(pidof $(basename $0))) 5 | echo $PIDS 6 | 7 | # Find my PID 8 | MYPID=$(echo $PIDS | cut -d " " -f 2) 9 | echo $MYPID 10 | 11 | # Kill all PIDs of processes with the name name that are not myself 12 | for PID in $PIDS ; do 13 | if [ "$PID" != "$MYPID" ] ; then 14 | echo kill $PID 15 | kill -9 $PID >/dev/null 2>&1 16 | fi 17 | done 18 | 19 | # Not clean 20 | killall sleep 21 | 22 | # Calculate seconds 23 | MINS=$(uci get radio.sleeptimer || echo 0) 24 | if [ $MINS -gt 100 ] ; then 25 | MINS=0 26 | fi 27 | NEWMINS=$(($MINS+15)) 28 | uci set radio.sleeptimer=$NEWMINS 29 | NEWSECS=$(($NEWMINS*60)) 30 | speak "Schaltee ab in $NEWMINS Minuten" 31 | 32 | # Sleep for certain time, then switch USB power off 33 | # (if we have set up everything correctly, this stops playback 34 | # and sends shutdown IR signal to external devices) 35 | sleep $NEWSECS ; echo 0 > /sys/class/gpio/gpio8/value 36 | 37 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/bin/speak: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | SPEAKER=$(amixer scontrols | head -n 1 | cut -d "'" -f 2) 4 | VOLUME=$(amixer get $SPEAKER | grep "\[" | head -n 1 | cut -d "[" -f 2 | cut -d "]" -f 1) 5 | 6 | # Pause any running madplay 7 | kill -SIGSTOP $(pidof madplay) 8 | sleep 1 9 | 10 | # Increase overall volume 11 | amixer sset $SPEAKER 5dB+ 12 | 13 | # FIXME: Can I send this to a different mixer that is not affected by the reduced overall volume? 14 | LANG=$1 15 | shift 16 | TEXT=$(echo "$@" | sed -e 's|\ |+|g') 17 | echo $TEXT 18 | 19 | if [ "$LANG" == "de" ] ; then 20 | VOICE="&VOICE=bits3-hsmm" 21 | fi 22 | 23 | if [ "$LANG" == "en" ] ; then 24 | LANG="en_US" 25 | fi 26 | 27 | URL="http://mary.dfki.de:59125/process?INPUT_TYPE=TEXT&OUTPUT_TYPE=AUDIO&AUDIO=WAVE_FILE&LOCALE=$LANG$VOICE&INPUT_TEXT=$TEXT" 28 | echo $URL 29 | 30 | wget -U "" "$URL" -O - | aplay -Dplug:dmix 31 | 32 | # Set back to original volume 33 | amixer sset $SPEAKER $VOLUME 34 | 35 | # Continue any running madplay 36 | kill -SIGCONT $(pidof madplay) 37 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/bin/tune: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [[ $# -eq 0 ]] ; then 4 | echo "Usage: $0 up|down|channel" 5 | exit 0 6 | fi 7 | 8 | case "$1" in 9 | up) uci set radio.next=$(($(uci get radio.next)+1)) ;; 10 | down) uci set radio.next=$(($(uci get radio.next)-1)) ;; 11 | *) exit 1 ;; 12 | esac 13 | 14 | killall -9 wget 15 | killall -9 madplay 16 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/bin/wifionoff: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | SW=$(uci -q get wireless.@wifi-device[0].disabled) 3 | [ "$SW" == "1" ] && uci set wireless.@wifi-device[0].disabled=0 4 | [ "$SW" == "1" ] || uci set wireless.@wifi-device[0].disabled=1 5 | wifi 6 | 7 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/lib/lua/luci/controller/myapp/mymodule.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Install to 3 | /usr/lib/lua/luci/controller/myapp/mymodule.lua 4 | ]]-- 5 | 6 | module("luci.controller.myapp.mymodule", package.seeall) 7 | 8 | function index() 9 | 10 | -- Create a new item in the main menu bar 11 | entry({"admin", "radio"}, cbi("myapp-mymodule/radio"), _("Radio"), 21).dependent = true 12 | 13 | -- Attach the submenus to the main menu item 14 | entry({"admin", "radio", "stations"}, cbi("myapp-mymodule/radio"), "Radio stations", 30).dependent=true 15 | entry({"admin", "radio", "remote"}, cbi("myapp-mymodule/remote"), "Radio remote control", 31).dependent=true 16 | 17 | -- entry({"click", "here", "now"}, call("action_tryme"), "Click here", 10).dependent=false 18 | -- entry({"my", "new", "template"}, template("myapp-mymodule/helloworld"), "Hello world", 20).dependent=false 19 | 20 | end 21 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/lib/lua/luci/model/cbi/myapp-mymodule/radio.lua: -------------------------------------------------------------------------------- 1 | -- uci config file /etc/config/radio, for this to work 2 | -- there must be a uci file created with "touch /etc/config/radio" 3 | m = Map("radio", "Personal Audio") 4 | 5 | -- Kill madplay when apply is clicked, so that we move to playonce track if we have one set 6 | m.on_after_commit = function(self) 7 | luci.util.exec("killall madplay") 8 | end 9 | 10 | s = m:section(TypedSection, "playonce", "Play once") 11 | s.template = "cbi/tblsection" 12 | 13 | s.addremove = true -- Allow the user to create and remove playonce instances 14 | 15 | p = s:option(ListValue, "type", "Type") 16 | p:value("mp3", "MP3") 17 | p:value("song", "Song") 18 | p.default = "mp3" 19 | 20 | url = s:option(Value, "url", "URL", "The http:// address of the mp3") 21 | function url:validate(value) 22 | return value:match("http://.*") 23 | end 24 | url:depends("type", "mp3") 25 | 26 | so = s:option(Value, "title", "Song title", "The name of the song") 27 | so:depends("type", "song") 28 | 29 | s = m:section(TypedSection, "station", "Stations") 30 | s.template = "cbi/tblsection" 31 | function s:filter(value) 32 | return value ~= "next" and value -- Don't touch variable "radio.next" 33 | end 34 | 35 | s.addremove = true -- Allow the user to create and station instances 36 | 37 | p = s:option(ListValue, "type", "Station type") 38 | p:value("mp3", "MP3 stream") 39 | p:value("pls", "M3U/PLS playlist") 40 | p:value("rss", "Podcast Feed") 41 | p.default = "mp3" 42 | 43 | url = s:option(Value, "url", "Stream URL", "The http:// address of the stream") 44 | function url:validate(value) 45 | return value:match("http://.*") 46 | end 47 | 48 | p = s:option(ListValue, "sidtype", "Station ID type") 49 | p:value("jingle", "Jingle") 50 | p:value("spoken", "Spoken") 51 | p.default = "jingle" 52 | 53 | sidurl = s:option(Value, "sidurl", "Station ID URL", "The http:// address of the station ID (jingle)") 54 | sidurl:depends("sidtype", "jingle") 55 | function sidurl:validate(value) 56 | return value:match("http://.*") 57 | end 58 | 59 | p = s:option(ListValue, "lang", "Language") 60 | p:value("de", "German") 61 | p:value("en_US", "English (US)") 62 | p.default = "de" 63 | p:depends("sidtype", "spoken") 64 | 65 | n = s:option(Value, "speakname", "Speakable station name", "This spoken as the station ID if no jingle is present") 66 | n:depends("sidtype", "spoken") 67 | 68 | luci.util.exec("/etc/init.d radio start") 69 | 70 | return m -- Returns the map 71 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/lib/lua/luci/model/cbi/myapp-mymodule/remote.lua: -------------------------------------------------------------------------------- 1 | -- uci config file /etc/config/radio, for this to work 2 | -- there must be a uci file created with "touch /etc/config/radio" 3 | m = Map("radio", "Radio") 4 | 5 | s = m:section(TypedSection, "rcc", "Remote Control Codes") 6 | s.template = "cbi/tblsection" 7 | function s:filter(value) 8 | return value ~= "next" and value -- Don't touch variable "radio.next" 9 | end 10 | 11 | s.addremove = true -- Allow the user to create and remove stations 12 | 13 | p = s:option(ListValue, "repeat", "Key type") 14 | p:value("0", "Not repeatable") 15 | p:value("1", "Repeatable (e.g., volume keys)") 16 | p.default = "0" 17 | 18 | n = s:option(Value, "command", "Command", "The command to be executed when this command is received") 19 | 20 | luci.util.exec("/etc/init.d/radio start") 21 | 22 | return m -- Returns the map 23 | -------------------------------------------------------------------------------- /traits/audio/radio/files/usr/lib/lua/luci/view/themes/openwrt.org/footer.htm: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /traits/audio/radio/files/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /traits/audio/shairport/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="alsa-utils shairport -6relayd -ip6tables -opkg -kmod-gpio-button-hotplug -kmod-leds-gpio -kmod-ledtrig-default-on -kmod-ledtrig-netdev -kmod-ledtrig-timer -swconfig -uboot-envtools" 2 | -------------------------------------------------------------------------------- /traits/core/files/etc/dropbear/authorized_keys: -------------------------------------------------------------------------------- 1 | /root/.ssh/authorized_keys -------------------------------------------------------------------------------- /traits/core/files/etc/shadow: -------------------------------------------------------------------------------- 1 | root:$1$WFDw.yoc$MuPQ4h/nu3WMpHmte5Yrp/:15719:0:99999:7::: 2 | daemon:*:0:0:99999:7::: 3 | ftp:*:0:0:99999:7::: 4 | network:*:0:0:99999:7::: 5 | nobody:*:0:0:99999:7::: 6 | -------------------------------------------------------------------------------- /traits/core/files/usr/bin/all_led: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | action=${1?\$1 must be ACTION (none|default-on|timer|...)} 3 | find /sys/class/leds/ -maxdepth 1 -mindepth 1 | while read led;do 4 | led ${led##/sys/class/leds/} $action 5 | done 6 | 7 | -------------------------------------------------------------------------------- /traits/core/files/usr/bin/genhostid: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | dd if=/dev/urandom bs=1 count=4> /etc/hostid 3 | -------------------------------------------------------------------------------- /traits/core/files/usr/bin/led: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | LED="$1" 3 | ACTION="$2" 4 | echo $ACTION > /sys/class/leds/$LED/trigger 5 | -------------------------------------------------------------------------------- /traits/core/firstrun/files/etc/rc.local: -------------------------------------------------------------------------------- 1 | /usr/bin/firstrun 2 | -------------------------------------------------------------------------------- /traits/core/firstrun/files/usr/bin/firstrun: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | if [ -e /etc/firstrun.d/ -a ! -e /etc/firstrun.complete ];then 5 | find /etc/firstrun.d/ -type f | grep -v '.complete$' | while read cmd; do 6 | [ ! -e ${cmd}.complete ] || continue 7 | if sh "$cmd" 2>&1 >/root/firstrun.log ;then 8 | logger "$cmd successful" 9 | touch ${cmd}.complete 10 | else 11 | logger "$cmd failed, bailing out!" 12 | exit 1 13 | fi 14 | done 15 | touch /etc/firstrun.complete 16 | fi 17 | -------------------------------------------------------------------------------- /traits/gui/luci/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="luci" 2 | REQUIRES="core/firstrun" 3 | -------------------------------------------------------------------------------- /traits/gui/luci/uhttpd/README: -------------------------------------------------------------------------------- 1 | Starts LUCI via uhttpd 2 | -------------------------------------------------------------------------------- /traits/gui/luci/uhttpd/files/etc/firstrun.d/50_enable_luci: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /etc/init.d/uhttpd enable 3 | /etc/init.d/uhttpd start 4 | -------------------------------------------------------------------------------- /traits/krebs/infest/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="tinc" 2 | DEPENDS="core/firstrun" 3 | -------------------------------------------------------------------------------- /traits/krebs/infest/README: -------------------------------------------------------------------------------- 1 | The base Krebs Trait 2 | =================== 3 | - installs and auto-boots tinc-retiolum 4 | -------------------------------------------------------------------------------- /traits/krebs/infest/TODO: -------------------------------------------------------------------------------- 1 | Infest after autoconnection by autowifi is completed 2 | -------------------------------------------------------------------------------- /traits/krebs/infest/files/etc/config/system: -------------------------------------------------------------------------------- 1 | config system 2 | option hostname krebsplug 3 | option timezone UTC 4 | -------------------------------------------------------------------------------- /traits/krebs/infest/files/etc/firstrun.d/5krebs_tinc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cat >> /etc/rc.local </dev/null 2>/&1 ; then (wget -O- http://euer.krebsco.de/retiolum/supernodes.tar.gz | tar xz -C /etc/tinc/retiolum/hosts/);fi 4 | fi 5 | -------------------------------------------------------------------------------- /traits/krebs/ssh_keys/files/root/.ssh/authorized_keys: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCl3RTOHd5DLiVeUbUr/GSiKoRWknXQnbkIf+uNiFO+XxiqZVojPlumQUVhasY8UzDzj9tSDruUKXpjut50FhIO5UFAgsBeMJyoZbgY/+R+QKU00Q19+IiUtxeFol/9dCO+F4o937MC0OpAC10LbOXN/9SYIXueYk3pJxIycXwUqhYmyEqtDdVh9Rx32LBVqlBoXRHpNGPLiswV2qNe0b5p919IGcslzf1XoUzfE3a3yjk/XbWh/59xnl4V7Oe7+iQheFxOT6rFA30WYwEygs5As//ZYtxvnn0gA02gOnXJsNjOW9irlxOUeP7IOU6Ye3WRKFRR0+7PS+w8IJLag2xb makefu@servarch 2 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3SFNYGRiH0oz44G51MWx+o4cC3Fj+ez5DKO5jjtEFZ0ik8XQ5CrVj7a87WbwABA/XRdIt+3WHoInsRmuDfgcIMYgWC567v2GdOxXg2danEIAhhsOY7KiCBLCfZz7lrFO7F6eJH1RCkwrXY+59hkA+i3LNtLmZazJIb2AGwFF8Xf+b/eWmLhqjCYON+OpvqftbCm9CwhLYOUcVoR94gFAzlMYSCHR7RuBBdLV6zrkmEwFEsKghBI7fcdhwfQxuV5UGVCD58KkTQTgK/Mf2tmAg/muBM+P8s2O6wVbtixmIiiDxfc99C3QD1MYVNHqWgV1Rz9JKfmyuVvFqn7TRuuT1 tv@also 3 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtDhAxjiCH0SmTGNDqmlKPug9qTf+IFOVjdXfk01lAV2KMVW00CgNo2d5kl5+6pM99K7zZO7Uo7pmSFLSCAg8J6cMRI3v5OxFsnQfcJ9TeGLZt/ua7F8YsyIIr5wtqKtFbujqve31q9xJMypEpiX4np3nLiHfYwcWu7AFAUY8UHcCNl4JXm6hsmPe+9f6Mg2jICOdkfMMn0LtW+iq1KZpw1Nka2YUSiE2YuUtV+V+YaVMzdcjknkVkZNqcVk6tbJ1ZyZKM+bFEnE4VkHJYDABZfELpcgBAszfWrVG0QpEFjVCUq5atpIVHJcWWDx072r0zgdTPcBuzsHHC5PRfVBLEw== makefu@arch 4 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAp83zynhIueJJsWlSEykVSBrrgBFKq38+vT8bRfa+csqyjZBl2SQFuCPo+Qbh49mwchpZRshBa9jQEIGqmXxv/PYdfBFQuOFgyUq9ZcTZUXqeynicg/SyOYFW86iiqYralIAkuGPfQ4howLPVyjTZtWeEeeEttom6p6LMY5Aumjz2em0FG0n9rRFY2fBzrdYAgk9C0N6ojCs/Gzknk9SGntA96MDqHJ1HXWFMfmwOLCnxtE5TY30MqSmkrJb7Fsejwjoqoe9Y/mCaR0LpG2cStC1+37GbHJNH0caCMaQCX8qdfgMVbWTVeFWtV6aWOaRgwLrPDYn4cHWQJqTfhtPrNQ== death@Uriel 5 | ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQB2G4SpJ/UYxmTidUl8ytT6bdNGTdYvv2nmhQyaFBroNit3xdDOVxKvaMEGDuR6ncRugw5BBvrv6iPMTCFluHJxjuh6lk3JrrsJ8CT22ZOGsA593hRoXZOCrs5SxcFkw9EBiCuaHHlWiS9+Dffr6/zpkhH3djTz05uGnDrvtKuV/Zmu5XHAurNn+X3C5S/zk/y0n8o62iSQHVKeNBGO2WYhVce9d65Ucek5dOvXZYVKSe1LeAOKyeHWv+VWP8QlObmfVrQ5l1Pou6WV6Wpo85KBa/mmBJIygC9rrG+gx/1LX7JxStbCu/WoUlUwkSaP2qxWaET9KaSO8+2Wrg5i34ax== samuel@localhost 6 | ssh-dss AAAAB3NzaC1kc3MAAACBAJE2uV+hM74kPr6IwIp5sDKBmbwDnugLxail3MeVCSPtoLLJ9fRj/HBissAubX2/20d3jPkV5DjipWJGZCxMuNl9pEDrlxL/jOp1HERoq0hj7XdIj/ka+wmLKWU9mLu3gX77M/QzrcpDNBrhYX8FePBHgMZr/gXap2raDZBAE8CjAAAAFQD4QaW+3N07Mvfh1yC/WVsEZ+6nUwAAAIAiQvhzUWUNon5e+UZlvGBlFV8B0isLDf87qxUZHRY0siSSXIlekEtAB0i4aXEVtBOJwsDdJjrCygoBtKT6VMsWCrXnAqvVAd3oVl9YeZ7R4zDPpWTYhERagTFla8yBEOTvEdHZ6Lfn72RDg0IDSnofdMzs6XwlD7c6uo6dRZ7+zgAAAIEAhakAD84QgbPRCwvRBVs4HAbnWps8GTQQx7WN2FC8Twv+Gkltha2RZtD7Artcm7d79kofiGax2NQrrzFKY1/gsBuIe15XhNiLpVqdSj3aK/LRRoNNOOCWvc6uQWXEN7gOVE8JTXyi+RDvzeP4Fn9jp+Ub6OGvWvsaBb9Z6IyfTHo= momo 7 | -------------------------------------------------------------------------------- /traits/minimal/README: -------------------------------------------------------------------------------- 1 | # Minimal Modules 2 | 3 | These modules actually remove specific traits in order to shrink the profiles 4 | in size. 5 | -------------------------------------------------------------------------------- /traits/minimal/no-dnsmasq/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="-dnsmasq -radvd -odhcpd" 2 | -------------------------------------------------------------------------------- /traits/minimal/no-firewall/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="-firewall" 2 | -------------------------------------------------------------------------------- /traits/minimal/no-iptables/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="-kmod-ipt-nat -kmod-ipt-nathelper -kmod-ipt-conntrack -iptables -kmod-nf-ipt6 -kmod-nf-nathelper-extra -kmod-nf-nat -kmod-nf-conntrack -kmod-nf-nat6 -kmod-nf-ipt -kmod-nf-nathelper -kmod-nf-conntrack6 -kmod-nf-conntrack-netlink" 2 | -------------------------------------------------------------------------------- /traits/minimal/no-ipv6/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="-kmod-ipv6 -6relayd -ip6tables -odhcp6c" 2 | -------------------------------------------------------------------------------- /traits/minimal/no-ppp/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES=" -kmod-ppp -kmod-pppoe -kmod-pppox -ppp -ppp-mod-pppoe" 2 | -------------------------------------------------------------------------------- /traits/mods/vfd_lcd/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="coreutils-stty" 2 | -------------------------------------------------------------------------------- /traits/mods/vfd_lcd/README: -------------------------------------------------------------------------------- 1 | # LCD 2 | This mod adds a VFD LCD to the uart port of your minikrebs. 3 | The following Pinout is required on the LCD: 4 | 5 | Using Blue Connector: 6 | - 1 - 5V 7 | - 3 - RX 8 | - 4 - GND 9 | 10 | The Following Pins can be used on the MR3020: 11 | 12 | - TX from UART connector 13 | - 5V from USB-Connector 14 | - GND from slide switch 15 | -------------------------------------------------------------------------------- /traits/mods/vfd_lcd/files/etc/rc.local: -------------------------------------------------------------------------------- 1 | /usr/bin/lcd-write "This is the Minikrebs Version 84" 2 | -------------------------------------------------------------------------------- /traits/mods/vfd_lcd/files/usr/bin/lcd-write: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | PORT=${LCD_PORT:-/dev/ttyATH0} 4 | stty < $PORT | grep -q "9600" || stty -F $PORT 9600 5 | echo > $PORT 6 | echo -n "$@" > $PORT 7 | -------------------------------------------------------------------------------- /traits/network/3g/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="comgt usb-modeswitch kmod-usb-serial" 2 | # comgt chat 3 | # usb-modeswitch libusb 4 | # kmod-usb-serial might only be needed for (k5005 12d1:14c3 ) 5 | # probably kmod-usb-serial-wwan 6 | # see: http://wiki.openwrt.org/doc/recipes/3gdongle 7 | # http://oleniner.blogspot.de/2011/11/tp-link-3420-openwrt-huawei-e398-3g.html 8 | -------------------------------------------------------------------------------- /traits/network/aircrack-overlay/MANIFEST: -------------------------------------------------------------------------------- 1 | OVERLAY_PACKAGES="aircrack-ng libopenssl libpcap libpthread zlib libsqlite3 reaver kmod-tun ip wireless-tools" 2 | -------------------------------------------------------------------------------- /traits/network/autoconnect/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="coreutils-readlink wpa-cli" 2 | DEPENDS="network/client-mode network/interactive-tools" 3 | -------------------------------------------------------------------------------- /traits/network/autoconnect/TODO: -------------------------------------------------------------------------------- 1 | * make a special branch for autowifi for openwrt as long as it is horribly 2 | broken 3 | -------------------------------------------------------------------------------- /traits/network/autoconnect/autostart/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="" 2 | DEPENDS="core/firstrun" 3 | -------------------------------------------------------------------------------- /traits/network/autoconnect/autostart/files/etc/firstrun.d/30_autostart_autowifi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo '/usr/bin/autowifi &' >> /etc/rc.local 3 | -------------------------------------------------------------------------------- /traits/network/autoconnect/docs/wpa_supplicant_wps_logs: -------------------------------------------------------------------------------- 1 | # working 2 | wlan0: Trying to associate with 14:cf:92:87:10:74 (SSID='hardbox' freq=2437 MHz) 3 | wlan0: Association request to the driver failed 4 | wlan0: Associated with 14:cf:92:87:10:74 5 | wlan0: CTRL-EVENT-EAP-STARTED EAP authentication started 6 | wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1 7 | wlan0: CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected 8 | WPS: Received old AP configuration from AP 9 | wlan0: WPS-CRED-RECEIVED 10 | wlan0: WPS-FAIL msg=11 config_error=0 11 | wlan0: CTRL-EVENT-EAP-FAILURE EAP authentication failed 12 | wlan0: WPS-FAIL 13 | wlan0: CTRL-EVENT-DISCONNECTED bssid=14:cf:92:87:10:74 reason=3 locally_generated=1 14 | ioctl[SIOCSIWFREQ]: Device or resource busy 15 | wlan0: Trying to associate with 14:cf:92:87:10:74 (SSID='hardbox' freq=2437 MHz) 16 | wlan0: Association request to the driver failed 17 | wlan0: Associated with 14:cf:92:87:10:74 18 | wlan0: WPA: Key negotiation completed with 14:cf:92:87:10:74 [PTK=CCMP GTK=TKIP] 19 | wlan0: CTRL-EVENT-CONNECTED - Connection to 14:cf:92:87:10:74 completed [id=0 id_str=] 20 | 21 | # Wrong PIN 22 | ioctl[SIOCSIWFREQ]: Device or resource busy 23 | wlan0: Trying to associate with 14:cf:92:87:10:74 (SSID='hardbox' freq=2437 MHz) 24 | wlan0: Association request to the driver failed 25 | wlan0: Associated with 14:cf:92:87:10:74 26 | wlan0: CTRL-EVENT-EAP-STARTED EAP authentication started 27 | wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1 28 | wlan0: CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected 29 | wlan0: WPS-FAIL msg=10 config_error=18 30 | wlan0: CTRL-EVENT-EAP-FAILURE EAP authentication failed 31 | wlan0: WPS-FAIL 32 | wlan0: Authentication with 14:cf:92:87:10:74 timed out. 33 | wlan0: CTRL-EVENT-DISCONNECTED bssid=14:cf:92:87:10:74 reason=3 locally_generated=1 34 | 35 | 36 | # Rate Limiting 37 | wlan0: Trying to associate with 14:cf:92:87:10:74 (SSID='hardbox' freq=2437 MHz) 38 | wlan0: Association request to the driver failed 39 | wlan0: Associated with 14:cf:92:87:10:74 40 | wlan0: CTRL-EVENT-EAP-STARTED EAP authentication started 41 | wlan0: CTRL-EVENT-EAP-FAILURE EAP authentication failed 42 | -------------------------------------------------------------------------------- /traits/network/autoconnect_old/MANIFEST: -------------------------------------------------------------------------------- 1 | 2 | #even though krebs is no hard dependency, the autoconnect feature has no use if the node does not connect back 3 | DEPENDS="krebs network/client-mode" 4 | -------------------------------------------------------------------------------- /traits/network/autoconnect_old/files/etc/rc.local: -------------------------------------------------------------------------------- 1 | /usr/bin/aap & 2 | -------------------------------------------------------------------------------- /traits/network/autoconnect_old/files/etc/wifiblack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/traits/network/autoconnect_old/files/etc/wifiblack -------------------------------------------------------------------------------- /traits/network/autoconnect_old/files/etc/wifipw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/traits/network/autoconnect_old/files/etc/wifipw -------------------------------------------------------------------------------- /traits/network/autoconnect_old/files/usr/bin/aap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/awk -f 2 | 3 | BEGIN { 4 | chan=0; 5 | essid=""; 6 | encr=0; 7 | psk2=0; 8 | psk=0; 9 | i=0; 10 | # find interface - start by finding if in sta mode 11 | while( "uci show wireless" | getline) { 12 | if(/mode=sta/) { 13 | split($0,wl,"."); 14 | iface=wl[2]; 15 | } 16 | } 17 | close("uci show wireless") 18 | "uci get wireless." iface ".device" | getline radio 19 | close("uci get wireless." iface ".device") 20 | system("ifconfig wlan0 up") 21 | for(;;){ 22 | while( "iwlist wlan0 scan" | getline ) { 23 | scan[i++]=$0; 24 | } 25 | close("iwlist wlan0 scan") 26 | for (j=0;j 0) { 57 | "easybox_keygen " mac | getline rkey 58 | close("easybox_keygen " mac) 59 | } 60 | else { 61 | print essid " is encrypted and key not in whitelist"; 62 | continue; 63 | } 64 | } 65 | } 66 | system("uci set wireless." radio ".channel=" channel); 67 | system("uci set wireless." iface ".ssid=" essid); 68 | if (crypt == "none") { 69 | system("uci set wireless." iface ".encryption=none"); 70 | system("uci -q delete wireless." iface ".key"); 71 | } 72 | else { 73 | system("uci set wireless." iface ".key=" rkey); 74 | system("uci set wireless." iface ".encryption=" crypt); 75 | } 76 | system("uci show wireless > /tmp/keepalive"); 77 | system("wifi up"); 78 | while(system("sleep 60; wget -q -T 30 -O /dev/null http://google.com/index.html") == 0) { 79 | system("all_led none") 80 | } 81 | } 82 | else { 83 | # now test for the things we want 84 | # channel 85 | if (/Channel:[0-9]/) { 86 | m=match($0,"Channel"); 87 | if (RSTART > 0) { 88 | s=substr($0,m); 89 | n=match(s,/[0-9]+/); 90 | chan=substr(s,n,RLENGTH) 91 | } 92 | continue; 93 | } 94 | # we don't need else as we break on successful find 95 | if (/^ *ESSID/) { 96 | m=match($0,"\".*\""); 97 | if (RSTART > 0) essid=substr($0,m+1,RLENGTH-2); 98 | continue; 99 | } 100 | if (/^ *Encryption key:on/) { 101 | encr = 1; 102 | continue; 103 | } 104 | if (/^ *IE: IEEE 802.11i\/WPA2/) { 105 | psk2=1; 106 | continue; 107 | } 108 | if (/^ *IE: WPA /) { 109 | psk=1; 110 | continue; 111 | } 112 | } 113 | } 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /traits/network/autoconnect_old/files/usr/bin/easybox_keygen: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # easybox_keygen.sh (c) 2012 GPLv3 4 | # 5 | # www.wotan.cc 6 | # 7 | 8 | MAC=${1?\$1 must be MAC} 9 | 10 | # Take the last 2 Bytes of the MAC-Address (0B:EC), and convert it to decimal. 11 | 12 | take5=${MAC:12} 13 | last4=${take5/:/} 14 | 15 | # Fill up to 4 places with zeros, if necessary: 16 | deci=$(printf "%04d" "0x$last4" | sed 's/.*\(....\)/\1/;s/./& /g') 17 | #echo M4: ${deci[@]} 18 | # 19 | # The digits M9 to M12 are just the last digits (9.-12.) of the MAC: 20 | hexi=$(echo ${MAC:12:5} | sed 's/://;s/./& /g') 21 | #echo 'M4 (Hex): ' ${hexi[@]} 22 | # K1 = last byte of (d0 + d1 + h2 + h3) 23 | # K2 = last byte of (h0 + h1 + d2 + d3) 24 | c1=$(printf "%d + %d + %d + %d" ${deci:0:1} ${deci:2:1} 0x${hexi:4:1} 0x${hexi:6:1}) 25 | c2=$(printf "%d + %d + %d + %d" 0x${hexi:0:1} 0x${hexi:2:1} ${deci:4:1} ${deci:6:1}) 26 | K1=$((($c1)%16)) 27 | K2=$((($c2)%16)) 28 | #printf "K1: %x\n" $K1 29 | #printf "K2: %x\n" $K2 30 | X1=$((K1^${deci:6:1})) 31 | X2=$((K1^${deci:4:1})) 32 | X3=$((K1^${deci:2:1})) 33 | Y1=$((K2^0x${hexi:2:1})) 34 | Y2=$((K2^0x${hexi:4:1})) 35 | Y3=$((K2^0x${hexi:6:1})) 36 | Z1=$((0x${hexi:4:1}^${deci:6:1})) 37 | Z2=$((0x${hexi:6:1}^${deci:4:1})) 38 | Z3=$((K1^K2)) 39 | printf "%x%x%x%x%x%x%x%x%x\n" $X1 $Y1 $Z1 $X2 $Y2 $Z2 $X3 $Y3 $Z3 | tr a-f A-F 40 | 41 | -------------------------------------------------------------------------------- /traits/network/avahi/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="avahi-daemon" 2 | -------------------------------------------------------------------------------- /traits/network/avahi/files/etc/avahi/avahi-daemon.conf: -------------------------------------------------------------------------------- 1 | [server] 2 | # The following line is important, otherwise the daemon will not start up 3 | enable-dbus=no 4 | use-ipv4=yes 5 | use-ipv6=no 6 | check-response-ttl=no 7 | use-iff-running=no 8 | 9 | [publish] 10 | publish-addresses=yes 11 | publish-hinfo=yes 12 | publish-workstation=no 13 | publish-domain=yes 14 | 15 | [reflector] 16 | enable-reflector=no 17 | reflect-ipv=no 18 | 19 | [rlimits] 20 | rlimit-core=0 21 | rlimit-data=4194304 22 | rlimit-fsize=0 23 | rlimit-nofile=30 24 | rlimit-stack=4194304 25 | rlimit-nproc=3 26 | -------------------------------------------------------------------------------- /traits/network/captive/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="luci-mod-admin-full uhttpd libiwinfo-lua luci-theme-bootstrap nano iptables-mod-conntrack-extra firewall luci-app-firewall nodogsplash" 2 | -------------------------------------------------------------------------------- /traits/network/captive/README: -------------------------------------------------------------------------------- 1 | Captive portal 2 | 3 | NOTE: The IP address of the Ethernet interface is hardcoded to 192.168.0.14 in /etc/configuration/network. 4 | You need to change it if you would like to use another address. 5 | 6 | Run 7 | ndsctl status 8 | to see the configuration and the authenticated clients. 9 | 10 | Run 11 | ndsctl deauth 192.168.0.12 12 | to make the user with IP 192.168.0.12 authenticate again (can also use MAC address) 13 | 14 | Start 15 | nodogsplash -f -d 7 16 | to see verbose output 17 | -------------------------------------------------------------------------------- /traits/network/captive/files/etc/config/dhcp: -------------------------------------------------------------------------------- 1 | config dnsmasq 2 | option domainneeded 1 3 | option boguspriv 1 4 | option filterwin2k 0 # enable for dial on demand 5 | option localise_queries 1 6 | option rebind_protection 1 # disable if upstream must serve RFC1918 addresses 7 | option rebind_localhost 1 # enable for RBL checking and similar services 8 | #list rebind_domain example.lan # whitelist RFC1918 responses for domains 9 | option local '/lan/' 10 | option domain 'lan' 11 | option expandhosts 1 12 | option nonegcache 0 13 | # option authoritative 1 14 | option readethers 1 15 | option leasefile '/tmp/dhcp.leases' 16 | option resolvfile '/tmp/resolv.conf.auto' 17 | #list server '/mycompany.local/1.2.3.4' 18 | #option nonwildcard 1 19 | #list interface br-lan 20 | #list notinterface lo 21 | #list bogusnxdomain '64.94.110.11' 22 | list 'server' '8.8.8.8' 23 | list 'server' '8.8.4.4' 24 | 25 | config dhcp lan 26 | # option interface lan 27 | # option start 100 28 | # option limit 150 29 | # option leasetime 12h 30 | option 'ignore' '1' 31 | 32 | config dhcp wan 33 | option interface wan 34 | option ignore 1 35 | 36 | config 'dhcp' 'hotspot' 37 | option 'interface' 'hotspot' 38 | option 'start' '100' 39 | option 'limit' '150' 40 | option 'leasetime' '12h' 41 | 42 | -------------------------------------------------------------------------------- /traits/network/captive/files/etc/config/firewall: -------------------------------------------------------------------------------- 1 | 2 | config defaults 3 | option syn_flood '1' 4 | option input 'ACCEPT' 5 | option output 'ACCEPT' 6 | option forward 'REJECT' 7 | 8 | config zone 9 | option name 'lan' 10 | option input 'ACCEPT' 11 | option output 'ACCEPT' 12 | option forward 'ACCEPT' 13 | option network 'lan' 14 | 15 | config zone 16 | option name 'wan' 17 | option input 'REJECT' 18 | option output 'ACCEPT' 19 | option forward 'REJECT' 20 | option masq '1' 21 | option mtu_fix '1' 22 | option network 'wan wan6' 23 | 24 | config forwarding 25 | option src 'lan' 26 | option dest 'wan' 27 | 28 | config rule 29 | option name 'Allow-DHCP-Renew' 30 | option src 'wan' 31 | option proto 'udp' 32 | option dest_port '68' 33 | option target 'ACCEPT' 34 | option family 'ipv4' 35 | 36 | config rule 37 | option name 'Allow-Ping' 38 | option src 'wan' 39 | option proto 'icmp' 40 | option icmp_type 'echo-request' 41 | option family 'ipv4' 42 | option target 'ACCEPT' 43 | 44 | config rule 45 | option name 'Allow-DHCPv6' 46 | option src 'wan' 47 | option proto 'udp' 48 | option src_ip 'fe80::/10' 49 | option src_port '547' 50 | option dest_ip 'fe80::/10' 51 | option dest_port '546' 52 | option family 'ipv6' 53 | option target 'ACCEPT' 54 | 55 | config rule 56 | option name 'Allow-ICMPv6-Input' 57 | option src 'wan' 58 | option proto 'icmp' 59 | list icmp_type 'echo-request' 60 | list icmp_type 'echo-reply' 61 | list icmp_type 'destination-unreachable' 62 | list icmp_type 'packet-too-big' 63 | list icmp_type 'time-exceeded' 64 | list icmp_type 'bad-header' 65 | list icmp_type 'unknown-header-type' 66 | list icmp_type 'router-solicitation' 67 | list icmp_type 'neighbour-solicitation' 68 | list icmp_type 'router-advertisement' 69 | list icmp_type 'neighbour-advertisement' 70 | option limit '1000/sec' 71 | option family 'ipv6' 72 | option target 'ACCEPT' 73 | 74 | config rule 75 | option name 'Allow-ICMPv6-Forward' 76 | option src 'wan' 77 | option dest '*' 78 | option proto 'icmp' 79 | list icmp_type 'echo-request' 80 | list icmp_type 'echo-reply' 81 | list icmp_type 'destination-unreachable' 82 | list icmp_type 'packet-too-big' 83 | list icmp_type 'time-exceeded' 84 | list icmp_type 'bad-header' 85 | list icmp_type 'unknown-header-type' 86 | option limit '1000/sec' 87 | option family 'ipv6' 88 | option target 'ACCEPT' 89 | 90 | config include 91 | option path '/etc/firewall.user' 92 | 93 | -------------------------------------------------------------------------------- /traits/network/captive/files/etc/config/network: -------------------------------------------------------------------------------- 1 | 2 | config interface 'loopback' 3 | option ifname 'lo' 4 | option proto 'static' 5 | option ipaddr '127.0.0.1' 6 | option netmask '255.0.0.0' 7 | 8 | config interface 'lan0' 9 | option ifname 'eth0' 10 | option proto 'dhcp' 11 | 12 | config interface 'lan1' 13 | option ifname 'eth1' 14 | option proto 'static' 15 | option ipaddr '192.168.0.14' 16 | option netmask '255.255.255.0' 17 | option gateway '192.168.0.1' 18 | 19 | config interface 'hotspot' 20 | option ifname 'wlan0' 21 | option proto 'static' 22 | option ipaddr '192.168.5.1' 23 | option netmask '255.255.255.0' 24 | -------------------------------------------------------------------------------- /traits/network/captive/files/etc/config/uhttpd: -------------------------------------------------------------------------------- 1 | # Server configuration 2 | config uhttpd main 3 | 4 | # HTTP listen addresses, multiple allowed 5 | list listen_http 0.0.0.0:80 6 | # list listen_http [::]:80 7 | 8 | # HTTPS listen addresses, multiple allowed 9 | list listen_https 0.0.0.0:443 10 | # list listen_https [::]:443 11 | 12 | # Server document root 13 | option home /www 14 | 15 | # Reject requests from RFC1918 IP addresses 16 | # directed to the servers public IP(s). 17 | # This is a DNS rebinding countermeasure. 18 | option rfc1918_filter 1 19 | 20 | # Maximum number of concurrent requests. 21 | # If this number is exceeded, further requests are 22 | # queued until the number of running requests drops 23 | # below the limit again. 24 | option max_requests 3 25 | 26 | # Maximum number of concurrent connections. 27 | # If this number is exceeded, further TCP connection 28 | # attempts are queued until the number of active 29 | # connections drops below the limit again. 30 | option max_connections 100 31 | 32 | # Certificate and private key for HTTPS. 33 | # If no listen_https addresses are given, 34 | # the key options are ignored. 35 | option cert /etc/uhttpd.crt 36 | option key /etc/uhttpd.key 37 | 38 | # CGI url prefix, will be searched in docroot. 39 | # Default is /cgi-bin 40 | option cgi_prefix /cgi-bin 41 | 42 | # List of extension->interpreter mappings. 43 | # Files with an associated interpreter can 44 | # be called outside of the CGI prefix and do 45 | # not need to be executable. 46 | # list interpreter ".php=/usr/bin/php-cgi" 47 | # list interpreter ".cgi=/usr/bin/perl" 48 | 49 | # Lua url prefix and handler script. 50 | # Lua support is disabled if no prefix given. 51 | # option lua_prefix /luci 52 | # option lua_handler /usr/lib/lua/luci/sgi/uhttpd.lua 53 | 54 | # Specify the ubus-rpc prefix and socket path. 55 | # option ubus_prefix /ubus 56 | # option ubus_socket /var/run/ubus.sock 57 | 58 | # CGI/Lua timeout, if the called script does not 59 | # write data within the given amount of seconds, 60 | # the server will terminate the request with 61 | # 504 Gateway Timeout response. 62 | option script_timeout 60 63 | 64 | # Network timeout, if the current connection is 65 | # blocked for the specified amount of seconds, 66 | # the server will terminate the associated 67 | # request process. 68 | option network_timeout 30 69 | 70 | # HTTP Keep-Alive, specifies the timeout for persistent 71 | # HTTP/1.1 connections. Setting this to 0 will disable 72 | # persistent HTTP connections. 73 | option http_keepalive 20 74 | 75 | # TCP Keep-Alive, send periodic keep-alive probes 76 | # over established connections to detect dead peers. 77 | # The value is given in seconds to specify the 78 | # interval between subsequent probes. 79 | # Setting this to 0 will disable TCP keep-alive. 80 | option tcp_keepalive 1 81 | 82 | # Basic auth realm, defaults to local hostname 83 | # option realm OpenWrt 84 | 85 | # Configuration file in busybox httpd format 86 | # option config /etc/httpd.conf 87 | 88 | # Do not follow symlinks that point outside of the 89 | # home directory. 90 | # option no_symlinks 0 91 | 92 | # Do not produce directory listings but send 403 93 | # instead if a client requests an url pointing to 94 | # a directory without any index file. 95 | # option no_dirlists 0 96 | 97 | # Do not authenticate any ubus-rpc requests against 98 | # the ubus session/access procedure. 99 | # This is dangerous and should be always left off 100 | # except for development and debug purposes! 101 | # option no_ubusauth 0 102 | 103 | 104 | # Certificate defaults for px5g key generator 105 | config cert px5g 106 | 107 | # Validity time 108 | option days 730 109 | 110 | # RSA key size 111 | option bits 1024 112 | 113 | # Location 114 | option country DE 115 | option state Berlin 116 | option location Berlin 117 | 118 | # Common name 119 | option commonname OpenWrt 120 | -------------------------------------------------------------------------------- /traits/network/captive/files/etc/config/wireless: -------------------------------------------------------------------------------- 1 | 2 | config wifi-device 'radio0' 3 | option type 'mac80211' 4 | option channel '11' 5 | option hwmode '11ng' 6 | option path 'platform/ar933x_wmac' 7 | list ht_capab 'SHORT-GI-20' 8 | list ht_capab 'SHORT-GI-40' 9 | list ht_capab 'RX-STBC1' 10 | list ht_capab 'DSSS_CCK-40' 11 | option htmode 'HT20' 12 | 13 | config wifi-iface 14 | option device 'radio0' 15 | option mode 'ap' 16 | option ssid 'hotspot' 17 | option encryption 'none' 18 | # option network 'lan hotspot' 19 | option network 'hotspot' 20 | 21 | -------------------------------------------------------------------------------- /traits/network/captive/files/etc/nodogsplash/nodogsplash.conf: -------------------------------------------------------------------------------- 1 | GatewayInterface wlan0 2 | 3 | FirewallRuleSet authenticated-users { 4 | FirewallRule block to 192.168.0.0/16 5 | FirewallRule block to 10.0.0.0/8 6 | FirewallRule allow tcp port 53 7 | FirewallRule allow udp port 53 8 | FirewallRule allow tcp port 80 9 | FirewallRule allow tcp port 443 10 | FirewallRule allow tcp port 22 11 | } 12 | 13 | FirewallRuleSet preauthenticated-users { 14 | } 15 | 16 | FirewallRuleSet users-to-router { 17 | } 18 | 19 | -------------------------------------------------------------------------------- /traits/network/client-mode/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="announce" 2 | -------------------------------------------------------------------------------- /traits/network/client-mode/files/etc/config/network: -------------------------------------------------------------------------------- 1 | config interface 'loopback' 2 | option ifname 'lo' 3 | option proto 'static' 4 | option ipaddr '127.0.0.1' 5 | option netmask '255.0.0.0' 6 | 7 | config interface 'lan0' 8 | option ifname 'eth0' 9 | option proto 'dhcp' 10 | 11 | config interface 'lan1' 12 | option ifname 'eth1' 13 | option proto 'dhcp' 14 | 15 | config interface 'lan2' 16 | option ifname 'eth0.1' 17 | option proto 'dhcp' 18 | -------------------------------------------------------------------------------- /traits/network/eth-wifi-nat/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="dnsmasq" 2 | DEPENDS="core/firstrun" 3 | -------------------------------------------------------------------------------- /traits/network/eth-wifi-nat/README: -------------------------------------------------------------------------------- 1 | This build will set up the following: 2 | 3 | eth0 - lan, dnsmasq 192.168.211.1 4 | wlan0 - wan,dhcp 5 | 6 | -------------------------------------------------------------------------------- /traits/network/eth-wifi-nat/files/etc/config/firewall: -------------------------------------------------------------------------------- 1 | config defaults 2 | option syn_flood 1 3 | option input ACCEPT 4 | option output ACCEPT 5 | option forward REJECT 6 | # Uncomment this line to disable ipv6 rules 7 | # option disable_ipv6 1 8 | 9 | config zone 10 | option name lan 11 | option network 'lan' 12 | option input ACCEPT 13 | option output ACCEPT 14 | option forward REJECT 15 | 16 | config zone 17 | option name wan 18 | option network 'wan' 19 | option input REJECT 20 | option output ACCEPT 21 | option forward REJECT 22 | option masq 1 23 | option masq_dest !192.168.211.0/24 24 | option mtu_fix 1 25 | 26 | # mandatory 27 | config forwarding 28 | option src lan 29 | option dest wan 30 | 31 | config forwarding 32 | option src wlan 33 | option dest lan 34 | 35 | # We need to accept udp packets on port 68, 36 | # see https://dev.openwrt.org/ticket/4108 37 | config rule 38 | option name Allow-DHCP-Renew 39 | option src wan 40 | option proto udp 41 | option dest_port 68 42 | option target ACCEPT 43 | option family ipv4 44 | 45 | # Allow IPv4 ping 46 | config rule 47 | option name Allow-Ping 48 | option src wan 49 | option proto icmp 50 | option icmp_type echo-request 51 | option family ipv4 52 | option target ACCEPT 53 | 54 | # Allow DHCPv6 replies 55 | # see https://dev.openwrt.org/ticket/10381 56 | config rule 57 | option name Allow-DHCPv6 58 | option src wan 59 | option proto udp 60 | option src_ip fe80::/10 61 | option src_port 547 62 | option dest_ip fe80::/10 63 | option dest_port 546 64 | option family ipv6 65 | option target ACCEPT 66 | 67 | # Allow essential incoming IPv6 ICMP traffic 68 | config rule 69 | option name Allow-ICMPv6-Input 70 | option src wan 71 | option proto icmp 72 | list icmp_type echo-request 73 | list icmp_type echo-reply 74 | list icmp_type destination-unreachable 75 | list icmp_type packet-too-big 76 | list icmp_type time-exceeded 77 | list icmp_type bad-header 78 | list icmp_type unknown-header-type 79 | list icmp_type router-solicitation 80 | list icmp_type neighbour-solicitation 81 | list icmp_type router-advertisement 82 | list icmp_type neighbour-advertisement 83 | option limit 1000/sec 84 | option family ipv6 85 | option target ACCEPT 86 | 87 | # Allow essential forwarded IPv6 ICMP traffic 88 | config rule 89 | option name Allow-ICMPv6-Forward 90 | option src wan 91 | option dest * 92 | option proto icmp 93 | list icmp_type echo-request 94 | list icmp_type echo-reply 95 | list icmp_type destination-unreachable 96 | list icmp_type packet-too-big 97 | list icmp_type time-exceeded 98 | list icmp_type bad-header 99 | list icmp_type unknown-header-type 100 | option limit 1000/sec 101 | option family ipv6 102 | option target ACCEPT 103 | 104 | # include a file with users custom iptables rules 105 | config include 106 | option path /etc/firewall.user 107 | -------------------------------------------------------------------------------- /traits/network/eth-wifi-nat/files/etc/firstrun.commands: -------------------------------------------------------------------------------- 1 | uci set network.lan=interface 2 | uci set network.lan.ifname=eth0 3 | uci set network.lan.proto=static 4 | uci set network.lan.ipaddr=192.168.211.1 5 | uci set network.lan.netmask=255.255.255.0 6 | uci set network.wan=interface 7 | uci set network.wan.ifname=wlan0 8 | uci set network.wan.proto=dhcp 9 | uci commit network 10 | /etc/init.d/network restart 11 | -------------------------------------------------------------------------------- /traits/network/interactive-tools/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="ip wireless-tools wpa-cli" 2 | -------------------------------------------------------------------------------- /traits/network/netem/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="kmod-netem tc iptables-mod-ipopt" 2 | -------------------------------------------------------------------------------- /traits/network/netem/README: -------------------------------------------------------------------------------- 1 | Simulate bad network on wlan0. 2 | A connection named wlan0 needs to be configured manually and needs to show up in ifup in order for this to work. 3 | The bad network simulation can be launched with /etc/init.d/netem start if there is a wlan0 network. 4 | -------------------------------------------------------------------------------- /traits/network/netem/etc/init.d/netem: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | # Simulate bad WLAN connection 3 | 4 | START=10 5 | STOP=15 6 | 7 | start() { 8 | echo "Start simulating bad network on wlan0" 9 | tc qdisc add dev wlan0 root netem delay 500ms 20ms loss 10% 10 | # for randomly dropping 10% of incoming packets 11 | iptables -A INPUT -m statistic --mode random --probability 0.1 -j DROP 12 | # and for dropping 10% of outgoing packets 13 | iptables -A OUTPUT -m statistic --mode random --probability 0.1 -j DROP 14 | } 15 | 16 | stop() { 17 | echo "Stop simulating bad network on wlan0" 18 | tc qdisc del dev wlan0 root netem delay 500ms 20ms loss 10% 19 | # for the incoming packets 20 | iptables -D INPUT -m statistic --mode random --probability 0.1 -j DROP 21 | # and for the outgoing packets 22 | iptables -D OUTPUT -m statistic --mode random --probability 0.1 -j DROP 23 | } 24 | 25 | restart() { 26 | stop 27 | sleep 1 28 | start 29 | } 30 | -------------------------------------------------------------------------------- /traits/network/open-wifi-ap/MANIFEST: -------------------------------------------------------------------------------- 1 | DEPENDS="core/firstrun" 2 | -------------------------------------------------------------------------------- /traits/network/open-wifi-ap/files/etc/firstrun.d/11_open-wifi-ap: -------------------------------------------------------------------------------- 1 | wifi detect > /etc/config/wireless 2 | uci set wireless.@wifi-iface[0].network='lan' 3 | uci set wireless.@wifi-iface[0].mode='ap' 4 | uci set wireless.@wifi-iface[0].encryption='none' 5 | uci set wireless.@wifi-iface[0].ssid='default' 6 | 7 | uci set wireless.@wifi-device[0].disabled=0 8 | uci commit wireless 9 | wifi 10 | -------------------------------------------------------------------------------- /traits/network/wifi-client/MANIFEST: -------------------------------------------------------------------------------- 1 | DEPENDS="core/firstrun" 2 | -------------------------------------------------------------------------------- /traits/network/wifi-client/files/etc/firstrun.d/10_wifi_client: -------------------------------------------------------------------------------- 1 | wifi detect > /etc/config/wireless 2 | uci set wireless.@wifi-iface[0].network='lan' 3 | uci set wireless.@wifi-iface[0].mode='sta' 4 | uci set wireless.@wifi-iface[0].encryption='none' 5 | uci set wireless.@wifi-iface[0].ssid='default' 6 | 7 | uci set wireless.@wifi-device[0].disabled=0 8 | uci commit wireless 9 | wifi 10 | -------------------------------------------------------------------------------- /traits/network/wifi-dhcp/files/etc/firstrun.d/01_configure_bridge: -------------------------------------------------------------------------------- 1 | uci set network.loopback=interface 2 | uci set network.loopback.ifname=lo 3 | uci set network.loopback.proto=static 4 | uci set network.loopback.ipaddr=127.0.0.1 5 | uci set network.loopback.netmask=255.0.0.0 6 | 7 | uci set network.wan=interface 8 | uci set network.wan.ifname=eth0 9 | uci set network.wan.proto=dhcp 10 | 11 | uci set network.lan=interface 12 | uci set network.lan.ifname=wlan0 13 | uci set network.lan.proto=static 14 | uci set network.lan.ipaddr=192.168.211.1 15 | uci set network.lan.netmask=255.255.255.0 16 | 17 | uci commit network 18 | /etc/init.d/network restart 19 | -------------------------------------------------------------------------------- /traits/network/wifibridge/files/etc/config/firewall: -------------------------------------------------------------------------------- 1 | config defaults 2 | option syn_flood 1 3 | option input ACCEPT 4 | option output ACCEPT 5 | option forward REJECT 6 | # Uncomment this line to disable ipv6 rules 7 | # option disable_ipv6 1 8 | 9 | config zone 10 | option name lan 11 | option network 'lan' 12 | option input ACCEPT 13 | option output ACCEPT 14 | option forward REJECT 15 | 16 | config zone 17 | option name wan 18 | option network 'wan' 19 | option input REJECT 20 | option output ACCEPT 21 | option forward REJECT 22 | option masq 1 23 | option mtu_fix 1 24 | 25 | config forwarding 26 | option src lan 27 | option dest wlan 28 | 29 | config forwarding 30 | option src wlan 31 | option dest lan 32 | 33 | # We need to accept udp packets on port 68, 34 | # see https://dev.openwrt.org/ticket/4108 35 | config rule 36 | option name Allow-DHCP-Renew 37 | option src wan 38 | option proto udp 39 | option dest_port 68 40 | option target ACCEPT 41 | option family ipv4 42 | 43 | # Allow IPv4 ping 44 | config rule 45 | option name Allow-Ping 46 | option src wan 47 | option proto icmp 48 | option icmp_type echo-request 49 | option family ipv4 50 | option target ACCEPT 51 | 52 | # Allow DHCPv6 replies 53 | # see https://dev.openwrt.org/ticket/10381 54 | config rule 55 | option name Allow-DHCPv6 56 | option src wan 57 | option proto udp 58 | option src_ip fe80::/10 59 | option src_port 547 60 | option dest_ip fe80::/10 61 | option dest_port 546 62 | option family ipv6 63 | option target ACCEPT 64 | 65 | # Allow essential incoming IPv6 ICMP traffic 66 | config rule 67 | option name Allow-ICMPv6-Input 68 | option src wan 69 | option proto icmp 70 | list icmp_type echo-request 71 | list icmp_type echo-reply 72 | list icmp_type destination-unreachable 73 | list icmp_type packet-too-big 74 | list icmp_type time-exceeded 75 | list icmp_type bad-header 76 | list icmp_type unknown-header-type 77 | list icmp_type router-solicitation 78 | list icmp_type neighbour-solicitation 79 | list icmp_type router-advertisement 80 | list icmp_type neighbour-advertisement 81 | option limit 1000/sec 82 | option family ipv6 83 | option target ACCEPT 84 | 85 | # Allow essential forwarded IPv6 ICMP traffic 86 | config rule 87 | option name Allow-ICMPv6-Forward 88 | option src wan 89 | option dest * 90 | option proto icmp 91 | list icmp_type echo-request 92 | list icmp_type echo-reply 93 | list icmp_type destination-unreachable 94 | list icmp_type packet-too-big 95 | list icmp_type time-exceeded 96 | list icmp_type bad-header 97 | list icmp_type unknown-header-type 98 | option limit 1000/sec 99 | option family ipv6 100 | option target ACCEPT 101 | 102 | # include a file with users custom iptables rules 103 | config include 104 | option path /etc/firewall.user 105 | -------------------------------------------------------------------------------- /traits/network/wifibridge/files/etc/config/network: -------------------------------------------------------------------------------- 1 | config interface 'loopback' 2 | option ifname 'lo' 3 | option proto 'static' 4 | option ipaddr '127.0.0.1' 5 | option netmask '255.0.0.0' 6 | 7 | config interface 'lan' 8 | option ifname 'eth0' 9 | option type 'bridge' 10 | option proto 'dhcp' 11 | -------------------------------------------------------------------------------- /traits/special_purpose/arduino/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="ser2net coreutils-stty kmod-usb-hid kmod-usb-acm avrdude" 2 | -------------------------------------------------------------------------------- /traits/special_purpose/arduino/README: -------------------------------------------------------------------------------- 1 | Makes an attached Arduino Uno or Mega available to the Arduino 1.5 IDE for programming and accessing the serial console over the network 2 | -------------------------------------------------------------------------------- /traits/special_purpose/arduino/files/etc/avahi/services/arduino.service: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %h 5 | 6 | _arduino._tcp 7 | 80 8 | distro_version=0.1 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /traits/special_purpose/arduino/files/etc/ser2net.conf: -------------------------------------------------------------------------------- 1 | 1234:raw:0:/dev/ttyATH0:57600 2 | -------------------------------------------------------------------------------- /traits/special_purpose/arduino/files/root/communicate-arduino.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | 3 | # Read the output of an Arduino which may be printing sensor output, 4 | # and at the same time, monitor the user's input and send it to the Arduino. 5 | # See also 6 | # http://www.arcfn.com/2009/06/arduino-sheevaplug-cool-hardware.html 7 | 8 | import sys, serial, select 9 | 10 | class Arduino() : 11 | def run(self, baud=9600) : 12 | # Port may vary, so look for it: 13 | baseports = ['/dev/ttyUSB', '/dev/ttyACM'] 14 | self.ser = None 15 | for baseport in baseports : 16 | if self.ser : break 17 | for i in xrange(0, 8) : 18 | try : 19 | port = baseport + str(i) 20 | self.ser = serial.Serial(port, baud, timeout=1) 21 | print "Opened", port 22 | break 23 | except : 24 | self.ser = None 25 | pass 26 | 27 | if not self.ser : 28 | print "Couldn't open a serial port" 29 | sys.exit(1) 30 | 31 | self.ser.flushInput() 32 | while True : 33 | # Check whether the user has typed anything: 34 | inp, outp, err = select.select([sys.stdin, self.ser], [], [], .2) 35 | # Check for user input: 36 | if sys.stdin in inp : 37 | line = sys.stdin.readline() 38 | self.ser.write(line) 39 | # check for Arduino output: 40 | if self.ser in inp : 41 | line = self.ser.readline().strip() 42 | print "Arduino:", line 43 | 44 | arduino = Arduino() 45 | try : 46 | if len(sys.argv) > 1 : 47 | print "Using", sys.argv[1], "baud" 48 | arduino.run(baud=sys.argv[1]) 49 | else : 50 | arduino.run() 51 | except serial.SerialException : 52 | print "Disconnected (Serial exception)" 53 | except IOError : 54 | print "Disconnected (I/O Error)" 55 | except KeyboardInterrupt : 56 | print "Interrupt" 57 | 58 | -------------------------------------------------------------------------------- /traits/special_purpose/arduino/files/usr/bin/merge-bootloader.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/traits/special_purpose/arduino/files/usr/bin/merge-bootloader.lua -------------------------------------------------------------------------------- /traits/special_purpose/arduino/files/usr/bin/run-avrdude: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #echo 1 > /sys/class/gpio/gpio21/value 4 | #avrdude -c linuxgpio -C /etc/avrdude.conf -p m32u4 -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xFB:m -Uflash:w:$1:i $2 5 | #echo 0 > /sys/class/gpio/gpio21/value 6 | #echo "$2" > /s2 7 | echo "" > /dev/ttyACM0 8 | 9 | lsusb|grep 0036 10 | if [ "$?"x == "0"x ];then 11 | echo LEONARDO 12 | reset-arduino /dev/ttyACM0 13 | avrdude -V -p atmega32u4 -c avr109 -b 57600 -P /dev/ttyACM0 -C /etc/avrdude.conf -U flash:w:$1 $2 14 | fi 15 | 16 | lsusb|grep 0043 17 | if [ "$?"x == "0"x ];then 18 | echo UNO 19 | avrdude -V -p m328p -c arduino -b 115200 -P /dev/ttyACM0 -C /etc/avrdude.conf -U flash:w:$1 $2 20 | fi 21 | 22 | lsusb|grep 0042 23 | if [ "$?"x == "0"x ];then 24 | echo MEGA 25 | avrdude -V -C/etc/avrdude.conf -patmega2560 -cstk500v2 -P/dev/ttyACM0 -b115200 -D -Uflash:w:$1 $2 26 | fi 27 | 28 | echo "" > /dev/ttyACM0 29 | 30 | # Enable every sketch to communicate with IDE (without the Bridge) 31 | ser2net -C 6571:raw:0:/dev/ttyACM0:9600 32 | -------------------------------------------------------------------------------- /traits/special_purpose/dali/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="coreutils-stty screen" 2 | -------------------------------------------------------------------------------- /traits/special_purpose/dali/files/etc/rc.local: -------------------------------------------------------------------------------- 1 | /usr/bin/lcd-write "arc 0 40" 2 | -------------------------------------------------------------------------------- /traits/special_purpose/dali/files/usr/bin/ACK: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | -------------------------------------------------------------------------------- /traits/special_purpose/dali/files/usr/bin/NACK: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | -------------------------------------------------------------------------------- /traits/special_purpose/dali/files/usr/bin/UNKNOWN_MODE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/traits/special_purpose/dali/files/usr/bin/UNKNOWN_MODE -------------------------------------------------------------------------------- /traits/special_purpose/dali/files/usr/bin/daliwrite: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | PORT=/dev/ttyATH0 4 | echo "$@" | delaywrite > $PORT 5 | -------------------------------------------------------------------------------- /traits/special_purpose/dali/files/usr/bin/delaywrite: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | awk 'BEGIN{FS=""}{for(i=1;i<=NF;i++){ printf $i;system("for i in $(seq 3000); do : ;done ") }}' 4 | echo 5 | -------------------------------------------------------------------------------- /traits/special_purpose/dali_web/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="uhttpd" 2 | -------------------------------------------------------------------------------- /traits/special_purpose/dali_web/files/www/cgi-bin/index.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Content-type: text/html" 4 | echo "" 5 | echo '' 6 | echo '' 7 | echo 'Form Example' 8 | echo '' 9 | echo '' 10 | 11 | echo "
"\ 12 | ''\ 13 | ''\ 14 | ''\ 15 | ''\ 16 | '
Address
Command
Parameter
' 17 | 18 | echo 'Device
'\ 19 | 'Group
'\ 20 | 'Broadcast
' 21 | 22 | echo '
'\ 23 | '
' 24 | 25 | # Make sure we have been invoked properly. 26 | 27 | if [ "$REQUEST_METHOD" != "GET" ]; then 28 | echo "
Script Error:"\ 29 | "
Usage error, cannot complete request, REQUEST_METHOD!=GET."\ 30 | "
Check your FORM declaration and be sure to use METHOD=\"GET\".
" 31 | exit 1 32 | fi 33 | 34 | # If no search arguments, exit gracefully now. 35 | 36 | if [ -z "$QUERY_STRING" ]; then 37 | exit 0 38 | else 39 | # No looping this time, just extract the data you are looking for with sed: 40 | ADDRESS=`echo "$QUERY_STRING" | sed -n 's/^.*address=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"` 41 | COMMAND=`echo "$QUERY_STRING" | sed -n 's/^.*command=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"` 42 | PARAM=`echo "$QUERY_STRING" | sed -n 's/^.*param=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"` 43 | ADDRESS_MODE=`echo "$QUERY_STRING" | sed -n 's/^.*address_mode=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"` 44 | echo "address: " $ADDRESS 45 | echo '
' 46 | echo "command: " $COMMAND 47 | echo '
' 48 | echo "paraemeter: " $PARAM 49 | echo '
' 50 | echo "address_mode: " $ADDRESS_MODE 51 | echo '
' 52 | echo $COMMAND " " $ADDRESS " " $PARAM | daliwrite 53 | fi 54 | echo '' 55 | echo '' 56 | 57 | exit 0 58 | -------------------------------------------------------------------------------- /traits/special_purpose/easybox_simulator/MANIFEST: -------------------------------------------------------------------------------- 1 | REQUIRES="core/firstrun" 2 | -------------------------------------------------------------------------------- /traits/special_purpose/easybox_simulator/README: -------------------------------------------------------------------------------- 1 | Easybox simulator calculates the easybox key for our MAC address and sets it as 2 | wpa key 3 | -------------------------------------------------------------------------------- /traits/special_purpose/easybox_simulator/files/etc/firstrun.d/11_easybox-wifi-ap: -------------------------------------------------------------------------------- 1 | wifi detect > /etc/config/wireless 2 | uci set wireless.@wifi-iface[0].network='lan' 3 | uci set wireless.@wifi-iface[0].mode='ap' 4 | uci set wireless.@wifi-iface[0].encryption='psk' 5 | uci set wireless.@wifi-iface[0].ssid='Easybox-ABCDEF' 6 | uci set wireless.@wifi-iface[0].key="$(/usr/bin/easybox_keygen $(uci get wireless.radio0.macaddr))" 7 | uci set wireless.@wifi-device[0].disabled=0 8 | uci commit wireless 9 | wifi 10 | -------------------------------------------------------------------------------- /traits/special_purpose/easybox_simulator/files/usr/bin/easybox_keygen: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # easybox_keygen.sh (c) 2012 GPLv3 4 | # 5 | # www.wotan.cc 6 | # 7 | 8 | MAC=${1?\$1 must be MAC} 9 | 10 | # Take the last 2 Bytes of the MAC-Address (0B:EC), and convert it to decimal. 11 | 12 | take5=${MAC:12} 13 | last4=${take5/:/} 14 | 15 | # Fill up to 4 places with zeros, if necessary: 16 | deci=$(printf "%04d" "0x$last4" | sed 's/.*\(....\)/\1/;s/./& /g') 17 | #echo M4: ${deci[@]} 18 | # 19 | # The digits M9 to M12 are just the last digits (9.-12.) of the MAC: 20 | hexi=$(echo ${MAC:12:5} | sed 's/://;s/./& /g') 21 | #echo 'M4 (Hex): ' ${hexi[@]} 22 | # K1 = last byte of (d0 + d1 + h2 + h3) 23 | # K2 = last byte of (h0 + h1 + d2 + d3) 24 | c1=$(printf "%d + %d + %d + %d" ${deci:0:1} ${deci:2:1} 0x${hexi:4:1} 0x${hexi:6:1}) 25 | c2=$(printf "%d + %d + %d + %d" 0x${hexi:0:1} 0x${hexi:2:1} ${deci:4:1} ${deci:6:1}) 26 | K1=$((($c1)%16)) 27 | K2=$((($c2)%16)) 28 | #printf "K1: %x\n" $K1 29 | #printf "K2: %x\n" $K2 30 | X1=$((K1^${deci:6:1})) 31 | X2=$((K1^${deci:4:1})) 32 | X3=$((K1^${deci:2:1})) 33 | Y1=$((K2^0x${hexi:2:1})) 34 | Y2=$((K2^0x${hexi:4:1})) 35 | Y3=$((K2^0x${hexi:6:1})) 36 | Z1=$((0x${hexi:4:1}^${deci:6:1})) 37 | Z2=$((0x${hexi:6:1}^${deci:4:1})) 38 | Z3=$((K1^K2)) 39 | printf "%x%x%x%x%x%x%x%x%x\n" $X1 $Y1 $Z1 $X2 $Y2 $Z2 $X3 $Y3 $Z3 | tr a-f A-F 40 | 41 | -------------------------------------------------------------------------------- /traits/special_purpose/ffmpeg/MANIFEST: -------------------------------------------------------------------------------- 1 | OVERLAY_PACKAGES="zlib libbz2 alsa-lib ffmpeg libpthread libffmpeg-full kmod-sound-core librt kmod-input-core" 2 | DEPENDS="core/firstrun" 3 | -------------------------------------------------------------------------------- /traits/special_purpose/ffmpeg/files/etc/rc.local: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/traits/special_purpose/ffmpeg/files/etc/rc.local -------------------------------------------------------------------------------- /traits/special_purpose/instacam/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="mjpg-streamer" 2 | DEPENDS="usb" 3 | -------------------------------------------------------------------------------- /traits/special_purpose/instacam/files/etc/config/mjpg-streamer: -------------------------------------------------------------------------------- 1 | config mjpg-streamer core 2 | option enabled "1" 3 | option device "/dev/video0" 4 | option resolution "1280x720" 5 | option fps "15" 6 | option www "/www/webcam" 7 | option port "80" 8 | -------------------------------------------------------------------------------- /traits/special_purpose/instacam/files/etc/config/system: -------------------------------------------------------------------------------- 1 | config system 2 | option hostname camkrebs 3 | option timezone UTC 4 | -------------------------------------------------------------------------------- /traits/special_purpose/instacam/uvc/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="kmod-video-uvc" 2 | -------------------------------------------------------------------------------- /traits/special_purpose/instacam/uvc/files/etc/config/mjpg-streamer: -------------------------------------------------------------------------------- 1 | config mjpg-streamer core 2 | option enabled "1" 3 | option device "/dev/video0" 4 | option resolution "1280x720" 5 | option fps "15" 6 | option www "/www/webcam" 7 | option port "80" 8 | -------------------------------------------------------------------------------- /traits/special_purpose/instacam/uvc/files/etc/rc.local: -------------------------------------------------------------------------------- 1 | insmod uvcvideo 2 | -------------------------------------------------------------------------------- /traits/special_purpose/instacam/uvc/yuv/files/etc/config/mjpg-streamer: -------------------------------------------------------------------------------- 1 | config mjpg-streamer core 2 | option enabled "1" 3 | option device "/dev/video0" 4 | option resolution "640x480" 5 | option fps "10" 6 | option www "/www/webcam" 7 | option port "80" 8 | -------------------------------------------------------------------------------- /traits/special_purpose/instacam/uvc/yuv/files/init.d/mjpg-streamer: -------------------------------------------------------------------------------- 1 | #!/bin/sh /etc/rc.common 2 | # Copyright (C) 2009-2012 OpenWrt.org 3 | 4 | START=50 5 | 6 | SERVICE_DAEMONIZE=1 7 | SERVICE_WRITE_PID=1 8 | 9 | PROG=/usr/bin/mjpg_streamer 10 | 11 | error() { 12 | echo "${initscript}:" "$@" 1>&2 13 | } 14 | 15 | section_enabled() { 16 | config_get_bool enabled "$1" 'enabled' 0 17 | [ $enabled -gt 0 ] 18 | } 19 | 20 | start_instance() { 21 | local s="$1" 22 | 23 | section_enabled "$s" || return 1 24 | 25 | config_get device "$s" 'device' 26 | config_get resolution "$s" 'resolution' 27 | config_get fps "$s" 'fps' 28 | config_get www "$s" 'www' 29 | config_get port "$s" 'port' 30 | 31 | [ -c "$device" ] || { 32 | error "device '$device' does not exist" 33 | return 1 34 | } 35 | 36 | # run in yuv (legacy) mode, impacts performance but at least something is happening 37 | service_start /usr/bin/mjpg_streamer --input "input_uvc.so \ 38 | --device $device --fps $fps --resolution $resolution -yuv" \ 39 | --output "output_http.so --www $www --port $port" 40 | } 41 | 42 | stop_instance() { 43 | local s="$1" 44 | 45 | section_enabled "$s" || return 1 46 | 47 | service_stop /usr/bin/mjpg_streamer 48 | } 49 | 50 | start() { 51 | config_load 'mjpg-streamer' 52 | config_foreach start_instance 'mjpg-streamer' 53 | } 54 | 55 | stop() { 56 | config_load 'mjpg-streamer' 57 | config_foreach stop_instance 'mjpg-streamer' 58 | } 59 | -------------------------------------------------------------------------------- /traits/special_purpose/instacam/zc3xx/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="kmod-video-gspca-zc3xx" 2 | -------------------------------------------------------------------------------- /traits/special_purpose/instacam/zc3xx/files/etc/config/mjpg-streamer: -------------------------------------------------------------------------------- 1 | config mjpg-streamer core 2 | option enabled "1" 3 | option device "/dev/video0" 4 | option resolution "640x480" 5 | option fps "15" 6 | option www "/www/webcam" 7 | option port "80" 8 | -------------------------------------------------------------------------------- /traits/special_purpose/nfc_login/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="libnfc-bin" 2 | REQUIRE="usb mods/vfd_lcd core" 3 | -------------------------------------------------------------------------------- /traits/special_purpose/nfc_login/README: -------------------------------------------------------------------------------- 1 | # NFC-Login 2 | The nfc-login manager provides a gateway to log into shackspace with an 3 | rfid-card. 4 | 5 | # hardware 6 | The current version uses a vfd-lcd and a mr3020 but it should work with all 7 | openwrt-enabled routers with usb. 8 | 9 | The NFC-Reader attached is: 10 | - SCM 3711 11 | 12 | # software 13 | - the router uses the rest-interface of user_suppository to check for users and 14 | logs them either in or out. 15 | 16 | pu- shing the button on the wrt-router turns on "refresh" mode which will not 17 | toggle the state of the user, but refresh the login. 18 | 19 | -------------------------------------------------------------------------------- /traits/special_purpose/nfc_login/files/etc/hotplug.d/button/buttons: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # sets nfc_refresh if button is pressed 3 | # nfc_refresh changes behavior of login-manager to not 'toggle' status but to log in again 4 | if [ "$ACTION" = "pressed" ];then 5 | all_led timer 6 | touch /tmp/nfc_refresh 7 | else 8 | all_led none 9 | rm -f /tmp/nfc_refresh 10 | fi 11 | -------------------------------------------------------------------------------- /traits/special_purpose/nfc_login/files/etc/hotplug2-common.rules: -------------------------------------------------------------------------------- 1 | $include /etc/hotplug2-common.rules 2 | 3 | SUBSYSTEM ~~ (^net$|^input$|button$|^usb$|^ieee1394$|^block$|^atm$|^zaptel$|^tty$) { 4 | exec /sbin/hotplug-call %SUBSYSTEM% 5 | } 6 | 7 | DEVICENAME == watchdog { 8 | exec /sbin/watchdog -t 5 /dev/watchdog 9 | next-event 10 | } 11 | -------------------------------------------------------------------------------- /traits/special_purpose/nfc_login/files/etc/rc.local: -------------------------------------------------------------------------------- 1 | /usr/bin/login-13mhz & 2 | /usr/bin/login-125khz & 3 | /usr/bin/lcd-fortune & 4 | -------------------------------------------------------------------------------- /traits/special_purpose/nfc_login/files/usr/bin/lcd-fortune: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | TIME=300 3 | LCD_SIZE=40 4 | set -euf 5 | get_fortune(){ 6 | fortune | sed ':a;N;$!ba;s/\n/ /g' 7 | } 8 | 9 | while sleep 1; do 10 | txt=`get_fortune` 11 | while [ ${#txt} -gt $LCD_SIZE ];do 12 | txt=`get_fortune` 13 | done 14 | lcd-write "$txt" 15 | sleep $TIME 16 | done 17 | -------------------------------------------------------------------------------- /traits/special_purpose/nfc_login/files/usr/bin/login-125khz: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | LOGIN_HOST=heidi.shack:5000 3 | # initial sleep, wait for usbfs and shit to initialize 4 | #sleep 10 5 | . /usr/bin/login-lib 6 | while : ;do 7 | cat /dev/ttyUSB0 | while read uid ; do 8 | echo "'$uid'" 9 | do_nfc_login "$uid" 10 | exit 11 | done 12 | done 13 | -------------------------------------------------------------------------------- /traits/special_purpose/nfc_login/files/usr/bin/login-13mhz: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | LOGIN_HOST=heidi.shack:5000 3 | # initial sleep, wait for usbfs and shit to initialize 4 | sleep 10 5 | . /usr/bin/login-lib 6 | while sleep 1; do 7 | uid=$(nfc-list | grep UID | cut -d: -f 2 | sed 's/ //g') 8 | do_nfc_login "$uid" 9 | done 10 | 11 | -------------------------------------------------------------------------------- /traits/special_purpose/nfc_login/files/usr/bin/login-lib: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | LOGIN_HOST=heidi.shack:5000 3 | # initial sleep, wait for usbfs and shit to initialize 4 | sleep 10 5 | do_nfc_login(){ 6 | [ -z "$uid" ] && return 7 | lcd-write "Logging in ..." 8 | online=$(wget -O- http://$LOGIN_HOST/user/$uid/online 2>/dev/null) 9 | name=$(wget -O- http://$LOGIN_HOST/user/$uid/name 2>/dev/null) 10 | 11 | if [ -z "$online" ];then 12 | led tp-link:green:lan timer 13 | lcd-write "$uid - No Such User..." 14 | elif [ -e /tmp/nfc_refresh ];then 15 | action="login" 16 | lcd-write "Refreshing $name" 17 | elif [ "$online" = "false" ];then 18 | action="login" 19 | lcd-write "Welcome $name" 20 | led tp-link:green:3g timer 21 | else 22 | lcd-write "Good Bye $name" 23 | action="logout" 24 | led tp-link:green:wlan timer 25 | fi 26 | wget -O- http://$LOGIN_HOST/user/$uid/$action &>/dev/null 27 | echo $uid $action 28 | sleep 5 29 | all_led none 30 | lcd-write "Welcome to shack, please log in!" 31 | } 32 | 33 | -------------------------------------------------------------------------------- /traits/special_purpose/pyserial/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="luci-mod-admin-full uhttpd libiwinfo-lua luci-theme-bootstrap ser2net alsa-utils madplay coreutils-stty kmod-usb-hid kmod-input-evdev triggerhappy kmod-usb-acm python pyserial nano" 2 | -------------------------------------------------------------------------------- /traits/special_purpose/pyserial/README: -------------------------------------------------------------------------------- 1 | Provides access to the serial port over the network. "Serial port" can mean a USB-to-serial converter. 2 | Contains an /root/communicate-arduino.py script that can "talk" to e.g., an Arduino. 3 | Use this as the basis for talking to your own gadgets over the serial line. 4 | -------------------------------------------------------------------------------- /traits/special_purpose/pyserial/files/etc/ser2net.conf: -------------------------------------------------------------------------------- 1 | 1234:raw:0:/dev/ttyATH0:57600 2 | -------------------------------------------------------------------------------- /traits/special_purpose/pyserial/files/root/communicate-arduino.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | 3 | # Read the output of an Arduino which may be printing sensor output, 4 | # and at the same time, monitor the user's input and send it to the Arduino. 5 | # See also 6 | # http://www.arcfn.com/2009/06/arduino-sheevaplug-cool-hardware.html 7 | 8 | import sys, serial, select 9 | 10 | class Arduino() : 11 | def run(self, baud=9600) : 12 | # Port may vary, so look for it: 13 | baseports = ['/dev/ttyUSB', '/dev/ttyACM'] 14 | self.ser = None 15 | for baseport in baseports : 16 | if self.ser : break 17 | for i in xrange(0, 8) : 18 | try : 19 | port = baseport + str(i) 20 | self.ser = serial.Serial(port, baud, timeout=1) 21 | print "Opened", port 22 | break 23 | except : 24 | self.ser = None 25 | pass 26 | 27 | if not self.ser : 28 | print "Couldn't open a serial port" 29 | sys.exit(1) 30 | 31 | self.ser.flushInput() 32 | while True : 33 | # Check whether the user has typed anything: 34 | inp, outp, err = select.select([sys.stdin, self.ser], [], [], .2) 35 | # Check for user input: 36 | if sys.stdin in inp : 37 | line = sys.stdin.readline() 38 | self.ser.write(line) 39 | # check for Arduino output: 40 | if self.ser in inp : 41 | line = self.ser.readline().strip() 42 | print "Arduino:", line 43 | 44 | arduino = Arduino() 45 | try : 46 | if len(sys.argv) > 1 : 47 | print "Using", sys.argv[1], "baud" 48 | arduino.run(baud=sys.argv[1]) 49 | else : 50 | arduino.run() 51 | except serial.SerialException : 52 | print "Disconnected (Serial exception)" 53 | except IOError : 54 | print "Disconnected (I/O Error)" 55 | except KeyboardInterrupt : 56 | print "Interrupt" 57 | 58 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/MANIFEST: -------------------------------------------------------------------------------- 1 | REQUIRE="network/open-wifi-ap" 2 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/advanced/MANIFEST: -------------------------------------------------------------------------------- 1 | OVERLAY_PACKAGES="lighttpd lighttpd-mod-cgi libopenssl zlib libpcre libpthread" 2 | DEPENDS="core/firstrun network/aircrack-overlay network/interactive-tools" 3 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/advanced/files/etc/firstrun.d/12_aircrack_monitor: -------------------------------------------------------------------------------- 1 | uci set wireless.@wifi-iface[0].mode='monitor' 2 | uci commit wireless 3 | wifi 4 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/advanced/files/etc/firstrun.d/84_enable_lighttpd: -------------------------------------------------------------------------------- 1 | /etc/init.d/lighttpd enable 2 | /etc/init.d/lighttpd start 3 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/advanced/files/etc/lighttpd/lighttpd.conf: -------------------------------------------------------------------------------- 1 | server.modules = ( 2 | "mod_cgi", 3 | ) 4 | server.error-handler-404 = "/index.html" 5 | server.network-backend = "write" 6 | server.document-root = "/www/" 7 | mimetype.assign = ( 8 | ".ogg" => "audio/ogg", 9 | ".gif" => "image/gif", 10 | ".jpg" => "image/jpeg", 11 | ".jpeg" => "image/jpeg", 12 | ".png" => "image/png", 13 | ".css" => "text/css", 14 | ".html" => "text/html", 15 | ".htm" => "text/html", 16 | ".js" => "text/javascript", 17 | ) 18 | static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) 19 | server.pid-file = "/var/run/lighttpd.pid" 20 | server.upload-dirs = ( "/tmp" ) 21 | $HTTP["url"] =~ "/cgi-bin/" { 22 | cgi.assign = ( "" => "/bin/sh" ) } 23 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/advanced/files/etc/rc.local: -------------------------------------------------------------------------------- 1 | if command -v airbase-ng >/dev/null ;then 2 | # channel 6 3 | # Rebroadcast every 30 seconds 4 | # Respond to all Probes 5 | # essid to linksys 6 | # be verbose 7 | # interface wlan0 8 | ifconfig wlan0 0.0.0.0 9 | airbase-ng -c 6 -C 30 -P wlan0 > /var/log/airbase.log & 10 | sleep 3 11 | ifconfig at0 192.168.23.1 12 | ifconfig at0 up 13 | fi 14 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/files/etc/config/dhcp: -------------------------------------------------------------------------------- 1 | config dnsmasq 2 | option domainneeded 1 3 | option boguspriv 1 4 | option filterwin2k 0 # enable for dial on demand 5 | option localise_queries 1 6 | option rebind_protection 1 # disable if upstream must serve RFC191 7 | 8 addresses 8 | option rebind_localhost 1 # enable for RBL checking and similar se 9 | rvices 10 | #list rebind_domain example.lan # whitelist RFC1918 responses for 11 | domains 12 | #option local '/lan/' 13 | #option domain 'lan' 14 | option expandhosts 1 15 | option nonegcache 0 16 | option authoritative 1 17 | option readethers 1 18 | option leasefile '/tmp/dhcp.leases' 19 | option resolvfile '/tmp/resolv.conf.auto' 20 | 21 | config dhcp wlan 22 | option interface lan 23 | option start 100 24 | option limit 150 25 | option leasetime 12h 26 | config 'domain' 27 | option name '#' 28 | option ip '192.168.23.1' 29 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/files/etc/config/firewall: -------------------------------------------------------------------------------- 1 | config defaults 2 | option syn_flood 1 3 | option input ACCEPT 4 | option output ACCEPT 5 | option forward REJECT 6 | 7 | config zone 8 | option name lan 9 | option network 'lan' 10 | option input ACCEPT 11 | option output ACCEPT 12 | option forward REJECT 13 | 14 | config zone 15 | option name wan 16 | option network 'wan' 17 | option input ACCEPT 18 | option output ACCEPT 19 | option forward REJECT 20 | option masq 1 21 | option mtu_fix 1 22 | 23 | config forwarding 24 | option src lan 25 | option dest wan 26 | 27 | # We need to accept udp packets on port 68, 28 | # see https://dev.openwrt.org/ticket/4108 29 | config rule 30 | option name Allow-DHCP-Renew 31 | option src wan 32 | option proto udp 33 | option dest_port 68 34 | option target ACCEPT 35 | option family ipv4 36 | 37 | # Allow IPv4 ping 38 | config rule 39 | option name Allow-Ping 40 | option src wan 41 | option proto icmp 42 | option icmp_type echo-request 43 | option family ipv4 44 | option target ACCEPT 45 | 46 | # Allow DHCPv6 replies 47 | # see https://dev.openwrt.org/ticket/10381 48 | config rule 49 | option name Allow-DHCPv6 50 | option src wan 51 | option proto udp 52 | option src_ip fe80::/10 53 | option src_port 547 54 | option dest_ip fe80::/10 55 | option dest_port 546 56 | option family ipv6 57 | option target ACCEPT 58 | 59 | # Allow essential incoming IPv6 ICMP traffic 60 | config rule 61 | option name Allow-ICMPv6-Input 62 | option src wan 63 | option proto icmp 64 | list icmp_type echo-request 65 | list icmp_type echo-reply 66 | list icmp_type destination-unreachable 67 | list icmp_type packet-too-big 68 | list icmp_type time-exceeded 69 | list icmp_type bad-header 70 | list icmp_type unknown-header-type 71 | list icmp_type router-solicitation 72 | list icmp_type neighbour-solicitation 73 | list icmp_type router-advertisement 74 | list icmp_type neighbour-advertisement 75 | option limit 1000/sec 76 | option family ipv6 77 | option target ACCEPT 78 | 79 | # Allow essential forwarded IPv6 ICMP traffic 80 | config rule 81 | option name Allow-ICMPv6-Forward 82 | option src wan 83 | option dest * 84 | option proto icmp 85 | list icmp_type echo-request 86 | list icmp_type echo-reply 87 | list icmp_type destination-unreachable 88 | list icmp_type packet-too-big 89 | list icmp_type time-exceeded 90 | list icmp_type bad-header 91 | list icmp_type unknown-header-type 92 | option limit 1000/sec 93 | option family ipv6 94 | option target ACCEPT 95 | 96 | config redirect 97 | option src lan 98 | option proto tcp 99 | option src_dport 80 100 | option src_ip !192.168.23.1 101 | option dest_port 80 102 | option dest_ip 192.168.23.1 103 | option target DNAT 104 | 105 | config redirect 106 | option src lan 107 | option proto tcp 108 | option src_dport 443 109 | option src_ip !192.168.23.1 110 | option dest_port 443 111 | option dest_ip 192.168.23.1 112 | option target DNAT 113 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/files/etc/config/network: -------------------------------------------------------------------------------- 1 | config interface 'loopback' 2 | option ifname 'lo' 3 | option proto 'static' 4 | option ipaddr '127.0.0.1' 5 | option netmask '255.0.0.0' 6 | 7 | config interface 'wan' 8 | option ifname 'eth0' 9 | option proto 'dhcp' 10 | 11 | config interface 'lan' 12 | option ifname 'wlan0' 13 | option proto 'static' 14 | option ipaddr 192.168.23.1 15 | option netmask 255.255.255.0 16 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/files/www/1x1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/traits/special_purpose/rickroller/files/www/1x1.gif -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/files/www/cgi-bin/rrhelper: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | RRLOG="/tmp/rrlog" 4 | 5 | if [ -n "$RRLOG" ]; then 6 | echo `awk '{print $1}' /proc/uptime` $REMOTE_ADDR:$REMOTE_PORT \'$HTTP_REFERER\' \'$HTTP_USER_AGENT\' >>"$RRLOG" 7 | fi 8 | 9 | if grep -q '\[none\]' /sys/class/leds/tp-link\:blue\:system/trigger ;then 10 | /usr/bin/led tp-link:blue:system default-on 11 | else 12 | /usr/bin/led tp-link:blue:system none 13 | 14 | fi 15 | 16 | echo "Content-type: image/gif" 17 | echo "" 18 | cat /www/1x1.gif 19 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/files/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | RickRoll'D 4 | 5 | 6 |
7 |

RickRoll'D

8 |
9 | 12 |
13 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/files/www/library/test/success.html: -------------------------------------------------------------------------------- 1 | SuccessSuccess 2 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/files/www/rick.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/traits/special_purpose/rickroller/files/www/rick.gif -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/files/www/rick.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/traits/special_purpose/rickroller/files/www/rick.ogg -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/uhttpd/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="uhttpd uhttpd-mod-tls" 2 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/uhttpd/files/etc/config/uhttpd: -------------------------------------------------------------------------------- 1 | config uhttpd main 2 | list listen_http 0.0.0.0:80 3 | list listen_https 0.0.0.0:443 4 | option home /www 5 | option rfc1918_filter 1 6 | option max_requests 3 7 | option cert /etc/uhttpd.crt 8 | option key /etc/uhttpd.key 9 | option cgi_prefix /cgi-bin 10 | option script_timeout 60 11 | option network_timeout 30 12 | option tcp_keepalive 1 13 | option error_page /index.html 14 | -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/uhttpd/files/etc/uhttpd.crt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/traits/special_purpose/rickroller/uhttpd/files/etc/uhttpd.crt -------------------------------------------------------------------------------- /traits/special_purpose/rickroller/uhttpd/files/etc/uhttpd.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/minikrebs/171cf3033eb60d5438196258f1c0cd3a717921a6/traits/special_purpose/rickroller/uhttpd/files/etc/uhttpd.key -------------------------------------------------------------------------------- /traits/usb/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="kmod-usb-core kmod-usb2" 2 | -------------------------------------------------------------------------------- /traits/usb/root_overlay/BUGS: -------------------------------------------------------------------------------- 1 | - if the usb-stick is not inserted BEFORE flashing the stick will not be 2 | initialized ( race condition) 3 | - if there is no 'real' overlay (e.g. only tmpfs overlay) inserting the stick 4 | will result in an endless reboot loop 5 | -------------------------------------------------------------------------------- /traits/usb/root_overlay/MANIFEST: -------------------------------------------------------------------------------- 1 | PACKAGES="block-mount kmod-fs-ext4 kmod-usb-storage" 2 | DEPENDS="core/firstrun" 3 | -------------------------------------------------------------------------------- /traits/usb/root_overlay/files/etc/config/fstab: -------------------------------------------------------------------------------- 1 | config global automount 2 | option from_fstab 1 3 | option anon_mount 1 4 | 5 | config global autoswap 6 | option from_fstab 1 7 | option anon_swap 0 8 | 9 | config mount 10 | option target /overlay 11 | option device /dev/sda1 12 | option fstype ext4 13 | option options rw,sync 14 | option enabled 1 15 | option enabled_fsck 0 16 | 17 | config swap 18 | option device /dev/sda2 19 | option enabled 1 20 | -------------------------------------------------------------------------------- /traits/usb/root_overlay/files/etc/firstrun.d/01_init-root-overlay: -------------------------------------------------------------------------------- 1 | if [ -e /tmp/overlay-disabled ];then 2 | #umount /overlay 3 | #/etc/init.d/fstab restart 4 | tar -C /overlay -cvf - . | tar -C /tmp/overlay-disabled -xf - 5 | /etc/init.d/fstab overlay_enable 6 | reboot # make sure that we have overlay 7 | exit 255 8 | fi 9 | -------------------------------------------------------------------------------- /traits/usb/root_overlay/install_overlay_packages/MANIFEST: -------------------------------------------------------------------------------- 1 | DEPENDS="core/firstrun" 2 | -------------------------------------------------------------------------------- /traits/usb/root_overlay/install_overlay_packages/README: -------------------------------------------------------------------------------- 1 | # install overlay packages 2 | installs all packages provided in the overlay folder /packages 3 | -------------------------------------------------------------------------------- /traits/usb/root_overlay/install_overlay_packages/files/etc/firstrun.d/02_install-overlay-packages: -------------------------------------------------------------------------------- 1 | [ ! -e /packages/ ] || opkg install /packages/* 2 | -------------------------------------------------------------------------------- /upgrade: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | IMAGE=${IMAGE:-openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin} 3 | cd $(dirname $(readlink -f $0)) 4 | if [ -z "${1:-}" ];then 5 | echo "usage: $0 ADDRESS" 6 | echo 7 | echo "ENVIRONMENT:" 8 | echo " IMAGE (currently $IMAGE)" 9 | 10 | exit 1 11 | fi 12 | 13 | IP=$1 14 | cd builder/bin/ar71xx/ 15 | 16 | if [ -e "$IMAGE" ];then 17 | scp $IMAGE root@$IP:/tmp/firmware.bin 18 | ssh root@$IP "/sbin/mtd write /tmp/firmware.bin firmware \ 19 | && /sbin/reboot" 20 | else 21 | echo "cannot find ar71xx build, aborting" 22 | exit 1 23 | fi 24 | --------------------------------------------------------------------------------