Exhaustive list of SPDX (Software Package Data Exchange) licenses: https://spdx.org/licenses/
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from pymavlink import mavutil | |
PORT = 6666 | |
CONNECTION_STRING = f'udpout:127.0.0.1:{PORT}' | |
CONNECTIONS = {} | |
def get_mavlink_connection(system_id: int, component_id: int): | |
def create(system_id: int, component_id: int): | |
return mavutil.mavlink_connection( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ToExecute | |
$userName = "user" | |
$domain = "domain" | |
$password = '<<<PASS>>>' | |
$Path = '\\some\path\here' | |
.\Use-Impersonation.ps1 $userName $domain $password {Get-ChildItem $Path | Foreach { Write-Host $_.Name }} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r""" | |
This requires to have the library (pkg) pre-installed. | |
Usage: | |
$ python ./py2mermaid.py --pkg pandas | |
$ python ./py2mermaid.py --pkg pandas --base-module pandas.core | |
$ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core | |
$ python ./docs/diagrams/py2mermaid.py --pkg pandas --base-module pandas.core --raw | sed "s/\w\.\(\w\)/\U\1/g" | |
Note: based on https://gist.github.com/Zulko/e0910cac1b27bcc3a1e6585eaee60121 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
Starts powershell webserver | |
.Description | |
Starts webserver as powershell process. | |
Call of the root page (e.g. http://localhost:8080/) returns a powershell execution web form. | |
Call of /script uploads a powershell script and executes it (as a function). | |
Call of /log returns the webserver logs, /starttime the start time of the webserver, /time the current time. | |
/download downloads and /upload uploads a file. /beep generates a sound and /quit or /exit stops the webserver. | |
Any other call delivers the static content that fits to the path provided. If the static path is a directory, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.fontSize": 14, | |
"editor.lineHeight": 1.8, | |
"javascript.suggest.autoImports": true, | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
"editor.rulers": [80, 120], | |
"extensions.ignoreRecommendations": true, | |
"typescript.tsserver.log": "off", | |
"files.associations": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.next | |
public | |
node_modules | |
yarn.lock | |
package-lock.json | |
**/*.test.js | |
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import string | |
from collections import namedtuple | |
def str_count(s): | |
'''找出字符串中的中英文、空格、数字、标点符号个数''' | |
count_en = count_dg = count_sp = count_zh = count_pu = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// wiring example for ripping a PMW3360 SROM: https://i.imgur.com/EspAlvz.jpeg | |
// set the board to 240mhz or higher for best results (WARNING: higher than 240mhz only works with USB if you overvolt the MCU) | |
// this implements reading SPI mode 3. if you want a different mode, you need to edit these two lines: | |
// uint32_t clockval = (1 << pin_clock); | |
// if (newclock && !clockval && buff_i < buffsize) | |
#include <pico/stdlib.h> | |
#define buffsize 50000 |
NewerOlder