Skip to content

Instantly share code, notes, and snippets.

Mateus Craveiro mccraveiro

Block or report user

Report or block mccraveiro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mccraveiro
mccraveiro / webpayment.js
Created Dec 9, 2017
Web Payments API with Pagar.me
View webpayment.js
const paymentMethods = [{
supportedMethods: 'basic-card',
data: {
supportedNetworks: ['visa', 'mastercard', 'amex'],
},
}]
// Checkout details
const details = {
displayItems: [
@mccraveiro
mccraveiro / .XCompose
Last active Jun 4, 2017
.XCompose with mac bidings
View .XCompose
<Multi_key> <e> <A> : "Á" Aacute # LATIN CAPITAL LETTER A WITH ACUTE
<Multi_key> <e> <E> : "É" Eacute # LATIN CAPITAL LETTER E WITH ACUTE
<Multi_key> <e> <I> : "Í" Iacute # LATIN CAPITAL LETTER I WITH ACUTE
<Multi_key> <e> <O> : "Ó" Oacute # LATIN CAPITAL LETTER O WITH ACUTE
<Multi_key> <e> <U> : "Ú" Uacute # LATIN CAPITAL LETTER U WITH ACUTE
<Multi_key> <e> <a> : "á" aacute # LATIN SMALL LETTER A WITH ACUTE
<Multi_key> <e> <e> : "é" eacute # LATIN SMALL LETTER E WITH ACUTE
<Multi_key> <e> <i> : "í" iacute # LATIN SMALL LETTER I WITH ACUTE
<Multi_key> <e> <o> : "ó" oacute # LATIN SMALL LETTER O WITH ACUTE
View serverless.yml
resources:
Resources:
IamRoleLambda:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
-
Effect: Allow
View 99java
## Setup java
if [ `uname -m` == 'x86_64' ]; then
PATH="/usr/lib64/jvm/java-7-oracle/jre/bin/"
JAVA_HOME="/usr/lib64/jvm/java-7-oracle/"
else
PATH="/usr/lib/jvm/java-7-oracle/jre/bin/"
JAVA_HOME="/usr/lib/jvm/java-7-oracle/"
fi
View tobogan.c
#include <stdio.h>
#include <math.h>
#define MAX 1000
typedef struct {
int x, y;
} Point;
typedef struct {
View sumitr.c
#define s(v) scanf("%d",&v);
#define a p[r][c]
int main(){int n,i,r,c,l,m,p[100][100];s(n)for(i=0;i<n;i++){s(l)m=0;for(r=0;r<l;r++)for(c=0;c<=r;c++){s(a)if(r!=0){a+=(c==0||p[r-1][c-1]<=p[r-1][c])?p[r-1][c]:p[r-1][c-1];if(r+1==l)m=a>m?a:m;}}printf("%d\n",m);}}
View permut1.c
#include <stdio.h>
int pd[13][99];
int permut(n, k) {
if (pd[n][k] != -1)
return pd[n][k];
int i;
View .jshintrc
// gist: https://gist.github.com/mccraveiro/45608fa73eb773c9f6b9
{
"bitwise": true,
"curly": true,
"immed": true,
"latedef": true,
"nonbsp": true,
"quotmark": "single",
"undef": true,
"unused": true,
You can’t perform that action at this time.