Skip to content

Instantly share code, notes, and snippets.

View luis-fss's full-sized avatar
:octocat:
Hey

Luis Fernando de Souza Santos luis-fss

:octocat:
Hey
View GitHub Profile
@erikw
erikw / ..git-commit-status - Generate git commit message from git-status.md
Last active March 13, 2024 07:44
Generate git commit message from git-status. Will generate a commit message like "Added: file1.py file2.py file3.py Modified: file4.py file5.py Deleted: README.md Renamed: test.txt-> test2.txt". Put this in your .gitconfig.

git commit-status alias

An alias that will generate a git commit message staged changes as shown in git-status. Put this alias (section below) in your .gitconfig.

The message generated will be in the format of:

$ git status --porcelain
A file1.py
A file2.py
A file3.py
@shanselman
shanselman / Microsoft.PowerShell_profile.ps1
Last active September 15, 2024 18:40
PowerShell Profile
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@shanselman
shanselman / ohmyposhv3-v2.json
Last active September 9, 2024 21:10
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@luizfelipeleite
luizfelipeleite / scripts.js
Last active May 29, 2024 13:50
Máscaras CPF, CNPJ, CEP e Telefone no Cleave
String.prototype.numbers = function () {
'use strict';
var result = '';
if (this.match(/(\d+)/g)) {
result = this.match(/(\d+)/g).join('');
}
return result;
};
( function( $ ) {
@luis-fss
luis-fss / gulpfile.js
Created April 28, 2020 14:03
NPM and Gulp for Asp.Net Core 3 config sample
/// <binding AfterBuild='default' Clean='clean' />
/*
This file is the main entry point for defining Gulp tasks and using Gulp plugins.
Click here to learn more. http://go.microsoft.com/fwlink/?LinkId=518007
*/
var gulp = require('gulp');
var del = require('del');
var plumber = require('gulp-plumber');
var concat = require('gulp-concat');
@jioo
jioo / share-git-stash.md
Last active July 27, 2024 07:04
How to export stash as a file, and apply it to another computer

Stash current changes

  • git > Stash > Stash (Include Untracked)

Create stash as patch

git stash show "stash@{0}" -p > changes.patch

Apply patch

@pedrofracassi
pedrofracassi / quicksteamactivator.user.js
Last active November 25, 2023 17:06
Steam Key Quick Activator
// ==UserScript==
// @name Steam Key Quick Activator
// @namespace http://pedrofracassi.me/
// @version 1.2
// @description Activates Steam Keys Quickly!
// @author Pedro Fracassi (http://pedrofracassi.me)
// @match https://store.steampowered.com/account/registerkey?key=*
// @grant none
// @run-at document-end
// ==/UserScript==
function Update-AssemblyInfoVersionFiles
{
Param
(
[Parameter(Mandatory=$true)]
[string]$productVersion
)
$buildNumber = $env:BUILD_BUILDNUMBER
if ($buildNumber -eq $null)
@bendc
bendc / supportsES6.js
Created August 25, 2016 08:05
Test if ES6 is ~fully supported
var supportsES6 = function() {
try {
new Function("(a = 0) => a");
return true;
}
catch (err) {
return false;
}
}();
@patriksvensson
patriksvensson / powershell.cake
Created March 8, 2016 09:20
Run PowerShell scripts from Cake
// Tools and addins
#addin "nuget:?package=System.Management.Automation&version=6.1.7601.17515"
using System.Collections;
using System.Management.Automation;
using System.Management.Automation.Internal;
using System.Management.Automation.Runspaces;
using System.Threading;
///////////////////////////////////////////////////////////////////////////////