Skip to content

Instantly share code, notes, and snippets.

@jokandre
jokandre / mpu6050
Created December 23, 2019 02:14
M5StickC resources
int xAng = map(AcX,minVal,maxVal,-90,90); int yAng = map(AcY,minVal,maxVal,-90,90); int zAng = map(AcZ,minVal,maxVal,-90,90);
x= RAD_TO_DEG * (atan2(-yAng, -zAng)+PI); y= RAD_TO_DEG * (atan2(-xAng, -zAng)+PI); z= RAD_TO_DEG * (atan2(-yAng, -xAng)+PI);
https://docs.platformio.org/en/latest/ide/pioide.html
https://github.com/AazimHassan/M5StickC
https://m5stack.hackster.io/shasha-liu/magic-wand-752f52
https://github.com/m5stack/MagicWand
@jokandre
jokandre / M5StickC_pitch_roll_yaw
Created December 22, 2019 02:27
M5StickC yaw ISSUE
10:08:31.658 ->
10:08:31.658 -> rst:0x1 (POWERON_RESET),figsip: 188777542, SPIWP:0xee
10:08:31.658 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00 clock div:1
10:08:31.658 -> load:0x3fff0018,len:4
10:08:31.658 -> load:0x3fff001c,len:1044
10:08:31.658 -> load:0x40078000,len:8896
10:08:31.658 -> load:0x40080400,len:5816
10:08:31.658 -> entry 0x400806ac
10:08:31.806 -> M5StickC initializing...OK
10:08:53.913 -> 2
@jokandre
jokandre / content.js
Created July 2, 2019 03:21
Popover element-ui
<el-popover
placement="bottom"
width=""
trigger="click">
<p v-for="val in array">this is content {{val}} - rest of the line here</p>
<el-button slot="reference">Click to activate</el-button>
</el-popover>
//css
p{
@jokandre
jokandre / content.css
Created June 27, 2019 05:52
Simple chrome extension selecting text from page
#zh-ext-container {
/* height: 40px; */
position: fixed;
bottom:0%;
width:100%;
background-color: rgb(230, 230, 230);
opacity: 1;
}
@jokandre
jokandre / docker-commands.md
Created January 10, 2019 11:58
Basic docker commands
docker build -t friendlyhello .  # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyhello  # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyhello         # Same thing, but in detached mode
docker container ls                                # List all running containers
docker container ls -a             # List all containers, even those not running
docker container stop <hash>           # Gracefully stop the specified container
docker container kill <hash>         # Force shutdown of the specified container
docker container rm <hash>        # Remove specified container from this machine
docker container rm $(docker container ls -a -q)         # Remove all containers
@jokandre
jokandre / components.javva
Created October 24, 2018 02:58
Java many components to one table Example
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package singleui_manycomponents;
import static java.lang.Math.random;
import java.util.Date;
import java.util.HashMap;
@jokandre
jokandre / gist:0d32cd9e52466cea22ebdcb47fbce47f
Created August 8, 2017 13:19 — forked from jnhuynh/gist:86693d8b485f4d335300
React Native Directory Structure
.
├── index.ios.js
├── js
│   ├── actions
│   │   ├── ChatServerActionCreators.js
│   │   └── ChatThreadActionCreators.js
│   ├── components
│   │   ├── ChatScreen
│   │   │   ├── index.js
@jokandre
jokandre / mongo_cloud9.md
Created February 10, 2017 09:19
Setting up mongo 3.4 in cloud9 environment
@jokandre
jokandre / hexo_help.md
Created January 27, 2017 13:15
Hexo workflow description

Install Hexo

https://hexo.io/

Set github

https://hexo.io/docs/deployment.html
# paste this
deploy:
 type: git
@jokandre
jokandre / github_ssh.md
Last active January 22, 2017 09:02
Set up SSH connection on Github

Generating a new SSH key

$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]
  • Adding your SSH key to the ssh-agent
$ eval "$(ssh-agent -s)"