This file contains 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
# Example ncurses program that should print all combinations of foreground | |
# color on background color but doesn't work. | |
# Make your terminal 256 characters wide for best view. | |
require 'rubygems' | |
require 'ncurses' | |
screen = Ncurses.initscr | |
Ncurses.noecho | |
Ncurses.cbreak |
This file contains 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
require "rubygems" | |
PLUGIN = "ncurses" | |
NAME = "ncurses" | |
VERSION = "1.2.4" | |
AUTHOR = "Tobias Peters" | |
EMAIL = "t-peters@users.berlios.de" | |
HOMEPAGE = "http://ncurses-ruby.berlios.de/" | |
SUMMARY = "This wrapper provides access to the functions, macros, global variables and constants of the ncurses library. These are mapped to a Ruby Module named \"Ncurses\": Functions and external variables are implemented as singleton functions of the Module Ncurses." |
This file contains 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
#!/usr/bin/env ruby | |
# REQUIRES A FILE NAMED "TODO" in current folder, to display and page | |
# a basic file pager to check out ncurses ruby pad | |
# working in 1.8.7 but not showing anything when i hit a key in 1.9.1 | |
# wclear before prefresh seemms to be the culprit. | |
# after rmoving werase it works but not what we want | |
require 'rubygems' | |
require 'ncurses' |
This file contains 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
# this is a test program, testing out | |
# subwindows and pads in ncurses + ruby. Testing out | |
# prefresh, copywin overwrite etc. All worked finally. | |
#$LOAD_PATH << "/Users/rahul/work/projects/rbcurse/" | |
require 'rubygems' | |
require 'ncurses' | |
require 'logger' | |
require 'rbcurse' | |
require 'rbcurse/rtabbedpane' |
This file contains 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
" place this in .vimrc file | |
" after marking a block, using key (,m) will prompt for a char | |
" which will be placed on both sides of the block | |
" A block start char such as {, [ or ( will be replaced by its corresponding | |
" end character. | |
" Useful if creating Markdown documents, or in README, TODO etc files | |
vmap ,m <ESC>:call VisualMarkdownTagWrap()<CR> | |
function! VisualMarkdownTagWrap() | |
let a:tag = input( "Chars to wrap block: ") |
This file contains 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
#!/usr/bin/env ruby -w | |
#*******************************************************# | |
# This is a sample program which reads a data file | |
# into a hash. | |
# The format can be either: | |
# Key: value | |
# | |
# Key: <<ENDHERE | |
# ... any kind of multiline | |
# ENDHERE |
This file contains 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
TITLE: Introduction to ruby | |
SUBTITLE: This is a subtitle | |
AUTHOR: rkumar | |
CATEGORY: info | |
CONVERT_BREAKS: 0 | |
STATUS: publish | |
FILTER: maruku | |
PUBLISH_DATE: | |
INTRO: <<!! | |
This page is to introduce newcomers to ruby. Welcome to ruby 1.9. And |
This file contains 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
#!/bin/bash | |
#*******************************************************# | |
# Shell script template # | |
# # | |
# Arunachalesha # | |
# $Id$ # | |
#*******************************************************# | |
# if running as a cronjob prepend /opt/local/bin:/opt/local/sbin | |
# export PATH="/opt/local/bin:/opt/local/sbin:$PATH:/Users/rahul/bin" | |
# also cd in the folder you want. |
This file contains 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
#!/bin/bash | |
#*******************************************************# | |
# Usage: pass in a file name | |
# Log things into a file in one consistent format # | |
# I needed to change IFS else newlines were getting hogged# | |
# 2009-10-10 09:46 changed rlwrap to use a tmp file | |
#and vim to edit. | |
#Also using an ex command to add text to top of file. | |
# Arunachalesha # |
This file contains 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
#!/bin/bash | |
#*******************************************************# | |
# Log things into a file in one consistent format # | |
# I needed to change IFS else newlines were getting hogged# | |
# appends to files (use genericdiary.sh to prepend to files) | |
# Arunachalesha # | |
# $Id$ # | |
#*******************************************************# | |
#TMPFILE=/usr/tmp/junk.$$ | |
#trap 'rm -f $TMPFILE; exit 0' 1 2 15 |
OlderNewer