Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
# Command line util for acquiring a one-off Twitter OAuth access token
# Based on http://blog.beefyapps.com/2010/01/simple-ruby-oauth-with-twitter/
require 'rubygems'
require 'oauth'
puts <<EOS
Set up your application at https://twitter.com/apps/ (as a 'Client' app),
<!DOCTYPE html>
<html>
<!-- This should be the simplest possible jQuery based CouchApp. Install by uploading to a design document in Futon or putting in _attachments/index.html and running `couchapp push` -->
<head><title>Tiny CouchApp</title></head>
<body>
<h1>Tiny CouchApp</h1>
<ul id="databases"></ul>
</body>
<script src="/_utils/script/jquery.js"></script>
<script src="/_utils/script/jquery.couch.js"></script>
var myApp = $.sammy(function() {
this.helpers({
loadIndex: function() {
// you can do everything you would do in a route here.
}
});
this.get('#/index', function() {
this.loadIndex();
@kulturpessimist
kulturpessimist / tagger.yql
Created December 3, 2010 00:40
YQL Command for "tag" generation based on the text of a website
select * from search.termextract where context in (
select content from html where url="http://somerandomdude.com/projects/iconic/"
) | truncate(count=5)
@kulturpessimist
kulturpessimist / jim.sublime-build
Created September 25, 2011 22:55
jim build process sublime text 2
{
"cmd": ["jim", "pack", "-f", "$File"]
}
@kulturpessimist
kulturpessimist / hack.sh
Created April 1, 2012 07:25 — forked from erikh/hack.sh
OSX For Hackers
#!/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
#
Beste Grüße
Alex Schedler
___________________
Alexander Schedler
Leiter Softwareentwicklung
@kulturpessimist
kulturpessimist / gist:5541504
Created May 8, 2013 16:05
String padding as prototype based on my.trading.io code.
String.prototype.pad = function(lenght, padding, left) {
var p = (new Array(lenght - this.toString().length + 1)).join(padding);
return ( left?p+this:this+p )
}
@kulturpessimist
kulturpessimist / Gruntfile.js
Last active August 29, 2015 14:00
Example grunt couchapp workflow
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
});
grunt.loadTasks('grunt');
// Tasks
grunt.registerTask('default', ['build']);
@kulturpessimist
kulturpessimist / designer.html
Last active August 29, 2015 14:03
designer
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;