This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import xlsxwriter, os, re, sys | |
| from os.path import join as pjoin, isdir | |
| from datetime import timezone, datetime, timedelta | |
| from pygit2 import Repository as GR, Tree, Blob, Diff, GIT_SORT_REVERSE, GIT_SORT_TIME | |
| from functools import reduce | |
| CONTEXT_LINES = 100 | |
| OUTFILE = 'winman-patches.xlsx' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <assert.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <sys/socket.h> | |
| #include <sys/un.h> | |
| char buf[1024]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # the open is done right away, reading however, is done only after a | |
| # connection is established to the unix domain socket. This keeps the file | |
| # around, and also "waits" for the last write from the producer process to | |
| # happen. (Tested with socat version 1.7.3.2(-1 debian testing) | |
| socat open:/proc/$PID/fd/$FD unix-listen:/tmp/$PID.$FD.sock & | |
| # Wait until the producer process exits, then "retrieve" the file. | |
| socat unix-connect:/tmp/$PID.$FD.sock -> /tmp/the-file # -> it is! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from glob import glob | |
| from os import readlink, getenv | |
| from sys import argv, exit | |
| def is_spotify(): | |
| for path in glob('/proc/*/exe'): | |
| try: | |
| if readlink(path) == '/usr/share/spotify/spotify': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Some sandboy settings in firefox | |
| 1. Add /dev/snd/ to the write_path_whitelist | |
| 2. Add ioctl syscall (no. 16 for linux-amd64) to syscall_whitelist | |
| ## See the following | |
| ``` | |
| security.sandbox.content.level;3 | |
| security.sandbox.content.read_path_whitelist; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// this is mix in glsl terms | |
| template <typename T, typename S> | |
| static inline float mix(T a, T b, S t) { | |
| return (1 - t) * a + t * b; | |
| } | |
| template <typename T, typename S> | |
| static inline T quadratic_bezier(T a, T b, T c, S t) { | |
| T d = mix(a, b, t); | |
| T e = mix(b, c, t); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # According to: https://superuser.com/a/1209478/60220 | |
| $sinature = @" | |
| [DllImport("user32.dll")] | |
| public static extern bool SystemParametersInfo(int uAction, int uParam, ref | |
| int lpvParam, int flags ); | |
| "@ | |
| $systemParamInfo = Add-Type -memberDefinition $signature -Name SloppyFocusMouse -passThru | |
| [Int32]$newVal = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| export WINEPREFIX=$PWD | |
| case "$1" in | |
| setup) | |
| mkdir -p ~/Games/anno-1602 | |
| cd ~/Games/anno-1602 | |
| winetricks winxp | |
| winetricks ddr=gdi # do I need this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import sys | |
| num_vert, num_face, num_edge = 0, 0, 0 | |
| not_handled_lines = 0 | |
| expect_header = True | |
| expect_count = None | |
| expect_vertices = 0 | |
| expect_faces = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| export WINEPREFIX=$PWD | |
| case "$1" in | |
| setup) | |
| mkdir -p ~/Games/anno-1503 | |
| cd ~/Games/anno-1503 | |
| winetricks winxp directplay directmusic vd=off | |
| case "$2" in |