Skip to content

Instantly share code, notes, and snippets.

View michel-slm's full-sized avatar

Michel Lind michel-slm

View GitHub Profile
@michel-slm
michel-slm / openpgp.md
Created January 16, 2022 03:20
keyoxide.org proof
@michel-slm
michel-slm / build.log
Last active January 16, 2022 04:40
Building nextcloud-3.4.1-1.fc36 on Fedora Rawhide with GCC 12
Mock Version: 2.15
Mock Version: 2.15
Mock Version: 2.15
ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/nextcloud-client.spec'], chrootPath='/var/lib/mock/f36-build-32398045-4392170/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x7fd68eec0370>timeout=201600uid=1000gid=425user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/nextcloud-client.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\
@michel-slm
michel-slm / gist:a0df6363faf4f93ff6cf
Created April 22, 2015 12:46
Quiz - discover X and Y given product and sum told to different people
"""
X and Y are two different integers, greater than 1, with sum less than 100. S and P are two mathematicians; S knows the sum X+Y, P knows the product X*Y, and both know the information in these two sentences. The following conversation occurs:
P says "I do not know X and Y."
S says "I knew you don't know X and Y."
P says "Now I know X and Y."
S says "Now I know X and Y too!"
@michel-slm
michel-slm / gdoc_dl.py
Created March 8, 2015 06:25
Download a list of Google Drive documents sent in an HTML email
#!/usr/bin/env python2
from bs4 import BeautifulSoup
import re
from sh import wget
def get_gdoc_links(html_doc, prefix='IMG'):
soup = BeautifulSoup(html_doc)
for link in soup.find_all('a'):
href = link.get('href')

Keybase proof

I hereby claim:

  • I am michel-slm on github.
  • I am michel_slm (https://keybase.io/michel_slm) on keybase.
  • I have a public key whose fingerprint is F7E5 714C 2E6C BCC3 89A1 FA06 4AF5 54AB A36A 937A

To claim this, I am signing this object:

@michel-slm
michel-slm / keybase.md
Created July 1, 2014 08:05
Keybase proof

Keybase proof

I hereby claim:

  • I am michel-slm on github.
  • I am michel_slm (https://keybase.io/michel_slm) on keybase.
  • I have a public key whose fingerprint is 5277 F9BB 57DB C63A 5BED 5CDB 7A07 8F2F 8D30 CB5F

To claim this, I am signing this object:

Retrieving master ... processing fdeca4274efd46b4122c3b2cecedb0c06a12019d ... saved.
Retrieving c3dfa345ea9fc33b748c83c20438978809b7773d ... processing c3dfa345ea9fc33b748c83c20438978809b7773d ... saved.
Retrieving b01bce6ee30ec6e34053c5ac008f9109447c6623 ... processing b01bce6ee30ec6e34053c5ac008f9109447c6623 ... saved.
Retrieving 8a2a3e91a580737e0e2d8ae8da498c1d20d55102 ... processing 8a2a3e91a580737e0e2d8ae8da498c1d20d55102 ... saved.
Retrieving 51bf2f3bd72a410d708f4abe7a197ecd5d485626 ... processing 51bf2f3bd72a410d708f4abe7a197ecd5d485626 ... saved.
Retrieving 4c3619547aec4d537107c54b087b2c7c8893bbcc ... processing 4c3619547aec4d537107c54b087b2c7c8893bbcc ... saved.
Retrieving 65eb3dadc84fe64a4aa6f15f54c5cf414ac339d4 ... processing 65eb3dadc84fe64a4aa6f15f54c5cf414ac339d4 ... saved.
Retrieving c98c91f0f0e805173ff12cd40206fa8bd44559bd ... processing c98c91f0f0e805173ff12cd40206fa8bd44559bd ... saved.
Retrieving 2e39d42d98d6ca4e4d0fb830b4cd4420bf52e1ff ... processing 2e39d42d98d6ca4e4d0fb830b4cd4420bf52e1f
@michel-slm
michel-slm / sync-acpi-intel.sh
Created July 14, 2011 07:22
For i915 systems with broken ACPI backlight controls, synchronize the ACPI value with the native control
#!/bin/bash
# Copyright (c) 2011, Michel Alexandre Salim <salimma@fedoraproject.org>
# Permission is hereby granted, without written agreement and without
# license or royalty fees, to use, copy, modify, and distribute this
# software and its documentation for any purpose, provided that the
# above copyright notice and the following two paragraphs appear in
# all copies of this software.
#
# IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
@michel-slm
michel-slm / itms_extract.py
Created April 5, 2011 11:42
iTunes feed extractor
#!/usr/bin/env python
import plistlib
import urllib2
import sys
ITUNES_VER = '7.4.1'
USER_AGENT = 'iTunes/' + ITUNES_VER