Skip to content

Instantly share code, notes, and snippets.

View mguomanila's full-sized avatar

mguomanila mguomanila

  • manila
View GitHub Profile
@mguomanila
mguomanila / renew-gpgkey.md
Created July 19, 2022 23:17 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@mguomanila
mguomanila / curl.md
Created April 27, 2022 04:58 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@mguomanila
mguomanila / Operating Ropsten Ethereum testnet.md
Created March 30, 2022 03:24 — forked from andreafspeziale/Operating Ropsten Ethereum testnet.md
Operating Ropsten Ethereum testnet network with Geth and Mist on OSX

Operating Ropsten Ethereum testnet

from a newbie to newbies

Intro

I believe that a development environment is one of the access key in learning new technologies. I didn't find on the internet a simple and common path to make the Ropsten network, the Ethereum public testnet, work.

So I'm writing down a couple of command lines and links that can be useful to achieve it.

Resources and requirements

@mguomanila
mguomanila / init.vim
Created February 20, 2022 05:32 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@mguomanila
mguomanila / remap-capslock-to-control-win10.md
Created December 25, 2021 04:50 — forked from joshschmelzle/remap-capslock-to-control-win10.md
Remap Caps Lock to Control on Windows 10

Ways to remap caps lock to control on Windows 10

These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).

Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.

Approach 1. Manually through regedit

Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map.

@mguomanila
mguomanila / WSL2.md
Created December 11, 2021 09:35 — forked from OnkelDom/WSL2.md
My WSL2 Setup with PowerShell7, Ubuntu, Windows Terminal, Powerline, SourceCodePro, Azure Tools

Install WSL2 and Ubuntu

First run: WSL2 Setup

Windows Tutorial: Install WSL2 (if needed)

Install PowerShell 7

# You need administrator grants on normal PowerShell terminal
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
@mguomanila
mguomanila / 1.vimrc
Last active September 16, 2021 08:28
matching [{()}] when cursor
" Codev{{{
" highlight a matching [{()}] when cursor is placed on start/end character
set showmatch
inoremap " ""<left>
inoremap ' ''<left>
inoremap ( ()<left>
inoremap [ []<left>
inoremap { {}<left>
inoremap {<CR> {<CR>}<ESC>O
inoremap {;<CR> {<CR>};<ESC>O
@mguomanila
mguomanila / nc1.py
Created September 4, 2021 09:51
alternative for netcat utility
# Here are a few examples: You can use it to test connectivity on port 443 to a list of 3 hosts:
import socket
def test_socket(ip,port):
s = socket.socket()
try:
s.settimeout(3)
s.connect((ip,port))
except socket.error as msg:
@mguomanila
mguomanila / formik1.js
Created September 4, 2021 07:14
Properly handle multiple files input with Formik and React
// You can use the useRef to get reference to the file input and clear it like this.
import { Formik, Field } from "formik";
import { useRef } from "react";
export default function App() {
const fileRef = useRef();
return (
<div className="App">
<Formik
@mguomanila
mguomanila / InstallingMeld.md
Created August 26, 2021 08:42 — forked from salhernandez/InstallingMeld.md
How to install Meld on Windows and getting it set up with Git

Install Meld from their webpage http://meldmerge.org/

I had to tell git where it was:

git config --global merge.tool meld git config --global diff.tool meld

If using windows 8 and 10 use the following git config --global mergetool.meld.path "/c/Program Files (x86)/meld/meld.exe" git config --global difftool.meld.path "/c/Program Files (x86)/meld/meld.exe"