Skip to content

Instantly share code, notes, and snippets.

@qcho
qcho / aliases\Logitech_G923_TRUEFORCE_Racing_Wheel_PS_USB.xml
Created August 1, 2021 03:00
City Car Driving Preset - Logitech G923 TRUEFORCE Racing Wheel PS
<?xml version="1.0"?>
<Alias targetDevice1="Logitech G923 TRUEFORCE Racing Wheel PS USB"
targetDevice2="Logitech G923 TRUEFORCE Racing Wheel PS"
targetProductGuid="{C266046D-0000-0000-0000-504944564944}">
<Axis axis="x" name="Steering" />
<Axis axis="y" name="Gas" />
<Axis axis="rz" name="Brake" />
<Axis axis="slider:0" name="Clutch" />
<Button number="1" name="X" />
<Button number="2" name="Square" />
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active October 22, 2025 09:55
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@marlhammer
marlhammer / CustomFocusTraversalPolicy.java
Last active December 21, 2015 18:39
Custom Focus Traversal Policy for Java Swing applications.
import java.awt.Component;
import java.awt.Container;
import java.awt.FocusTraversalPolicy;
import java.util.ArrayList;
public class CustomFocusTraversalPolicy extends FocusTraversalPolicy {
private ArrayList<Component> order;
@puffy
puffy / postgresql os x ordering
Created February 11, 2012 16:38
Существует проблема сортировки текстовых полей postgresql на Mac OS X (возможно и FreeBSD, не знаю как сейчас) при использовании мультибайтовой кодировки UTF-8. Здесь приведен один из вариантов решения данной проблемы.
# psql -h localhost postgres
postgres=# create database mydb_test with lc_collate='C';
ERROR: new collation (C) is incompatible with the collation of the template database (ru_RU.UTF-8)
HINT: Use the same collation as in the template database, or use template0 as template.
postgres=# UPDATE pg_database SET datallowconn = TRUE WHERE datname = 'template0';
postgres=# create database mydb_test with lc_collate = 'C' template = template0;