Skip to content

Instantly share code, notes, and snippets.

@hedgehog
hedgehog / hypothetical_libcloud_example.rb
Created December 29, 2009 08:45
Hypothetical port of the libcloud example to Ruby
## from libcloud.types import Provider
## from libcloud.providers import get_driver
require 'fog/types'
require 'fog/providers'
## EC2 = get_driver(Provider.EC2)
## Slicehost = get_driver(Provider.SLICEHOST)
## Rackspace = get_driver(Provider.RACKSPACE)
EC2 = Fog::Provider.new(:ec2) # syntax 1
@progrium
progrium / noded.py
Created May 18, 2010 02:47
twistd-style nodejs daemonizer
#!/usr/bin/env python
# Copyright (c) 2010 Jeff Lindsay
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
STDOUT.sync = true
require 'queue'
start_time = Time.now.to_i
msg = 0
queue = Queue.new("testing")
queue.subscribe do |obj|
msg += 1
javascript:(function(){x%20=%20open().document;$(".views-field-title a").each(%20function()%20{%20x.write('[' + $(this).attr('href').replace(/\/node\//, '#') + '] : ' + $(this).text()+'<br%20/>')%20})})()
var sys = require('sys'),
YUI = require("yui3").YUI;
YUI({
filter: 'debug',
_logExclude: {
'attribute': true,
'base': true,
'get': true,
'loader': true,
Index: sapi/cli/config.w32
===================================================================
--- sapi/cli/config.w32 (revision 308839)
+++ sapi/cli/config.w32 (working copy)
@@ -6,7 +6,8 @@
ARG_ENABLE('cli-win32', 'Build console-less CLI version of PHP', 'no');
if (PHP_CLI == "yes") {
- SAPI('cli', 'php_cli.c', 'php.exe');
+ SAPI('cli', 'php_cli.c php_http_parser.c php_cli_server.c', 'php.exe');
@biilmann
biilmann / README.md
Created October 27, 2011 00:04
Webpop Calendar Extension

Calendar Extension

This is a simple calendar extension using Webpop's search API to list events.

To use the extension create a Section with entries enabled and configure the entries to have a "date" field.

Add calendar.js to your extensions folder and set the calendar section to use this extension.

In the template used to display the calendar section, you can list all future events like this:

@biilmann
biilmann / README
Created November 8, 2011 14:37
Webpop storage module
The Basic Key/Value Store
-------------------------
Extensions now have access to a simple key/value store. To use it require the "storage" module:
var storage = require("storage");
// put an object in the store
storage.put("my-key", {title: "An object", text: "You can store any normal js object in the store});
@voodootikigod
voodootikigod / seriallogger.js
Created January 3, 2012 15:16
Log all output from a serial port connection to a log file.
/*
Simple example that takes a command line provided serial port destination and routes the output to a file of the same name with .log appended to the port name.
usage: node logger.js /dev/tty.usbserial <baudrate>
*/
var SerialPort = require("serialport");
var fs = require("fs");
var port = process.argv[2];
@docwhat
docwhat / Gemfile
Created October 6, 2012 03:36
Example of cross-platform Guard support gems
group :tools do
gem "guard"
gem "guard-bundler"
gem "guard-rspec"
#For detecting changes in the filesystem
gem 'rb-inotify', :require => false
gem 'rb-fsevent', :require => false
#For displaying notices