Skip to content

Instantly share code, notes, and snippets.

View dev2me's full-sized avatar

Jesús Rosas dev2me

View GitHub Profile
@dev2me
dev2me / easy_broker_integration.rb
Created June 17, 2023 20:36
EasyBroker Integreation
require 'uri'
require 'net/http'
require 'openssl'
require 'json'
class EasyBrokerIntegration
attr_accessor :endpoint
API_ENDPOINT = "https://api.stagingeb.com/v1/properties?page=1&limit=50".freeze
def initialize
@properties = []
@dev2me
dev2me / active_record_data.rb
Last active June 17, 2023 20:38
A module Bank Transfer
class BankTransfer
# Parser Module
module Parser
# Active Record Data
class ActiveRecordData
def initialize(data, config)
@data = data
@config = config
end
@dev2me
dev2me / nginx.conf
Created May 14, 2018 15:24 — forked from kennethkalmer/nginx.conf
Sample nginx config for serving a rails API and static frontend like Ember on the same domain...
daemon off;
worker_processes 4;
events {
use epoll;
accept_mutex on;
multi_accept on;
worker_connections 1024;
}
@dev2me
dev2me / web-servers.md
Created August 13, 2016 04:04 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000