Skip to content

Instantly share code, notes, and snippets.

@efargas
efargas / esp32-spiflash.ino
Created September 12, 2024 23:52 — forked from racerxdl/esp32-spiflash.ino
ESP32 Arduino VSPI SPI Flash Reader / Writer
#include <SPI.h>
#include "FS.h"
#include "SPIFFS.h"
#define CS 5
#define FORMAT false
SPIClass * vspi = NULL;
SPISettings settings(10000000, MSBFIRST, SPI_MODE0);
//SPISettings settings(1000000, MSBFIRST, SPI_MODE0);
@efargas
efargas / remove_crw.cmd
Created February 12, 2017 04:43 — forked from xvitaly/remove_crw.cmd
Remove telemetry updates for Windows 7 and 8.1
@echo off
echo Uninstalling KB3075249 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart
echo Uninstalling KB3080149 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart
echo Uninstalling KB3021917 (telemetry for Win7)
start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart
echo Uninstalling KB3022345 (telemetry)
start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart
echo Uninstalling KB3068708 (telemetry)
#!/bin/bash
# function Extract for common file formats
function extract {
if [ -z "$1" ]; then
# display usage if no parameters given
echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>"
else
if [ -f "$1" ] ; then
NAME=${1%.*}
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <linux/spi/spidev.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/errno.h>
#include <assert.h>
@efargas
efargas / cpstat.bash
Last active April 13, 2016 11:56
Copy files with progress bar
#!/usr/bin/env bash
cpstat () {
tar c "$1" | pv | tar x -C "$2"
}
[Unit]
Description=Prints the IP of eth0 interface in OLED Display
Requires=network.target
After=syslog.target udhcpd.service
[Service]
Type=oneshot
ExecStart=/home/debian/System/printIP_oled.py
#!/usr/bin/env python
# coding=utf-8
import time
import Adafruit_SSD1306
import Image
import ImageFont
import ImageDraw
import sys
[[[HSRC]]]
[[[STEP]]]
[[[DEFINE routername="OpenWrt Barrier Breaker"/]]]
[[[/STEP]]]
[[[STEP]]]
[[[REQUEST]]]
POST /cgi-bin/luci HTTP/1.1
Host: %%%routerip%%%
@efargas
efargas / menu_launcher.py
Created November 4, 2015 20:01 — forked from abishur/menu_launcher.py
A simple menu system using python for the Terminal (Framebufer)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Topmenu and the submenus are based of the example found at this location http://blog.skeltonnetworks.com/2010/03/python-curses-custom-menu/
# The rest of the work was done by Matthew Bennett and he requests you keep these two mentions when you reuse the code :-)
# Basic code refactoring by Andrew Scheller
from time import sleep
import curses, os #curses is the interface for capturing key presses on the menu, os launches the files
screen = curses.initscr() #initializes a new window for capturing key presses
curses.noecho() # Disables automatic echoing of key presses (prevents program from input each key twice)
@efargas
efargas / README.md
Created October 27, 2015 20:55 — forked from hofmannsven/README.md
My simply Git Cheatsheet