Skip to content

Instantly share code, notes, and snippets.

View chibby0ne's full-sized avatar
🦀

Antonio Gutierrez chibby0ne

🦀
View GitHub Profile
@chibby0ne
chibby0ne / gist:ad576b3a360b7b898acb69246b8fc053
Created November 29, 2017 19:12
Disabling Raspberry Pi 3 Wifi Power Save
There are 3 ways of disabling power save on the Raspberry Pi 3 depending on how you wifi is configured:
1. Configured using NetworkManager
Follow this gist: https://gist.github.com/jcberthon/ea8cfe278998968ba7c5a95344bc8b55
2. Configured using Command Line editing `/etc/network/interface`
The accepted known method is to add the following line *AFTER* the setting up of the interface
@chibby0ne
chibby0ne / gist:cdd76c593df8edeb91db70d1061eda9b
Created February 12, 2020 21:26
redshift in sway arch linux
To run redshift in sway:
1. Install redshift-wlr-gamma-control
2. Edit the redshift.service and add:
a. Environment=XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR_ACTUALLY
b. Environment=WAYLAND_DISPLAY=$WAYLAND_DISPLAY_ACTUAL_VALUE
Since the XDG_RUNTIME_DIR, might not be set you can set it using:
export XDG_RUNTIME_DIR=/run/user/$ID
@chibby0ne
chibby0ne / gist:b1d8531363ccc1bd3a327c2bca3de7a5
Created October 4, 2018 22:02
poetry's pyproject.toml on master
[tool.poetry]
name = "poetry"
version = "0.11.5"
description = "Python dependency management and packaging made easy."
authors = [
"Sébastien Eustace <sebastien@eustace.io>"
]
license = "MIT"
readme = "README.md"
@chibby0ne
chibby0ne / gist:b3465dadcda3ba829b57c34f270719d5
Last active August 7, 2018 17:00
Show Name and IP of currently running docker containers
docker inspect -f '{{.Name}}{{"\n"}}{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -q)
Output would be:
container_name_1
ip_container_name_1
container_name_2
ip_container_name_2
...
...
@chibby0ne
chibby0ne / command.md
Last active May 16, 2018 06:01
Find all hidden files of a certain extension in the curent directory recursively

This command will find all the files of the given extensions in the current directory recursively, print the output to console and also write it to list_of_hidden_files file in the current directory:

find . -regextype posix-extended -regex ".*\.(EXTENSIONS)" | tee list_of_hidden_files 

where EXTENSION can be any regex expression:

For example to look for .docx, doc, and odt just replace extensions for:

### Keybase proof
I hereby claim:
* I am chibby0ne on github.
* I am chibby0ne (https://keybase.io/chibby0ne) on keybase.
* I have a public key whose fingerprint is EA67 1980 505E B9D6 7D8E 5399 9292 84BA BCCF F39D
To claim this, I am signing this object:
@chibby0ne
chibby0ne / dep.md
Created March 3, 2018 18:07 — forked from subfuzion/dep.md
Concise guide to golang/dep

Overview

This gist is based on the information available at golang/dep, only slightly more terse and annotated with a few notes and links primarily for my own personal benefit. It's public in case this information is helpful to anyone else as well.

I initially advocated Glide for my team and then, more recently, vndr. I've also taken the approach of exerting direct control over what goes into vendor/ in my Dockerfiles, and also work from isolated GOPATH environments on my system per project to ensure that dependencies are explicitly found under vendor/.

At the end of the day, vendoring (and committing vendor/) is about being in control of your dependencies and being able to achieve reproducible builds. While you can achieve this manually, things that are nice to have in a vendoring tool include:

@chibby0ne
chibby0ne / dep.md
Created March 3, 2018 18:07 — forked from subfuzion/dep.md
Concise guide to golang/dep

Overview

This gist is based on the information available at golang/dep, only slightly more terse and annotated with a few notes and links primarily for my own personal benefit. It's public in case this information is helpful to anyone else as well.

I initially advocated Glide for my team and then, more recently, vndr. I've also taken the approach of exerting direct control over what goes into vendor/ in my Dockerfiles, and also work from isolated GOPATH environments on my system per project to ensure that dependencies are explicitly found under vendor/.

At the end of the day, vendoring (and committing vendor/) is about being in control of your dependencies and being able to achieve reproducible builds. While you can achieve this manually, things that are nice to have in a vendoring tool include:

@chibby0ne
chibby0ne / instructions.md
Created March 3, 2018 15:13
Updating dependencies created by go dep

If you run

dep init

On a project for vendoring its dependencies, the versions choosen by dep for some of the dependencies might not be all that recent or if they are they might not be the versions that you want.

How do you manually change the versions then?

@chibby0ne
chibby0ne / gist:be7d4512f60f8bb42a8f00fa3e650b22
Created February 23, 2018 18:52
Full terminal windows minicom
To make minicom use the entire terminal window, after sessions has started check that the terminal emulation is set to ANSI.
For this you need to press:
Ctrl-A Z for help
In the menu that appears select Terminal settings by pressing 't' key.
Then in that menu press 'a' To switch Terminal Emulation. By default minicom uses VT102 which only uses a small portion of the screen.