Skip to content

Instantly share code, notes, and snippets.

View telamon's full-sized avatar
🙂
probing for lost signals

Tony Ivanov telamon

🙂
probing for lost signals
View GitHub Profile
@telamon
telamon / simple_test.ino
Created February 1, 2018 00:07
TMC2130 driver debugging
/**
* Author Teemu Mäntykallio
* Initializes the library and turns the motor in alternating directions.
*/
#define EN_PIN 48 // Nano v3: 16 Mega: 38 //enable (CFG6)
#define DIR_PIN 16 // 19 55 //direction
#define STEP_PIN 17 // 18 54 //step
#define CS_PIN 31 // 17 64 //chip select
#define MOSI_PIN 51
@telamon
telamon / init.vim
Created August 16, 2017 13:25
My amazing Neovim configuration.
" Tony's Settings
" Usage:
" Download and install nvim, then install 'dein' the vim-package manager.
" During installation of dein it will output a sample configuration, take the
" two lines that `set runtimepath=PATH` and `dein#begin(PATH)` and replace the
" ones in this file online 14 and 17. Restart nvim and Happy Vimming!
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
@telamon
telamon / README.md
Last active June 9, 2021 03:08
Reclaim windows 10

Windows 10 Home Revoke & Reclaim

UPDATE: This is a work in progress document, please disregard all spelling-errors and outdated info.

I'm a linux user, and by accident a tablet with window 10 home edition came into my possesion.

And I was not prepared for the shock that is windows 10, they have successfully reminted the term "Rightless Slave" into the term "User".

@telamon
telamon / guid.js
Created October 10, 2014 12:43
GUID generator
var guid = function(){
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
return v.toString(16);
});
};
<!DOCTYPE html>
<html ng-app="app">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-rc.3/angular.min.js"></script>
<script type="text/javascript">
var app = angular.module('app',['ng']);
app.controller('MainCtrl', function($scope){
});
@telamon
telamon / Gemfile.lock
Created May 3, 2014 11:06
Lockfile generated by Tumblargh/Middleman dependencies.
PATH
remote: ../tumblargh
specs:
tumblargh (0.2.2)
activesupport (>= 3.1)
api_cache
nokogiri
treetop
GEM
@telamon
telamon / delta.py
Last active August 29, 2015 14:00
DeltaTime dependend positioning.
float accumlatedTime=0;
Sprite cow;
float runSpeed = 1; # in pixels per second
float fallingAccelleration = 0.3; # how fast the fall should reach topspeed plummeting.
float maxFallVelocity = 3.0; # Should not be able to fall faster than 3px/s
onFrame(float deltaTime):
accumulatedTime + = deltaTime;
# Timestamp when a jump reached it's peak height and you're scheduled with a romantic date with gravity.
@telamon
telamon / tilemapper.js
Created February 5, 2014 18:47
Pixi.js Tiled importer
(function(window,PIXI){
var regenerateCache = function(tilemap){
var tileset = tilemap.tileset;
tilemap.cache = {}; // empty cache.
var x=tileset.margin,y=tileset.margin,row=0,col=0;
var id= 0;
while(tileset.margin+row*tileset.spacing+y+tileset.tileheight <=tileset.imageheight){
x=tileset.margin,col=0;
while(tileset.margin+col*tileset.spacing+x+tileset.tilewidth <= tileset.imagewidth){
var bounds = {
@telamon
telamon / lantern.js
Last active December 31, 2015 20:58
Simple lightweight `minderd` frontend/output parser written for/in node/js
#!/usr/bin/env node
var spawn = require('child_process').spawn,
util = require('util'),
child;
var bin= './minerd.exe',
args = {
algo: 'scrypt',
threads: 8,
user: 'LXKwG9oYazZPUc6ozF5t3zyf6xBxbEbTXP',
pass: 'x',
@telamon
telamon / pinmapcomparison.txt
Created August 2, 2012 11:10
Arduino Leo,Uno,ITDB28 comparison
Pin TFT Leo Uno
-------------------
D0 DB8 PD2 PD0
D1 DB9 PD3 PD1
D2 DB10 PD1 PD2
D3 DB11 PD0 PD3
D4 DB12 PD4 PD4
D5 DB13 PC6 PD5
D6 DB14 PD7 PD6
D7 DB15 PE6 PD7