Skip to content

Instantly share code, notes, and snippets.

View shadeslayer's full-sized avatar
👁️‍🗨️

Rohan Garg shadeslayer

👁️‍🗨️
View GitHub Profile
interface org.mpris.MediaPlayer2.Player {
methods:
Next();
Previous();
Pause();
PlayPause();
Stop();
Play();
Seek(in x Offset);
SetPosition(in o TrackId,
node /org/mpris/MediaPlayer2 {
interface org.kde.amarok.App {
methods:
ShowOSD();
LoadThemeFile(in s arg_0);
signals:
properties:
};
interface org.kde.amarok.Mpris2Extensions.Player {
methods:
#!/usr/bin/env python2
# vim: set sts=4 sw=4 et tw=0:
#
# Author(s): Rohan Garg <rohan16garg@gmail.com>
# License: GPL (2011)
#
import players.base
from gi.repository import Gio, GLib
import time
shadeslayer@saphira ~/amazing-horse ±amarok⚡ » python2.7
Python 2.7.1+ (r271:86832, Mar 24 2011, 00:37:39)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from players import amarok
>>> print player.status()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'player' is not defined
>>>
node /Player {
interface org.freedesktop.MediaPlayer {
methods:
Pause();
Stop();
Play();
Prev();
Next();
Repeat(in b arg_0);
@com.trolltech.QtDBus.QtTypeName.Out0("Mpris1::Status")
#!/usr/bin/env python2
# vim: set sts=4 sw=4 et tw=0:
#
# Author(s): Rohan Garg <rohan16garg@gmail.com>
# License: GPL (2011)
#
import players.base
#import dbus
import time
#!/usr/bin/env python2
# vim: set sts=4 sw=4 et tw=0:
#
# Author(s): Rohan Garg <rohan16garg@gmail.com>
# License: MIT (2011)
#
import players.base
import time
from gi.repository import Gio, GLib
@shadeslayer
shadeslayer / client.c
Created April 18, 2011 08:19
Experiment 7
/********************************************
* Author: Rohan Garg <rohan16garg@gmail.com *
* License: MIT ( 2011 ) *
* client.c *
********************************************/
#include <stdio.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <netinet/in.h>
/********************************************* * Author: Rohan Garg <rohan16garg@gmail.com> * * License: MIT ( 2011 ) * * client.c [ Experiment 6 ] *
*********************************************/
#include<stdio.h>
#include<netinet/in.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<sys/errno.h>
#include<string.h>
#include<arpa/inet.h>
@shadeslayer
shadeslayer / .emacs
Created April 18, 2011 17:04
My emacs config file ;)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(scroll-bar-mode nil)
'(tooltip-mode nil)
'(menu-bar-mode nil)
'(tool-bar-mode nil)
'(x-select-enable-clipboard t))