Skip to content

Instantly share code, notes, and snippets.

View romuloccomp's full-sized avatar

Romulo cComp romuloccomp

  • Belo Horizonte, MG, Brazil
View GitHub Profile
@romuloccomp
romuloccomp / Exemplo_rest_dataset.js
Created May 28, 2021 12:49
Exemplo de Consumo de Dataset no Fluig
//FUNÇÃO DE CHAMADA DE DATASET GENÊRICA
function getDatasetExterno(dataset, filtros, cb) {
var retorno;
var oauth = OAuth({
consumer: {
'key': '{consumerKey}', // nome do aplicativo que você criou
'secret': '{consumerSecret}' // nome do aplicativo que você criou
},
signature_method: 'HMAC-SHA1',
{
"id": "C66AFBCD4ED34BBF9822B7FB6AEDE1E2",
"name": "bis",
"created_at": "2017-12-26T12:29:25-02:00",
"updated_at": "2017-12-26T16:31:11-02:00",
"can_receive?": true,
"is_verified?": true,
"last_verification_request_status": "accepted",
"last_verification_request_data": null,
"last_verification_request_feedback": null,
Iugu::Charge.create(
{
"method"=> "bank_slip",
"email"=>"[email protected]",
"custom_variables" => [{"name"=>"empresa","value"=>current_company.name},
{"name"=>"company_id","value"=>current_company.id}],
"payer"=>{
"cpf_cnpj":"08097814684",
"name":"Romulo Pereira",
<nav class="light-blue lighten-1" role="navigation">
<div class="nav-wrapper container"><a id="logo-container" href="#" class="brand-logo">Logo</a>
<ul class="right hide-on-med-and-down">
<li><a href="#">Navbar Link</a></li>
</ul>
<ul id="nav-mobile" class="side-nav" style="left: -250px;">
<li><a href="#">Navbar Link</a></li>
</ul>
<a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
----
troca essa parte
IF h-field:BUFFER-VALUE(i-cont2) <> ? THEN DO:
{&OUT} CHR(34) + h-field:NAME + '_' + TRIM(STRING(i-cont2)) + CHR(34) + ':' + CHR(34) + h-field:BUFFER-VALUE(i-cont2) + CHR(34).
IF i-cont2 < h-field:EXTENT THEN
{&OUT} ','.
END.
@romuloccomp
romuloccomp / gist:1514871
Created December 23, 2011 17:36
Sample js Handlebars
var source = $("#some-template").html();
var template = Handlebars.compile(source);
var data = { users: [
{username: "alan", firstName: "Alan", lastName: "Johnson", email: "[email protected]" },
{username: "allison", firstName: "Allison", lastName: "House", email: "[email protected]" },
{username: "ryan", firstName: "Ryan", lastName: "Carson", email: "[email protected]" }
]};
$("#content-placeholder").html(template(data));
@romuloccomp
romuloccomp / gist:1514869
Created December 23, 2011 17:36
Samples handlebars
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>OS Eletr&ocirc;nica - teste</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
@romuloccomp
romuloccomp / rsa.c
Created December 9, 2011 16:50
Implementação do RSA
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <string.h>
#define NUM_MAX 30
int mdc(int a,int b);
int primo(p);
@romuloccomp
romuloccomp / gist:1375392
Created November 18, 2011 02:30
List file and directory in C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
char *path_cat (const char *str1, char *str2);
int main () {
struct dirent *dp;