Skip to content

Instantly share code, notes, and snippets.

View alexsandro-xpt's full-sized avatar

Alexsandro Souza Pereira alexsandro-xpt

View GitHub Profile
@alexsandro-xpt
alexsandro-xpt / mysql-docker.sh
Created April 18, 2018 12:44 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@alexsandro-xpt
alexsandro-xpt / iischeatsheet.bat
Created March 3, 2017 18:53 — forked from jcefoli/iischeatsheet.bat
IIS Websites and Apppools Delete/Import/Export Cheat Sheet
REM Delete all Websites
%windir%\system32\inetsrv\appcmd list site /xml | %windir%\system32\inetsrv\appcmd delete site /in
REM Delete all App Pools
%windir%\system32\inetsrv\appcmd list apppool /xml | %windir%\system32\inetsrv\appcmd delete apppool /in
REM Export all the Application Pools:
%windir%\system32\inetsrv\appcmd list apppool /config /xml > C:\apppools.xml
REM Import all the Application Pools:
@alexsandro-xpt
alexsandro-xpt / Example.html
Created December 23, 2016 21:30 — forked from Danielku15/Example.html
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">
<script>
export default {
props: {
title: {
required: true,
type: String,
},
open: false,
},
computed: {},
@alexsandro-xpt
alexsandro-xpt / System Design.md
Created May 5, 2016 21:30 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@alexsandro-xpt
alexsandro-xpt / squash-commits.sh
Created February 29, 2016 15:33 — forked from jbub/squash-commits.sh
git squash last two commits into one
git rebase --interactive HEAD~2
# we are going to squash c into b
pick b76d157 b
pick a931ac7 c
# squash c into b
pick b76d157 b
s a931ac7 c
@alexsandro-xpt
alexsandro-xpt / gist:11a0e0b5f74c77bfb594
Last active September 11, 2015 14:20 — forked from ctolkien/gist:719c6ce5861c9155289c
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:{
#!/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
[IPFilter("192.168.0.0/24")]
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
}

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage