Skip to content

Instantly share code, notes, and snippets.

View Oxore's full-sized avatar

Vladimir Novikov Oxore

  • Saint Petersburg, Russia
View GitHub Profile
@dnmodder
dnmodder / fixcontroller.py
Last active March 10, 2024 14:25
This script should no longer be necessary thanks to the latest changes made to the master branch of the xpad [https://github.com/paroj/xpad] driver, please give it a try and report any regressions you find.
#!/usr/bin/env python3
import os
import sys
try:
import usb.core
import usb.util
except ImportError:
Утренний Ульяновск вносил уныние в душу программиста Рицку. Мокрый асфальт, утрамбованный песок, проезжающие машины. Люди, стоящие в очереди к автобусу. Проверив свой плеер на наличие "Ночных Грузчиков", программист двинулся из дома в "Симтек". Сев в свой очередной старенький троллейбус "Следует в депо через ЦКГБ", детектив понял, что сегодня он не хочет ехать до Сиреневого проезда. Выйдет на "Врача Михайлова". Или раньше. Или - позже. Part-time work во всей его красе. В офисе достав из ранца чемонданчик Thinkpad-а, он разрядит его ровно наполовину, прежде чем вспомнит про зарядник. Как и про то, что задачи нужно ставить в "In Progress".
В таск-трекере были видны очередные задачи от отдела маркетинга, тихо сошедшего с ума от жизни иллюзий. Они уже не могут позволить себе пойти на работу со стоящим клоком волос. Оглядев спринт ещё раз, Рицка открыл исходники RitsuFramework и стал рассматривать их. Строчка "Implementation stupid web framework for learn PHP" не сулила ничего хорошего. Но и ничего плохого в ней н
@Twi1ightSpark1e
Twi1ightSpark1e / README.md
Last active May 17, 2019 21:48
My QEMU setup

This gist describes how to use QEMU with NAT+DHCP networking

It will usually be enough to reproduce the following steps:

  1. Copy starter script to your VM directory
  2. Merge/copy net configuration
  3. Copy dnsmasq configuration
  4. (optional) Make sure that /dev/hugepages mounted with hugetlbfs (you can use my script to do it every startup)
  5. Change everything as you want (like IP addresses, VM HDD filename, etc.)
  6. Execute starter script
@nepsilon
nepsilon / git-change-commit-messages.md
Last active June 2, 2024 23:31
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@bellbind
bellbind / hello-asm.c
Last active August 22, 2018 23:04
[clang][gcc][c][osx] inline asm to syscall on OSX amd64
/* clang hello-asm.c -o hello-asm */
int main() {
long write = 0x2000004; /* syscall "write" on MacOS X */
long stdout = 1;
char * str = "Hello World\n";
unsigned long len = 12;
unsigned long ret = 0;
/* ret = write(stdout, str, len); */
__asm__("movq %1, %%rax;\n"
"movq %2, %%rdi;\n"
@shortsightedsid
shortsightedsid / cl-udpip.lisp
Created October 27, 2014 22:01
Short guide to UDP/IP Client/Server programming in Common Lisp using usockets
; Short guide to UDP/IP Client/Server programming in Common Lisp using usockets
;
; The main reason for this guide is because there are very few examples that
; explain how to get started with socket programming with Common Lisp that I
; could understand.
; After working on a short example on TCP, I found the
; need for a UDP tutorial. So, here goes.
; As usual, we will use quicklisp to load usocket.
@shortsightedsid
shortsightedsid / cl-tcpip.lisp
Last active January 15, 2024 02:36
Short guide to TCP/IP Client/Server programming in Common Lisp using usockets
; Short guide to TCP/IP Client/Server programming in Common Lisp using usockets
;
; The main reason for this guide is because there are very few examples that
; explain how to get started with socket programming with Common Lisp that I
; could understand. After spending a day trying, I finally came up with a small
; bit of code that makes it easy to understand the basics. I've written this
; primarily for myself, but should help others get started as well.
; As usual, we will use quicklisp to load usocket.
@lirenlin
lirenlin / build-gcc.md
Last active October 1, 2023 16:57
build cross arm-gcc with newlib

##Set environment variables

export TARGET=aarch64-none-elf
export PREFIX=/work/public/$TARGET
export PATH=$PATH:$PREFIX/bin

##Build binutils

mkdir build-binutils
cd build-binutils

Music Naming Conventions

This document specifies the naming conventions for my DJ music collection. This includes formatting for ID3 tags as well as directory structure and file naming conventions.

Track file types

All music must be either a 320kbs MP3 or a 16bit or 24bit unsigned PCM stream stored in a AIFF file. Both of these files are commonly readable by