Skip to content

Instantly share code, notes, and snippets.

View Jervelund's full-sized avatar

Sigurd Jervelund Hansen Jervelund

  • Eupry ApS
  • Copenhagen
View GitHub Profile
@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
@mlconnor
mlconnor / elastic_beanstalk_external_sessions.md
Created October 17, 2014 20:26
Analaysis and recommendation for externalizing session in Elastic Beanstalk using Tomcat and memcached.

Session Management in an Autoscaling Environment

Problem Statement

User sessions in J2EE and LAMP stacks have traditionally been handled in memory by the application server handling the user request. Because of that, load balancers have been configured to use sticky sessions. By sticky sessions we mean that once the user has visited the site, they will be assigned an app server and will return to that server for subsequent requests. The load balancers typically handle that by referencing the users session cookie.

Elastic cloud environments differ from traditional server configurations in that they have a variable number of servers based on traffic loads whereas traditional configurations had a fixed number of servers. When traffic volumes decline it is necessary to vaporize servers. In doing so, we would lose user sessions (essentially forcing a logout) unless we come up with a new strategy for session management.

A new approach

After much research, it is clear that the best

@teslamint
teslamint / tplink.sh
Created November 28, 2013 08:24
TP-LINK Firmware flashing script by attila.lendvai from http://wiki.openwrt.org/toh/tp-link/tl-wr1043nd#oem.mass.flashing (rev. 1336694829) CC-BY-SA 3.0
@travelton
travelton / gist:7680617
Created November 27, 2013 18:22
Send iCal with Mailgun PHP SDK
<?php
require 'vendor/autoload.php';
use Mailgun\Mailgun;
use Sabre\VObject;
// Instantiate the Mailgun Client
$mg = new Mailgun("MG-API-KEY");
$domain = "Your Domain";