Skip to content

Instantly share code, notes, and snippets.

View vrbadev's full-sized avatar
🇺🇦

Vojtěch Vrba vrbadev

🇺🇦
View GitHub Profile
@primaryobjects
primaryobjects / hotspot-keep-alive.ps1
Last active June 24, 2024 13:30
Script to Enable Windows 10 Mobile Hotspot Automatically After Reboot
# https://superuser.com/a/1434648
Add-Type -AssemblyName System.Runtime.WindowsRuntime
$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0]
Function Await($WinRtTask, $ResultType) {
$asTask = $asTaskGeneric.MakeGenericMethod($ResultType)
$netTask = $asTask.Invoke($null, @($WinRtTask))
$netTask.Wait(-1) | Out-Null
$netTask.Result

FreePalestine.Dev

Installing ROS Noetic on Raspberry Pi 4

Hello Everyone. I've been trying to install ROS Noetic on Raspbian GNU/Linux 10 (buster) from source but it was like a nightmare. Finally, I was able to install it and I want to share it with you.

Steps:

$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

@lightrush
lightrush / README.md
Last active September 2, 2023 22:57
Normalize volume level with PulseAudio

Normalize volume level with PulseAudio and simultaneous output

This should work conceptually on any Linux OS with PulseAudio but these particular instructions are for Ubuntu. There are two major reasons for using simultaneous output. The first is self-evident - we can output to say a bluetooth headset and wired headphones at the same time to enable two people to watch a movie with headphones on a single computer. The second reason is a sort of a convenience for setup. We know the simultaneous sink name so the default.pa config would work without modification so long as simultaneous output is enabled. If we were to set this up without that, we'd have to customize the config with our specific device sink name. That's totally doable but personally I always setup simultaneous output. That's why I haven't described the alternative in this gist.

@addisonElliott
addisonElliott / DE10SoCNanoBasicGuide.md
Last active November 14, 2023 08:28
This is a basic guide for building a program on the DE10 Nano SoC. This walks through using Quartus Prime, Qsys, and EDS from start to finish. The program counts up four LEDs on the HPS

I successfully created a project instantiating the HPS in Qsys. I added a parallel I/O in Qsys to allow the HPS to communicate with the LEDs via the HPS-to-FPGA lightweight bus. From there, I generated a preloader and U-boot along with the SOF file. I also wrote a simple C program that counts from 0-15 and sets the LEDs to that value every second. This encompasses about every step required to be able to communicate between the FPGA and HPS, so this is definitely a first step. I'm going to document what I did and how you guys can get this running.

I did this on Windows since that is my primary OS. Things are different on Linux, so you will have to figure them out if you try to do this on Linux.

File Structure

DE10NanoUART-FPGA

  • Project containing everything necessary to get exactly what I have running
  • HPS_FPGA_LED - Source code and makefile for the C program to blink LEDs
  • hps_isw_handoff - ISW stands for Initial SoftWare so it is the first thing to be ran AFTER the hardcoded bootrom is loa
@awesomebytes
awesomebytes / debian_from_ros_pkg.md
Last active June 27, 2024 08:01
How to create a debian from a ROS package
@laobubu
laobubu / ABOUT.md
Last active May 27, 2024 21:40
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
@friendly
friendly / wavelength_to_rgb.R
Created October 24, 2016 19:50
Convert wavelength of color to RGB
#' Wavelength to RGB
#'
#' This function converts a given wavelength of light to an
#' approximate RGB color value.
#'
#' @param wavelength A wavelength value, in nanometers, in the human visual range from 380 nm through 750 nm.
#' These correspond to frequencies in the range from 789 THz through 400 THz.
#' @param gamma The \eqn{\gamma} correction for a given display device. The linear RGB values will require
#' gamma correction if the display device has nonlinear response.
#' @return a color string, corresponding to the result of \code{\link[grDevices]{rgb}} on the
@iamtekeste
iamtekeste / Download Google Drive files with WGET
Created July 8, 2015 11:00
Download Google Drive files with WGET
Download Google Drive files with WGET
Example Google Drive download link:
https://docs.google.com/open?id=[ID]
To download the file with WGET you need to use this link:
https://googledrive.com/host/[ID]
Example WGET command:
@linuxster
linuxster / ILP.ipynb
Last active August 9, 2023 16:43
ILP example in python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mattwilliamson
mattwilliamson / avrdude.conf
Created June 1, 2012 15:51
ATmega1284 AVRDude support
#------------------------------------------------------------
# ATmega1284
#------------------------------------------------------------
# similar to ATmega164p
part
id = "m1284";
desc = "ATMEGA1284";
has_jtag = yes;