Skip to content

Instantly share code, notes, and snippets.

View regisbsb's full-sized avatar

Regis Bittencourt regisbsb

View GitHub Profile
@regisbsb
regisbsb / show_cred.bat
Created April 7, 2020 15:19
Show creadentials
rundll32.exe keymgr.dll, KRShowKeyMgr
using System;
using System.Globalization;
public class Program
{
public static void Main()
{
var lowerHello = "hello world";
Console.WriteLine(CultureInfo.CurrentCulture.TextInfo.ToTitleCase(lowerHello));
@regisbsb
regisbsb / dns-sync.sh
Last active March 30, 2021 22:28 — forked from matthiassb/dns-sync.sh
Init.d script for keeping WSL resolv.conf in-sync with Windows
#! /bin/bash
### BEGIN INIT INFO
# Provides: dns-sync
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks
### END INIT INFO
@regisbsb
regisbsb / history.bat
Created April 19, 2017 11:18
Get clink history
type "%LOCALAPPDATA%\clink\.history"
@regisbsb
regisbsb / nohyper.bat
Created April 10, 2017 10:27
create no hyper-v boot entry
bcdedit /copy {current} /d "No Hyper-V"
bcdedit /set {copy from result from first command} hypervisorlaunchtype off
// ==UserScript==
// @name RARBGfy Trakt
// @namespace https://gist.github.com/regisbsb/
// @version 0.2
// @description Turns IMDB links into RARBG ones
// @icon https://walter.trakt.tv/hotlink-ok/public/favicon.ico
// @author Regis Bittencourt
// @match http://trakt.tv/*
// @match https://trakt.tv/*
// @grant none
@regisbsb
regisbsb / .bash_profile
Last active July 26, 2020 13:18
Get the branch name in the git bash
# Load in the git branch prompt script.
source ~/.git-prompt.sh
source ~/.profile
PS1="\[\033[38;5;251m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\[$(tput sgr0)\]\[\033[38;5;251m\]\H\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;28m\]\w\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\]\n\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;1m\]\\$\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"
PS1=$PS1'$(__git_ps1 "(%s) ")'
@regisbsb
regisbsb / REACT.md
Created March 1, 2016 09:51
How to learn react

react-howto

https://github.com/petehunt/react-howto

If you’re new to React (or frontend in general) you may find the ecosystem confusing. There are a few reasons for this.

  • React has historically been targeted at early-adopters and experts
  • Facebook only open-sources what it actually uses, so it doesn’t focus on tooling for smaller-than-Facebook projects
  • There’s a lot of bad marketing masquerading as React guides
# --- settings ---
$feedUrlBase = "http://go.microsoft.com/fwlink/?LinkID=206669"
# the rest will be params when converting to funclet
$latest = $true
$overwrite = $false
$top = 500 #use $top = $null to grab all
$destinationDirectory = join-path ([Environment]::GetFolderPath("MyDocuments")) "NuGetLocal"
# --- locals ---
$webClient = New-Object System.Net.WebClient
@regisbsb
regisbsb / EnumName.tt
Last active November 30, 2015 13:53
Generate enum
<#@ template language="C#" debug="true" hostspecific="True" #>
<#@ output extension=".cs"#>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Data" #>
<#@ assembly name="System.Configuration" #>
<#@ import namespace="System" #>
<#@ import namespace="System.Data" #>
<#@ import namespace="System.Data.SqlClient" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Text" #>