Skip to content

Instantly share code, notes, and snippets.

View greyltc's full-sized avatar
💭
I may be slow to respond.

M. Greyson Christoforo greyltc

💭
I may be slow to respond.
View GitHub Profile
@greyltc
greyltc / PKGBUILD
Created February 3, 2019 10:27
glib2-static
pkgname=glib2-static
pkgver=2.59.1
pkgrel=1
pkgdesc="Low level core library. Static library."
url="https://wiki.gnome.org/Projects/GLib"
license=(LGPL2.1)
arch=(x86_64)
depends=(pcre libffi)
makedepends=(libffi zlib shared-mime-info python libelf git util-linux meson dbus libxslt docbook-xsl)
checkdepends=(desktop-file-utils dbus)
# Generated by NetworkManager
search domain.a domain.b
nameserver 163.1.74.3
nameserver 163.1.74.4
nameserver 163.1.74.6
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver 163.1.74.7
# Generated by NetworkManager
search domain.a domain.bk
nameserver 163.1.74.3
nameserver 163.1.74.4
nameserver 163.1.74.6
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver 163.1.74.7
@greyltc
greyltc / PKGBUILD
Created January 28, 2019 12:10
fixed PKGBUILD
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Andrzej Giniewicz <gginiu@gmail.com>
pkgbase=python-scikit-image
pkgname=('python2-scikit-image' 'python-scikit-image')
pkgver=0.14.2
pkgrel=1
pkgdesc="Image processing routines for SciPy"
arch=('i686' 'x86_64')
url="http://scikit-image.org/"
@greyltc
greyltc / pacman.py.diff
Created January 25, 2019 02:14
patch for fixing pacman module in ansible
--- /usr/lib/python3.7/site-packages/ansible/modules/packaging/os/pacman.py.old 2019-01-25 02:11:32.635210517 +0000
+++ /usr/lib/python3.7/site-packages/ansible/modules/packaging/os/pacman.py 2019-01-25 02:11:40.871981413 +0000
@@ -131,30 +131,45 @@
def get_version(pacman_output):
"""Take pacman -Qi or pacman -Si output and get the Version"""
lines = pacman_output.split('\n')
for line in lines:
if 'Version' in line:
return line.split(':')[1].strip()
/usr/bin/python -m pycodestyle --max-line-length 160 --config /dev/null --ignore E402,E741,W503,W504 filename.py
- name: remove test
pacman:
name: linux-gpib
state: absent
@greyltc
greyltc / api.py
Last active January 15, 2019 23:43
api thingy
#!/usr/bin/env python
"""
API access example for https://www.elexonportal.co.uk/
"""
import urllib.request
import xml.etree.ElementTree as ET
API_KEY = "put_yours_here"
@greyltc
greyltc / mountDFS.sh
Created January 6, 2019 17:59
mounts the physics DFS folder, use with sudo
#!/usr/bin/env bash
MOUNT_POINT=/mnt/dfs
# mounts the physics DFS folder, use with sudo
echo Enter your physics username:
read PHYSICS_USER
import logging
root = logging.getLogger()
root.setLevel(logging.INFO)
my_logger = logging.getLogger("my_logger")
my_logger.setLevel(logging.INFO)
my_logger.info('info')
my_logger.warning('warning')
my_logger.error('error')