Skip to content

Instantly share code, notes, and snippets.

View gnumoksha's full-sized avatar
🐚
available only on my shell phone

Tobias Sette gnumoksha

🐚
available only on my shell phone
View GitHub Profile
View adb-wireless-connect.sh
#!/usr/bin/env bash
# This script will try to find the adb remote debugging port in the specified
# IP address and then tell adb to try to connect to it.
# It is useful for connecting to an android device without opening the
# "Wireless debugging" screen to get the IP and the random port, which is
# cumbersome.
for line in $(avahi-browse --terminate --resolve --parsable --no-db-lookup _adb-tls-connect._tcp); do
if [[ $line != =* ]]; then
@gnumoksha
gnumoksha / datadog_daemon.php
Created August 4, 2021 19:14
datadog_daemon.php
View datadog_daemon.php
<?php
declare(strict_types=1);
/**
* This script is a daemon, i.e. it will be executed by
* systemd and kept running for a long time.
*/
class Processor
{
@gnumoksha
gnumoksha / Client.php
Last active June 10, 2020 21:35
Wrap some of Guzzle's behaviours using only PSR-7, PSR-17 and PSR-18 interfaces.
View Client.php
<?php
declare(strict_types=1);
namespace Libs\Tools\Http;
use Http\Client\Common\Plugin\CookiePlugin;
use Http\Client\Common\Plugin\RedirectPlugin;
use Http\Client\Common\PluginClient;
use Http\Message\CookieJar;
@gnumoksha
gnumoksha / openpgp.txt
Created March 14, 2019 23:17
Identidade Vinculada do OpenKeychain
View openpgp.txt
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:713beb28e0c16bad0359da1ce724f606efff66f7]
@gnumoksha
gnumoksha / keybase.md
Created March 14, 2019 07:23
keybase 02
View keybase.md

Keybase proof

I hereby claim:

  • I am gnumoksha on github.
  • I am gnumoksha (https://keybase.io/gnumoksha) on keybase.
  • I have a public key ASC4MqcMxqoFlZfcAbb4Z0ByiTrgsmZxs5pIFs5ibsEpXAo

To claim this, I am signing this object:

View onename.com.txt
Verifying that "gnumoksha.id" is my Blockstack ID. https://onename.com/gnumoksha
View keybase.md

Keybase proof

I hereby claim:

  • I am gnumoksha on github.
  • I am gnumoksha (https://keybase.io/gnumoksha) on keybase.
  • I have a public key ASCgFWYMc3PEX06aMq2v0Kd6KPY_naq4ZOg-WWpBTEJHFgo

To claim this, I am signing this object:

@gnumoksha
gnumoksha / auto_sync_git.sh
Created June 20, 2016 19:39
Does the git pull of all subdirectories
View auto_sync_git.sh
#!/bin/bash
# This script syncs (i.e. makes git pull) on a specified directory or, se no
# parameter was specified, in all the subdirectories that are git projects.
#
# Usage:
# ./auto_sync_git.sh directory_of_my_project
# ./auto_sync_git.sh
# An alias to the git binary
@gnumoksha
gnumoksha / telegram-cli_example_usage.md
Last active December 5, 2021 14:24
Telegram-cli example usage
View telegram-cli_example_usage.md

Install the required packages

apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev make git -y

Compile

cd /usr/src
git clone --recursive https://github.com/vysheng/tg.git
View up_pcsensor.sh
#!/bin/bash
# Copyright (C) 2013 Tobias <tobias@gnu.eti.br>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of