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)
[[[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
@efargas
efargas / gist:7c1e3886050ebbb66eec
Created October 26, 2015 23:57 — forked from elevenarms/gist:7438026
pumpkin file
# running this be sure I2C speed is set as desired
# sudo modprobe -r i2c_bcm2708 && sudo modprobe i2c_bcm2708 baudrate=2000000
# -*- coding: latin-1 -*-
import time, random
import gaugette.ssd1306 as ssd1306
import RPi.GPIO as GPIO
import picamera
from datetime import datetime
import rotaryEnc
/*
* Framebuffer Driver for Adafruit SSD1306 based Monochrome OLED displays
*
* Copyright 2015 Noralf Trønnes
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
@efargas
efargas / ssd1306_init.c
Created October 19, 2015 17:03 — forked from pulsar256/ssd1306_init.c
SSD 1306 Init Sequence
/**
* according to http://www.adafruit.com/datasheets/UG-2864HSWEG01.pdf Chapter 4.4 Page 15
*/
void ssd1306Init(void)
{
i2c_OLED_send_cmd(0xAE); // Set display OFF
i2c_OLED_send_cmd(0xD4); // Set Display Clock Divide Ratio / OSC Frequency
i2c_OLED_send_cmd(0x80); // Display Clock Divide Ratio / OSC Frequency
#!/usr/bin/env bash
# gsettings list-recursively org.gnome.system.proxy
# Change de ip address and port number accordingly.
function myProxyOn() {
gsettings set org.gnome.system.proxy mode 'manual' # ' manual / nome / automatic '
gsettings set org.gnome.system.proxy.http host '10.0.0.1'
gsettings set org.gnome.system.proxy.http port 8080
gsettings set org.gnome.system.proxy.https host '10.0.0.1'