Tuesday, September 26, 2017
Streaming log or Tail log using Notepad
Streaming log or Tail log using Notepad
1. Select the Setting -> Preferences..


- Tail for Win32
- Baretail
download file now
Tuesday, September 19, 2017
Stream your webcam to see it through a browser using YawCam
Stream your webcam to see it through a browser using YawCam
![]()
YawCam, Yet Another Webcam software, this is a free program that, unlike tons of others, will let you easy stream your webcam to see it through your browser.
Now, let�s do this. First download and install.
Let�s configure it. First you need to select the cam you want to use.
![]()
Now, go to Settings > Edit settings. Copy your public IP and port.
![]()
Now (assuming that you already forwarded the port, otherwise use this) enable the Stream option.
![]()
Go to the browser and paste the IP followed by the port, like this:
xxx.xxx.xxx.xxx:PORT
Where xxx.xxx.xxx.xxx is your public IP, and PORT is the port that the program is using.
![]()
And that�s it. You�ll receive a notification each time someone is watching you. Also, you need to keep the program running to be able to access it, so if you shut it down, no one will be able to access your camera.
download file now
Sunday, September 3, 2017
Swipe to Refresh ListView using SwipeRefreshLayout
Swipe to Refresh ListView using SwipeRefreshLayout

With android.support.v4.widget.SwipeRefreshLayout, user can refresh the contents of a view via a vertical swipe gesture. This example show how to implement Swipe-to-Refresh ListView using SwipeRefreshLayout.
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android_layout_width="match_parent"
android_layout_height="match_parent"
android_padding="16dp"
android_orientation="vertical"
tools_context="com.blogspot.android_er.androidswiperefresh.MainActivity">
<TextView
android_layout_width="wrap_content"
android_layout_height="wrap_content"
android_layout_gravity="center_horizontal"
android_autoLink="web"
android_text="http://android-er.blogspot.com/"
android_textStyle="bold" />
<android.support.v4.widget.SwipeRefreshLayout
android_id="@+id/swiperefreshlayout"
android_layout_height="match_parent"
android_layout_width="match_parent">
<ListView
android_id="@+id/swipelist"
android_layout_width="match_parent"
android_layout_height="match_parent"/>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
MainActivity.java
package com.blogspot.android_er.androidswiperefresh;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class MainActivity extends AppCompatActivity {
SwipeRefreshLayout swipeRefreshLayout;
ListView swipeList;
List<String> myList;
ListAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
swipeRefreshLayout = (SwipeRefreshLayout)findViewById(R.id.swiperefreshlayout);
swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
refresh();
}
});
swipeList = (ListView)findViewById(R.id.swipelist);
myList = new ArrayList<>();
adapter = new ArrayAdapter<String>(
this, android.R.layout.simple_list_item_1, myList);
swipeList.setAdapter(adapter);
}
private void refresh(){
//insert dummy string of current date/time
String currentDateTime = DateFormat.getDateTimeInstance().format(new Date());
myList.add(currentDateTime);
swipeList.invalidateViews();
swipeRefreshLayout.setRefreshing(false);
}
}
In this example, the ListView items is updated in SwipeRefreshLayout.OnRefreshListener(). But normally refreshing involve longtime task, such as loading from Internet. The next example show how to refresh with longtime task run in background thread.
download file now
Thursday, August 31, 2017
Stream Videos To Chromecast From The Command Line Using Stream2Chromecast
Stream Videos To Chromecast From The Command Line Using Stream2Chromecast

Stream2Chromecast is a command line Chromecast media streamer for Linux. The tool can transcode unsupported formats in real time and play them on the Chromecast.
Stream2Chromecast features:
- cast audio and video to a Chromecast device;
- pass an URL to be played on the Chromecast; the file must be streamable and a Chromecast supported format since it cant be transcoded;
- can transcode any formats not supported by the Chromecast in real time (using FFmpeg or Libav), so you dont have to convert any video manually;
- provides basic control commands: pause / unpause / stop playback (currently this only works when not transcoding), set or mute volume;
- allows specifying a device when multiple Chromecasts are connected on the same network;
- supports passing custom custom transcoder parameters to ffmpeg or avconv (thanks to this, you can set the quality, add subtitles even though Stream2Chromecast doesnt directly support it, etc.);
- supports specifying the port to use for streaming media.
For audio-only files, no metadata (artist, title, cover image, etc.) is displayed by Chromecast.
Basic Stream2Chromecast usage
Notes:
- the instructions below assume youve installed Stream2Chromecast from the main WebUpd8 PPA (see the installation instructions below). If you install Stream2Chromecast manually, youll need to use the full path to stream2chromecast.py (e.g.: "/path/to/stream2chromecast.py /path/to/my_media.mp4") for the commands below;
- the computer running Stream2Chromecast and the Chromecast device must be in the same network;
- ffmpeg or libav-tools are required for transcoding. If both are installed, ffmpeg is used by default.
stream2chromecast "/path/to/some-video.mp4"Replacing "/path/to/some-video.mp4" with the exact path and filename of the video you want to play (e.fg.: stream2chromecast "/home/andrei/Videos/VIDEO1.mp4").If thats the case for you too, you can specify the Chromecast IP by adding the "-devicename" flag followed by the Chromecast IP address, to the stream2chromecast command, like this:
stream2chromecast -devicename CHROMECAST_IP_ADDRESS "/path/to/some-video.mp4"stream2chromecast -devicename CHROMECAST_NAME "/path/to/some-video.mp4"stream2chromecast -transcode "/path/to/some-video.avi"Stream2Chromecast also supports specifying custom transcoder parameters. As an example, heres a command that passes the device IP address, transcodes the video, and adds subtitles via a custom FFmpeg parameter (for FFmpeg only):
stream2chromecast -devicename CHROMECAST_IP_ADDRESS -transcodeopts -vf subtitles="/path/to/some-video.srt" -transcode "/path/to/some-video.avi"Where CHROMECAST_IP_ADDRESS is your Chromecast IP address, "/path/to/some-video.avi" is the exact path and filename of the video you want to play on the Chromecast, and "/path/to/some-video.srt" is the exact subtitle path and filename of the subtitle file you want to use.More about the FFmpeg subtitle filters, HERE.
stream2chromecast -playurl URLWhere URL is the video file URL, e.g. "http://www.example.com/my_media.mp4".stream2chromecast -stopstream2chromecastOr visit the Stream2Chromecast GitHub page.Download / Install Stream2Chromecast
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
sudo apt install stream2chromecastReport any bugs you may find @ GitHub.
Also see: How To Stream Audio To A Chromecast Or DLNA / UPnP Device From Linux (Using pulseaudio-dnla)
Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.
download file now
Wednesday, August 9, 2017
Subscribe Google Apps users to calendars using GAM and python
Subscribe Google Apps users to calendars using GAM and python
If you want to subscribe a Google App user to calendar, you can use GAM and python. This following script my get you started:
Note: You have to have GAM up and running before running this script.
download file now