Skip to content

Instantly share code, notes, and snippets.

View atomicules's full-sized avatar

atomicules atomicules

View GitHub Profile
@atomicules
atomicules / TTYtter.pl
Last active August 29, 2015 13:55
Creating diff for TTYtter.pl as of version 2.1.0 (27 December 2012) and version 2.1.0 (14 Jan 2014)
#!/usr/bin/perl -s
#########################################################################
#
# TTYtter v2.1 (c)2007-2012 cameron kaiser (and contributors).
# all rights reserved.
# http://www.floodgap.com/software/ttytter/
#
# distributed under the floodgap free software license
# http://www.floodgap.com/software/ffsl/
#
@atomicules
atomicules / config.h.patch
Created May 21, 2014 12:44
Patches for Snownews to add simplistic undo for "mark all read"
$NetBSD$
--- config.h.orig 2009-09-17 06:44:28.000000000 +0000
+++ config.h
@@ -61,6 +61,7 @@ struct newsitem {
struct newsdata {
struct feed *parent;
int readstatus; /* 0: unread, 1: read */
+ int prevreadstatus; /* 0: unread, 1: read */
char *title;
@atomicules
atomicules / atom2rss.xsl
Last active August 29, 2015 14:01
My slight modification (as rev 2 of this gist) to the atom2rss.xsl file from here: https://kiza.eu/software/snownews/snowscripts/extensions/script/atom2rss/
<?xml version="1.0"?>
<!-- Atom to RSS 1.0 Transformation, written by Rene Puls (rpuls@kcore.de) -->
<!-- Snownews filter command for this extension: "xsltproc /path/to/atom2rss -" -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@atomicules
atomicules / gist:32f17cf337b3da0f2661
Last active August 29, 2015 14:16
Microformats and nested h-cite question. Moved here: http://simp.ly/publish/MSD9YN
We couldn’t find that file to show.
=================
Last 20 lines...
=================
./shoes/native.h:22: warning: function declaration isn’t a prototype
./shoes/native.h:24: warning: function declaration isn’t a prototype
./shoes/native.h:40: warning: function declaration isn’t a prototype
shoes/http/nsurl.m: In function ‘-[ShoesHttp readHeaders:]’:
shoes/http/nsurl.m:114: warning: assignment discards qualifiers from pointer target type
shoes/http/nsurl.m:116: warning: assignment discards qualifiers from pointer target type
# A simple app to test Keypress, Keydown and Keyup functionality
# Reports key being pressed and changes colour with change in state
Shoes.app do
@keypress = para "Keypress: "
para "\n"
@keydown = para "Keydown:"
para "\n"
@keyup = para "Keyup: "
@kpff = 0
@kdff = 0
# testing mechanize in Ruby 1.9 based Shoes
# Assumes Mechanize is installed local to application
# Others might need this code:
=begin
Shoes.setup do
gem 'mechanize = 0.8.5' #mechanize 0.8.5 saves having to install nokogiri
end
=end
# Dummy line so it doesn't try to pick up encoding from below
# Testing "uninitialized constant Encoding::UTF_16BE" error
# that occurs in Shoes Policeman built with Ruby 1.9.1
# The below works in Shoes 2, but not in Shoes 3
#
# Problem seems to be in CGI
# See \dist\ruby\lib\cgi\utli.rb lines 37 onwards:
=begin
# Unescape a string that has been HTML-escaped
# CGI::unescapeHTML("Usage: foo &quot;bar&quot; &lt;baz&gt;")
What successful building of Shoes on OSX PPC looks like:
i5m-Powerbook:~ i5m$ cd code/github/shoes/
i5m-Powerbook:shoes i5m$ source use-deps
i5m-Powerbook:shoes i5m$ rake
(in /Users/i5m/code/github/shoes)
rm -rf dist
mkdir -p dist
In file included from /Users/i5m/code/github/shoes/deps/include/ruby-1.9.1/ruby/ruby.h:25,
from /Users/i5m/code/github/shoes/deps/include/ruby-1.9.1/ruby.h:32,
#Testing differences between Shoes 2 and 3, Ruby 1.8 and Ruby 1.9
#In Shoes 2 (and also version 1229 of Shoes 3 that I built with Ruby 1.8) this code works
#In Shoes 3, then in ui.rb ":attach => Window" must be replaced with ":attach => Shoes::Window"
#as otherwise the error "uninitialized constant UI::Window" occurs.
require 'ui'
Shoes.app do
extend UI