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
from __future__ import division | |
import time | |
import Adafruit_PCA9685 | |
from pyueye import ueye | |
import ctypes | |
import datetime | |
pwm = Adafruit_PCA9685.PCA9685(address = 0x40) #1st | |
pwm1 = Adafruit_PCA9685.PCA9685(address = 0x41) #2nd |
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
# extract YouTube videoids from html | |
import re | |
import json | |
import urllib2 | |
from BeautifulSoup import BeautifulSoup | |
def get_videoids(url): |
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
#!/usr/bin/python3 | |
""" | |
Export your Windows Bluetooth LE keys into Linux! (arch edition) | |
Thanks to: http://console.systems/2014/09/how-to-pair-low-energy-le-bluetooth.html | |
discussed here: https://unix.stackexchange.com/questions/402488/dual-boot-bluetooth-device-pairing | |
Usage: | |
$ ./export-ble-infos.py <args> | |
$ sudo bash -c 'cp -r ./bluetooth /var/lib' |
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
//grab a screenshot using chromedriver headless | |
//see install of pupetter on | |
//https://pptr.dev/ | |
const puppeteer = require('puppeteer'); | |
// print process.argv | |
console.log(process.argv.length); | |
if (process.argv.length <= 2) { | |
console.log("Usage: " + __filename + " URL and IMAGE.jpg"); |
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
#script guidance from John G. Fisher | |
# check his youtube https://www.youtube.com/watch?v=e6xZAISu-5E | |
# grab all links we talked about | |
from bs4 import BeautifulSoup | |
import requests | |
import re | |
#use 'python http.server' on the directory to serve the folder. sb4 doesnt do local links | |
inbox_path='http://localhost:8000/messages/inbox/ElBootkeh_64b09d1ba5/message.html' | |
print(inbox_path) |
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
#include <stdint.h> | |
// Set MAX_ADDR to the largest address you need | |
// to read. For example, for the 27C512 chips, | |
// you'll want to use a MAX_ADDR of 65536. | |
// (That's 512 * 1024 / 8.) | |
// A 27C256 would be 256 kilobits, or 256 * 1024 / 8 = | |
// 32768. | |
#define MAX_ADDR 32768L |
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
#!/bin/bash | |
mkdir /var/tmp | |
chmod 777 /var/tmp | |
pkill -f getty | |
netstat -antp | grep '27.155.87.59' | grep 'ESTABLISHED' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 | |
netstat -antp | grep '27.155.87.59' | grep 'SYN_SENT' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 | |
netstat -antp | grep '104.160.171.94\|170.178.178.57\|91.236.182.1\|52.15.72.79\|52.15.62.13' | grep 'ESTABLISHED' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 | |
netstat -antp | grep '104.160.171.94\|170.178.178.57\|91.236.182.1\|52.15.72.79\|52.15.62.13' | grep 'CLOSE_WAIT' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 | |
netstat -antp | grep '104.160.171.94\|170.178.178.57\|91.236.182.1\|52.15.72.79\|52.15.62.13' | grep 'SYN_SENT' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 | |
netstat -antp | grep '121.18.238.56' | grep 'ESTABLISHED' | awk '{print $7}' | sed -e "s/\/.*//g" | xargs kill -9 |
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
<div id="mc_embed_signup"> | |
<form action="//zimmeramma.us9.list-manage.com/subscribe/post?u=5451b67137c5c418cd2b12858&id=a00e351fb6" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> | |
<div id="mc_embed_signup_scroll"> | |
<h2>Subscribe to zimmer mailing list</h2> | |
<div class="mc-field-group"> | |
<label for="mce-EMAIL">Email Address </label> | |
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"> | |
</div> | |
<div id="mce-responses" class="clear"> | |
<div class="response" id="mce-error-response" style="display:none"></div> |
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
''' | |
A python script example to create plot files to build a board: | |
Gerber files | |
Drill files | |
source https://github.com/KiCad/kicad-source-mirror/blob/master/demos/python_scripts_examples/plot_board.py | |
additons via https://github.com/beagleboard/pocketbeagle/blob/master/kicad-scripts/kicad-fab.py | |
to use | |
$> python2 plot_gerber.py ../shnzn2svgExport/export.kicad_pcb |
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
//see http://arduino.land/FAQ/content/6/32/en/passing-arrays-to-functions.html#pass-multi-by-pointer | |
int arr_3Da[1][2][3] { | |
{ | |
{1, 2, 3}, | |
{4, 5, 6} | |
} | |
}; |