Skip to content

Instantly share code, notes, and snippets.

View a-andreyev's full-sized avatar
🕊️

Alexey Andreyev a-andreyev

🕊️
View GitHub Profile
@MarSoft
MarSoft / gist:83f1fe35c959b15cf321
Created March 6, 2015 21:16
qemu-fdt PKGBUILD patch
# Maintainer: Josh Cartwright <joshc@eso.teric.us>
# Based on extra/qemu maintained by Tobias Powalowski <tpowa@archlinux.org>
pkgname=qemu-fdt
pkgver=1.5.0
pkgrel=2
pkgdesc="A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation."
arch=('i686' 'x86_64')
license=('GPL2' 'LGPL2.1')
url="http://wiki.qemu.org/Index.html"
makedepends=('texi2html' 'perl' 'python2')
.gist {
color: #000;
}
.gist div {
padding: 0;
margin: 0;
}
.gist .gist-file {
@cowboycoded
cowboycoded / rounded_box_gist.css
Created April 8, 2011 18:13
styles for rounded box gist
.gist{
margin: 15px 0 !important;
}
.gist-file{
border: none !important;
}
.gist-meta{
border: 1px solid #D2d2d2 !important;
@albertcarrete
albertcarrete / readme.md
Last active December 28, 2017 06:36
Surface Pro 4 Arch Linux Installation

Dual Booting Arch Linux / Windows 10 on a Surface Pro 4

Device: Surface Pro 4

OS: Windows 10 / Arch Linux 4.3.3 - 2016.01.01

Method: Arch Linux USB Installer

Shrink volume in Windows 10

Follow the instructions in disk partition windows.

Boot from USB

@digetx
digetx / gist:99d62b96823bdfe2dc49dfbd372a65e6
Last active May 30, 2018 12:05
Grate-driver compilation instructions
General rules:
----------------------
1. Use the master branches.
2. Install autotools and gcc.
3. Compile and install libdrm first.
4. Use the most recent mainline linux kernel or at least the most recent stable.
5. Update all libdrm / opentegra / mesa at once as there could be interdependencies, start from libdrm.
libdrm:
----------
@soemarko
soemarko / theme.html
Created November 26, 2011 16:18
embed github gist to tumblr
<!-- Add the following lines to theme's html code right before </head> -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script>
<!--
Usage: just add <div class="gist">[gist URL]</div>
Example: <div class="gist">https://gist.github.com/1395926</div>
-->
@klalle
klalle / EnergyMeter.ino
Last active March 28, 2020 00:13
EnergyMeter
/*
Reads voltage and power from China-style energy meter.
Collecting data by eavesdropping on the MOSI-line (master in slave out)
between the energy monitoring chip (ECH1560) and the main processor*/
const int CLKPin = 2; // Pin connected to CLK (D2 & INT0)
const int MISOPin = 5; // Pin connected to MISO (D5)
//All variables that is changed in the interrupt function must be volatile to make sure changes are saved.
volatile int Ba = 0; //Store MISO-byte 1
@fgsahoward
fgsahoward / Dockerfile
Created June 1, 2018 13:43
Qt WebAsm Arch Linux Dockerfile
FROM base/archlinux:latest AS base
RUN pacman -Sy --noconfirm binutils perl python libxcb clang emscripten git make cmake qbs
ENV PATH="/usr/lib/emscripten:${PATH}"
FROM base AS repos-configured
COPY ./configure-qt5-repos.sh ./
RUN ./configure-qt5-repos.sh
FROM repos-configured AS repos-built
@trollixx
trollixx / qt.cfg
Last active January 4, 2021 23:32
Uncrustify configuration for Qt
# Uncrustify 0.60
#
# Qt specific options
#
set FOR foreach
set FOR forever
#
# General options
@yeokm1
yeokm1 / archlinux-rpi3-serial-and-bluetooth.md
Last active October 9, 2021 09:59
Arch Linux Raspberry Pi 3 configuration to use both Serial Debug Port and Bluetooth

The new Raspberry Pi 3 released on 29 Feb 2016 has issues with its UART port as the pinout GPIO 14/15 on the pin header is now based on a low throughput mini-UART.

To understand the issue better than reading the wall of text below, you can see the talk I gave on this issue.

The actual hardware UART on the BCM2837 SoC has now been assigned to handle Bluetooth with the BCM43438 Wifi/Bluetooth chip. More details can be found here and here.

This mini-UART does not produce a stable baud rate as it fluctuates based on the Core clock speed whenever it rises or falls. The result is that the serial debug output is practically unusable. On Raspbian you may see garbage or nothing at all. The solution is simple, add core_freq=250 to /boot/config.txt to cap the core frequency to a constant value. This optio