Skip to content

Instantly share code, notes, and snippets.

@aka-z
aka-z / esp8266.ino
Created July 26, 2018 06:36 — forked from xesscorp/esp8266.ino
This program issues commands to an ESP8266 Wifi module in order to receive an HTML page from a website.
///////////////////////////////////////////////////////////////////////////////////////
// This program uses the ESP8266 Wifi module to access a webpage. It's an adaptation of
// the program discussed at http://hackaday.io/project/3072/instructions
// and shown here http://dunarbin.com/esp8266/retroBrowser.ino .
//
// This program was ported to the ZPUino 2.0, a softcore processor that runs on an FPGA
// and emulates an Arduino.
//
// This program works with version 00160901 of the ESP8266 firmware.
///////////////////////////////////////////////////////////////////////////////////////
@aka-z
aka-z / install.bash
Created July 19, 2018 09:12 — forked from isc30/install.bash
Raspberry Pi Install PHP7 + Nginx + MySQL + PhpMyAdmin (last versions)
#!/bin/bash
# Thanks to https://gist.github.com/Lewiscowles1986/ce14296e3f5222082dbaa088ca1954f7
if [ "$(whoami)" != "root" ]; then
echo "Run script as ROOT please. (sudo !!)"
exit
fi
echo "deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi" > /etc/apt/sources.list.d/stretch.list
echo "APT::Default-Release \"jessie\";" > /etc/apt/apt.conf.d/99-default-release
@aka-z
aka-z / pfc1-potted-tomato-recipe.json
Created June 25, 2018 05:14 — forked from novemberalpha/pfc1-potted-tomato-recipe.json
A PFC1 recipe for potted tomatoes!
{
"_id": "pfc1-potted-tomatoes-72days",
"format": "phased",
"version": "1.0",
"optimization": [
"general purpose"
],
"date_created": "2017-05-14",
"author": "openag",
"operations": [
@aka-z
aka-z / docker-install-rpi3.md
Created June 22, 2018 06:43 — forked from tyrell/docker-install-rpi3.md
Installing latest Docker on a Raspberry Pi 3

Introduction

I wrote this gist to record the steps I followed to get docker running in my Raspberry Pi 3. The ARM ported debian version (Jessie) comes with an old version of docker. It is so old that the docker hub it tries to interact with doesn't work anymore :)

Hopefully this gist will help someone else to get docker running in their Raspberry Pi 3.

Installation

From original instructions at http://blog.hypriot.com/post/run-docker-rpi3-with-wifi/

@aka-z
aka-z / docker-install-rpi3.md
Created June 22, 2018 06:43 — forked from tyrell/docker-install-rpi3.md
Installing latest Docker on a Raspberry Pi 3

Introduction

I wrote this gist to record the steps I followed to get docker running in my Raspberry Pi 3. The ARM ported debian version (Jessie) comes with an old version of docker. It is so old that the docker hub it tries to interact with doesn't work anymore :)

Hopefully this gist will help someone else to get docker running in their Raspberry Pi 3.

Installation

From original instructions at http://blog.hypriot.com/post/run-docker-rpi3-with-wifi/

@aka-z
aka-z / README.md
Created June 21, 2018 05:45 — forked from magnetikonline/README.md
Bookmarklet to pretty print Gist pages without the usual page chrome, just content. Handy for Markdown document printing.

Pretty print bookmarklet helper for Gist pages

Create a new bookmark somewhere handy in your browser with the following URL:

javascript:var el=document.createElement('style');el.media='print';el.innerHTML='#header,.pagehead.repohead,.gist-description.container,.file-box .meta,#comments,.js-comment-form,#footer{display:none;}.file-box{border:0!important;}';document.getElementsByTagName('head')[0].appendChild(el);alert('Please consider the environment before printing :)');
  • Navigate to your Gist of choice
  • Hit the bookmarklet
  • Now print
//file IoT-nodeMCU-virtuino-00.ino
//Internet of Things, Institut Rambla Prim
//Jaume Nogues jnogues@gmail.com
//http://vps249990.ovh.net/iot/
// http://vps249990.ovh.net/grav/
// http://jnogues.org
//Derived from:
/* Virtuino NodeMCU ESP8266 web server and WiFi access point example No1
* Created by Ilias Lamprou
@aka-z
aka-z / DBHelper.java
Created March 8, 2018 02:50 — forked from Nabid/DBHelper.java
MySQL helper class for Java
/*
Assuming that you have proper MySQL JDBC driver:
How to use this class?
1. Create new object
DBHelper db = new DBHelper();
2. Open connection
db.open();
3. Call corresponding method
db.test();
@aka-z
aka-z / ESP8266 Arduino Mega.cpp
Created November 10, 2017 06:11 — forked from teos0009/ESP8266 Arduino Mega.cpp
ESP8266 with Arduino
//#include <SoftwareSerial.h>
//use mega Serial 2 for serial monitor; Serial 1 on pins 19 (RX) and 18 (TX);// Serial2 on pins 17 (RX) and 16 (TX), Serial3 on pins 15 (RX) and 14 (TX).
#define SSID "enter SSID here"
#define PASS "enter password here"
#define DST_IP "220.181.111.85" //baidu.com
//SoftwareSerial dbgSerial(10, 11); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
//serial 2 is to esp8266
@aka-z
aka-z / convert-to-webp.sh
Created March 14, 2017 02:41 — forked from SandroMachado/convert-to-webp.sh
Script to convert all the `JPEG` images to the `WEBP` format in your Android project
#/bin/sh
# Inpiration: http://engineeringblog.yelp.com/2016/05/yelp-android-app-went-on-a-diet.html
# `-lossless` not used to give support for Android 4.0+
# Make sure cwebp is installed.
if ! type "cwebp" > /dev/null; then
echo "Please install cwebp to continue:"
echo "brew install webp"
exit 1
fi