This file contains 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 <string.h> | |
#include <X11/Xlib.h> | |
#include <X11/extensions/XInput2.h> | |
static Window create_win(Display *dpy) | |
{ | |
Window win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0, 200, | |
200, 0, 0, WhitePixel(dpy, 0)); | |
Window subwindow = XCreateSimpleWindow(dpy, win, 50, 50, 50, 50, 0, 0, |
This file contains 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 @mmozeiko's libx + EGL example ported to xcb + EGL | |
// Original code: https://gist.github.com/mmozeiko/911347b5e3d998621295794e0ba334c4 | |
// It requires EGL_EXT_platform_xcb extension, so if your system is circa the end of 2021 or newer you should be fine. | |
// Also, I don't know if it works on nvidia. LMK if you test it | |
// example how to set up OpenGL core context on X11 with EGL | |
// and use basic functionality of OpenGL 4.5 version | |
// to compile on Ubuntu first install following packages: build-essential libxcb1-dev libgl-dev libegl-dev, then run: |
This file contains 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
// RTFM. Starting from page 160 | |
// https://edge.edx.org/c4x/BITSPilani/EEE231/asset/8086_family_Users_Manual_1_.pdf | |
// NOTE: this leaks all the memory in the world, but maybe I don't care | |
// How to test: compile .asm files with NASM and then provide them to this program | |
// then compare the output to the asm source code. I'll make a proper testing harness | |
// in the future maybe. | |
main :: () { | |
args := get_command_line_arguments(); |
This file contains 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
;; Meow experiments. Unfortunately didn't quite worked out for me for now, | |
;; so go back to trusty evil | |
(use-package meow | |
:init | |
(define-key input-decode-map (kbd "C-[") [control-bracketleft]) | |
(global-set-key [control-bracketleft] 'ignore) | |
(global-set-key [control-bracketleft] 'meow-insert-exit) | |
(setq meow-expand-hint-counts | |
'((word . 0) | |
(line . 0) |
This file contains 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
#!/path/to/jai-linux | |
#import "Basic"; | |
#import "Compiler"; | |
#run { | |
set_build_options_dc({.do_output = false}); | |
print("Hello!\n"); | |
} |
This file contains 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
Q: Artix s6 wiki? | |
A: https://wiki.artixlinux.org/Main/S6 | |
Q: How to get s6 service for a program? | |
A: instal program-s6 package | |
Q: Does the service get enabled after reboot? | |
A: No | |
Q: How to enable it then? |
This file contains 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
[tool.poetry] | |
name = "packagename" | |
version = "0.1.0" | |
description = "" | |
authors = ["Valentin Ignatev <valentignatev@gmail.com>"] | |
[tool.poetry.dependencies] | |
python = "^3.7" | |
[tool.poetry.dev-dependencies] |
This file contains 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
[{"code": "Paula-Top", "description": "Paula Top by Related Apparel.\u00a0This classic cut tee has a boxy fit and comes in a beautiful black and grey wool blend filigree style patterned fabric. Wear over jeans or pair with the matching Margaux Skirt.", "gbp_price": "62.50", "sale_discount": 50.0, "gender": "F", "stock_status": {"UK6": 1, "UK10": 1, "UK14": 1, "UK12": 1, "UK8": 3}, "designer": "Related", "link": "http://www.oxygenboutique.com/Paula-Top.aspx", "raw_color": "black", "images": ["http://oxygenboutique.com/GetImage/cT0xMDAmdz04MDAmaD02MDAmUEltZz1hYTUzNTAyZS05YjA2LTRhZmMtOWQzZi0wZGQ4OGJlYjBjZGYuanBn0.jpg"], "type": "A", "name": "Related Paula Top"}, | |
{"code": "Selena-Gown", "description": "Selena Gown by Related. This elegant show piece has a slim silhouette with a fitted bodice to enhance your waist. Cut from pale grey floral jacquard it has a subtle shimmer that's just right for your evening soirees.", "gbp_price": "125.00", "sale_discount": 50.0, "gender": "F", "stock_status": {"UK6": 1, "UK10": 1 |
This file contains 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
#! -*- coding: utf-8 -*- | |
import sys | |
# param_name: required | |
PARAMS = { | |
'--integer': True, | |
'--boolean': True, | |
'--string': False, | |
} |
This file contains 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
#! -*- coding: utf-8 -*- | |
def divide(n, m): | |
# Выходной список интервалов | |
intervals = [] | |
# Количество элементов в каждой части | |
el_count = n / m | |
# Количество элементов вектора, не попадающих в части | |
rest_part = n % m |
NewerOlder