This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a ESPHome yaml configuration skeleton for | |
# ESP32-C3 (RISC-V) based boards. | |
# It is known to work on ESP32-C3-DevKitM-1 | |
# This is using stable release of Arduino 2.0.2 as base | |
esphome: | |
name: esp32-c3-test | |
platformio_options: | |
board_build.flash_mode: dio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Author: Stefan Agner | |
import os | |
import sys | |
import time | |
import usb | |
CP210X_VENDOR_SPECIFIC = 0xFF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import time | |
import usb | |
ftdi_eval = { | |
'tty': "/dev/ttyUSB3", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# Python scripts which reads all Python bytecode files (pyc) and clears | |
# the timestamp (set to 0) | |
# This is useful for OSTree which clears modification time of all source | |
# files. Processed bytecode files are then not considered stale anymore. | |
import sys, os | |
import marshal | |
import importlib.util |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Author: Stefan Agner | |
import os | |
import sys | |
import time | |
import usb | |
BITMODE_CBUS = 0x20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include "FreeRTOS.h" | |
#include "task.h" | |
#include "board.h" | |
#include "debug_console_imx.h" | |
double squareroot(double x) | |
{ | |
double it = x; | |
while (fabs(it*it - x) > 1e-13) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"syscall" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define ELEMENTS 100 | |
void quicksort(int array[], int left, int right); | |
void mergesort(int array[], int length); | |
void printarray(int array[], int length) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/bash.bashrc | |
# | |
# https://wiki.archlinux.org/index.php/Color_Bash_Prompt | |
# | |
# This file is sourced by all *interactive* bash shells on startup, | |
# including some apparently interactive shells such as scp and rcp | |
# that can't tolerate any output. So make sure this doesn't display | |
# anything or bad things will happen ! | |
# Test for an interactive shell. There is no need to set anything |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
IN=$1 | |
OUT=`echo "$IN"|sed -e 's/wma$/mp3/'`; | |
echo "Will convert from $IN to $OUT"; | |
echo Extracting... | |
mplayer -ao pcm:waveheader:file=/tmp/audiodump.wav "$IN" 2>/dev/null > /tmp/taginfo; | |
echo Encoding... | |
lame --id3v2-only -m j -h --vbr-new -b 192 "/tmp/audiodump.wav" -o "/tmp/$OUT"; |