Skip to content

Instantly share code, notes, and snippets.

View basmoura's full-sized avatar

Breno Moura basmoura

View GitHub Profile
@basmoura
basmoura / gist:e9131c8eb75ea04c6999b3f4667cbc57
Created August 6, 2020 00:23 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@basmoura
basmoura / std_api.md
Created February 6, 2019 13:20
STD API

API changes

STD Medical History

There are four new attributes to the json:

  • treated_for_std_past_year_details:

    • Question for patient: 'Please specify:'
    • Type: String
    • Required: true if treated_for_std_past_year is true
  • hiv_infected_or_low_immunity_details:

# GET /availability/:service_id/:country_id/:state_id
#
# GET /availability/std/us/ca
# GET /availability/:service_id/:country_id/:state_id
#
# GET /availability/std/us/ca
{
slot_window: 1800, # seconds
@basmoura
basmoura / Mysql ubuntu.txt
Created August 20, 2018 15:36
Mysql ubuntu
https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost
array = Array.new(100) { rand(1...5000) }
def dp(array)
duplicates = {}
array.each do |a|
if duplicates[a]
duplicates[a] += 1
else
duplicates[a] = 1
def isPalindrome(low, high)
while (low < high) do
if (low != high)
return false;
end
low += 1
high -= 1
end
require 'date'
class App
def initialize
collect
process
print
end
def collect
Perído: 23/12/16 19:04:09 - 24/05/17 12:28:27
Total de mensagens: 57628
12/16 - Aldo Cristiano: 160 mensagens. (7.6%)
01/17 - Aldo Cristiano: 963 mensagens. (7.11%)
02/17 - Aldo Cristiano: 1101 mensagens. (9.81%)
03/17 - Aldo Cristiano: 865 mensagens. (7.17%)
04/17 - Aldo Cristiano: 687 mensagens. (6.93%)
05/17 - Aldo Cristiano: 590 mensagens. (6.72%)
def index
@cursos = Curso.all
if request.format =="application/json"
where = " ativo='S' and escritorio_id= "+params[:escritorio_id].to_s
else
where = " escritorio_id= "+current_user.escritorio_id.to_s
end
if params[:titulo] != nil && params[:titulo].length>0
<%= simple_form_for(@car) do |f| %>
<% if @car.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@car.errors.count, "error") %> prohibited this car from being saved:</h2>
<ul>
<% @car.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>