Skip to content

Instantly share code, notes, and snippets.

View ssaadh's full-sized avatar
🎯
Focusing

Saad ssaadh

🎯
Focusing
View GitHub Profile
@ttscoff
ttscoff / text_score.rb
Created June 17, 2012 16:17
Readability stats for passed text using ipeirotis.appspot.com
#!/usr/bin/env ruby
# Uses the Readability Metrics API from http://ipeirotis.appspot.com/readability-api.html
# Accepts text from STDIN (piped) or as an argument
=begin examples
pbpaste|text_score.rb # copy text and run (on OS X) to get the stats for the clipboard.
cat myfile.md|text_score.rb # get scores for the contents of a file
=end
require 'open-uri'
require 'net/http'

Many people like the pomodoro technique because it helps them focus intently on tasks. It is also helpful for preventing interruptions. If your team, and extended team, know that you are in the middle of a pomodoro then they know to avoid interrupting you. But how do you communicate that you have a pomodoro in progress?

Team Pomodoro combines a tradtional pomodoro timer and a dashboard showing the status of each team member's pomodoros. A person can see at a glance who is currently available and when each person will be available.

Team Pomodoro screen shot

Additional Features

  • Add features for messaging team members. Choice of
@ssaadh
ssaadh / fix-owncloud-fscache-table-parent-id-column.rb
Created November 6, 2012 07:42
Using Owncloud with files mounted outside data folder. Owncloud didn't set correct parent for 1st account that had files added into the file cache table, fscache, in Mysql or Sqlite. Quickly made this hack. Heh, go through more than ~1000 rows and this wi
#require 'sqlite3'
require 'mysql2'
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter => 'mysql2',
:host => 'localhost',
:username => 'USERNAME',
:password => 'PASSWORD',
:database => 'DATABASE_NAME'
)
@nhoizey
nhoizey / screenshots.js
Created November 12, 2012 17:07
Take screenshots at different viewport sizes using CasperJS
/*
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes.
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed
*
* Usage:
* $ casperjs screenshots.js http://example.com
*/
var casper = require("casper").create();
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
ServerName pow
ServerAlias *.dev
ServerAlias *.xip.io
ProxyPass / http://localhost:20559/
ProxyPassReverse / http://localhost:20559/
ProxyPreserveHost On
@dobbs
dobbs / zzz_pow.conf
Created November 27, 2012 14:14 — forked from elspethsoup/zzz_pow.conf
Apache reverse proxy config for pow
<VirtualHost *:80>
ServerName pow
ServerAlias *.dev
ServerAlias *.xip.io
ProxyPassMatch ^/~ !
ProxyPass / http://localhost:20559/
ProxyPassReverse / http://localhost:20559/
ProxyPreserveHost On
</VirtualHost>
@gaspanik
gaspanik / spotlight-terminal-command.markdown
Last active December 16, 2023 07:39
OS X: spotlight indexing switch

Spotlight Indexing switch

os x terminal command.

Turn off indexing

Turn off Spotlight Indexing

sudo mdutil -a -i off
@seanlinsley
seanlinsley / log_formatting.rb
Last active April 14, 2017 16:07
proper logging -- with color :)
# Define a setter to pass in a custom log formatter
class ActiveSupport::BufferedLogger
def formatter=(formatter)
@log.formatter = formatter
end
end
# Defines a custom log format (time, severity, message, PID, backtrace)... all with color!
class Formatter
SEVERITY_TO_TAG = {'DEBUG'=>'meh', 'INFO'=>'fyi', 'WARN'=>'hmm', 'ERROR'=>'wtf', 'FATAL'=>'omg', 'UNKNOWN'=>'???'}
@valpackett
valpackett / Alfred-Pinboard-INSTANT.md
Last active September 7, 2023 21:01
INSTANT Pinboard search from Alfred 2

INSTANT Pinboard search from Alfred 2

I've had a Python script that makes an HTML Bookmarks file for LaunchBar.
Now that I use Alfred 2, I modified it to make XML for Alfred.
This allows me to search my bookmarks with GREP SPEED!

Installation

First, add your token (from pinboard.in/settings/password) to ~/.netrc

@adamwiggins
adamwiggins / adams-heroku-values.md
Last active November 10, 2025 18:54
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style