Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

Rogerio Prado de Jesus rogeriopradoj

😀
View GitHub Profile
@milolav
milolav / Portable_WhatsApp.md
Last active May 4, 2021
Making WhatsApp desktop application portable
View Portable_WhatsApp.md

Portable desktop WhatsApp

You start multiple instances of WhatsApp using --user-data-dir flag providing the full path to the directory. For example:

E:\Temp\Whatsapp>WhatsApp.exe --user-data-dir=E:\Temp\Whatsapp\number1

or by creating a shortcut with the flag.

@lpar
lpar / README.md
Last active May 12, 2021
How to make Hugo (0.20+) generate an Atom feed instead of RSS
View README.md

The Hugo static site generator sadly still uses the obsolete and badly standardized RSS format.

Here's how to set it up to generate an Atom feed instead. Pretty much all feed readers which understand RSS also understand Atom, except iTunes, and Atom is a better format.

  1. Define an appropriate media type and corresponding output format in config.toml:
@BretFisher
BretFisher / docker-for-mac.md
Last active Jun 13, 2021
Getting a Shell in the Docker Desktop Mac VM
View docker-for-mac.md

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@w00fz
w00fz / sphp.sh
Last active May 28, 2021
PHP switcher
View sphp.sh
#!/bin/bash
# Check if command was ran as root.
if [[ $(id -u) -eq 0 ]]; then
echo "The command \"sphp\" should not be executed as root or via sudo directly."
echo "When a service requires root access, you will be prompted for a password as needed."
exit 1
fi
# Usage
@zenorocha
zenorocha / etc-hosts-on-win.md
Last active Jun 21, 2021
/etc/hosts on Windows
View etc-hosts-on-win.md

1. Get your IP Address

echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`

2. Modify your hosts file

notepad

@evanwill
evanwill / gitBash_windows.md
Last active Jun 17, 2021
how to add more utilities to git bash for windows, wget, make
View gitBash_windows.md

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@helderco
helderco / db-open
Created Oct 6, 2015
Script to open a mysql database in Sequel Pro from a service in docker-compose.
View db-open
#!/bin/bash
set -e
show_help() {
cat << EOF
Usage: ${0##*/} [-u USER] [-p PASS] [-P PORT] [-H HOST] [DATABASE]
${0##*/} -h
Open a standard connection in Sequel PRO.
@PurpleBooth
PurpleBooth / README-Template.md
Last active Jun 22, 2021
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@scalopus
scalopus / common-config.sh
Created Feb 27, 2015
php-build-common-config
View common-config.sh
#!/bin/bash
# Copy this file to ./php-build/share/php-build/after-install.d
# This file is to keep all minors version use the same configuration file.
# This will required you to install the base version.
# Ex.
# 5.4.10 use 5.4.0 as configuration
# you have to install 5.4.0 at first.
View setup-modernie-vagrant-boxes.md

Setup modern.ie vagrant boxes

Since modern.ie released vagrant boxes, it' no longer necessary to manually import the ova file to virtualbox, as mentioned here.

However, the guys at modern.ie didn't configured the box to work with WinRM. This how-to addresses that, presenting steps to proper repackage these boxes, adding WinRM support. Additionally configures chocolatey package manager and puppet provisioner.

Pre-requisites