Skip to content

Instantly share code, notes, and snippets.

View ninest's full-sized avatar
🎯
Experimenting

Parth Kabra ninest

🎯
Experimenting
View GitHub Profile
@TranceCat
TranceCat / NSmessage_alert.py
Created January 19, 2015 12:39
Example of pyobjc implementation for Notification Center on OS X with reply option
#!/usr/bin/env python
from Foundation import NSUserNotification, NSUserNotificationCenter, NSObject
from PyObjCTools import AppHelper
'''
This class is used for NSUserNotificationCenter alert. User needs to select Alerts style
in System Preferences -> Notifications for the python script.
'''
class Notification(NSObject):
<?php
echo file_get_contents('http://tinyurl.com/api-create.php?url='.'http://www.example.com/');
/* For example
http://tinyurl.com/api-create.php?url=http://www.fullondesign.co.uk/
Would return:
http://tinyurl.com/d4px9f
*/
?>