Skip to content

Instantly share code, notes, and snippets.

View meramsey's full-sized avatar

Michael Ramsey meramsey

View GitHub Profile
@meramsey
meramsey / gist:b9c98032a34612a1a29f9fd2059156a5
Created February 4, 2023 01:07 — forked from lavalake/gist:d83a5bc14284161433019475013996d1
Android activity manager "am" command help
adb shell am
Activity manager (activity) commands:
help
Print this help text.
start-activity [-D] [-N] [-W] [-P <FILE>] [--start-profiler <FILE>]
[--sampling INTERVAL] [--streaming] [-R COUNT] [-S]
[--track-allocation] [--user <USER_ID> | current] <INTENT>
Start an Activity. Options are:
-D: enable debugging
-N: enable native debugging
@meramsey
meramsey / README.md
Last active October 11, 2021 20:31
Add Copy Path to nautilus

Add Copy Path to nautilus

Download the file then move it and make executable and restart nautilus to see the Copy Path icon

wget https://gist.githubusercontent.com/meramsey/f1d20da371de82e801df19c92a673e63/raw/2bb9cb9007f21e85b00aade70d5db21c41b44f44/nautilus-copy-paths.py
sudo mv nautilus-copy-paths.py /usr/share/nautilus-python/extensions/nautilus-copy-paths.py
sudo chmod +x /usr/share/nautilus-python/extensions/nautilus-copy-paths.py
nautilus -q
@meramsey
meramsey / tailslack.py
Created September 1, 2021 02:22
Python log file tailer with slack alerting capabilities.
#!/usr/bin/python3
import sys
import time
from datetime import date, timedelta
from datetime import datetime
import os
import re
import urllib.request
import requests
import json
@meramsey
meramsey / README.md
Last active August 13, 2021 12:55
Aync Lookup a list of domains IP and ASN Description from a csv
@meramsey
meramsey / git-auto-sign-commits.sh
Created August 10, 2021 14:36 — forked from mort3za/git-auto-sign-commits.sh
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
@meramsey
meramsey / .php-cs-fixer.php
Last active September 30, 2021 13:33
CS-Fixer setup
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('libs')
->exclude('utils')
->name('*.phtml')
->in(__DIR__)
//->append([
//__DIR__.'/dev-tools/doc.php',
// __DIR__.'/php-cs-fixer', disabled, as we want to be able to run bootstrap file even on lower PHP version, to show nice message
@meramsey
meramsey / .xonshrc
Last active July 20, 2021 21:13 — forked from eugenesvk/starship_left.toml
Starship prompt Left+Right and config for xonsh shell
# Save to ~/.xonshrc
# https://github.com/anki-code/xontrib-prompt-starship
# Below is example to put in xonsh config ~/.xonshrc for xontrib-prompt-starship
#$STARSHIP_CONFIG = "~/.config/starship_xonsh.toml"
$XONTRIB_PROMPT_STARSHIP_LEFT_CONFIG = "~/.config/starship_xonsh_left.toml"
#$XONTRIB_PROMPT_STARSHIP_RIGHT_CONFIG = "~/.config/starship_xonsh_right.toml"
#$XONTRIB_PROMPT_STARSHIP_BOTTOM_CONFIG = "~/.config/starship_xonsh_bottom.toml"
xontrib load prompt_starship
@meramsey
meramsey / readme.md
Last active January 22, 2022 22:18 — forked from benediktg/readme.md
Send mails from systemd services

Usage

based on https://wiki.archlinux.org/index.php/Systemd/Timers#MAILTO

  • Move systemd-email.sh to /usr/local/bin/systemd-email
  • Move status-email-alerts@.service to /etc/systemd/system/
  • Put OnFailure=OnFailure=status-email-alerts@%n.service into the [Unit] section of a service

Create file /usr/local/bin/systemd-email

@mnesarco
mnesarco / build-installer.py
Created December 27, 2020 13:25
AppImage Auto Installer Builder
#!/usr/bin/python3
#
# Copyright 2020 Frank David Martinez M. (mnesarco at github)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#

Setup

  • Create a developer account with Apple
  • Download and install X-Code from the Apple App Store
  • Open and run X-Code app and install whatever extras it requires
  • Open the preferences pane (cmd+,)
    • click the + in the lower right corner
    • choose Apple ID
    • enter your apple ID and password