Skip to content

Instantly share code, notes, and snippets.

View mikeloveapple2's full-sized avatar

Mike mikeloveapple2

View GitHub Profile
@fm4dd
fm4dd / gcc compiler optimization for arm systems.md
Last active May 26, 2024 10:24
GCC compiler optimization for ARM-based systems

GCC compiler optimization for ARM-based systems

2017-03-03 fm4dd

The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.

-mcpu, -march: Defining the CPU type and architecture

These flags can both be used to set the CPU type. Setting one or the other is sufficient.

# extract linux-3.16 to $linux
# extract rtai-4.1 to $rtai
# have .config ready at $config
# patch kernel
cd $linux
patch -p1 < $rtai/base/arch/x86/patches/hal-linux-3.16-x86-3.patch
# configure kernel
cp $config .config
@chergert
chergert / touchy.py
Created December 20, 2012 09:42
basic touch test using gtk and touch events
#!/usr/bin/env python
import cairo
from gi.repository import Gdk
from gi.repository import Gtk
colors = ['a40000', '75507b', '8ae234', '729fcf', 'f57900',
'c4a000', 'ce5c00', 'eeeeec', '4e9a06', '204a87']
def next_idx(seq):
@mkotsbak
mkotsbak / connect_qmi.sh
Created August 4, 2012 01:02
Connects a modem like Sierra wireless MC7710 using QMI protocol on Debian/Ubuntu using NetCom in Norway
#!/bin/bash
#
# Requires the following line in /etc/network/interfaces:
# iface wwan0 inet dhcp
#
sudo /etc/init.d/network-manager stop
echo AT+CGDCONT=1,"IP","internet.netcom.no" > /dev/ttyUSB2
sudo modprobe qmi_wwan
@debloper
debloper / xrandr.sh
Last active May 14, 2024 20:52
Add system unrecognized but monitor supported resolution in X
#!/bin/bash
# Copyright (c) 2021 Soumya Deb <debloper@gmail.com>
#
# 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 the following conditions:
import QtQuick 1.1
Flickable {
id: flickable
// Updates to the contentWidth and contentHeight of the regular
// flickable will trigger an instant relocation of the content
// item to the bounds of the flickable. We want to controll this
// behavior, so we shadow the properties and ensure they are set
// through the contentItem's own width and hight properties,