Skip to content

Instantly share code, notes, and snippets.

View idesignzone's full-sized avatar

Ali Seivani idesignzone

View GitHub Profile
@soshial
soshial / freematics.md
Last active July 1, 2024 02:11
Freematics + Traccar (integration and configuration)

In this article I listed some common problems I encountered when I tried to use Freematics OBD-reader together with traccar device-tracking server. Both are open-source, thanks to which I was able to improve both and their cooperation.

Freematics: official repo and my fork.

traccar: official repo and my fork.

What are the pitfalls and hardware drawbacks of Freematics?

  1. Currently, Freematics cannot switch between WiFi and SIM depending on connectivity. If you want to switch to a different WiFi or mobile operator - you need to open your bloody Windows and recompile everything :)
  2. Doesn't work at all without external power, has no battery. Works only when connected to USB (3.7V), OBD-II (12V), or SAE J1939 (24V). It me
@onecrayon
onecrayon / ContentPostPage.vue
Last active May 31, 2021 21:18
Pages with next/prev links in Gridsome 0.6.x
<template>
<layout>
<!-- Here there be markup... -->
</layout>
</template>
<page-query>
query Chapter ($id: String, $prevId: String, $nextId: String) {
post: contentPost (id: $id) {
title,
@izzygld
izzygld / Pagination.vue
Last active May 27, 2022 01:56
Wp Graphql Vue Pagination
1. Regular post query with pagination fields
2. include the Pagination Component
3. The actual pagination.
----------------
1. const postsQuery = gql`
query GetAllPosts ($first: Int, $last: Int, $endCursor: String, $startCursor: String) {
posts(first:$first last:$last after:$endCursor before:$startCursor) {
@nickberens360
nickberens360 / new_gist_file.php
Last active September 28, 2021 20:46
wordpress: Full dynamic bootstrap carousel code
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<?php
$args = array(
'post_type' => 'slides1',
'orderby' => 'menu_order title',
'order' => 'ASC',
);
$query = new WP_Query( $args );