Skip to content

Instantly share code, notes, and snippets.

View mixaz's full-sized avatar

Mikhail Zemlyanukha mixaz

  • freelancer
  • Russia
View GitHub Profile
@shirriff
shirriff / main.c
Last active March 16, 2024 13:51
Example code using a timer with the BeagleBone Black's PRU microcontroller. This code generates 5 pulses with 100ns width.
/*
* Demonstration of the BeagleBone's PRU, using a timer.
* Ken Shirriff, http://righto.com
*/
#include <stdint.h>
#define DELAY_NS 100 // Use 500000000 for 0.5 second delay
#define WRITE_PIN 15 /* P8_11, Ethernet output data, pr1_PRU0_pru_r30_15 */
// PRU Interrupt control registers
@jadonk
jadonk / README.md
Last active May 23, 2023 16:20
Add X11 to a BeagleBone IoT image

As 'root' perform the following:

git clone https://gist.github.com/jadonk/39d0fcfc323347d88e995cdfee02bdad
apt-get install -y --no-install-recommends xinput xinput-calibrator xorg xserver-xorg-video-fbdev \
    xserver-xorg-video-modesetting lightdm xserver-xorg-core xserver-xorg-input-joystick \
    dbus-x11 openbox cmst compton-conf libfm-tools libgl1-mesa-dri lximage-qt	\
    lxqt-about lxqt-admin lxqt-common lxqt-config lxqt-globalkeys lxqt-notificationd	\
    lxqt-panel lxqt-policykit lxqt-runner lxqt-session lxqt-sudo	\
 obconf pcmanfm-qt qterminal \
@z3ntu
z3ntu / local_manifest.xml
Last active October 10, 2016 19:27
Ubuntu Touch Fairphone 2
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="fairphone" fetch="http://code.fairphone.com/gerrit/fp2-dev" />
<project path="device/fairphone_devices/FP2" name="device/fairphone_devices/fairphone" remote="fairphone" revision="fp2-sibon" />
<project path="kernel" name="kernel/msm" remote="fairphone" revision="fp2-sibon" />
<project path="device/qcom/common" name="device/qcom/common" remote="fairphone" revision="fp2-sibon" />
<project path="bootable/bootloader/lk" name="kernel/lk" remote="fairphone" revision="fp2-sibon" />
</manifest>
@zankich
zankich / bbb_connect.sh
Last active April 1, 2019 10:56
connect to your beaglebone black using the usb->ethernet and forward the internet from your host computer to the beaglebone black
#!/bin/bash
#
# run this script on your linux host computer to connect to the bbb and forward your internet.
# be sure to replace "enp0s20u1" with the appropriate usb device for your bbb, which can be found
# by doing an "ifconfig" on your host computer.
#
sudo -- sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
sudo iptables -A POSTROUTING -t nat -j MASQUERADE
@igorepst
igorepst / gist:091a9c16d08c1981b3ac
Last active June 12, 2021 02:48
Gradle: Copy Proguard's mapping.txt to save it
android {
applicationVariants.all { variant ->
if (variant.getBuildType().isMinifyEnabled()) {
variant.assemble.doLast{
copy {
from variant.mappingFile
into "${rootDir}/mappings"
rename { String fileName ->
"mapping-${variant.name}.txt"
}
@renatolfc
renatolfc / android-client.ovpn
Created December 28, 2014 18:59
A sample OpenVPN client configuration file in the unified format
client
dev tun
remote example.com
resolv-retry infinite
nobind
persist-key
persist-tun
ca [inline]
cert [inline]
key [inline]
@pgilad
pgilad / Instructions.md
Last active March 31, 2024 22:30
Git commit-msg hook to validate for jira issue or the word merge

Instructions

  • copy the file commit-msg to .git/hooks/commit-msg
  • make sure your delete the sample file .git/hooks/commit-msg.sample
  • Make commit msg executable. chmod +x .git/hooks/commit-msg
  • Edit commit-msg to better fit your development branch, commit regex and error message
  • Profit $$

Shell example

@oakwhiz
oakwhiz / configure-crond-journal.md
Last active November 9, 2023 06:47
How to configure crond to send cron job output to the system journal

How to configure crond to send cron job output to the system journal

Keywords: fedora 20, systemd, cron, crond, output, stdout, journal

Problem: You want to capture and read the output of your cron jobs, but the output isn't being logged anywhere.

Solution: Add an argument to crond.

@wbroek
wbroek / genymotionwithplay.txt
Last active November 8, 2024 01:24
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)