Skip to content

Instantly share code, notes, and snippets.

View jpace121's full-sized avatar

jpace121

View GitHub Profile
rm -r *.xml private/ public/ enclaves/
@jpace121
jpace121 / home-config-i3-config
Last active January 26, 2023 17:14
i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
@jpace121
jpace121 / container-with-ansible.yaml
Last active April 19, 2022 00:59
run container with ansible
---
- name: Container test.
hosts: localhost
tasks:
- name: Create a container
containers.podman.podman_container:
name: ansible-container
20:52:34 up 192 days, 12:22, 1 user, load average: 0.74, 0.62, 0.49
On Sender:
python -m http.server
ssh -R 8000:localhost:8000 common-account@common-host
On Receiver:
ssh -L 1230:localhost:8000 common-account@common-host
wget locahost:1230
Debian:
https://www.eyrie.org/~eagle/notes/debian/git.html
RPM:
https://github.com/rpm-software-management/tito - makes lots of assumptions...
https://docs.pagure.org/rpkg-util/quick_start.html#new-project -- less assumptions?
http://ftp.rpm.org/max-rpm/
git filter-branch \
--tree-filter 'find . ! \( -path "./config*" -o \
-path "./templates*" -o \
-path "./.git*" -o \
-path "." \) \
-exec rm -fr {} +' \
--prune-empty \
HEAD
@jpace121
jpace121 / git-submodules.md
Created July 11, 2019 04:15 — forked from slavafomin/git-submodules.md
Git submodules best practices

Git submodules best practices

Useful commands

— Clone repository with submodules automatically:

git clone --recursive git@github.com:name/repo.git

— Initialize submodules after regular cloning:

@jpace121
jpace121 / python-templates-ex.py
Created August 10, 2017 19:38
Example of "cpp templates"-type thing in python using the fact Python supports first-class functions and that object constructors are functions. In C++, templates can be used in a similar way.
class Add:
def __init__(self, val):
self.val = val
def mod(self, new_val):
return self.val + new_val
class Mult:
def __init__(self, val):
self.val = val
def mod(self, new_val):
@jpace121
jpace121 / ADC_MSP432.c
Created April 1, 2017 16:44
non working ADC example or MSP432 using DriverLib.
/******************************************************************************
*
* ADC example using DriverLib, external voltage, and measuring two different
* channels.
*
*******************************************************************************/
/*
* P5.4 - A0
* P5.5 - A1