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 | |
import fontforge | |
def main(file): | |
for font in fontforge.fontsInFile(file): | |
f = fontforge.open(u'%s(%s)' % (file, font)) | |
f.generate('%s.ttf' % font) |
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<stdio.h> | |
#include<sys/prctl.h> | |
__attribute__ ((constructor)) static void setup(void) { | |
if(prctl(PR_SET_CHILD_SUBREAPER, 1) != 0){ | |
perror("prctl"); | |
} | |
} |
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 | |
# inspired by https://github.com/busyloop/lolcat | |
import sys | |
import re | |
import os | |
from math import ceil | |
from colorsys import hsv_to_rgb | |
from unicodedata import east_asian_width |
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<sys/prctl.h> | |
#include "subreap.mdh" | |
#include "subreap.pro" | |
/**/ | |
static int | |
bin_subreap(char *nam, char **args, Options ops, UNUSED(int func)) | |
{ | |
int reaping = !OPT_ISSET(ops, 'u'); | |
int result = prctl(PR_SET_CHILD_SUBREAPER, reaping); |
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/zsh -e | |
cd ~/tmpfs | |
mkdir -p .lxc-root .lxc-data/root/etc .lxc-work | |
sudo GDK_DPI_SCALE=$GDK_DPI_SCALE zsh -e - <<'EOF' | |
chown 0:0 .lxc-data/root .lxc-data/root/etc | |
modprobe overlay | |
mountpoint .lxc-root || mount -t overlay -o lowerdir=/,upperdir=$PWD/.lxc-data/root,workdir=$PWD/.lxc-root overlayfs $PWD/.lxc-root |
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 os | |
import sys | |
from urllib.parse import parse_qs | |
import subprocess | |
import json | |
from PyQt5 import QtWebKit, QtWebKitWidgets | |
from PyQt5.QtCore import ( |
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 fcntl | |
import socket | |
import struct | |
import json | |
import urllib.request | |
from dns.resolver import Resolver |
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 socket | |
import struct | |
import traceback | |
import subprocess | |
import time | |
import signal | |
import dnslib |
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
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
grep = auto | |
showbranch = auto | |
[core] | |
excludesfile = ~/.gitconfig.d/gitignore | |
quotepath = false | |
[alias] |
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
//===================================================================== | |
// 拾取颜色并输出 | |
// 返回值: | |
// 0 正常 | |
// 1 被取消 | |
// 2 语法错 | |
//--------------------------------------------------------------------- | |
#include<gtk/gtk.h> | |
#include<ctype.h> | |
//--------------------------------------------------------------------- |
OlderNewer