Skip to content

Instantly share code, notes, and snippets.

View alexsandro-xpt's full-sized avatar

Alexsandro Souza Pereira alexsandro-xpt

View GitHub Profile
@Danielku15
Danielku15 / Example.html
Created February 25, 2016 19:53
A MediaTypeFormatter for WebApi for multipart/form-data including file uploads
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>File Upload example</title>
<link href="/Content/bootstrap.css" rel="stylesheet" />
</head>
<body>
<form action="api/Upload" method="post">
<div class="form-group">
@ctolkien
ctolkien / gist:719c6ce5861c9155289c
Created June 3, 2015 13:00
ASP.Net 5 Gulp + Webpack
var gulp = require('gulp');
var webpack = require('gulp-webpack');
var ts = require('gulp-typescript');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var dnx = require("gulp-dnx");
gulp.task('webpack', function(){
return gulp.src('./src/client/main.ts')
.pipe(webpack({
output:{
@netojoaobatista
netojoaobatista / cielo.sh
Last active November 4, 2020 12:30
Instalação dos certificados Cielo em servidores Linux
#!/bin/bash
if [ $EUID != 0 ]; then
echo 'Você precisa ser root para instalar certificados.'
exit $?
fi
# Diretório onde os certificados serão instalados
cert_path=`openssl version -d|sed 's/.*\"\(.*\)\"/\1/g'`/certs
# Path para o certificado da Cielo
<?php
class Application
{
private $router;
private $dispatcher;
private $errorRoute;
@davidfowl
davidfowl / dotnetlayout.md
Last active July 12, 2025 16:21
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@rdeavila
rdeavila / git-update-fork.sh
Last active June 19, 2025 06:59
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
<?php
$a = 10;
if ($a > 5) {
$b = 5;
} else {
$b = 10;
}
<?php
namespace Entidades;
use Exception;
class Contato
{
private $idContato;
private $telefone;
@rxaviers
rxaviers / gist:7360908
Last active July 15, 2025 02:46
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:
@Renatodeluna
Renatodeluna / Gruntfile.js
Created November 4, 2013 16:56
Rodando a task connect e watch juntos
module.exports = function (grunt) {
'user strict';
// Configurando Tarefas
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Inicia um server estático
connect: {
server: {