#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
#!/usr/bin/env python | |
""" | |
Like cut, but for CSVs. To be used from a shell command line. | |
Change row[1] to the row index to be printed. row[1] will print the second | |
item in the row. | |
Note that fields are zero-based, as opposed to 'cut' where they are 1-based. | |
Leveraged from/motivated by an example from @bycoffe |
<? foreach(range(1, 10) as $i) echo $i * 2 . " "; |
%w(rack tilt backports).map do |lib| | |
require lib | |
end | |
%w(INT TERM).map do |sig| | |
trap(sig){ $r.stop } | |
end | |
Sinatra = Module.new { | |
extend Rack | |
a = (Application = Builder.new) |
global import require 'prelude-ls' | |
# or "lsc -d" command | |
# 1. Multiple Each Item in a List by 2 | |
list = [1 to 10] |> map (* 2) | |
list.for-each (n) !-> console.log n | |
# 2. Sum a List of Numbers | |
n = sum [1 to 1000] | |
console.log n |
# the new and improved one-file rails app -- now including | |
require "action_controller/railtie" | |
class Tester < Rails::Application | |
config.session_store :cookie_store, :key => '_rails_session' | |
config.secret_token = '095f674153982a9ce59914b561f4522a' | |
end | |
class UsersController < ActionController::Base |
def resize_nocrop_noscale(image, w,h) | |
w_original = image[:width].to_f | |
h_original = image[:height].to_f | |
if w_original < w && h_original < h | |
return image | |
end | |
# resize | |
image.resize("#{w}x#{h}") |
source "http://rubygems.org/" | |
gem "sinatra", "~> 1.3.0" | |
gem "thin" |
// Java | |
import java.util.BufferedReader; | |
import java.util.FileReader; | |
import java.util.IOException; | |
String content = new String(); | |
try { | |
BufferedReader reader = new BufferedReader(FileReader.new(filename)); | |
String line; | |
while ((line = reader.readLine()) != null) { |
module Base58 | |
class InvalidCharacterError < RuntimeError; end | |
ALPHABET = | |
%w( | |
1 2 3 4 5 6 7 8 9 | |
a b c d e f g h i | |
j k m n o p q r s | |
t u v w x y z A B |