Skip to content

Instantly share code, notes, and snippets.

Working from home

Pedro Fernandes pmcfernandes

Working from home
View GitHub Profile
pmcfernandes / erc20_one_file
Created Sep 14, 2022 — 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 Jun 19, 2022
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 Jun 13, 2022 — 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 Apr 5, 2022
My AdGuard DNS Block List
View hosts.txt
# Comment here
pmcfernandes / install.ps1
Created Feb 12, 2022
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 Feb 26, 2021
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 Feb 27, 2021
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
pmcfernandes / .mailcap
Last active Feb 25, 2021
mutt install & config
View .mailcap
text/html; "$BROWSER" %s &; test=test -n "$DISPLAY"; needsterminal;
text/html; w3m -I %{charset} -T text/html; copiousoutput;
pmcfernandes / .Xresources
Last active Apr 16, 2022
Install i3 in Debian Minimal Distro
View .Xresources
!! Colorscheme
! special
*.foreground: #93a1a1
*.background: #141c21
*.cursorColor: #afbfbf
! black
*.color0: #263640
*.color8: #4a697d