Skip to content

Instantly share code, notes, and snippets.

import os
import ssh_automation
from paramiko import client
import celery
#region asa
def asa():
lo = os.getcwd()
print lo
return lo
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@mixin ie6 { * html & { @content } }
#logo {
background-image: url("/images/logo.png");
@include ie6 { background-image: url("/images/logo.gif"); }
}
@zennro
zennro / sikuli.py
Created January 23, 2013 14:25 — forked from 3kwa/sikuli.py
# java -cp ~/Downloads/Sikuli-X-1.0rc3\ \(r905\)-linux-x86_64/Sikuli-IDE/sikuli-script.jar org.python.util.jython test.py
from __future__ import with_statement
import unittest
from sikuli.Sikuli import *
class Firefox(object):
"""
very simple firefox browser context manager
@zennro
zennro / init.sh
Created January 23, 2013 14:27 — forked from hdemon/init.sh
# install with English
# Language Setting
# VMwareToolsは/tmpを作業ディレクトリにしない。再起動時に消えるので、上手くインストールが完了していない気がする。
### basic package
sudo apt-get update
sudo apt-get install --yes aptitude
sudo aptitude -y install \
zsh \

Sublime Text 2 – Useful Shortcuts (Windows)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing

[
{
"keys": ["super+alt+left"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.33, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
import socket
if __name__ == "__main__":
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("localhost", 9000))
data = "some data"
sock.sendall(data)
result = sock.recv(1024)
print result
sock.close()
section {
padding-top: 60px;
}
.subnav {
margin-bottom: 60px;
width: 100%;
height: 36px;
background-color: #eeeeee; /* Old browsers */
background-repeat: repeat-x; /* Repeat the gradient */
@zennro
zennro / README.md
Created October 12, 2013 18:49 — forked from nikcub/README.md