Skip to content

Instantly share code, notes, and snippets.

View maz-1's full-sized avatar
🐢
slow to respond

maz-1 maz-1

🐢
slow to respond
  • WolkenVision AG
  • China
View GitHub Profile
diff -Naur old/ifslinux/config_check.c Paragon-715-PRE_NTFS_Linux_9.5_Pro/ifslinux/config_check.c
--- old/ifslinux/config_check.c 2017-09-09 00:07:43.000000000 +0800
+++ Paragon-715-PRE_NTFS_Linux_9.5_Pro/ifslinux/config_check.c 2019-01-05 13:50:57.639006860 +0800
@@ -160,7 +160,7 @@
while (offset<fsize) {
oldfs = get_fs();
set_fs(get_ds());
- ret = vfs_read(filp, in, IN_SIZE, &offset);
+ ret = kernel_read(filp, in, IN_SIZE, &offset);
set_fs(oldfs);
@maz-1
maz-1 / wps
Last active August 21, 2018 18:25
launch wps for linux while hidpi is enabled
#!/bin/sh
me=`basename "$0"`
sed -i 's/WindowIsMaximized=true/WindowIsMaximized=false/g' ~/.config/Kingsoft/Office.conf
export WPS_NO_KDE_NATIVE_DIALOG=1
exec run_scaled /usr/bin/$me "$@"
@maz-1
maz-1 / run.ahk
Created June 30, 2018 14:39
Open arduino projects with per-project settings.
#NoEnv
#NoTrayIcon
SetWorkingDir %A_ScriptDir%
SetRegView 32
SetBatchLines -1
RegRead, ArduinoUninstall, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Arduino, UninstallString
ArduinoEXE := StrReplace(ArduinoUninstall, "uninstall.exe" , "arduino.exe")
SplitPath, A_ScriptDir, OutDirName
@maz-1
maz-1 / sync.sh
Last active March 19, 2018 08:07
repo sync helper script
#!/bin/bash
#MANIFEST=".repo/manifest.xml"
MANIFEST="/tmp/manifest.xml"
cat .repo/manifest.xml | sed '/<!--.*-->/d' | sed '/<!--/,/-->/d' > $MANIFEST
ls .repo/manifests/snippets/ | while read line
do
cat .repo/manifests/snippets/$line | sed '/<!--.*-->/d' | sed '/<!--/,/-->/d' >> $MANIFEST
done
@maz-1
maz-1 / XE42_FIX.diff
Created February 17, 2018 02:58
USB TYPE-C FIX
diff --git a/10.12/Advanced/DSDT-HotPatches/Patches/SSDT-XE42.dsl b/10.12/Advanced/DSDT-HotPatches/Patches/SSDT-XE42.dsl
new file mode 100644
index 0000000..0631dc2
--- /dev/null
+++ b/10.12/Advanced/DSDT-HotPatches/Patches/SSDT-XE42.dsl
@@ -0,0 +1,106 @@
+// An alternate USB-hotplug interrupt method that is non-recursive - dpassmor
+
+DefinitionBlock ("", "SSDT", 1, "hack", "XE42", 0)
+{
;https://autohotkey.com/boards/viewtopic.php?t=3144
#NoEnv
#SingleInstance, Force
SetWinDelay, -1
SetBatchLines, -1
#include <gdip>
Global HMain, XMain, YMain, HChild, XChild, YChild
Scaling_Ratio:=A_ScreenDPI/96
#!/usr/bin/env python3
import sys
import os
from persepolis.scripts import persepolis
persepolis.main()
@maz-1
maz-1 / clink_launch.ahk
Created January 7, 2018 05:42
A clink helper program
@maz-1
maz-1 / headphone.json
Last active September 16, 2017 13:37
Kernel Adiutor custom setting to tweak headphone gain through sound_control
{"version":1,"control":{"apply":"#!\/system\/bin\/sh\n\necho $1 > \/sys\/kernel\/sound_control\/headphone_gain\n#echo \"-20 -20\" > \/sys\/kernel\/sound_control\/headphone_gain","value":"#!\/system\/bin\/sh\n\n\norigval=$(cat \/sys\/kernel\/sound_control\/headphone_gain)\nleftval=${origval% *}\nrightval=${origval#* }\n\nif [ $leftval -ge 172 ]\nthen\n leftval=$(expr $leftval - 256)\nfi\n\nif [ $rightval -ge 172 ]\nthen\n rightval=$(expr $rightval - 256)\nfi\n\necho $leftval $rightval","title":"headphone volume control","description":"headphone volume gain","id":"generic"}}
--- packages/SystemUI/res/layout/status_bar_alarm_group.xml 2017-09-01 06:35:08.616525928 +0000
+++ packages/SystemUI/res/layout-sw410dp/status_bar_alarm_group.xml 2017-09-01 06:35:08.616525928 +0000
@@ -42,6 +42,20 @@
android:layout_height="match_parent" />
</FrameLayout>
+ <com.android.systemui.statusbar.policy.DateView
+ android:id="@+id/date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"