Skip to content

Instantly share code, notes, and snippets.

function cocomod() {
# port list all detected ports: python3 -m there detect
# run run local file on module (not send): python3 -m there run [FILE]
# list list file: python3 -m there ls -l [/] python3 -m there run [FILE]
# send send file to module: python3 -m there push [FILE] [/]
# read get source code from file on module: python3 -m there cat [FILE]
# delete delete file from module: python3 -m there rm [FILE]
# repl enter repl: python3 -m there -i
# echo "Usage: burn, goto, port, run, list, send, read, delete, repl"
import subprocess, os
current_path = os.getcwd()
current_file_list = os.listdir()
def exec_command(cmd):
command = cmd.split()
command_output =, capture_output=True)
for line in command_output.stdout.decode("utf-8").split("\n"):
print("\t\t", line)
tommyjtl / dopa-rev5_withname.stl
Last active Jun 26, 2020
Ring for lovers. License under CC 4.0 BY-SA.
View dopa-rev5_withname.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from PIL import Image, ImageFile
import glob, random, os, time, re, time
tommyjtl /
Last active May 16, 2020
Python script to list matching files between two different kind of format, e.g. txt and jpg
import glob, os
import os.path
from os import path
direcotry_name = input("Please enter the name of the directory you want to compare: \n")
current_path = os.getcwd()
directory_path = direcotry_name
extension_name = "jpg"
tommyjtl /
Last active May 16, 2020
Python script to replace the first character of a file for every txt file in a directory.
import glob, os
direcotry_name = input("Please enter the name of the directory you want to replace: \n")
current_path = os.getcwd()
directory_path = "turnright"
extension_name = "txt"
index_placed_before = "0"
index_placed_after = "2"
tommyjtl /
Created Aug 3, 2019 — forked from denji/
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)


#define GpsSerial  Serial1
#define DebugSerial Serial

  char GPS_Buffer[80];
  bool isGetData;
function esp() {
python $[] --port=$[espPort]"$@" write_flash -fm=dio -fs=32m 0x00000 $[esptoolFirmware]
function esptest() {
$esptool -vv -cd nodemcu -cb 460800 -cp $[espPort] -ca 0x00000 -cf $[testCode]
sleep 0.5
echo ""
echo "entering serial monitor..."
screen $[espPort] 115200
View ar-2016-demo.html
<!doctype html>
<html><head><title>【AR Demo】AR Painting</title><meta charset="UTF-8"><link href=",400italic,700,700italic|Roboto:400,700,700italic,400italic" rel="stylesheet" type="text/css"><style>/*
* Copyright 2014 Quip
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at