Skip to content

Instantly share code, notes, and snippets.


samy kamkar samyk

View GitHub Profile
samyk / graph.html
Created November 17, 2022 05:33 — forked from kevinfjbecker/graph.html
HTML5 Canvas Line Graph
View graph.html
<!DOCTYPE html>
<meta charset=utf-8 />
<!--[if IE]>
<script src=""></script>
article, aside, figure, footer, header, hgroup,
samyk /
Created December 29, 2019 19:19 — forked from nmz787/
work in progress MKS 901P vacuum transducer sensor library and command-line program.
usage: [-h] [--find_baud] [--baud BAUD] [-unit] serial_port
positional arguments:
serial_port the Windows COM port or path to a linux serial port
optional arguments:
-h, --help show this help message and exit
--find_baud tries to access the sensor over all supported baud rates,
prints which is successful
samyk / syphon2serial.pde
Created June 29, 2019 19:00
Syphon to Serial Processing 2 app
View syphon2serial.pde
* syphon2serial (syphon -> teensy using octows2811)
* take video input from Syphon (eg Resolume Arena) out to Teensys over serial
* by Samy Kamkar - -
* based off of OctoWS2811 movie2serial
/* OctoWS2811 movie2serial.pde - Transmit video data to 1 or more
Teensy 3.0 boards running OctoWS2811 VideoDisplay.ino
samyk / sctag
Created November 23, 2018 21:09
Convert Supercell gamer tags / avatar IDs / account IDs between each other
View sctag
# Convert Supercell gamer tags to avatar/account IDs and vice versa
# Tested on Crash Royale and Boom Beach
# - supports new Boom Beach avatar_id format
# -samy kamkar -
# 2018/11/23
my @tagchrs = qw/0 2 8 9 P Y L Q G R J C U V/;
samyk / sin134-pdb-dma-dac.c
Last active September 8, 2020 19:17
134kHz sine wave w/DMA, DAC and PDB on Teensy 3.6
View sin134-pdb-dma-dac.c
// Generating a 134kHz sine wave using Teensy 3.6 with virtually
// 0 cpu usage by filling the DAC up via DMA triggered by PDB
// -samy kamkar
#include <DMAChannel.h>
#include "pdb.h"
DMAChannel dma(false);
static volatile uint16_t sinetable[] = {
samyk /
Created December 30, 2016 07:55
print version numbers for all perl packages
# add to top of perl program to print version numbers for perl packages
use Data::Dumper;
print "$_\n" for grep { /:: \d/ } map { "$_ " . eval "\$${_}VERSION" } grep { /::$/ } keys %{"main::"};
samyk / sin134.c
Last active August 21, 2019 10:48
134kHz sine wave on Teensy 3.6
View sin134.c
// We can send 223 analog values (per wavelength) with an unrolled loop to get ~134kHz sine wave on 180MHz Teensy 3.6
// A version that uses virtually no CPU by controlling the DAC via DMA and PDB is here:
// -samy kamkar
// If you want to use a for loop, you can only send 161vals per wavelength
#define SINE 161
samyk / chrome_tabs.osa
Created June 14, 2016 18:36
applescript to show all url+titles of Chrome tabs along with front window+tab url+title
View chrome_tabs.osa
# shows all url+titles of Chrome along with front window+tab url+title
set titleString to ""
tell application "Google Chrome"
set window_list to every window # get the windows
repeat with the_window in window_list # for every window
set tab_list to every tab in the_window # get the tabs
repeat with the_tab in tab_list # for every tab
View gsg-case-bottom.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am samyk on github.
  • I am samy ( on keybase.
  • I have a public key whose fingerprint is 8EFB B6A5 6900 7401 B68F 9038 F4E1 C226 C2F6 EA94

To claim this, I am signing this object: