Skip to content

Instantly share code, notes, and snippets.

@alanhoff
alanhoff / client.js
Last active October 19, 2024 20:53
Exemplo de SSE com Node.js
var source = new EventSource('http://localhost:8080');
source.addEventListener('message', function(data){
console.log(data);
});
source.addEventListener('open', function(){
console.log('Conexão aberta!');
});
@abernardobr
abernardobr / Client Code
Created August 14, 2015 13:53
How to upload images to S3 using Graphics Magick and Knox S3 npm module
/ At the client, just use a normal post. I use jQuery and do an AJAX post
// In your HTML
<form id="uploadForm" autocomplete="off" action="" method="post" enctype="multipart/form-data"></form>
<input id='fileId' type="file" accept="image/*">
// In you JS
var $form = $('#uploadForm');
var $file = $('#fileId');
@jchandra74
jchandra74 / PowerShell Customization.md
Last active August 20, 2025 11:13
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active November 11, 2025 10:49
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example