Skip to content

Instantly share code, notes, and snippets.

View nebiros's full-sized avatar

Juan Alvarez nebiros

View GitHub Profile
@nebiros
nebiros / Mailer.php
Created April 15, 2014 16:39
mailer
<?php
/**
* Mailer.
*
* @author nebiros
*/
class Mailer {
protected $_mailsFilePath = null;
@nebiros
nebiros / BaseGeolocable.swift
Last active January 5, 2017 22:41
BaseGeolocable example
//
// BaseGeolocable.swift
//
// Created by Juan Felipe Alvarez Saldarriaga on 11/11/16.
//
import Foundation
import CoreLocation
protocol BaseGeolocable: class, CLLocationManagerDelegate {
@nebiros
nebiros / job_position_frontend.md
Last active October 13, 2016 18:05 — forked from anonymous/job_offerings.md
How to post job offerings

Batteries911

Oscar Correa: oscar@batteries911.com

Requerimientos

  • css
  • javascript
  • node.js
  • angular (al menos mid-level)

Salario: $1800 USD

@nebiros
nebiros / test1.swift
Last active September 20, 2016 18:13
Swift 3 – Resolving method ambiguity defining closures as a var
// objc's continue method signature: - (AWSTask *)continueWithBlock:(AWSContinuationBlock)block;
// swift translate it as: .continue(block: (AWSTask<AWSCognitoIdentityUserPoolSignUpResponse>) -> Any?)
// error: Ambiguous use of 'continue'
pool.signUp(username,
password: password,
userAttributes: attrs,
validationData: nil)
.continue { (task) -> Any? in
}

Batteries911

Oscar Correa: oscar@batteries911.com

Requerimientos

  • ios
  • objc
  • swift (no es necesario saberlo)
  • uikit

Salario: $1800 USD

@nebiros
nebiros / unicorn.rake
Created June 5, 2012 17:26
rails rake tasks for managing unicorn server instances + rbenv
ENV["RAILS_ENV"] ||= "production"
module UnicornServer
# http://unicorn.bogomips.org/Unicorn/Configurator.html
CONFIG_PATH = File.join(Rails.root, "config", "unicorn.rb")
PID_PATH = File.join(Rails.root, "tmp", "pids", "unicorn.pid")
RBENV = %x[which rbenv].strip
DAEMON = "bundle exec unicorn_rails"
DAEMON_OPTS = "-c #{CONFIG_PATH} -E #{ENV["RAILS_ENV"]} -D"
@nebiros
nebiros / MyViewController.m
Last active January 1, 2016 05:19
Custom back button as navigation item left bar button.
#import "MyViewController.h"
#import "UIViewController+JIMBackButton.h"
@interface MyViewController ()
@end
@implementation MyViewController
#pragma mark - UIViewController
@nebiros
nebiros / gist:7757728
Created December 2, 2013 20:10
php55 --with-pgsql error: command not found: pg_config --includedir
$ HOMEBREW_MAKE_JOBS=1 brew install -v php55 --with-homebrew-openssl --with-imap --with-pgsql --with-tidy 2>&1
==> Downloading http://www.php.net/get/php-5.5.6.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php55-5.5.6
tar xf /Library/Caches/Homebrew/php55-5.5.6
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file configure
Hunk #1 succeeded at 39041 (offset 764 lines).
/usr/local/Library/Homebrew/formulary.rb:40: command not found: pg_config --includedir
==> ./configure --prefix=/usr/local/Cellar/php55/5.5.6 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.5 --with-config-file-path=/usr/local/etc/php/5.5 --with-config-file-scan-dir=/usr/local/etc/php/5.5/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enable-wddx --enable-ftp --enable-sockets --enable-zip --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-mbstring --enable-mbregex --enable-bcmath --enable-calendar --with-zlib=/usr/local/op
@nebiros
nebiros / UIViewController+JIMBackButton.h
Last active December 27, 2015 18:59
iOS custom back button category.
//
// UIViewController+JIMBackButton.h
// CupMaster
//
// Created by Juan Felipe Alvarez Saldarriaga on 11/7/13.
// Copyright (c) 2013 juan.im. All rights reserved.
//
#import <UIKit/UIKit.h>
@nebiros
nebiros / app.js
Last active December 15, 2015 17:19
phonegap + jquery + app-UI + dust.js + fastclick.js
var App = App || {};
App.UI = (function ($) {
var module = {};
function Template(options) {
var defaults = {
cache: {}
, nav: {target: document.body, backLabel: "Back"}
, templatesDir: "templates"