Skip to content

Instantly share code, notes, and snippets.

View karanjamutahi's full-sized avatar
🏠
Working from home

Karanja Mutahi karanjamutahi

🏠
Working from home
View GitHub Profile
@karanjamutahi
karanjamutahi / Resume-Latex
Created November 27, 2022 21:05
My resumé
%-------------------------
% Resume in Latex
% Author : Jake Gutierrez
% Based off of: https://github.com/sb2nov/resume
% License : MIT
%------------------------
\documentclass[letterpaper,11pt]{article}
\usepackage{latexsym}
@karanjamutahi
karanjamutahi / kenyan_counties.json
Last active October 1, 2022 18:17 — forked from Aroniez/kenyan_counties.json
List of kenyan counties and their sub-counties in json format
[
{
"name": "Baringo",
"capital": "Kabarnet",
"code": 30,
"sub_counties": [
"Baringo central",
"Baringo north",
"Baringo south",
"Eldama ravine",
const cartBtn=document.querySelector(".cart-btn");
const CloseCartBtn=document.querySelector(".close-cart");
const clearCartBtn=document.querySelector(".clear-cart");
const cartDOM=document.querySelector(".clear");
const cartOverlay=document.querySelector(".cart-overlay");
const cartItmes=document.querySelector(".cart-items");
const cartTotal=document.querySelector(".cart-total");
const cartContent=document.querySelector(".cart-content");
const productsDOM=document.querySelector(".products-center");
Arduino: 1.8.9 (Linux), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
/home/thorin/Downloads/arduino-1.8.9/arduino-builder -dump-prefs -logger=machine -hardware /home/thorin/Downloads/arduino-1.8.9/hardware -hardware /home/thorin/.arduino15/packages -tools /home/thorin/Downloads/arduino-1.8.9/tools-builder -tools /home/thorin/Downloads/arduino-1.8.9/hardware/tools/avr -tools /home/thorin/.arduino15/packages -built-in-libraries /home/thorin/Downloads/arduino-1.8.9/libraries -libraries /home/thorin/Arduino/libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=0X2341_0X0042 -ide-version=10809 -build-path /tmp/arduino_build_727343 -warnings=all -build-cache /tmp/arduino_cache_771255 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/thorin/Downloads/arduino-1.8.9/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/home/thorin/Downloads/arduino-1.8.9/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/home/thorin/Downloads/arduino-1.8
For single IP connection
If “AT+CIPSRIP=1” is set, IP address and port are contained.
if <mode>=1
+CIPRXGET: 1[,<IP ADDRESS>:<PORT>]
if <mode>=2
+CIPRXGET: 2,<reqlength>,<cnflength>[,<IP ADDRESS>:<PORT>]
1234567890…
OK
if <mode>=3
AT+CIPRXGET=1
AT+CGATT=1
AT+SAPBR=3,1,"CONTYPE","GPRS"
AT+SAPBR=3,3,"APN", "iot.safaricom.com"
AT+SAPBR=3,3,"USER", "saf"
AT+SAPBR=3,3, "PWD", "data"
AT+CSTT="iot.safaricom.com", "saf","data"
AT+SAPBR=1,1
AT+CIICR
AT+CIFSR
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/ledc.h"
#include "esp_err.h"
#include "string.h"
#include "driver/gpio.h"
//WiFi headers
#include "esp_wifi.h"
void app_main()
{
//Config'd channels properly
struct colors_t
{
int red;
int green;
int blue;
} blue, red, green, magenta, purple, yellow, aqua,white;
/home/thorin/esp/myledc/main/./ledc_example_main.c: In function 'app_main':
/home/thorin/esp/myledc/main/./ledc_example_main.c:164:21: error: redeclaration of 'blue' with no linkage
struct colors_t blue = {0,0,1023};
^
/home/thorin/esp/myledc/main/./ledc_example_main.c:162:7: note: previous declaration of 'blue' was here
} blue, red, green, magenta, purple, yellow, aqua,white;
^
/home/thorin/esp/myledc/main/./ledc_example_main.c:165:21: error: redeclaration of 'red' with no linkage
struct colors_t red = {1023,0,0};
^
var apiURL = "";
var title = "";
$(document).ready(function(){
$.support.cors = true; //doesn't seem to do anything
$.ajaxSetup({
headers: {'Access-Control-Allow-Origin':'*',
'Content-Type':'text/plain' //trying to make it a simple request because it was sending an OPTIONS request
}