Skip to content

Instantly share code, notes, and snippets.

View XRay3D's full-sized avatar
💭
I may be slow to respond.

XRay3D

💭
I may be slow to respond.
View GitHub Profile
@skammer
skammer / flashlight.sh
Created November 16, 2023 01:49
Aurora OS flashlight toggle script. Watches over the unused orange button on the R570E phone.
#!/bin/bash
set -e
COUNTER=0
cat /dev/input/event1 | \
while IFS= read -s -d '' -r -n1 foo ; do
if [ "$foo" == "<" ]
then
@b-epelbaum
b-epelbaum / 1. build_procedure.txt
Last active June 23, 2025 08:47
Full Qt 6.x Windows Static build procedure
Prerequisites :
1. Windows 10 host
2. Visual Studio 2019 and higher with latest Windows SDK
3. 150 GB free space
4. The following tools should be installed :
a) Cmake 3.20 and higher ( https://cmake.org/ )
b) Strawberry Perl ( https://strawberryperl.com/ )
c) Python 3 and higher ( https://www.python.org/downloads/windows/ )
d) OpenSSL binaries and libraries v1.1.x ( not 3.x ) from :https://slproweb.com/download/Win64OpenSSL-1_1_1s.exe
5. Make sure that all tools have added themselves to PATH environment variable
@rexim
rexim / simple_openssl_client.c
Last active March 25, 2025 23:04
Simple OpenSSL example that makes HTTPS request
// cc `pkg-config --cflags openssl` -o simple_openssl_client simple_openssl_client.c `pkg-config --libs openssl`
// Copyright 2021 Alexey Kutepov <[email protected]>
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
@madkoding
madkoding / pair-dual-boot-bluetooth.md
Last active June 27, 2025 19:05
Pairing bluetooth devices in dual boot with Linux Ubuntu and Windows 10/11

Pairing Bluetooth Devices in Dual Boot with Linux Ubuntu and Windows 10/11

Introduction

This guide provides updated instructions for pairing Bluetooth devices (such as keyboards or mice) in a dual-boot environment with Linux Ubuntu and Windows 10/11, incorporating community feedback and suggestions.

Instructions

1. Pair in Linux First

  • Pair your Bluetooth device in Linux. This is crucial to ensure the LinkKey remains consistent.
  • Note: Do not re-pair the device in Linux after completing the pairing in Windows.
@nikkon-dev
nikkon-dev / FastPimpl.hpp
Created January 15, 2020 22:53
FastPimpl after Yandex.Taxi
#pragma once
#include <type_traits>
#include <utility>
namespace Fast
{
template <typename Type, size_t Size, size_t Alignment>
class FastPimpl
{
public:
@afabri
afabri / five.txt
Created November 27, 2019 08:22
Union of polygons with segments and circular arcs
-2 2 -2 14 -4 14 -4 2
-2 11 8 11 8 13 -2 13
0 2 12 2 12 8 0 8
2 9 5 12 3 14 0 11
9 0 9 12 7 12 7 0
@vicrucann
vicrucann / glsl.xml
Created February 17, 2017 23:17
GLSL syntax highlighter for Qt Creator
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!-- the version of this file shows the largest supported OpenGL version, second digit is the minor patch level (Y.XP = supports GLSL X.Y0 with patchlevel P -->
<language name="GLSL" section="Sources" extensions="*.glsl;*.vsh;*.vert;*.tcsh;*.tcs;*.tesh;*.tes;*.gsh;*.geo;*.geom;*.fsh;*.frag;*.csh;*.cs" mimetype="text/x-glslsrc" version="4.31" kateversion="2.4" author="Robert Menzel ([email protected])" license="LGPL">
<highlighting>
<!-- ####################################################################################################### keywords -->
<list name="keywordsCompatibility">
<!-- compatibility mode, older GLSL versions -->
<item>attribute</item>
@i026e
i026e / git_clear_history
Created January 12, 2017 08:36
clear history
#! /usr/bin/env sh
#http://stackoverflow.com/questions/13716658/how-to-delete-all-commit-history-in-github
#Checkout
git checkout --orphan latest_branch
#Add all the files
git add -A

#Fixing “WARNING: UNPROTECTED PRIVATE KEY FILE!” on Linux

If you are getting this error then you probably reset the permissions on your hidden .ssh directory in your user folder, and your keys aren’t going to work anymore. It’s very important that these files not be writable by just anybody with a login to the box, so openssh will give you an error if you try to use them.

The full error message:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@