Skip to content

Instantly share code, notes, and snippets.

@aalinat
aalinat / window.py
Created March 18, 2012 19:02
pygtk basic window
import pygtk
pygtk.require('2.0')
import gtk
import os
class Podcaster:
wTree = None
@aalinat
aalinat / window.py
Created March 18, 2012 19:15
other variation of pygtk window creation
import gtk
class Podcaster(gtk.Window):
def __init__(self):
super(Podcaster, self).__init__()
@aalinat
aalinat / kanan-player.py
Created March 24, 2012 16:34
pygtk video player
#!/usr/bin/env python
import pygst
pygst.require("0.10")
import gst, pygtk, gtk
import sys
class Main(object):
def __init__(self):
self.multimedia_file=""
# Create the GUI
self.win = gtk.Window()
@aalinat
aalinat / gist:2306676
Created April 5, 2012 00:00
shell command for playing youtube videos using gstreamer,make sure you installed the plugins
gst-launch-0.10 playbin2 uri=rtsp://v1.cache6.c.youtube.com/CiILENy73wIaGQngicUMXOqJOxMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp
@aalinat
aalinat / contact.html.erb
Created July 14, 2012 22:43
rails upload attachment (contact form)
<h1>Contact</h1>
<%= form_tag("/send_to", :method=>'post', :multipart => true) do %>
<p>
Subject:<br />
<%= text_field_tag "subject" %>
</p>
<p>
Priority: <br />
@aalinat
aalinat / do_contact.html.erb
Created July 14, 2012 23:37
rails inline attachment
<h2>New Message!</h2>
<p>Priority:</p>
<%=@priority%>
<p>
<%= image_tag attachments['image.jpg'].url %>
</p>
<p>
<%=@description%>
@aalinat
aalinat / activity.java
Last active December 16, 2015 03:49
android http post/get requests
package com.example.single;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
@aalinat
aalinat / Index.erb
Created July 18, 2014 19:40
angular + ruby on rails demo
<h1>Angular</h1>
<div ng-controller="Numbers" ng-cloak>
<button ng-click="SaveCookie()">Save Cookie</button>
<button ng-click="PrintCookie()">Print Cookie</button>
<button ng-click="Increment()">Increment</button>
count: {{count}}
@aalinat
aalinat / creating angular services
Created July 18, 2014 21:25
creating angular services
angular.module('myApp', [])
.factory('myService', function () {
return {
say: function () {
return "Hello World";
}
}
});
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5.1" />