Skip to content

Instantly share code, notes, and snippets.

View daviscabral's full-sized avatar

Davis Z. Cabral daviscabral

View GitHub Profile
@daviscabral
daviscabral / jum_proxy.rb
Created April 30, 2009 03:08
Mechanize tests to get orkut/twitter messages
# Mechanize tests with Orkut/Twitter
# @author Davis Zanetti Cabral
# Orkut usage example:
# >> require 'jum_proxy'
# >> orkut = JumProxy::Sites::Orkut.new("daviscabral@gmail.com", "pa$$w0rd", "pt-BR")
# >> orkut.scraps
#
# Twitter usage example:
# >> require 'jum_proxy'
# Variation on Hashrocket's script for managing the git process
# as documented here: http://reinh.com/blog/2008/08/27/hack-and-and-ship.html
# Create shell scripts out of each of these, put them in your path (~/bin for example)
# chmod 755 them and use like this:
#
# This version of hack is totally different than Hackrockets. I feel that hack implies
# that you are getting started, not finishing up. sink is Hashrockets hack.
#
# $ hack branch_name
# Test and Implement until done
#!/usr/bin/env ruby
HELP = <<EOS
Freshbridge helps you to create an invoice with items from a Pivotal Tracker Project.
Just to avoid mess your stuff - this script don't create invoices - just update an existent invoice.
DEPENDENCIES:
- freshbooks
- HTTParty
EOS
case class User(id: Long, name: String)
class Work { /* ... */ }
class Result { /* --- */ }
case class WorkToBeDone(user: User, work: Work)
case class WorkIsDone(user: User, result: Result)
class Worker extends Actor { /* ... */ }
class BadWorkerCoordinator extends Actor {

Keybase proof

I hereby claim:

  • I am daviscabral on github.
  • I am daviscabral (https://keybase.io/daviscabral) on keybase.
  • I have a public key whose fingerprint is 88A6 6761 8656 9F3E B3FB 36FB 8AE7 AB8B 7771 AADF

To claim this, I am signing this object:

Reduce boilerplate in Redux

  • Create actions similar to Flummox.
  • Generate action ids.
  • Supports actions with decorators, promises, and therefore ES7 async.
<!doctype html>
<html lang="en" data-framework="react">
<head>
<meta charset="utf-8">
<title>React • TodoMVC</title>
<link rel="stylesheet" href="node_modules/todomvc-common/base.css">
<link rel="stylesheet" href="node_modules/todomvc-app-css/index.css">
</head>
<body>
<section class="todoapp" id="content">
@daviscabral
daviscabral / GIF-Screencast-OSX.md
Created February 22, 2018 20:44 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@daviscabral
daviscabral / install-redis.sh
Created July 18, 2018 04:40 — forked from four43/install-redis.sh
Install Redis
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://gist.githubusercontent.com/four43/e00d01ca084c5972f229/raw/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"

So I built a dummy Rails-plugin gem...

rails plugin new foo --skip-bundle -O --full

and filled in my .gemspec as below, including the line

s.add_dependency "rails-assets-sugar"

and added