Skip to content

Instantly share code, notes, and snippets.

View punnie's full-sized avatar

Pedro Coelho punnie

View GitHub Profile
import os
import time
import signal
import pyinotify
import pygtk
pygtk.require('2.0')
import gtk
import gobject
import appindicator
import pynotify
require './lib/clishe'
class Console < Clishe::Base
command 'user' do |c|
c.parameter 'action', %w[add delete set], 'action to perform'
c.parameter 'username', String, 'the new user\'s username'
c.parameter 'email', /^\w+\.\w+@\w+\.\w+/, 'the new user\'s email address'
c.action do
puts c.params[:username]
class Controller
def action
respond_to do |format|
format.html { render :gaitas_sem_javascript }
format.js { render :gaitas_que_o_javascript_curte }
format.json { render :jasão }
end
end
end
<object data='https://s3.amazonaws.com/gruvi-player-ss/flash-assets/player-real.swf?config=/movies/9/flash.js' height='283' id='player' type='application/x-shockwave-flash' width='504'>
<!-- load configuration from config.js -->
<param name='flashvars' value='config=/movies/9/flash.js&width=504&height=283'>
<param name='movie' value='https://s3.amazonaws.com/gruvi-player-ss/flash-assets/player-real.swf'>
<param name='allowfullscreen' value='true'>
<param name='allowScriptAccess' value='always'>
<embed allowScriptAccess='always' flashvars='width=504&height=283' height='283' src='https://s3.amazonaws.com/gruvi-player-ss/flash-assets/player-real.swf?config=/movies/9/flash.js' type='application/x-shockwave-flash' width='504'>
</object>
eyJzdiI6eyJjIjoiMTdsazFoaWk2YjcwMCIsImNzIjoiMTdsazFoaWk2YjcwMCIsInciOiIxM2prNW5uYW1tZSIsImNsIjoiYzE6MHxjMjowfGMzOjB8YzQ6MHxjNTowfGM2OjB8Yzc6MHxjODowfGM5OjB8YzEwOmF8YzExOjJjfGMxMjoxNnxjMTM6YXxjMTQ6NXxjMTU6NXxjMTY6OCIsInNsIjoiczE6MHxzMjowfHMzOjB8czQ6NDR8czU6MHxzNjowfHM3OmF8czg6YXxzOToybXxzMTA6NDR8czExOjFifHMxMjoxMXxzMTM6YXxzMTQ6NXxzMTU6NXxzMTY6OCIsImJuIjoiYjE6MHxiMjowfGIzOjB8YjQ6MHxiNTowfGI2OjV8Yjc6NXxiODowfGI5OjExfGIxMDoxYnxiMTE6MTF8YjEyOjV8YjEzOjIiLCJ1IjoidTAxfHUwMnx1MDN8dTA0fHUwNXx1MDZ8dTA3fHUwOHx1MDl8dTEwfHUxMXx1MTJ8dTEzfHUxNHx1MTV8dTE2fHUxN3x1MTh8dTE5fHUyMHx1MjF8dTIyfHUyM3x1MjR8dTI1fHUyNnx1Mjd8dTI4fHUyOXx1MzB8dTMxfHUzMnx1MzN8dTM0fHUzNXx1MzZ8dTM3fHUzOHx1Mzl8dTQwfHU0MXx1NDJ8dTQzfHU0NHx1NDV8dTQ2fHU0N3x1NDcuMXx1NDh8dTQ5fHU1MHx1NTAuMXx1NTF8dTUyfHU1M3x1NTR8dTcwIiwicyI6InNlbGxlcl9ycHM6MzlmbDYyODB8Y2xpY2tlcl9ycHM6MzlnODA0aWd8YmFua19ycHM6MWRtMzFrZTY0MHxjaGVhdGVkX3dpZGdldHM6MHxjaGVhdGVkX2Nhc2g6MHxoYW5kX21hZGVfd2lkZ2V0czoyYzQ4azRsYzY1NDN8bWFkZV93aWRnZXRzOjQxaTlhaWE3aDJqZ3xzb2xkX3dpZGdldHM6NDFkM2NmaG0xNmtlfGhhbmRfc29s
class Lol
class << self
def new(args)
puts "args"
self
end
end
def new(lol)
puts lol
end
#!/usr/bin/env ruby
require 'eventmachine'
require 'securerandom'
require 'optparse'
require 'ostruct'
class Chord
BITS = 5
end
#!/usr/bin/env ruby
require 'eventmachine'
require 'securerandom'
require 'optparse'
require 'ostruct'
class Chord
BITS = 8
end
@punnie
punnie / keybase.md
Created March 24, 2014 18:25
Keybase verification

Keybase proof

I hereby claim:

  • I am punnie on github.
  • I am punnie (https://keybase.io/punnie) on keybase.
  • I have a public key whose fingerprint is 8BCB 1C70 96DF 320D 1314 0F2D 61A1 46FB 0B93 41C6

To claim this, I am signing this object:

@punnie
punnie / recipe.rb
Created April 1, 2014 00:16
An example chef recipe
package 'htop' do
action :install
end
template '/etc/motd' do
source 'motd'
action :create
end