Skip to content

Instantly share code, notes, and snippets.

View dougsland's full-sized avatar
:octocat:
#opensource #upstream

Douglas Landgraf dougsland

:octocat:
#opensource #upstream
View GitHub Profile
@dougsland
dougsland / git-change-commit-messages.md
Created March 20, 2018 04:18 — forked from nepsilon/git-change-commit-messages.md
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

### Keybase proof
I hereby claim:
* I am dougsland on github.
* I am dougsland (https://keybase.io/dougsland) on keybase.
* I have a public key whose fingerprint is A13D 1ABC 798F 0660 4D28 C77B AD27 5D27 3278 1901
To claim this, I am signing this object:
@dougsland
dougsland / license-badges.md
Created May 7, 2021 14:47 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  

Translations: (No guarantee that the translations are up-to-date)

@dougsland
dougsland / vagrant-cheat-sheet.md
Created February 27, 2022 13:37 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@dougsland
dougsland / networkmanager-wifi-powersave.md
Created May 19, 2022 03:25 — forked from jcberthon/networkmanager-wifi-powersave.md
NetworkManager Wi-Fi powersaving configuration

NetworkManager WiFi Power Saving

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

  • NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  • NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
  • NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
@dougsland
dougsland / .bashrc
Created November 30, 2022 05:17 — forked from nf3/.bashrc
ssh-agent .bashrc script
# Note: not sure who wrote this, but thank you
# Note: ~/.ssh/environment should not be used, as it
# already has a different purpose in SSH.
env=~/.ssh/agent.env
# Note: Don't bother checking SSH_AGENT_PID. It's not used
# by SSH itself, and it might even be incorrect
# (for example, when using agent-forwarding over SSH).
@dougsland
dougsland / gist:7fcd2482470e3a93ba29e8d16ab8d0c6
Created May 25, 2023 15:35 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@dougsland
dougsland / gist:bbbf7fdc8ff338c91c33412888b1fc4b
Last active August 31, 2023 06:35
bluechi introspect org.eclipse.bluechi /org/eclipse/bluechi
# busctl introspect org.eclipse.bluechi /org/eclipse/bluechi
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.eclipse.bluechi.Manager interface - - -
.CreateMonitor method - o -
.DisableMetrics method - - -
.EnableMetrics method - - -
.GetNode method s o -
.ListNodes method - a(sos) -
.ListUnits method - a(sssssssouso) -
.Ping method s s -
# Rust
Rust developers can take advance of **dbus-codegen-rust** to generate a Rust module
and use,tag,release in any pace it's appropriate to their project.
## Generating bluechi module
Make sure a BlueChi node is running and execute the below commands.
``` bash
# dnf install rust cargo
@dougsland
dougsland / gist:69b26df3bd729663cbb95cc24062d9e8
Last active September 7, 2023 14:36
BlueChi, dbus-devel library, C++ example
dnf install g++ dbus-devel -y
g++ -o list_nodes list_nodes.cpp -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include/ -ldbus-1
#include <dbus/dbus.h>
#include <iostream>
void handle_structure(DBusMessageIter *structIter) {
int typeInStruct;
while ((typeInStruct = dbus_message_iter_get_arg_type(