Skip to content

Instantly share code, notes, and snippets.

View XioNoX's full-sized avatar

Arzhel Younsi XioNoX

View GitHub Profile
@phred
phred / pedantically_commented_playbook.yml
Last active June 27, 2024 13:39
Very complete Ansible playbook, showing off all the options
---
####
#### THIS IS OLD AND OUTDATED
#### LIKE, ANSIBLE 1.0 OLD.
####
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES
####
#### IF IT BREAKS I'M JUST SOME GUY WITH
#### A DOG, OK, SORRY
####
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@endolith
endolith / export_google_starred_locations.py
Created October 16, 2012 02:29
Export Google Maps starred locations
# -*- coding: utf-8 -*-
"""
Go to Google Bookmarks: https://www.google.com/bookmarks/
On the bottom left, click "Export bookmarks": https://www.google.com/bookmarks/bookmarks.html?hl=en
After downloading the html file, run this script on it to generate a KML.
"""
@djui
djui / saml.py
Last active November 30, 2023 00:26
Python class to fetch a website behind a SAML2 SSO service conforming to the Shibboleth protocol.
from __future__ import print_function
import cookielib
import getpass
import HTMLParser
import re
import sys
import urllib
import urllib2
@joepie91
joepie91 / vpn.md
Last active July 5, 2024 14:35
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@ytti
ytti / jnh_exception_packet_trace.rb
Last active August 22, 2022 11:56
script to turn JunOS Trio exception capture into a PCAP
#!/usr/bin/env ruby
# script to generate PCAP from Trio exception trace. Potentially you may need to change POP_BYTES variable.
# Trio exception trace allows you to capture things like broken packets (checksum error), to see who is sending them
# clogin junos-trio-box | tee exception_trace
# start shell pfe network fpc0
# show jnh 0 exceptions terse
# debug jnh exceptions N discard ## get N from above command
# debug jnh exceptions-trace
@joar
joar / sierra-em7455.md
Last active October 31, 2017 14:58
Sierra EM7455

The final part of the EM7455 Linux driver support is going in Linux v4.7 which will be released in a couple of weeks. It will also be backported to the currently maintained stable kernels, so you should eventually get it through Ubuntu kernel updates.

Sorry it took this long. In theory, any MBIM modem should just work with the existing Linux drivers. But it turned out that the EM7455 needed a small delay during initialization, or it would silently fail to work. The "fix" is a single line of code:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/net/usb/cdc_ncm.c?id=c086e7096170390594c425114d98172bc9aceb8a

>

@joakin
joakin / remote-advice.md
Last active February 26, 2018 17:56
What have you learned by working remote?
@MrXermon
MrXermon / netbox-graph.php
Last active September 3, 2023 15:50
Display interface graphs in Netbox fetched from LibreNMS.
<?php
/*
* Display LibreNMS interface graphs in Netbox
*
* 1. Upload this file into the plugin folder of LibreNMS.
* 2. Generate an API key in LibreNMS and insert the connection details below.
* 3. Create graphs in Netbox using the following URL scheme.
* https://nms.level66.network/plugins/netbox-graph.php?device={{ obj.device.name }}&interface={{ obj.name }}&duration=8h
* 4. Save time in your daily work!
*
class fastnetmon (
Hash $policy_defaults = {}
Hash $policy_overrides = {}
Array[Stdlib::IP::Address,1] $networks = [],
Array[Stdlib::IP::Address,1] $all_networks = [],
Optional[Stdlib::Host] $graphite_host = undef,
) {
$policy_overrides.each |String $network| {
$network = slice_network_constants($network['network'], {'desription' => '$network['desrciption']})
file {"etc/fastnetmodn.d/$network_$network['description'].conf": { ... }