Skip to content

Instantly share code, notes, and snippets.

View pmcfernandes's full-sized avatar
Working from home

Pedro Fernandes pmcfernandes

Working from home
View GitHub Profile
pmcfernandes / 1st_sample_sendmail_in_sqlserver.sql
Last active December 10, 2023 17:37
Send emails from MS SQL server
View 1st_sample_sendmail_in_sqlserver.sql
EXEC xp_ConfigureMailServer
DECLARE @Content VARCHAR(max),
@ContentOut VARCHAR(max)
EXEC xp_GetFileContent 'C:\Users\pmcfe\Desktop\1.txt', @Content OUTPUT
DECLARE @vars AS TemplateVars
INSERT INTO @vars ([Name], [Value]) VALUES ('Name', 'Michael Franq')
INSERT INTO @vars ([Name], [Value]) VALUES ('Position', 'Head of Development')
pmcfernandes / .env
Last active November 24, 2023 16:29
create docker in ubuntu
View .env
# place here variables
pmcfernandes / erc20_one_file
Created September 14, 2022 21:45 — forked from AndreiD/erc20_one_file
ERC20 Token One File
View erc20_one_file
// File: @openzeppelin/contracts/GSN/Context.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.5;
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and, they should not be accessed in such a direct
pmcfernandes / enable-virtualbox-with-hyperv.txt
Created June 19, 2022 22:56
Enable Hyper-V and VirtualBox at same time.
View enable-virtualbox-with-hyperv.txt
cd "C:\Program Files\Oracle\VirtualBox"
VBoxManage setextradata "<VM Name>" "VBoxInternal/NEM/UseRing0Runloop" 0
pmcfernandes /
Created June 13, 2022 00:48 — forked from helinwang/
Unraid: mount a unraid share using the unraid mount tag in Ubuntu

Mounting the shared path You can mount the shared folder using

mount -t 9p -o trans=virtio [mount tag] [mount point] -oversion=9p2000.L

mount tag: As specified in Qemu commandline. mount point: Path to mount point. trans: Transport method (here virtio for using 9P over virtio) version: Protocol version. By default it is 9p2000.u . Other options that can be used include:

View gulp-favicon.js
var realFavicon = require ('gulp-real-favicon');
var fs = require('fs');
// File where the favicon markups are stored
var FAVICON_DATA_FILE = 'faviconData.json';
// Generate the icons. This task takes a few seconds to complete.
// You should run it at least once to create the icons. Then,
// you should run it whenever RealFaviconGenerator updates its
// package (see the check-for-favicon-update task below).
pmcfernandes / hosts.txt
Last active April 5, 2022 14:10
My AdGuard DNS Block List
View hosts.txt
# Comment here
pmcfernandes / install.ps1
Created February 12, 2022 18:42
Install all common software for development pc via Chocolatery
View install.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString(''));
choco install adobereader -y
choco install googlechrome -y
choco install python3 -y
choco install visualstudio-installer -y
choco install zoom -y
choco install winrar -y
choco install nodejs.install -y
pmcfernandes /
Last active February 26, 2021 23:53
Install my software in alpine
apk add sudo alsa-utils alsa-utils-doc alsa-lib alsaconf neofetch htop bc \
alpine-sdk nodejs npm python3 mutt mc w3m tmux zsh cmus mplayer \
sh -c "$(curl -fsSL"
addgroup $USER audio
addgroup root audio
pmcfernandes / .tmux.conf
Last active February 27, 2021 13:45
Tmux install and config
View .tmux.conf
# 0 is too far from ` ;)
set -g base-index 1
setw -g mouse on
set-option -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on