$ cd github-services
$ git remote add upstream git://github.com/<user>/<repository>.git
$ git fetch upstream
Source: http://stackoverflow.com/questions/3903817/pull-new-updates-for-forked-github-repository
$ cd github-services
$ git remote add upstream git://github.com/<user>/<repository>.git
$ git fetch upstream
ACTION!="add", GOTO="gtab_rules_end"
SUBSYSTEM!="usb|usb_device", GOTO="gtab_usb_end"
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="685e", MODE="0777" SYMLINK+="gtab"
LABEL="gtab_usb_end"
LABEL="gtab_rules_end"
This guide assumes you have a remote server, calledloghost.example.org
that you are going to use to avoid any firewall issues.
First make sure you have netcat-openbsd and NOT netcat traditional installed.sudo apt-get install netcat-openbsd
Then to ensure your system is working try the following basic netcat tip.
Now to share my logging output I run on my laptop:tail -f /var/log/syslog | ssh loghost "nc -v -l 8000"
Now to share my log with a remote collegue, he simply runs:curl http://loghost.example.org.org:8000
or http://loghost.example.org:8000 in a browser
$ adb devices
List of devices attached
???????????? no permissions
$ su
$ adb kill-server
$ adb start-server
$ adb devices
$ lsusb
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 044: ID 18d1:2d66 <- this is my mobile
Bus 002 Device 004: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
Bus 002 Device 003: ID 10d5:0001 Uni Class Technology Co., Ltd
$ su
$ vim /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", OWNER="%YOUR_USER%" GROUP="%YOUR_USER_GROUP%"
Android comes with 3 fonts (Sans, Serif, Monospace) which can be accesed using android:typeface="FONT_NAME". But most of the times you would want to use your own fonts instead of the stock ones. Android provides an "assets" folder where you can put your TTF font files and access them from within the code.
There are two ways of doing this,
1. Assign the Typeface object to TextView,
2. Paint the Typeface on screen Canvas.
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView bauhs = null,chiller=null,broadw=null,joker=null ;
Button mag=null;
setFont(bauhs, "fonts/BAUHS93.TTF", R.id.bauhs);
setFont(broadw, "fonts/BROADW.TTF", R.id.broadw);
setFont(chiller, "fonts/CHILLER.TTF", R.id.chiller);
setFont(joker, "fonts/JOKERMAN.TTF", R.id.joker);
setFont(mag, "fonts/MAGNETOB.TTF", R.id.magneto);
}
void setFont(TextView name, String path, int res)
{
name=(TextView)findViewById(res);
Typeface font = Typeface.createFromAsset(this.getAssets(), path);
name.setTypeface(font);
}
- "Typeface" is the class for handling fonts.
- The createFromAsset() method is used to specify the font path.
- font object is assigned to the TextView name
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(new FontView(this));
}
private static class FontView extends View
{
private Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
private Typeface mFace;
public FontView(Context context)
{
super(context);
// mFace = Typeface.createFromAsset(getContext().getAssets(),"fonts/MAGNETOB.TTF");
mPaint.setTextSize(34);
mPaint.setColor(Color.WHITE);
}
@Override
protected void onDraw(Canvas canvas)
{
canvas.drawColor(Color.BLACK);
drawFont(canvas, "fonts/BAUHS93.TTF", 50, "Bauhaus 93");
drawFont(canvas, "fonts/BROADW.TTF", 150, "Broadway");
drawFont(canvas, "fonts/CHILLER.TTF", 250, "Chiller");
drawFont(canvas, "fonts/JOKERMAN.TTF", 350, "Jokerman");
}
void drawFont(Canvas canvas, String path, int y, String name)
{
mFace = Typeface.createFromAsset(getContext().getAssets(),path);
mPaint.setTypeface(mFace);
canvas.drawText(name, 30, y, mPaint);
}
}
- We need to extend the View class to access and override the onDraw() method.
- A Paint object is created which allows us to set the font size and color.
- The TypeFace object mFace is assigned to mPaint which is drawn on screen using the drawText().
- drawText() takes 3 parameters, the text to be painted, its X-Y location and the Paint object.
vi ~/.ssh/config
Host svn.wn.d-o-m.org
User <svnuser>