Skip to content

Instantly share code, notes, and snippets.

View alezhu's full-sized avatar
🏠
Working from home

Alexandr Zhuravlev alezhu

🏠
Working from home
View GitHub Profile
@alezhu
alezhu / update_wifi_drv.sh
Created December 25, 2018 21:04
GMOLO Wifi Realtek RTL8723BU chipset (0bda:b720)
#!/bin/sh
sudo apt-get install git build-essential linux-headers-$(uname -r)
git clone https://github.com/lwfinger/rtl8723bu
sed -i 's/EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE/#EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE/g' ~/rtl8723bu/Makefile
cd rtl8723bu
make
sudo make install
xed admin:///etc/modprobe.d/blacklist.conf
@alezhu
alezhu / htix5288.service
Last active December 25, 2018 20:36
GMOLO touchpad
[Unit]
Description=HTIX5288 driver workaround
[email protected]
After=systemd-user-sessions.service [email protected] plymouth-quit.service systemd-logind.service suspend.target
[Service]
ExecStart=/usr/local/bin/touchpad.sh
[Install]
WantedBy=multi-user.target suspend.target
@alezhu
alezhu / transform.xslt
Last active September 18, 2018 08:11
XML parse with slip tags. SimpleTransformation
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="ROOT"/>
<tt:variable name="skip"/>
<tt:template>
<root>
<values>
<tt:assign to-var="skip" val="0"/>
<tt:group>
<tt:d-cond frq="?">
@alezhu
alezhu / data.xml
Last active September 18, 2018 07:27
xmlsimple transfomation with unnessesary tags
<root>
<values>
<material>1</material>
<prod>XXXX</prod>
<foo>bar</foo>
<values>
</root>
REPORT ZTEST_SORT_DUP_DELETE_VS_HASH.
TYPES:
BEGIN OF ts_data,
num TYPE i,
END OF ts_data.
TYPES:
BEGIN OF ts_result,
lines TYPE i,
@alezhu
alezhu / zaz_unlock_editor.abap
Created August 18, 2017 17:26
Разблокировка редактора для программы
REPORT zaz_unlock_editor.
PARAMETERS p_prog TYPE trdir-name OBLIGATORY.
START-OF-SELECTION.
UPDATE PROGDIR SET edtx = space WHERE name = p_prog AND edtx = 'X'.
COMMIT WORK.
WRITE 'Done'.
*DEFINITION
private section.
types:
begin of ts_dest,
bskey type SLD_BSKEY,
logsys type TBLSYSDEST-logsys,
dest type TBLSYSDEST-rfcdest,
end of ts_dest,
tt_dest type HASHED TABLE OF ts_dest with UNIQUE key bskey.
class-methods SY2RETURN
exporting
!ES_RETURN type BAPIRET2
changing
!CT_RETURN type BAPIRET2_T optional .
METHOD sy2return.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = sy-msgty
@alezhu
alezhu / class_decorator.ts
Last active July 9, 2018 08:18 — forked from remojansen/class_decorator.ts
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@alezhu
alezhu / ZCL_TVARVC.abap
Last active June 4, 2024 11:33
Class to work with TVARVC table (get value, get_range, check value equal)
class ZCL_TVARVC definition
public
abstract
final
create public .
public section.
class-methods CHECK_VALUE
importing