- This script will generate a bare git repo in your current user's
${HOME}
directory - it will query you for relevant info that the frontend (
cgit
) will use and dispay to users - it will make an initial README.md commit to the repository
- this is intended to be used with this project https://github.com/dweinstein/minimal-cgi-server-for-cgit
- basically this hosts
cgit
(http://git.zx2c4.com/cgit/) from a minimal python http server so you don't have to go setup lighthttp or apache.
- basically this hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
client_dir=client-$1 | |
if [ -z $1 ]; then | |
echo "must pass the client name" | |
exit | |
fi | |
if [ ! -d $1 ]; then | |
mkdir $client_dir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
../configure --enable-linux-user --python=/usr/bin/python2 --target-list="armeb-linux-user arm-linux-user" --prefix=${HOME}/local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```bash | |
$ cat - > /etc/tmpfiles.d/resolv.conf | |
f /tmp/resolv.conf 755 root root - | |
EOF | |
$ touch /tmp/resolv.conf | |
$ ln -sf /tmp/resolv.conf /etc/resolv.conf | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/dev/root / ext3 ro,relatime,user_xattr,barrier=1,nodelalloc,data=ordered 0 0 | |
ramfs /tmp ramfs defaults,noatime,mode=1777 0 0 | |
ramfs /var/cache/pacman tmpfs defaults,noatime,nosuid,nodev,size=128M 0 0 | |
ramfs /var/log ramfs defaults,noatime,mode=1777 0 0 | |
ramfs /var/tmp ramfs defaults,noatime,mode=1777 0 0 | |
ramfs /home/user/filerelay ramfs defaults,noatime,mode=1777 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __dbg_h__ | |
#define __dbg_h__ | |
#include <stdio.h> | |
#include <errno.h> | |
#include <string.h> | |
#ifdef NDEBUG | |
#define debug(M, ...) | |
#else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __dbg_h__ | |
#define __dbg_h__ | |
#include <stdio.h> | |
#include <errno.h> | |
#include <string.h> | |
// Debug tag | |
#define DTAG "DBG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--------------------------------------------------------------------------------- | |
.SUFFIXES: | |
#--------------------------------------------------------------------------------- | |
ifeq ($(strip $(NDK_DIR)),) | |
$(error "set NDK_DIR in your environment. export NDK_DIR=<path to android-ndk-r8e>") | |
endif | |
#determine OS string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.6.+' | |
} | |
} | |
apply plugin: 'android' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ -z "$1" ]; then | |
echo "usage: $(basename $0) <process>" | |
exit 1 | |
fi | |
IP=$(adb shell netcfg | grep wlan0 | awk '{print $3}' | cut -d '/' -f1) | |
if [ $? -ne 0 ]; then | |
echo "device plugged in?" | |
exit 1 |