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 argparse | |
import logging | |
import os | |
import re | |
import requests | |
import shutil | |
import subprocess as sp | |
import tempfile |
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
diff -udr a/libsrc/vhci_driver.c b/libsrc/vhci_driver.c | |
--- a/libsrc/vhci_driver.c 2018-03-18 22:07:40.126034770 +0800 | |
+++ b/libsrc/vhci_driver.c 2018-03-18 22:10:22.405106067 +0800 | |
@@ -150,7 +150,12 @@ | |
static int vhci_hcd_filter(const struct dirent *dirent) | |
{ | |
- return strcmp(dirent->d_name, "vhci_hcd") >= 0; | |
+ size_t l = strlen(dirent->d_name); | |
+ if (l < 8) |
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 | |
# This is free and unencumbered software released into the public domain. | |
if (file &> /dev/null; test $? -eq 127); then | |
file () { | |
# file -Lbi file | |
local l_mime | |
case "$(echo "$2" | rev | cut -d . -f1 | rev)" in | |
html) l_mime=text/html;; | |
css) l_mime=text/css;; |
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
#define _DEFAULT_SOURCE | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <signal.h> | |
#include <sys/sysinfo.h> | |
#define LEDCTL "/sys/class/leds/led0/brightness" |
NewerOlder