Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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 / 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