Skip to content

Instantly share code, notes, and snippets.

View luismmontielg's full-sized avatar

Luis Montiel luismmontielg

View GitHub Profile
@yalab
yalab / heroku_mongo_backup
Created November 17, 2011 10:24
Backup scripts MongoHQ databases using heroku.
#!/bin/bash
HEROKU="/home/yalab/.rvm/gems/ruby-1.9.3-p0/bin/heroku"
BACKUP_DIR="$HOME/.backup/mongohq"
if [ ! -d $BACKUP_DIR ];then
mkdir -p $BACKUP_DIR
fi
for APP in `$HEROKU list`;do
MONGOHQ_URL=`heroku config --app $APP | grep MONGOHQ_URL | awk '{print $3}'`
@gcatlin
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
@tkaemming
tkaemming / decorators.py
Created March 1, 2012 22:06
django class-based view mixins
from django.utils.decorators import method_decorator
def view_class_decorator(decorator):
"""
Wraps a class based view dispatcher with the provided decorator.
Usage:
@view_class_decorator(login_required)
@brentsowers1
brentsowers1 / AudaxHealthSoftwareEngineer.scala
Last active September 24, 2021 18:03
Audax Health is looking for good software engineers
object AudaxHealthSoftwareEngineer {
val headline = """
Audax Health is hiring! Come join our incredible team of engineers in Washington, DC or San Francisco,
to help build the first truly social health platform, Zensey.com. We've embraced Scala and the
Lift web framework for most of our software, so if you have experience in or want to learn Scala,
we're looking for you!
"""
val requirementsDescription = """We don't have a firm list of requirements, we're just looking for
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active July 22, 2024 09:57
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@mariocesar
mariocesar / dyndns_route53.py
Created November 25, 2012 06:08
Update a Route53 Record if your public IP changes. Like DynDNS
"""
Requeriments:
$ sudo pip install boto dnspython
Edit ~/.boto to use your AWS credentials
"""
import time
import sys
@ymasory
ymasory / bay-scala-jobs
Last active February 18, 2020 20:48
Companies hiring Scala developers in the Bay Area.
Companies hiring Scala developers in the Bay Area.
Created in response to a thread on scala-base.
My favorites:
- CloudPhysics
- Wordnik
Unbiased list:
- 10Gen
- Audax Health
@timperrett
timperrett / futures.scala
Last active December 11, 2015 21:28
Example of composing 2.10 futures with scalaz.Validation
package scalaz.akkaz
import scala.language.higherKinds
import scalaz.{Monad, Monoid, Comonad, Traverse, Applicative}
import scala.concurrent.{Await, ExecutionContext, Future, Promise}
import scala.concurrent.duration._
/**
* @see [[scalaz.akkaz.future]] for examples
*/
@almeidap
almeidap / BaseDAO.scala
Last active March 25, 2023 12:26
DAO design for ReactiveMongo using JSONCollection and Play2 Scala JSON API (work in progress).
package core.dao
import scala.concurrent.Future
import play.api.Logger
import reactivemongo.core.commands.LastError
import reactivemongo.core.errors.DatabaseException
import core.db.MongoHelper
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active July 4, 2024 13:00
Backend Architectures Keywords and References