Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Harshad Joshi hj91

:octocat:
View GitHub Profile
@hj91
hj91 / esp32-opcua-server-log
Created Dec 10, 2020
This is esp32 server log
View esp32-opcua-server-log
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
@hj91
hj91 / installation-log
Last active Dec 10, 2020
installing opcua library on esp32 development board
View installation-log
export IDF_PATH=/home/harshad/esp-idf
export PATH=$PATH:/home/harshad/esp-idf/tools
cd /home/harshad/esp-idf/examples/
git clone https://github.com/cmbahadir opcua-esp32
cd opcua-esp32
idf.py build
harshad@harshad-HP-Laptop-15q-ds0xxx:~ $ cd esp-idf/
harshad@harshad-HP-Laptop-15q-ds0xxx:~/esp-idf $ ls
View sensehat-display-nodered
[
{
"id": "5e47003a.bd96b",
"type": "tab",
"label": "Flow 2"
},
{
"id": "265fd756.cc0488",
"type": "tab",
"label": "Flow 1"
View NotificationUtilities.java
/*
LinConnect: Mirror Android notifications on Linux Desktop
Copyright (C) 2013 Will Hauck
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@hj91
hj91 / wififail.txt
Created Jul 9, 2014
This is the output of my dmesg after i logged in. I disabled wifi and was unable to boot in. After much efforts i managed to enable wifi and this is what i got. Ubuntu is made by bastards. fucking bastards. idiots releasing untested and unstable drivers.
View wififail.txt
[ 265.138732] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138755] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138778] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138801] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138824] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138846] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138868] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138891] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138913] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
[ 265.138935] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4
@hj91
hj91 / cellinfo2
Created Jul 25, 2013
Code for printing Cell Tower information for non GPS phones.
View cellinfo2
/* @author=harshad joshi */
package com.harshad.cellinfo2;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
@hj91
hj91 / exampleinstance.py
Created Jun 2, 2013
a simple example of using isinstance in Python
View exampleinstance.py
class A:
def __init__(self,a):
self.a=a
print self.a
def show(self):
print self.a
a=A(1)
a.show()
@hj91
hj91 / text1.py
Last active Dec 17, 2015
This gist is an example of opening a file in read only mode, reading its contents and manipulating some standard string functions.
View text1.py
a=open("text1.txt","r")
b=[]
for i in a.readlines():
b.append(i)
if b.__contains__("hello"):
print "Yes"
else:
print "No"
View tweetku.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Full script used in blog post at http://h6o6.com/2013/03/using-python-and-the-nltk-to-find-haikus-in-the-public-twitter-stream
4-clause license (original "BSD License")
Copyright (c) 2013, h6o6
All rights reserved.
@hj91
hj91 / lockcap.c
Created Feb 23, 2013
generating segfault and logging it in kern.log
View lockcap.c
/* this code is meant to run on MS DOS machines and uses bios bit setting to turn CAPS LOCK on or off */
/* it contains far keyword, which is not used in gcc */
#include <stdio.h>
void main()
{
char *kb;
kb = (char *)0x417;
*kb = 64;