This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# journal parser | |
""" | |
<row> | |
<id>2183</id> | |
<date>2010-08-27</date> | |
<time>09:04:12</time> | |
<timezone>MST</timezone> | |
<tag>Scratch</tag> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css"> | |
#targetimg { | |
background-image:url('http://c.seungjin.net/picture/7'); | |
width: 800px; | |
height: 600px; | |
position: static; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'></script> | |
<script> | |
$(document).ready(function(){ | |
ws = new WebSocket("ws://localhost:8080/"); | |
ws.onopen = function() { console.log("open"); }; | |
ws.onmessage = function(evt) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<!-- http://faye.jcoglan.com/browser.html --> | |
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'> | |
</script> | |
<script type="text/javascript" src="http://localhost:8000/faye.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
var client = new Faye.Client("http://localhost:8000/faye"); | |
var subscription = client.subscribe('/email/new', function(msg){alert(msg.text);}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<!-- http://faye.jcoglan.com/browser.html --> | |
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'> | |
</script> | |
<script type="text/javascript" src="/faye.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
var client = new Faye.Client("/faye"); | |
var subscription = client.subscribe('/new_log', function(msg){ $("#msg").append(msg.text+"<br/>"); }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from twisted.conch import error | |
from twisted.conch.ssh import transport, connection, keys, userauth, channel, common | |
from twisted.internet import defer, protocol, reactor | |
class ClientCommandTransport(transport.SSHClientTransport): | |
def __init__(self, username, password, command): | |
self.username = username | |
self.password = password | |
self.command = command |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript"> | |
try { | |
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); | |
} catch (e) { | |
alert("Permission UniversalBrowserRead denied."); | |
} | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<h1>reading file from arg</h1> | |
browser try to read "/Users/seungjin/Desktop/test"<br/>view the javascript src.<br/> | |
<code id="console1">...console1...</code> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(comment | |
this source is from http://www.learningclojure.com/2010/09/clojure-13-first-impression.html | |
I will try this cljure src later when I get free time.) | |
(import '(javax.swing JFrame JPanel ) | |
'(java.awt Color Graphics Graphics2D)) | |
(defn ^:static draw-tree [ #^Graphics g2d ^double angle ^double x ^double y ^double length ^double branch-angle ^long depth] | |
(if (> depth 0) | |
(let [new-x (- x (* length (Math/sin (Math/toRadians angle)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<style> | |
canvas {border:1px solid #444; } | |
</style> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script></head> | |
<body> | |
<canvas id="cv" width="1000" height="800"></canvas> | |
</body> |