Skip to content

Instantly share code, notes, and snippets.

@sticilface
sticilface / PROGMEM.md
Last active July 23, 2023 11:38
PROGMEM

Guide to PROGMEM on ESP8266 and Arduino IDE

Intro

On low memory devices like the arduino and esp8266 you do not want strings to be stored in RAM. This occurs by default on these systems. Declare a string const char * xyz = "this is a string" and it will use up RAM.

The solution on these devices is to allow strings to be stored in read only memory, in Arduino this is the PROGMEM macro. Most of my experience is with the ESP8266 which is a 32bit micros controller. This device stores PROGMEM data in flash. The macro PROGMEM on ESP8266 is simply

#define PROGMEM   ICACHE_RODATA_ATTR
@whizzzkid
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active December 3, 2022 15:43
[XPS 15 Early 2017 9560 kabylake] Making Nvidia Drivers + (CUDA 8 / CUDA 9 / CUDA 9.1) + Bumblebee work together on linux ( Ubuntu / KDE Neon / Linux Mint / debian )
# Instructions for 4.14 and cuda 9.1
# If upgrading from 4.13 and cuda 9.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-9.0/
# Important libs required with 4.14.x with Cuda 9.X
$ sudo apt install libelf1 libelf-dev
@renshuki
renshuki / ubuntu_agnoster_install.md
Last active April 23, 2024 13:04
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@jdpilgrim
jdpilgrim / OutlookNotificationsToPushBullet
Created March 27, 2015 16:35
Outlook macro to push notifications to android devices using PushBullet
'You need to paste it into the code file called "ThisOutlookSession".
'IMPORTANT You'll need to change the text YOUR_ACCESS_TOKEN to your Access Token that you
'you got from https://www.pushbullet.com/account
Const vbDoubleQuote As String = """" 'represents 1 double quote (")
Const vbSingleQuote As String = "'" 'represents 1 single quote (')
Private Sub Application_Reminder(ByVal Item As Object)
Dim Title As String
Dim Body As String
@ax3l
ax3l / CUDA_Compilers.md
Last active May 3, 2024 13:36
CUDA Compilers
@jpic
jpic / kisscli.py
Created September 29, 2011 22:23
Non blocking GNU readline usage example for python, proof of concept
import sys
from select import select
import socket
import readline
# HACK - python doesn't include a binding to rl_callback_read_char
import readline
import ctypes
rl_lib = ctypes.cdll.LoadLibrary("libreadline.so")