#HTML presentation tools
There are many HTML presentation tools and they are all created for slightly different reasons. Here's an overview. Please let me know if I forgot any.
##CSSS
CSS-based SlideShow System
For each Ruby module/class, we have Ruby methods on the left and the equivalent | |
Clojure functions and/or relevant notes are on the right. | |
For clojure functions, symbols indicate existing method definitions, in the | |
clojure namespace if none is explicitly given. clojure.contrib.*/* functions can | |
be obtained from http://github.com/kevinoneill/clojure-contrib/tree/master, | |
ruby-to-clojure.*/* functions can be obtained from the source files in this | |
gist. | |
If no method symbol is given, we use the following notation: |
;; | |
;; NS CHEATSHEET | |
;; | |
;; * :require makes functions available with a namespace prefix | |
;; and optionally can refer functions to the current ns. | |
;; | |
;; * :import refers Java classes to the current namespace. | |
;; | |
;; * :refer-clojure affects availability of built-in (clojure.core) | |
;; functions. |
package com.mypackage.benchmark | |
import com.mypackage.util.Logging | |
import net.lag.configgy.Configgy | |
import scala.collection.mutable | |
import scala.collection.JavaConversions._ | |
import java.net.InetSocketAddress | |
import java.nio.charset.Charset | |
import java.util.concurrent._ |
from django.contrib.sessions.backends.base import SessionBase, CreateError | |
from django.conf import settings | |
from django.utils.encoding import force_unicode | |
import redis | |
class SessionStore(SessionBase): | |
""" Redis store for sessions""" | |
def __init__(self, session_key=None): | |
self.redis = redis.Redis( |
<!-- Add the following lines to theme's html code right before </head> --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script> | |
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script> | |
<!-- | |
Usage: just add <div class="gist">[gist URL]</div> | |
Example: <div class="gist">https://gist.github.com/1395926</div> | |
--> |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.zyxel</groupId> | |
<artifactId>sting</artifactId> | |
<name>abc</name> | |
<packaging>war</packaging> | |
<version>1.0.0-BUILD-SNAPSHOT</version> | |
<properties> |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
def run_pg_fouine(): | |
info = host_info[env.host_string] | |
db_name = info.tags.get('Name') | |
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 0/" /etc/postgresql/9.*/main/postgresql.conf') | |
sudo('/etc/init.d/postgresql reload') | |
time.sleep(30) | |
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 500/" /etc/postgresql/9.*/main/postgresql.conf') | |
sudo('/etc/init.d/postgresql reload') | |
run('tail -n 100000 /var/log/postgresql/postgresql-9.*-main.log > /tmp/pgfouine.txt') | |
run('gzip -f /tmp/pgfouine.txt') |