[HOW TO] Plex and super-automation of tv torrents - Fire TV Themes and Apps

(NB: I started messing with plex thanks to Luxferro and some others on here. you know who you are. you know what you did!!!)
this is not exactly firetv related, but it sure simplified my tv-life a lot, and while none of it was difficult to figure out, a lot of the documentation was outdated and/or wrong (mainly wrt broken config files) - so I'm including mostly-not-redacted working copies of mine.
this isn't anything fancy or new or original. people have been using things like sickbeard for a while now to pipe rss to torrent engines. this is simply what works for me, to the point I hardly have to do a thing.
I don't have a fancy NAS, I have a mini-itx ubuntu 12.04 non-gui thing built from spare parts. I don't really download movies. I don't really save stuff forever. I watch tv shows and then delete them. if you do have a NAS that is costly and shiny, you still likely probably have optware and/or debian type repos that would let you add this stuff anyway.
this is basically debian/ubuntu specific, but every part should be standardly obvious to lunix-using-peoples of the world, whatever flavor.
this is going to involve 3 server parts: transmission-daemon, plexmediaserver, and flexget.
and of course some sort of plex client/frontend - cmon, for firetv still only usd0.99 on spamazon?! (or free with like plexbmc, or rarflix on roku, or plex-theatre-whatsis for win/mac/linux)
what this will give you, is a way to write down all your favorite tv shows (well, modulo what rss feed, and what country your favorite tv shows are from - I mostly only use eztv, which is mainly US, decent bit of Canada, lesser amount of UK, and tiny bit of OZ and NZ) - and the server waits around looking for new episodes, and saves them to the folder plex is serving up. fire and forget. no more browsing torrent sites and clicking on new eps. it will just be there.
transmission:
$ sudo aptitude install transmission-daemon
$ sudo /etc/init.d/transmission-daemon stop
edit and/or replace /etc/transmission-daemon/settings.json (see below)
mainly: rpc-whitelist, rpc-username, and rpc-password. but speeds, seed / queue limits, etc. whatever works for you.
$ sudo chmod ... /home/you/Videos and /home/you/tmp to 775 (ug+rwx , o+rx)
$ sudo chown ... /home/you/Videos and /home/you/tmp to debian-transmission:debian-transmission
(obvs. change folders to match how you edited settings.json)
sudo /etc/init.d/transmission-daemon start
browser plugins:
https://addons.mozilla.org/en-US/firefox/addon/add-to-transmission/
https://chrome.google.com/webstore/detail/torrent-to-transmission/fjfeeonbeiocojnpfboldpckcgcfknll
(change hostname, user and password. if you do this correctly, you'll be able to right-click any torrent or magnet link from e.g. your mac or windows laptop (or, yes, even from YOUR FIRETV) on the same network, and it will get dumped straight to the torrent engine on the linux server. not quite the point of this post, it's just a really nice bonus.)
you can also go to http://yourlocalserver:9091/transmission/web/ and mess with settings or add torrents there.
plex:
go get the deb or whatever of proper bit width - https://plex.tv/downloads
in web UI, point plex library at the same folder as you set in transmission e.g. /home/me/Videos
and edit plex web UI however you like. get myplex accounts straightened out if you don't have one. it's "free"! (NB: when something is free, you are not the consumer, you are the product.)
$ sudo nano /etc/group
add yourself's linux user, and plex, to debian-transmission group.
add debian-transmission to plex group, just in case. heck add yourself to it just in case lol.
sudo /etc/init.d/plexmediaserver restart
flexget:
https://forums.plex.tv/index.php/to...ysafe-virtualized-version-in-about-5-minutes/
config files.................
/etc/transmission-daemon/settings.json :
Code:
{
"alt-speed-down": 500,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 1,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": true,
"blocklist-url": "http://john.bitsurge.net/public/biglist.p2p.gz",
"cache-size-mb": 4,
"dht-enabled": true,
"download-dir": "/home/you/Videos",
"download-limit": 100,
"download-limit-enabled": 0,
"download-queue-enabled": true,
"download-queue-size": 1,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/home/you/tmp",
"incomplete-dir-enabled": true,
"lpd-enabled": false,
"max-peers-global": 200,
"message-level": 2,
"peer-congestion-algorithm": "",
"peer-limit-global": 240,
"peer-limit-per-torrent": 100,
"peer-port": 50736,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": true,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"prefetch-enabled": 1,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 0.0010,
"ratio-limit-enabled": true,
"rename-partial-files": true,
"rpc-authentication-required": false,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "blahblahblah",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "transmission",
"rpc-whitelist": "127.0.0.1,192.168.1.100,etc",
"rpc-whitelist-enabled": true,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 1,
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 11,
"speed-limit-up-enabled": true,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-limit": 11,
"upload-limit-enabled": true,
"upload-slots-per-torrent": 1,
"utp-enabled": true
}
.......
~/.flexget/config.yml
mandatory indentation of 2-space increments. screw it up and you will be screwed. it's a grammar parser thing, I ent gonna take the time to 'splain.
the cool part is just putting in tv shows by name under the "tv:" section. every time you do this, you should update the (already-running if you didn't break anything) flexget service by:
$ flexget daemon reload
Code:
templates:
tv:
regexp:
from: title
# ??? accept_excluding:
reject:
- subbed
- subs
- NL
- Subs
- .ESP.
- dubbed
series:
settings:
tv:
exact: yes
propers: 3 days
quality: hdtv <720p
tv:
- About a Boy
- Adventure Time
- Archer
- Big Bang Theory
- Castle 2009
- Elementary
- Fargo
- Jamaica Inn
- Legit US
- Marvels Agents of S H I E L D
- Motive
- Parks and Recreation
- Seed
- Saint George
- Sirens 2014
- Suburgatory
- Supernatural
- Surviving Jack
- The 100
- The Americans 2013
- The Mentalist
- The Middle
- The Millers
- The Mindy Project
- The Soul Man
- Vikings
transmission:
enabled: yes
host: localhost
port: 9091
username: transmission
password: blahblahblah
clean_transmission:
enabled: yes
host: localhost
port: 9091
username: transmission
password: blahblahblah
tasks:
bt-chat.com-tv:
priority: 1
rss:
url: 'http://rss.bt-chat.com/?group=3'
link:
- magneturi
template: tv
ezrss.it:
priority: 2
rss:
url: 'http://ezrss.it/feed/'
link:
- magneturi
template: tv
kickass:
priority: 10
rss:
url: 'http://kickass.to/search/ettv/?rss=1'
link:
- magneturi
template: tv
thepiratebay.org-tv:
priority: 3
rss:
url: 'http://rss.thepiratebay.org/208'
link:
- magneturi
template: tv
# verify_ssl_certificates: no
kat.ph-tv:
priority: 4
rss:
url: 'http://kat.ph/tv/?rss=1'
link:
- magneturi
template: tv
extratorrent.com-tv:
priority: 5
rss:
url: 'http://extratorrent.com/rss.xml?cid=8'
link:
- magneturi
template: tv
torrentz.eu-tv:
priority: 6
rss:
url: 'http://torrentz.eu/feed'
link:
- magneturi
template: tv
showrss.karmorra.info-tv:
priority: 12
rss:
url: 'http://showrss.karmorra.info/feeds/all.rss'
link:
- magneturi
template: tv
schedules:
# Run every task once a half hour
- tasks: '*'
interval:
minutes: 30

http://sickbeard.com/ - works with Python
https://couchpota.to/ - works with Python as well
Windows and Mac versions also...

Can I get this to work stand alone on the FTV?
Sent from my SM-G900A using XDA Premium 4 mobile app

Dragracekid said:
Can I get this to work stand alone on the FTV?
Sent from my SM-G900A using XDA Premium 4 mobile app
Click to expand...
Click to collapse
No
Sent from my Nexus 5 using Tapatalk

Well I found a way it's not the prettiest method and I'm still working it out mainly just renaming and moving the files but it works great
Sent from my SM-G900A using XDA Premium 4 mobile app

Please share how you got this to work on fire tv

You should also give https://sonarr.tv a try,
here is an article comparing the two,
http://www.htpcbeginner.com/sickbeard-alternative-nzbdrone-vs-sickbeard/

Related

Grooveshark Music Streaming For Windows Phone 7, WP7

Would it be possible with the current Marketplace restrictions to develop a streaming client for Grooveshark?
Nanogroove and GrooveFish did that on Windows Mobile, it would be great to have such a client on Windows Phone 7, i would definitely pay for such an app.
Also there is a thread going on, on the official Grooveshark forums but there is no official answer till now.
The official clients on iPhone and Android are coded really well and add a great value to the platform.
If you like Grooveshark help us put some pressure on them
http://forums.grooveshark.com/discussion/1262/Grooveshark-on-Windows-Phone-7
Ikkari said:
Would it be possible with the current Marketplace restrictions to develop a streaming client for Grooveshark?
Nanogroove and GrooveFish did that on Windows Mobile, it would be great to have such a client on Windows Phone 7, i would definitely pay for such an app.
Also there is a thread going on, on the official Grooveshark forums but there is no official answer till now.
The official clients on iPhone and Android are coded really well and add a great value to the platform.
If you like Grooveshark help us put some pressure on them
http://forums.grooveshark.com/discussion/1262/Grooveshark-on-Windows-Phone-7
Click to expand...
Click to collapse
I had a quick glance at the source for one of the Windows Mobile grooveshark applications. Looks like it just uses basic HTTP JSON requests to post/receive data, so it shouldn't really be an issue.
The only problem would be, what would you do while listening to Grooveshark? Because as soon as you want to do something else it has to stop
I know that there is no multitasking on WP7 and that only Zune can play in background. But as long you are in the app you can lock the screen an continue to listen to music, which would be totally enough for me.
Otherwise would there be a way to play the songs directly in the Zune player?
There is some kind of interaction with Zune and 3rd party apps, at least i can see some youtube videos and radio streams in my Zune player history.
Ikkari said:
Otherwise would there be a way to play the songs directly in the Zune player?
There is some kind of interaction with Zune and 3rd party apps, at least i can see some youtube videos and radio streams in my Zune player history.
Click to expand...
Click to collapse
This could well be possible. I may have a look into doing this this weekend. There are too many differences in the old .NET Compact source code for a direct port, but it should be easy enough to get a proof of concept pretty quickly (assuming the device supports the data received from Grooveshark).
but i would have thought zune pass is good enough? Then again, if youre in a country without zune pass that might be a problem (i dont have access to zune pass and am waiting )
kingjovius said:
but i would have thought zune pass is good enough? Then again, if youre in a country without zune pass that might be a problem (i dont have access to zune pass and am waiting )
Click to expand...
Click to collapse
It is, but it's also £86 for the year. Grooveshark (via the internal APIs) is free.
edit: I managed to write a quick library to query Grooveshark and pull back some results. Unfortunately the MediaElement is having some trouble playing the MP3 stream when it really should be fine.
If anybody has any ideas why this isn't working, we would basically have a fully functional Grooveshark app
Blade0rz said:
It is, but it's also £86 for the year. Grooveshark (via the internal APIs) is free.
edit: I managed to write a quick library to query Grooveshark and pull back some results. Unfortunately the MediaElement is having some trouble playing the MP3 stream when it really should be fine.
If anybody has any ideas why this isn't working, we would basically have a fully functional Grooveshark app
Click to expand...
Click to collapse
Wow, thanks. The playing fails because of AG_E_NETWORK_ERROR error. After some searching:
I found a suggestion to add &.mp3 to the end of the stream URL, but that didn't work for me.
I've also tried it on my HTC Mozart (with unplugged cable, since I've read that media streaming on the device doesn't work while it's connected to the PC), but that didn't work too.
I've tried to compare Grooveshark MP3 file/codec info with some other MP3 that I can play without any problems using MediaElement. I did it because WP7 supports only specific codecs. Unfortunately I haven't found any differences.
I've tried to extract Location header from the stream to get exact location to the file. Header doesn't exist.
Now I'm scared that it might be impossible to create Grooveshark player until we get update for WP7 API.
Anyhow, if you find anything to make it work, please let me know. I'm really interested into that.
CR1M1N4L said:
Wow, thanks. The playing fails because of AG_E_NETWORK_ERROR error. After some searching:
I found a suggestion to add &.mp3 to the end of the stream URL, but that didn't work for me.
I've also tried it on my HTC Mozart (with unplugged cable, since I've read that media streaming on the device doesn't work while it's connected to the PC), but that didn't work too.
I've tried to compare Grooveshark MP3 file/codec info with some other MP3 that I can play without any problems using MediaElement. I did it because WP7 supports only specific codecs. Unfortunately I haven't found any differences.
I've tried to extract Location header from the stream to get exact location to the file. Header doesn't exist.
Now I'm scared that it might be impossible to create Grooveshark player until we get update for WP7 API.
Anyhow, if you find anything to make it work, please let me know. I'm really interested into that.
Click to expand...
Click to collapse
I don't think it has anything to do with the encoding, but I did notice that these don't work:
http://download.linnrecords.com/test/mp3/recit.aspx (MP3)
http://download.linnrecords.com/test/wma/recit24bit.aspx (WMA, should work no matter what)
While this does:
http://wahiduddin.net/troubleshooting/testing.wma
http://wahiduddin.net/troubleshooting/testing.mp3
Something to do with the way the content is served. Maybe the web server is adding extra headers before sending the WMA/MP3 headers?
Blade0rz said:
I don't think it has anything to do with the encoding, but I did notice that these don't work:
http://download.linnrecords.com/test/mp3/recit.aspx (MP3)
http://download.linnrecords.com/test/wma/recit24bit.aspx (WMA, should work no matter what)
While this does:
http://wahiduddin.net/troubleshooting/testing.wma
http://wahiduddin.net/troubleshooting/testing.mp3
Something to do with the way the content is served.
Click to expand...
Click to collapse
There's no surprise two first ones aren't working. Even the browser tries to download them instead of streaming, while the next two ones streams in the browser. The GrooveShark urls also streams in the browser (like the second ones in your post), therefore you shouldn't take first to links in your post as an example since they are forced to be downloaded.
Maybe the web server is adding extra headers before sending the WMA/MP3 headers?
Click to expand...
Click to collapse
As for headers, here's GrooveShark stream response headers:
Code:
HTTP/1.1 206 Partial Content
X-Powered-By: PHP/5.1.6
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: Sat, 26 Jul 1997 05:00:00 GMT
Content-Type: audio/mpeg
Etag: "403963618"
Accept-Ranges: bytes
Last-Modified: Wed, 29 Sep 2010 11:57:11 GMT
Content-Range: bytes 0-4617321/4617322
Content-Length: 4617322
Connection: close
Date: Sun, 02 Jan 2011 14:00:40 GMT
Server: lighttpd/1.5.0
And this is some other MP3 stream that WP7 loads correctly:
Code:
HTTP/1.1 206 Partial Content
Date: Sun, 02 Jan 2011 14:02:03 GMT
Server: Apache
Last-Modified: Sun, 07 Feb 2010 18:06:12 GMT
Etag: "443d05d-15180-4b6f0114"
Accept-Ranges: bytes
Content-Length: 86400
Content-Range: bytes 0-86399/86400
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: audio/mpeg
There are some extra headers, but I don't think that it should make any difference.
EDITED:
Just right after posting those headers here and reading my post I've noticed this header in GrooveShark's response:
Code:
Connection: close
I think that might cause the problem.
CR1M1N4L said:
EDITED:
Just right after posting those headers here and reading my post I've noticed this header in GrooveShark's response:
Code:
Connection: close
I think that might cause the problem.
Click to expand...
Click to collapse
I was thinking the same thing, probably causing the Stream to read all in one go. Problem here is that Silverlight restricts pretty much all HTTP headers so we can't override them
I did manage to get the stream to play by writing it to the Isolated Storage, then passing it onto the MediaElement:
Code:
void gf_CompleteStream(object sender, EventArgs e)
{
GroovesharkAPI.GroovesharkFunctionsEventArgs<GroovesharkAPI.ResponseObjects.Stream> gea =
e as GroovesharkAPI.GroovesharkFunctionsEventArgs<GroovesharkAPI.ResponseObjects.Stream>;
WebClient wc = new WebClient();
wc.OpenReadCompleted += new OpenReadCompletedEventHandler(wc_OpenReadCompleted);
wc.OpenReadAsync(new Uri(gea.ResponseObject.result.url));
this.txtStatus.Text = "Downloading MP3";
}
void wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
using (var store = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication())
{
if (store.FileExists("output.mp3"))
{
store.DeleteFile("output.mp3");
}
using (var fs = new System.IO.IsolatedStorage.IsolatedStorageFileStream("output.mp3", System.IO.FileMode.Create, store))
{
byte[] bytesInStream = new byte[e.Result.Length];
e.Result.Read(bytesInStream, 0, (int)bytesInStream.Length);
fs.Write(bytesInStream, 0, bytesInStream.Length);
fs.Flush();
this.mediaElement1.SetSource(fs);
}
}
}
So it's definitely something to do with the way MediaElement handles the stream from the server. Another oddity in the API DLL is that the "getStreamUrlEx" method is returning the wrong song!
Blade0rz said:
I was thinking the same thing, probably causing the Stream to read all in one go. Problem here is that Silverlight restricts pretty much all HTTP headers so we can't override them
I did manage to get the stream to play by writing it to the Isolated Storage, then passing it onto the MediaElement:
Code:
void gf_CompleteStream(object sender, EventArgs e)
{
GroovesharkAPI.GroovesharkFunctionsEventArgs<GroovesharkAPI.ResponseObjects.Stream> gea =
e as GroovesharkAPI.GroovesharkFunctionsEventArgs<GroovesharkAPI.ResponseObjects.Stream>;
WebClient wc = new WebClient();
wc.OpenReadCompleted += new OpenReadCompletedEventHandler(wc_OpenReadCompleted);
wc.OpenReadAsync(new Uri(gea.ResponseObject.result.url));
this.txtStatus.Text = "Downloading MP3";
}
void wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
using (var store = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication())
{
if (store.FileExists("output.mp3"))
{
store.DeleteFile("output.mp3");
}
using (var fs = new System.IO.IsolatedStorage.IsolatedStorageFileStream("output.mp3", System.IO.FileMode.Create, store))
{
byte[] bytesInStream = new byte[e.Result.Length];
e.Result.Read(bytesInStream, 0, (int)bytesInStream.Length);
fs.Write(bytesInStream, 0, bytesInStream.Length);
fs.Flush();
this.mediaElement1.SetSource(fs);
}
}
}
So it's definitely something to do with the way MediaElement handles the stream from the server. Another oddity in the API DLL is that the "getStreamUrlEx" method is returning the wrong song!
Click to expand...
Click to collapse
Could you check this app source? Maybe there's some problem with GrooveShark API in your test app.
I can suggest a little tricky solution (I've used to "hack" Google's TTS API). Yes, MediaElement can't play mp3 stream not ended by extension ".mp3". Not sophisticated design of course...
But you may create and use an URL redirector! You just need your own site running Apache with URL rewrite module installed.
Create directory, for example, "stream" and create inside a file ".htaccess" with content:
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^.mp3$ http://download.linnrecords.com/test/mp3/recit.aspx[NE]
Click to expand...
Click to collapse
So, you should use the following url for ME Source property:
http://yoursite.com/streaming/file.mp3
MediaElement will determine the opened stream type as mp3 but real data will came from recit.aspx.
It's just an example; your implementation may differ. But I hope you've got my point.
sensboston said:
I can suggest a little tricky solution (I've used to "hack" Google's TTS API). Yes, MediaElement can't play mp3 stream not ended by extension ".mp3". Not sophisticated design of course...
But you may create and use an URL redirector! You just need your own site running Apache with URL rewrite module installed.
Create directory, for example, "stream" and create inside a file ".htaccess" with content:
So, you should use the following url for ME Source property:
http://yoursite.com/streaming/file.mp3
MediaElement will determine the opened stream type as mp3 but real data will came from recit.aspx.
It's just an example; your implementation may differ. But I hope you've got my point.
Click to expand...
Click to collapse
Hey, thank you! It actually did the trick. In a day or two I'll try to release fully working player.
CR1M1N4L said:
Hey, thank you! It actually did the trick. In a day or two I'll try to release fully working player.
Click to expand...
Click to collapse
Damm that would be awesome
kingjovius said:
but i would have thought zune pass is good enough? Then again, if youre in a country without zune pass that might be a problem (i dont have access to zune pass and am waiting )
Click to expand...
Click to collapse
Thats the problem with Zune Pass in most countries it's not available right now. Also, Blade0rz mentioned it already earlier, Zune Pass is not that cheap.
I like Grooveshark better because i can use it with almost any platform, Win, Linux, MacOS, iOS, Android and maybe in near future with WP7 ^^
And you can upload your songs if Grooveshark don't have them, which i use a lot because I'm not listening to common music that much.
CR1M1N4L said:
Hey, thank you! It actually did the trick. In a day or two I'll try to release fully working player.
Click to expand...
Click to collapse
That indeed would be awesome
CR1M1N4L said:
Hey, thank you! It actually did the trick. In a day or two I'll try to release fully working player.
Click to expand...
Click to collapse
Great! Looking forward to this
FYI, the "random song" thing seems to have fixed itself today. URLs are coming back just fine, so there shouldn't be any barriers any more
Sorry guys, but I guess I won't be able to do the app because of lack of time. Anyhow, if anyone have enough time and skills to do the app, there's some stuff that might come in handy:
.htaccess file:
Code:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*?)/(.*?).mp3$ http://$1.grooveshark.com/stream.php?streamKey=$2 [NC]
Stream URL:
Yes, I know, there are more nicer ways to do that. This is just to understand how to do the redirect and use your host as a proxy:
Code:
var newUrl = "http://www.yourhost.net/groove/" + url.Host.Replace(".grooveshark.com", "") + "/" + url.Query.Replace("?streamKey=", "") + ".mp3";
Refactored API:
I've made some refactoring to the API (comments, split classes, code optimizations etc). You can download refactored API (source + binaries) here. I hope Blade0rz won't be mind.
Suggestions:
I was planning to make the app to look very similar to Zune player on WP7. I would make a panorama app. In the first page, for starters, "Search", "Radio" and "Playlists" menu items could be added. The second page would display history (album cover) and would open "Now playing" page when clicked. In the third page, by using WP7 toolkit top/new songs/albums could be should if that is possible by the API.
Notes:
Please be aware that it's unlikely that that sort of GrooveShark app would make it to the MarketPlace since using this API is against GrooveShark TOS, therefore it's a great chance they will comply.
CR1M1N4L said:
Sorry guys, but I guess I won't be able to do the app because of lack of time. Anyhow, if anyone have enough time and skills to do the app, there's some stuff that might come in handy:
Click to expand...
Click to collapse
I've been in touch with CR1M1N4L and I will be taking up this project, so thanks to him for refactoring some shoddy, 5 minute coding & helping with fixing the streaming issues
Please be aware that it's unlikely that that sort of GrooveShark app would make it to the MarketPlace since using this API is against GrooveShark TOS, therefore it's a great chance they will comply
Click to expand...
Click to collapse
Technically we should be OK as long as we don't use the Grooveshark trademarks (name/logo), but MS aren't likely to be very co-operative there, so everyone should be prepared to sideload this project! Shouldn't be a problem for anyone though given the relative ease of using Chevron.
Here is even a chance to make some money.
mmunkel said:
We'd like to develop for Windows Phone 7, but we don't yet have a developer...if any of you guys think you've got what it takes, e-mail [email protected] and show us what you've got.
Click to expand...
Click to collapse
Last post on the official Grooveshark forums:
(But I'm not sure if this an official statement, so could be just a joke)
http://forums.grooveshark.com/discussion/1262/Grooveshark-on-Windows-Phone-7
On his profile page it says Roles: VIP
So it's definitely worth a shot.

The DllImport Project (+/also C++ Wrapper) [Mango Support]

The DllImport Project
This project is part "Real DllImport" and also not the same time. It has limited DllImport to only types "void();" (well isn't that DllImport )
Other CORE functions that require multiple [IN] or/and [OUT] are to complex for the code right now (there are so many possibilities).
Terms of use, using the code (free to use, under my name "fiinix00 @ XDA"~ in app)
As posted to JaxBot
Well thanks for asking, this project is free for everyone, the one purpose it was made for.
The only thing i needed back is my name (fiinix @ XDA) included in whose projects (external) that take use of my code base. There is no licence or something (GNU e.g.), it just make people mad and confused.
So feel free to take advantage of the code whenever you want, just remember, i want my name on it. =D
Click to expand...
Click to collapse
UPDATE @ (2011y-03m-26d - 23:08)
Ohyeah, i can control zune from my application (Resume, Stop, Pause, NextSong, PrevSong, ShutdownZune, StartZune, ... to come)
Turn on/off radio remote from code. (DAMN, the radio begins to play without "No antenna" but no sound, plugin again and it sounds :/)
UPDATE @ (2011-03-27 - 14:35)
- Set clipboard (lol, doesent even have NODO): DllImportCaller.lib.Clipboard_SET("Hello");
- Get clipboard: DllImportCaller.lib.Clipboard_GET(ref [string]);
- Enchanted: Phone.Clipboard.Value { get { ... } set { ... } }
- Basic calls against void without arguments: DllImportCaller.lib.VoidCall( [DLL] , [Method] );
- API for verifying method existence: DllImportCaller.NativeMethodExists( [DLL] , [Method] );
- Raw API for controlling vibrator (unlimited "on", also continues to vibrate on exit, dont forget to turn off ): Phone.Vibrator. { Vibrate(), Stop() }
Source code + test XAP updated (2011-03-27-17:38) (Clipboard GET; is corrupt)
HELLO THERE TASKMANAGER!!
(I can now enumerate the running processes on the phone )
Proof: http://moitox.com/WP7tskMngr.png
Hook to keyboard, for some reason it only show interest in the "Search" button.
Documentation of proc:
[WP7Process].{ CreationTime, ExitTime, KernelTime, UserTime, <-UpdateTimes(), Kill(exitCode), { PROCESSENTRY32 RAW } }
^ for "currentProcess.Kill()" use "Phone.TaskManager.GentlyExitCurrentProcess();" the Kill(exitCode) KILLS
WP7Process[] = Phone.TaskManager.Named("taskhost");
WP7Process = Phone.TaskManager.CurrentProcess();
Documentation of network
- ConnectionType { Unk0, Unk1, Unk2, Connected, Unk3 ... }
- ConnectionType = Phone.Network.GetWirlessState;
Phone.KeyboardHook.IsKeyDown(int key)
> Search = 124 (lol)
Misc finds
DllImportCaller.NativeMethodExists("urlmon", "IsIntranetAvailable");
DllImportCaller.NativeMethodExists("urlmon", "ObtainUserAgentString");
- Code updated! (2011-03-28-22:12)
Added "Phone.DEP", dep is a wrapper against info stored in "Microsoft.Phone.Info.DeviceExtendedProperties"
Full "TaskHost.exe" support
HostInformation = Phone.TaskHost.GetCurrenHostInfo();
HostInformation {
fDehydrating = 0,
fRehydrated = 0,
hHostWnd = -25821178 /* This silverlight managed window (host window) */
szAppDataFolder = "\\Applications\\Data\\8DC5214E-88FA-4C2D-A379-2CD74FE24B72\\Data"
szAppInstallFolder = "\\Applications\\Install\\8DC5214E-88FA-4C2D-A379-2CD74FE24B72\\Install"
szAppIsolatedStorePath = "\\Applications\\Data\\8DC5214E-88FA-4C2D-A379-2CD74FE24B72\\Data\\IsolatedStore"
szProductId = "{8DC5214E-88FA-4C2D-A379-2CD74FE24B72}"
szTaskPage = "MainPage.xaml" /* Current page? */
szUri = "app://8DC5214E-88FA-4C2D-A379-2CD74FE24B72/_default"
ullLastInstanceId = 39 /* fully retarded property? */
}
Code updated! (2011-03-29-23:25)
new Phone functionality
Phone.OS.{ Shutdown(ewxCode) } /* 1.0.2 can still call it with "DllImportCaller.lib.ShutdownOS" (failed tho on mine in 1.0.2) */
Added "GetLastError7" (C++ ::GetLastError()) for better C# side error handling.
Code updated! (2011-04-03-12:37)
Code updated! (2011-04-04-21:48)
- App launcher code!!
- Enchanted IO support
- 1.0.6!
Code updated! (2011-04-05-22:08)
- Enchanted task support
- Console7.Title { get; set; } etc.
Code updated! (2011-04-08-00:03)
- Stable%: 97 :/
- Battery support (see battery info (CORE only))
- Phone.Sound { MasterVolume!! { get; set; }, etc } (controlling phone master volume over all processes)
- Phone.OS.Kernel.ResetDevice(); (instant stops kernel, instant shutdown, not recommended!)
Code updated! (2011-04-09-22:39)
- Enchanted "Phone.Battery" class
- Phone.TaskManager.+GetCurrentProcessId
- WiFi Controll! (On/Off) (from code!)
- Bluetooth Controll! (On/Off) (from code here toe!)
- Phone.OS.+GetSystemStartupItems(),+GetDesktopWindowHandle()
- New class "Phone.Search."+SearchFor,+OpenSearch,+BindSearchButtonToPage (FAILS)
- New class "Phone.XboxLive"+GetIsXboxLiveEnable,+GetIsSignedIn
- Yep: 1.0.9!
Code updated! (2011-04-17-22:01) //damn, not update in 8 days~
- Phone.OS.OSLanguage { SubLanguageID, PrimaryLanguageID }
- Phone.WP7Process.+ CurrentProcessID (int),+GetCurrentProcess() returns guaranteed the right taskhost @class_WP7Process
- Improved Phone.OS.Memory
- + Extra i don't remember (8 days)
Code updated! (2011-05-22-21:25)
- 1.2.1 (because 1.2 methods was commented out to set things right (less crash))
- HUGE improvements
- Removed unneeded **** to speed things up
- Screenshot 161 ms per capture (non-save-to-gallery) =D
- =D
Mango support added(2011-10-26-19:30)
- yep, "ATL" Mango compiled. I have not yet tested to run it on a NoDo.
- Trying to implement a ASM virtual machine; example:
Code:
[ASMMethod(Dll = "coredll", EntryPoint = "GetLastError")]
public delegate int GetLastError();
var last = ASMGenerator.GenerateDelegateFor<GetLastError>();
int code = last();
Custom tile support added(2011-11-07-23:08)
- Custom core tiles ftw!
[/CODE]
Source: Attatchment
-Compile VS2008 folder with C++ compiler from WM6 SDK
-Windows Mobile SDK 6 PRO
-Visual Studio 2010 (+ WP7 Silverlight SDK)
Test-app: Attatchment
-Deploy
-No need anymore to do a initialize button call, automatic called on first use in code "DllImportcaller.lib.cctor" by JIT (Net Framework just in time).
-Do some tests from the scrolling list. (due there are more CORE back-code API's than buttons, all tests can not be tested).
OLDER VERSIONS WILL BE DEPRECATED AND WILL BE REPLACED BY NEWER, MAX ATTACHMENTS IS 8.
fiinix said:
Searched for dllimport but did not found what i was searching for; so i need to ask about if it is possible to do a dllimport with interop in meta?
Because if not, i think i have found something quite the same without dllimport.
Click to expand...
Click to collapse
We can't p/invoke, but only use COM interfaces to interop with native code. What did you find?
Im trying the method, of c++ calling the calls for me.
In c++ i call "HMODULE dll = LoadLibrary("MyDLL.dll");" to get the native kerner32.dll e.g.
Then call "Dword addr = GetProcAddress(dll, "MyMethod");"
Code:
typedef HRESULT (STDAPICALLTYPE * LPFNBOX) (void);
C# -> COM (LoadLibrary e.g.) ->
return dll addr -> return to C#
C# -> COM -> LPFNBOX * val = (LPFNBOX)GetProcAddress(addr, "method"); ->
return val(); ->
return to C#
May work with some privileges bypass, not tested. (^ Not programmer, skip it)
Step 1 of 2 "LoadLibrary7" S_OK (success!)
int result;
var hr = lib.MessageBox7("lpText", "lpCaption", MB.MB_OK, out result);
And: It shows a native msg box
It ** worked!
var t = DllImportCaller.Call<string, string>("coredll.dll", "CeRunAppAtEvent", "emptyArgs");
LoadLibrary7( .. "coredll.dll" .. ) @ -1304248592
GetProcAddress7( .. CeRunAppAtEvent" .. ) @ 1105512120
Now just "box" and call it
Sounds sweet. Any code to share?
kuerbis2 said:
Sounds sweet. Any code to share?
Click to expand...
Click to collapse
Well, last step now is to box it. Due "Compact Framework 3.7" there is no "Marshal.GetDelegateForFunctionPointer". But iw found something quite common.
Code, yes. (if i succeed)
Well, there we go. I did just shut down the phone with code (phone sided code)!
DllImportCaller.lib.ShutdownOS();
nevermind.
So you wrapped LoadLibrary/GetProcAddress via C++/COM, how is this any different than what we have now? It's easier to simply write C++ code and provide a calling mechanism. (Which is what we're doing.)
WithinRafael said:
So you wrapped LoadLibrary/GetProcAddress via C++/COM, how is this any different than what we have now? It's easier to simply write C++ code and provide a calling mechanism. (Which is what we're doing.)
Click to expand...
Click to collapse
The use of dllimports (gdiplus.dll located in "\Windows\" for example) in C# code. And you dont need to know c++/programmer to call c++ methods anymore.
The last annoying, to get that IntPtr (native) to become a managed method... (it is possible). Anyways its going great, i'll continue tomorrow
Hey any code on this?
Flow WP7 said:
Hey any code on this?
Click to expand...
Click to collapse
Very soon (today @ Central European Time, dinner). Due im currently at work. The preview will not do all the way down to dllimport because the last thing for me is to figure out how to call the native IntPtr from c# with c# arguments.
Glad you guys are asking
Yeah, would be really cool if thats possible, then it would be possible todo everything over mscoree.dll, i guess?!
I found something intresting myself yesterday, the mscorlib.dll and System.dll on the phone are different from the ones in the sdk. (They contain a lot more stuff) Also the the mscorlib contains DllImports for almost everything.
If there is some way to get an internal class that would be also a great alternative...
Flow WP7 said:
Yeah, would be really cool if thats possible, then it would be possible todo everything over mscoree.dll, i guess?!
I found something intresting myself yesterday, the mscorlib.dll and System.dll on the phone are different from the ones in the sdk. (They contain a lot more stuff) Also the the mscorlib contains DllImports for almost everything.
If there is some way to get an internal class that would be also a great alternative...
Click to expand...
Click to collapse
Internal's -> typeof(CLASS).GetMethod( ... ).Invoke( ... ). Works perfect with </Interop> in manifest. Else "MethodAccessException".
And all those dllimports in mscore, plenty of them, most doing calls to mscoree
Goad is to do "DllImportCaller.Call( DLL, METHOD, ARGS )"~
I just tried this:
Type type = Type.GetType("System.PInvoke.PAL");
Type type1 = Type.GetType("System.Host.HostNative+FIND_DATA");
object createInstance = Activator.CreateInstance(type1);
And this results into MethodAccessException
I have a WPInteropManifest.xml, so what do you mean by:
Works perfect with </Interop> in manifest. Else "MethodAccessException".
Click to expand...
Click to collapse
regards,
Flow
Flow WP7 said:
I just tried this:
Type type = Type.GetType("System.PInvoke.PAL");
Type type1 = Type.GetType("System.Host.HostNative+FIND_DATA");
object createInstance = Activator.CreateInstance(type1);
And this results into MethodAccessException
I have a WPInteropManifest.xml, so what do you mean by:
regards,
Flow
Click to expand...
Click to collapse
This is going kind of off topic. Stay to topic.
Anyways, Activaror.CreateInstance cannot create internal constructots, you need TYPE.GetConstructor( ... ).Invoke. Check visibility of ctor.
fiinix said:
The last annoying, to get that IntPtr (native) to become a managed method... (it is possible). Anyways its going great, i'll continue tomorrow
Click to expand...
Click to collapse
Having some difficulties (its killing itself on call) :/ Ill publish as fast as possible.

[Q] WebView - Set URL from settings tab?!

I'm currently (trying) to make a app that simply displays a webpage.. However, I want to be able in the settings for the user to select the URL & port.. But finding it hard to do!
Basically, If the user presses the options button all I need is a box with two options..
IP:
Port:
So it'll look something like:
IP Address:
[ INPUT BOX HERE FOR IP ADDRESS (@IP_ID) ]
Port Number:
[ INPUT BOX HERE FOR Port ID (@Port_ID) ]
Then within the code for the webview..
The code is:
Code:
webView = (WebView) findViewById(R.id.webView1);
startWebView([COLOR="red"]MY DEFAULT URL[/COLOR]);
All I basically need to do is change the IP & Port to what the user puts into the settings.. So..
Code:
startWebView([COLOR="red"]@IP_ID[/COLOR] : [COLOR="red"]@Port_ID[/COLOR])
I'm pretty new to making app's but have previously done PHP, C++ & MySQL ect.. But this has just thrown me off a little..
I've asked a couple of other places but they just direct my to the android dev page which throws me off even more

Fire Stick Hidden - 711 Page (v 0.1)

I have a Fire Stick and basic remote. I "butt dialed" the remote by sitting on it. When I looked at my TV monitor there was a diagnostic screen I never saw before on the display. The diagnostic screen information was:
711 Page (v 0.1)
1 ******** Device ********
1.1 DSN : (numbers...)
1.2 Version : 54.5.5.0_user_550145120
1.4 Time : Jul 18, 2016 1:10:13 AM
1.7 TV model : (some info on my display)
1.8 TV resolution : 640x480p @ 60 Hz
3 ******** Connection ********
3.2 AP : (info on my access point)
3.2.1 Signal : -35
3.2.2 Captive : No(0)
3.2.5 Noise : -92
3.3 Scan : 3
4 ******** Interface ********
4.1 IP : 192.168.1.161
5 ******** Internet ********
5.3 Internet reachable : Yes(1)
5.5 Amazon servers reachable: Yes(1)
7 ********Channels ********
7.1 Current channel : 10
7.2 Recommended channels
2.4 Ghz: 9
5.0 Ghz: 48
8 ******** Fire HD10 Keyboard ********
8.1 Connection status : -1
At the bottom were three buttons: [Reconnect] [Reboot] [More]
The [More] button brought up a new dialog window, with a spinner. After spinning for about 2 minutes the following displayed:
More
Throughput: 37.78 +/- 24.99 Mbps
So I was wondering if someone could figure out what buttons on the remote cause these dialogs to display?
Maybe a developer using "strings" on some internal libraries tricks or other?
Thank you. Otherwise, FYI only.
Bob Smith42 said:
I have a Fire Stick and basic remote. I "butt dialed" the remote by sitting on it. When I looked at my TV monitor there was a diagnostic screen I never saw before on the display. The diagnostic screen information was:
711 Page (v 0.1)
1 ******** Device ********
1.1 DSN : (numbers...)
1.2 Version : 54.5.5.0_user_550145120
1.4 Time : Jul 18, 2016 1:10:13 AM
1.7 TV model : (some info on my display)
1.8 TV resolution : 640x480p @ 60 Hz
3 ******** Connection ********
3.2 AP : (info on my access point)
3.2.1 Signal : -35
3.2.2 Captive : No(0)
3.2.5 Noise : -92
3.3 Scan : 3
4 ******** Interface ********
4.1 IP : 192.168.1.161
5 ******** Internet ********
5.3 Internet reachable : Yes(1)
5.5 Amazon servers reachable: Yes(1)
7 ********Channels ********
7.1 Current channel : 10
7.2 Recommended channels
2.4 Ghz: 9
5.0 Ghz: 48
8 ******** Fire HD10 Keyboard ********
8.1 Connection status : -1
At the bottom were three buttons: [Reconnect] [Reboot] [More]
The [More] button brought up a new dialog window, with a spinner. After spinning for about 2 minutes the following displayed:
More
Throughput: 37.78 +/- 24.99 Mbps
So I was wondering if someone could figure out what buttons on the remote cause these dialogs to display?
Maybe a developer using "strings" on some internal libraries tricks or other?
Thank you. Otherwise, FYI only.
Click to expand...
Click to collapse
I think what you stumbled upon was system xray? Hold the down and select for 5 seconds then hit the menu button.
KLit75 said:
I think what you stumbled upon was system xray? Hold the down and select for 5 seconds then hit the menu button.
Click to expand...
Click to collapse
It is *not* actually xray. Your suggestion works for another hidden dialog. On my fire stick, standard remote, your suggestion brings up a dialog to turn on/off xray. The info on dialog:
Title: System Status Monitor
System X-Ray [OFF | ON]
Launch Network Advisor
The Launch Network Advisor displays another dialog with network info.
But, your suggestion helped. By mistake (misread your suggestion) I pressed the down and home for 5 seconds, then hit the menu button. This brings up the hidden 711 Page. So, it is sorted!
Maybe I should buy a lottery ticket soon. LOL
Many thanks!
----------
UPDATE: So now it does *not* work. But, I did bring up the 711 Page dialog three times using the info posted. Suggestions welcome.
u mean h t t p : / / i67.tinypic.com/2zpkt1w.jpg ? Is not exactly "butt dialed"
It's something related to down /up pressing and menu button pressing. I can be run without xray .
nicefile said:
u mean h t t p : / / i67.tinypic.com/2zpkt1w.jpg ? Is not exactly "butt dialed"
It's something related to down /up pressing and menu button pressing. I can be run without xray .
Click to expand...
Click to collapse
That is it. Thanks for the picture.
I have not been able to show it again after a many tests.
You might want to block the 54_5_3_7_user_(number), where (number) is unique to our Amazon accounts. Kinda wish I'd blocked (number) out on my post. FYI
I got Rewind + Left then Menu to open the 711 page.
runio said:
I got Rewind + Left then Menu to open the 711 page.
Click to expand...
Click to collapse
Yes. That is it! Thank you. Confirmed.
For more interesting reading google "Kindle 3 and 411/711" and mobileread.com forums. Quote:
"
I only explained how to enter the numbers in as that was the question posed by geeksquadofun in their original post. The page which geeksquadofun is referring to should have told them where exactly to type it and it was a reasonable assumption to make as geeksquadofun was not on the home screen due to the fact that Sym key didn't function. The Sym key would have worked if geeksquadofun was at the Home screen.
311 = Change GSM provider so this only exists on the Kindle 2 International and newer as older Kindles weren't GSM. It doesn't exist at all on a Kindle 3 WiFi. Don't mess with this unless you know what you're doing or at least remember to change it back. If you select the wrong provider then the 3G Whispernet connection no longer works until you set it back.
411 = Kindle version numbers. Only 1 page.
611 = Cell modem details. Around 6 pages. The details automatically refresh so you may find it bounces around a bit and the paging is unreliable. You'll notice that the cell modem is always enabled and connected even if WiFi is active. On the Kindle 3 WiFi unit, this page is still there but empty.
711 = WiFi details so only Kindle 3 units have this currently. 2 pages. You'll see signal strength, channel, what SSID you're connected to and IP address details.
"
Not specifically for the Kindle Fire Stick, but apparently these 711 Pages have some common ground on Kindle devices.
Bob Smith42 said:
That is it. Thanks for the picture.
I have not been able to show it again after a many tests.
You might want to block the 54_5_3_7_user_(number), where (number) is unique to our Amazon accounts. Kinda wish I'd blocked (number) out on my post. FYI
Click to expand...
Click to collapse
Once seen can't be unseen ....
nicefile said:
Once seen can't be unseen ....
Click to expand...
Click to collapse
No. That number has nothing to do with your account. It's a software version...

[Bash/fish] CLI Productivity Config

Background
Mostly inspired by DOS and the 1200+ batch files I was gifted in early 2017, CLI Productivity Config is a project to port the concepts over to the Linux shell (whether it be for Bash or fish shell). This project has been developed and tested on Debian 9 (Stretch), but should also work great on Ubuntu 17 (Zesty Zapus, Artful Aardvark).
If using the Ubuntu Xenial LTS or any derivative (e.g. Linux Mint 18.x), you may find that the columnar expression for the 'dirw' command is not aligned. This is due to a package (BSDMainUtils) being ever-so-slightly too old (9.0.6) for the required feature to appropriately handle escaped characters (9.0.7). Since Ubuntu and the derivatives are currently catching up to a newer version (first LTS being Bionic Beaver), instead of making anyone face an upgrade path, I built from source an updated (9.0.7) package, for both i386 and amd64 architectures for Ubuntu 18.04 and derivatives. Or you can make your own update with 'debuild'.
Installation
Getting these tools is relatively easy. The method used below assumes the 'git' package is installed. If not (and don't care to install it either) you can download the package directly.
Code:
git clone https://github.com/joelmaxuel/cli-productivity-config.git
cd cli-productivity-config
./INSTALL.sh
For the last command, you can either choose which shell you use (or both) as part of the guided script. Will also prompt for installation of standalone scripts (below), if desired.
Functions
Currently, every function available for Bash is available for fish, and vice versa. Arguably the only exception to this is fish has a function called 'sudo!!' where Bash already has the equivalent 'sudo !!'.
cdb
cdfl
cdh
clihelp
dirw
dirlast / dirprev / actlast / actprev
editadd
mked
sudo!!
timer
Scripts
The theory is that all of these will be built from Bash. They deploy differently (which have it's perks and drawbacks) than functions. Also, the scripts will likely fit a more specific purpose than functions.
wakessh
Support
I am finding myself very delayed in adding features or finding/fixing issues. Either can be nudged along to my attention by either an issue, posting in this thread (being thorough pays off here) or better yet, a pull request if you have code to back up a particular solution.
Source
Found on GitHub: https://github.com/joelmaxuel/cli-productivity-config
Functions/Scripts in Detail
cdb
Performs a search (based on name) below the current working directory to change to any specified matched directory. As this uses a live search, you may not want to use this when then there is a very deep directory structure below, or you will find yourself waiting on the search results.
Code:
[email protected] ~/B/g/android_kernel_asus_msm8916> cdb arm
a 1) ./virt/kvm/arm
b 2) ./arch/arm
c 3) ./Documentation/devicetree/bindings/arm
d 4) ./Documentation/arm
e 5) ./Documentation/zh_CN/arm
f 6) ./sound/arm
g 7) ./tools/perf/arch/arm
h 8) ./drivers/scsi/arm
Select directory by letter or number: 2
[email protected] ~/B/g/a/a/arm>
cdfl
Move anywhere in the filesystem without having to type out or tab through a full path - enter the first letter of every path level instead. '~' and '/' can be used as a prefix (to start with home or root, respectively), or use '.' anywhere in the parameter to go up one level.
Code:
[email protected] /u/l/bin> cdfl ~B.
[email protected] ~> cdfl .
[email protected] /home> cd
[email protected] ~> cdfl Bg
a 1) ./Build/github
b 2) ./Build/genymotion
c 3) ./Build/git:
Select directory by letter or number: 1
[email protected] ~/B/github> cdfl ..
[email protected] ~> cdfl /ulb
a 1) /usr/lib/blt2.5
b 2) /usr/lib/binfmt-support
c 3) /usr/lib/binfmt.d
d 4) /usr/local/bin
Select directory by letter or number: 4
[email protected] /u/l/bin>
cdh
Displays a history of visited directories to allow changing back to one of them.
Code:
[email protected] ~/B/g/a/a/arm> cdh
c 3) ~/Build
b 2) ~
a 1) ~/Build/github/android_kernel_asus_msm8916
Select directory by letter or number: 3
[email protected] ~/Build> cdh
d 4) ~/Build
c 3) ~
b 2) ~/Build/github/android_kernel_asus_msm8916
a 1) ~/Build/github/android_kernel_asus_msm8916/arch/arm
Select directory by letter or number: 3
[email protected] ~>
clihelp
A helper message about common keyboard shortcuts. Can also be invoked by pressing ^h (CTRL + H)
Code:
[email protected] ~> clihelp
Keyboard Shortcuts:
CTRL + C – Cancels current command
CTRL + S – Repeats the last command with sudo
CTRL + L – Provide directory listing in current working directory
CTRL + U – Cuts text up until the cursor
CTRL + K – Cuts text from the cursor until the end of the line
CTRL + W – Cut word behind cursor
CTRL + Y – Pastes text
CTRL + E – Move cursor to end of line
CTRL + A – Move cursor to the beginning of the line
ALT + Backspace – Delete previous word
CTRL + Left – Move cursor one word to the left
CTRL + Right – Move cursor one word to the right
Home – Move cursor to beginning of line
End – Move cursor to end of the line
Tab – Autocomplete current command/argument
[email protected] ~>
dirw
A compact listing of the current directory with colour. Long names are truncated in the listing. Can also be invoked by pressing ^l (CTRL + L)
Code:
[email protected] ~/B/g/android_kernel_asus_msm8916> dirw
android/ AndroidKernel.mk arch/ block/
COPYING CREDITS crypto/ Documentation.../
drivers/ firmware/ fs/ include/
init/ ipc/ Kbuild Kconfig
kernel/ lib/ MAINTAINERS Makefile*
mm/ net/ README REPORTING-BUGS
samples/ scripts/ security/ sound/
tools/ usr/ virt/
[email protected] ~/B/g/android_kernel_asus_msm8916>
dirlast / dirprev / actlast / actprev
These functions either display or act (copy, move or remove) upon files that match a certain age (modified date), whether they are newer than a specific week/day/hour/minute (dirlast/actlast) or older (dirprev/actprev). The searches can also include a (wildcarded) name search as well.
Code:
[email protected] ~/B/g/cli-productivity-config> dirlast D 5 '*.fish' -rl
-rw-r--r-- 1 joel joel 2850 Sep 1 17:53 ./fish/functions/dir-core.fish
-rw-r--r-- 1 joel joel 50 Sep 1 17:05 ./fish/functions/actlast.fish
-rw-r--r-- 1 joel joel 3826 Sep 1 17:53 ./fish/functions/act-core.fish
-rw-r--r-- 1 joel joel 50 Sep 1 17:13 ./fish/functions/dirprev.fish
-rw-r--r-- 1 joel joel 50 Sep 1 17:15 ./fish/functions/dirlast.fish
-rw-r--r-- 1 joel joel 50 Sep 1 17:12 ./fish/functions/actprev.fish
-rw-r--r-- 1 joel joel 2634 Sep 4 09:25 ./fish/functions/cdh.fish
[email protected] ~/B/g/cli-productivity-config> actprev W 2 cp ..
Action: cp
The following files will be affected:
./README.md
./INSTALL-fish.sh*
./LICENSE
./INSTALL-Bash.sh*
Do you wish to continue? [yes|no]: y
[email protected] ~/B/g/cli-productivity-config>
editadd
Opens a file in your default editor, and then marks it for inclusion in the next git commit ('git status' is also run to verify the addition).
Code:
[email protected] ~/B/g/cli-productivity-config> editadd Bash/.bash_functions
M Bash/.bash_functions
[email protected] ~/B/g/cli-productivity-config>
mked
Makes and enters a specified directory (or several nested ones when applicable).
Code:
[email protected] ~/B/g/cli-productivity-config> mked examples/Bash
[email protected] ~/B/g/c/e/Bash>
sudo!!
Repeats the last command, with sudo preceeded. In bash, this already exists as 'sudo !!'. Can also be invoked in either shell by pressing ^s (CTRL + S)
Code:
[email protected] ~> apt-get update
Reading package lists... Done
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
[email protected] ~> sudo!!
[sudo] password for joel:
Ign:1 http://mirror.its.dal.ca/debian jessie InRelease
Ign:2 http://mirror.its.dal.ca/debian stretch InRelease
Hit:3 http://mirror.its.dal.ca/debian stretch-updates InRelease
Hit:4 http://mirror.its.dal.ca/debian jessie-backports InRelease
Hit:5 http://mirror.its.dal.ca/debian jessie Release
Hit:6 http://mirror.its.dal.ca/debian stretch Release
...
timer
A cut down 'time' command showing only the "wall clock" time a command has run for.
Code:
[email protected] ~> timer sleep 1
Ran for 0:01.00 min:sec
[email protected] ~>
wakessh
Invokes Wake-On-LAN (WOL) for a PC defined by a profile, then remotes into the system once online.
Code:
[email protected] ~> wakessh android
192.168.1.111 not turned on. WOL packet sent at 19:23
Waiting a Minute...
Trying again.....
192.168.1.111 is UP as on 19:24
Attempting to SSH [email protected]
Linux terminatrix 4.14.0-0.bpo.3-amd64 #1 SMP Debian 4.14.13-1~bpo9+1 (2018-01-14) x86_64
Last login: Sat Mar 10 11:33:38 2018 from 192.168.1.101
[email protected]:~$
I love the topic! Command-line for life! Lets work together!
I too have become re-acquainted with my life-long friend the Command-line. My history with my keyboard goes way back:
In 1985, I inherited a Commodore VIC-20 computer which plugged into the bunny-ears antennae of my 13" television in my bedroom. Its operating system was Commodore BASIC with access to 3kilobytes of its advertized 20KB of RAM.
In 1989, I received an 80286-12 MHz PC/generic with 512kb of RAM and a 40MB Hard drive for my 8th birthday, first coming with DOS 3.2, gradually upgraded to MSDOS 5 after a motherboard replacement to a 386-SX 16 MHz and a whole 2 MEGABYTES of RAM.
At some-point after years of begging for more RAM and a C compiler, I was happily bestowed with a 486-sx 33 and an SVGA card. The new-fangled Windows 3.1 software annoyed me, because other than the pretty colors, my favorite software ran better under the command line, and I had written my own OS extensions as batch scripts to provide me multitasking and shortcuts.
Fast forward through many boring years of high school, windows machines (self-built AMD machines all), my friend, Dom introduced me sometime my senior year (class of 1999) to Slackware Linux, by bringing a floppy disk to one of my Doom LAN-parties (I proudly had a 100MB ethernet switch and a Cable modem, in the days of 14.4kbaud)...
At my University, I never went to classes because I spent freshman & sophomore years working through the LinuxFromScratch.org guide & flirting with girls. Fortunately, dropping out of school freed up my schedule the next year to build an industrial grade FreeBSD server from scratch, and configuring the software exactly how I wanted to keep it, for Co-location at the HE.net Network Operations Center in Freemont California, at only $88/month. This was potentially my version of Command-line heaven, with 8 friends offering to pay $10/month for their own websites, and the nude-modeling website of my fiance fast growing in monthly subscriptions.
Unfortunately, fate conspires against the honest, as after 12 months the co-location fee doubled to $168/month, my fiancee abruptly realized that people could see her nude photos on the internet, after her sister told her mom who blamed me, and ordered me to abandon my first successful business and refund the 200 subscribers their $10 monthly fees. My web-hosting customers quickly realized that they could just post to a public blog or photo-site for free, and stopped paying me, so their websites (and hours of tech support) became a charity I provided. My entrepeneurial ambitions of 2000-2005 of a public database showing the graph network of the photos and interactions of my friends, called buddylist.org (pending AOL negotiations), including its special messaging modes which integrated group texting across web and sms text messages, were set aside to pay for my obscenely high rent.
Through working at Microsoft-only employers, I remained familiar with the progress of Command.com and the features of Microsoft's Developer Command Console (might have forgotten the name)...
For the past decade, Debian Linux & Bash has been my OS command-line, and after falling in love with Computer Algebra, then, seeking the most openly licensed platform for my Scientific Computing Ambitions, and a more marketable programming language for my resume, I discovered Python.org & SageMath.org . The Computer Algebra luminaries who I followed developed their own command console called IPython.org which has now caught-on as the highly popular JuPyTer (Julia and Python Terminal), that supports this elegant console-style of programming in many more programming languages!
Most recently, I discovered a shell (and its fork) that proposes to offer the features of Bash & the Python programming language on top of the JuPyTer environment, as a suitable replacement for any Unix Login shell!
These 2 are named "xonsh" & "xosh", one is at http://xon.sh and the other is in the http://pypi.python.org index. The easiest way to install for a python user is: pip install xosh xonsh
I hope that by telling you this, you can practice one of my favorite Design Patterns of the Unix philosophy: "Don't Reinvent the Wheel". You can investigate the state of progress of xonsh to see which of those batch scripts is advantageous,
I am also in the early stages of evaluating the terminal features of the "terminology" sub-project of the Enlightenment GUI project, because I am building some foundational tools for a standardized client experience centered around an elegant Linux keyboard + console experience to mentor & inspire bright young adults into participation with the sophistication of the Unix tradition as a core element of my mission to teach International Collaboration on Open Source & Open Content Projects to all of Asia, China especially. I realized that they have an enormous amount of engineering talent in China, and a fledgling young Open-Source movement emerging alongside the emergence of capitalism. I hope to spread the wisdom of the immense value of public knowledge crystallized in the form of Open Source Projects as essential to the intellectual progress of the world, and the cross-pollination of ideas across the globe produces immeasurable value in the form of common wealth available to all who are aware of how to find it.
The elegant text console experience I am developing is relevant to Android, because these devices are suitable clients for remotely-booting (either through an unlocked bootloader or a root-mode package) my platform which will load a slick color Unicode console that is also an IDE built around my polyglot ideas for mixing many programming languages together with LLVM tooling that feels interpreted but is fully capable of being compiled into a distributable app, a Firefox fullscreen browser, and a remote terminal viewer, each fullscreen in a Wayland windowing system (Weston for now, rustc built "way-cooler" eventually), switchable by the volume keys. This project is competing for my attention among my several other ambitious projects, including REPOS to help unify the dozens of software repository tools I use, and STARS to help sort my favorites/bookmarks within individual projects (think GitHub, GitLab, Mercurial, Firefox, Chromium, Alternatives) in a unified manner.
I realize that one lifetime may not be long enough to finish all of my ambitions, so I have a project idea for that as well: Open Ambitions github.com/open-ambitions is my proposal to form a community where people can learn how to be thorough with their due-diligence of discovery about which aspects of their project idea are already being worked towards, have already been proposed, or already in existence, and which aspects are feasible or infeasible and why, and then a process for communal contemplation of the merits and costs of each proposal, including honest advocacy for contributions to existing projects, mergers of complementary or redundant projects, and prudent council on the process of forking an existing project with the least harm to the principle of reuse of code, and minimizing duplication of efforts.
Maybe you are perfect to be a co-founder of my Charitable Open Source Mentoring Non-Profit Organization, named Dandelion Labs? ( dandelionlabs.org & a dozen subdomains coming soon)
merbst said:
I hope that by telling you this, you can practice one of my favorite Design Patterns of the Unix philosophy: "Don't Reinvent the Wheel". You can investigate the state of progress of xonsh to see which of those batch scripts is advantageous
Click to expand...
Click to collapse
Hmm, as I understand it, since a good deal of what CLIPC does is modify the current environment (typically within that change the working directory), forking out to another environment to do something is well and good in a fork, but I am not aware of the voodoo needed for the changes resulting in that fork coming back. This is a big reason why I work on Bash and fish in parallel. It would be nice to be able to call on other interpreters and have it mean something later on, but this is quite different than calling on a 4DOS function while in DR-DOS.
There is probably a way to shim, but that provides the next problem. I want to be able to provide CLIPC with as few extras not already found in a vanilla install. Even if extras need to be installed, it can be a quick package grab away. According to Debian, xonsh is currently not yet mature enough to be mainline.
Don't get me wrong, I appreciate the alternative perspective. At this time however, since this hobby has slowed to a crawl due to other hobbies (a collection of servers, most of which are not mine; Commodore 64 repair; teasing possibilities with Soekris net4511 & Linksys WRT54GS network devices; odd soldering jobs) and being reasonably satisfied with the effect currently.
At some point I will revisit the old batch files for more ideas; and I will check out what xonsh can do as well. But when it comes to actively leveraging it, seems doubtful, at least for the moderate time frame.
Thanks for the info.

Categories

Resources