Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Ioannis Valasakis wizofe

🎯
Focusing
Block or report user

Report or block wizofe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wizofe
wizofe / python2pdf.sh
Last active Aug 15, 2019 — forked from smoitra87/python2pdf.sh
Convert python files to pdf and concatenate all pdfs. Requires pygmentize, pdflatex and pdftk
View python2pdf.sh
#!/bin/sh
# Run as ./python2pdf.sh $(ls *.py)
# For Debian the requirements are
# sudo apt install pdftk python3-pygments texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
outdir=${HOME}/tmp
mkdir ${outdir}
allpdfs=""
@wizofe
wizofe / python2pdf.sh
Created Aug 15, 2019 — forked from smoitra87/python2pdf.sh
Convert python files to pdf and concatenate all pdfs. Requires pygmentize, pdflatex and pdftk
View python2pdf.sh
#!/bin/sh
allpdfs=""
for f in "$@" ; do
filename=$(basename "$f")
filename="${filename%.*}"
pygmentize -f tex -O linenos -O title=$( echo $filename | tr '_' '-').py -O full -O style=default -o /tmp/$filename.tex $f
pdflatex -jobname=$filename -output-directory=/tmp /tmp/$filename.tex
allpdfs="$allpdfs /tmp/$filename.pdf"
View psboom.py
from __future__ import print_function
import os
import glob
import re
import json
from pprint import pprint
import comtypes.client as ct
from comtypes import COMError
### Credits:
@wizofe
wizofe / gist:8726a97b2fbba66ecf2f31962d6f0ffa
Created Apr 12, 2019 — forked from todgru/gist:4128695
Git Keeps asking for username password clone ssh git https
View gist:8726a97b2fbba66ecf2f31962d6f0ffa
View keybase.md

Keybase proof

I hereby claim:

  • I am wizofe on github.
  • I am wizofe (https://keybase.io/wizofe) on keybase.
  • I have a public key ASBu40xOEbGwtW3EyyMTghrgv90RTWbjkkPtDE0UU5sexQo

To claim this, I am signing this object:

@wizofe
wizofe / hk960mode
Last active Jul 29, 2018
hikey960-modes
View hk960mode
╔═══════════════╦═════════════════════╤═════════════╤═══════════════╤═══════════════╗
║ Name ║ Link / Switch │ Normal Mode │ Fastboot Mode │ Recovery Mode ║
╠═══════════════╬═════════════════════╪═════════════╪═══════════════╪═══════════════╣
║ Auto Power up ║ Link 1-2 / Switch 1 │ closed / ON │ closed / ON │ closed / ON ║
║ Recovery ║ Link 3-4 / Switch 2 │ open / OFF │ open / OFF │ closed / ON ║
║ Fastboot ║ Link 5-6 / Switch 3 │ open / OFF │ closed / ON │ open / OFF ║
╚═══════════════╩═════════════════════╧═════════════╧═══════════════╧═══════════════╝
@wizofe
wizofe / servant.sh
Last active Jul 12, 2018
Start systemd/init level services sequentially
View servant.sh
#!/bin/sh
# Start all system services sequentially
wants=$(systemctl show -p Wants multi-user.target | sed 's/^Wants=//' | tr ' ' '\n' | sort)
log=/var/tmp/multi-user-steps-$(date +%Y%m%d-%H%M%S)
log () {
echo "$* ..." | tee -a "$log"
sync
View newtrace.py
SYSCALL(args) = return
Traceback (most recent call last):
File "tps.py", line 2, in <module>
os.getgrouplist('wizofe', 20)
FileNotFoundError: [Errno 2] No such file or directory
madvise(0x101956000, 0x3000, 0x5) = 0 0
open("/dev/dtracehelper\0", 0x2, 0xFFFFFFFFEE6E8BA0) = 3 0
ioctl(0x3, 0x80086804, 0x7FFEEE6E8B00) = 0 0
close(0x3) = 0 0
access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0) = -1 Err#2
@wizofe
wizofe / dtrace.log
Created Apr 4, 2018
dtrace_python_posix
View dtrace.log
SYSCALL(args) = return
== CPython 3.8.0a0 (heads/master:da58533ac6, Apr 3 2018, 16:54:53) [Clang 9.1.0 (clang-902.0.37.1)]
== Darwin-17.5.0-x86_64-i386-64bit little-endian
== cwd: /Volumes/pythontesting/cpython/build/test_python_26294
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 2.15 [1/1] test_posix
testNoArgFunctions (test.test_posix.PosixTester) ... ok
test_access (test.test_posix.PosixTester) ... ok
@wizofe
wizofe / pyfailed.sh
Created Apr 3, 2018
pydev failed test
View pyfailed.sh
======================================================================
ERROR: test_getgrouplist (test.test_posix.PosixTester)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/wizofe/kano/cpython/Lib/test/test_posix.py", line 972, in test_getgrouplist
self.assertIn(group, posix.getgrouplist(user, group))
OSError: [Errno 25] Inappropriate ioctl for device
----------------------------------------------------------------------
You can’t perform that action at this time.