Skip to content

Instantly share code, notes, and snippets.

View rezahussain's full-sized avatar

Reza Hussain rezahussain

View GitHub Profile
// https://medium.com/@jonsamp/how-to-set-up-https-on-localhost-for-macos-b597bcf935ee
// cd ~/
// mkdir .localhost-ssl
// create a self signed key and certificate with next command
// sudo openssl genrsa -out ~/.localhost-ssl/localhost.key 2048
// sudo openssl req -new -x509 -key ~/.localhost-ssl/localhost.key -out ~/.localhost-ssl/localhost.crt -days 3650 -subj /CN=localhost
// now you have to drag and drop the crt file into your keychain app, so when the browser opens the callback https://localhost url, it doesnt
// think that the self signed ssl cert for localhost that we just generated is a mitm attack
// stuff is here:
// ~/.localhost-ssl/localhost.crt
@rezahussain
rezahussain / gist:f5dcfc586e7f54e439e8548f25157133
Last active February 10, 2021 03:30
HelloWorldTDAmeritradeTrader
//THE SAMPLE CODE ON THIS PAGE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
//INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
//ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
//INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) SUSTAINED BY YOU
//OR A THIRD PARTY, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
//CONTRACT, STRICT LIABILITY, OR TORT ARISING IN ANY WAY OUT OF THE USE OF
//THIS SAMPLE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
@rezahussain
rezahussain / gist:f4b8b14e167a72668c98
Last active August 18, 2017 06:11
phModuleProductionCalibrationWith10and7PH
#include <Wire.h>
#define PHADDRESS 0x4D
int RoomTempI2CAddress = B1001011;
float volt7 = 0.6939;
float volt10= 0.3846;
float calibrationTempC = 20;
@rezahussain
rezahussain / gist:11128896
Created April 21, 2014 00:23
Dormant Labs LCD PH Module V2 Arduino
#include <Wire.h>
#include <stdlib.h>
#define PHADDRESS 0x4D
int RoomTempI2CAddress = B1001011;
float volt4 = 0.95;
float volt7 = 0.67;
float calibrationTempC = 20;