Skip to content

Instantly share code, notes, and snippets.

View jostmart's full-sized avatar

jostmart

View GitHub Profile
@jostmart
jostmart / siptrack.py
Created July 11, 2019 15:12 — forked from stemid/siptrack.py
Ansible inventory script for Siptrack (https://github.com/sii/siptrackweb)
#!/usr/bin/env python
# Siptrack dynamic inventory script for Ansible.
# Depends on siptracklib
# * https://github.com/sii/siptracklib
#
#http://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html
#
# by Stefan Midjich <swehack at gmail dot com>
@jostmart
jostmart / 00_play.yml
Created May 30, 2019 13:53 — forked from halberom/00_play.yml
ansible - example of using selectattr to filter on attrs that are defined and true
---
- hosts: localhost
connection: local
gather_facts: False
vars:
apache2_vhosts:
- name: "stage.example.org"
docroot: "/var/www/stage1"
- name: "stage2.example.org"
docroot: "/var/www/stage2"
@jostmart
jostmart / acpi_yogaX1_fedora28
Created November 1, 2018 13:09 — forked from javanna/acpi_yogaX1_fedora28
S3 deep sleep for Lenovo yoga X1 3rd Generation on Fedora 28
This is a step-by-step guide on how make sleep mode work with a Lenovo Yoga X1 3rd generation running Fedora 28 (UEFI based system).
Kernel version: 4.17.4-200.fc28.x86_64
Credits: most of this guide comes from `https://delta-xi.net/#056`. The patch I used is a little different though, taken from http://kernel.dk/acpi.patch
(found through https://bbs.archlinux.org/viewtopic.php?pid=1794150#p1794150), and some of the steps slightly differ as well as mine is a UEFI based system.
1. Reboot, enter BIOS/UEFI. Go to Config - Thunderbolt (TM) 3 - set Thunderbolt BIOS Assist Mode to Enabled. Set also Security - Secure Boot to Disabled.
2. Install iasl (Intel's compiler/decompiler for ACPI machine language) and cpio: `sudo yum install acpica-tools cpio`
#!/usr/bin/perl
#
# Takk Jonas :)
#
use strict;
use File::Path;
my $folder=$ARGV[0];
#!/bin/bash
if [ $# -eq 0 ]; then
echo >&2 "Usage: jstackSeries <pid> <run_user> [ <count> [ <delay> ] ]"
echo >&2 " Defaults: count = 10, delay = 0.5 (seconds)"
exit 1
fi
pid=$1 # required
user=$2 # required
count=${3:-10} # defaults to 10 times
delay=${4:-30} # defaults to 30 seconds

Keybase proof

I hereby claim:

  • I am jostmart on github.
  • I am jostmart (https://keybase.io/jostmart) on keybase.
  • I have a public key whose fingerprint is E887 3BAB 68EF F3AC D09A 479A 4B22 8B5D CB25 2EE8

To claim this, I am signing this object: