Skip to content

Instantly share code, notes, and snippets.

View pulsar256's full-sized avatar

Paul Rogalinski-Pinter pulsar256

  • 4screen
  • Munich
  • 04:50 (UTC +01:00)
View GitHub Profile
@pulsar256
pulsar256 / templated.java
Created October 11, 2016 16:16
Templated Links for spring-hateoas workaround
import org.apache.commons.lang.StringUtils;
import org.springframework.core.DefaultParameterNameDiscoverer;
import org.springframework.hateoas.Link;
import org.springframework.hateoas.UriTemplate;
import org.springframework.hateoas.mvc.ControllerLinkBuilder;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.util.UriComponentsBuilder;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
module pusteblume(radius=10, nupsies=40){
rotate_extrude(convexity=10) translate([radius, 0, 0]) circle(r=1, $fn=50);
for(i=[0:(360/nupsies):360-(360/nupsies)]) {
rotate([0,0,i]) translate([radius-2.2,0,0]) rotate([0,90,0]) cylinder(h=2,d1=0.5,d2=1.8,$fn=25);
}
}
difference() {
cylinder(h=2,d=8,$fn=100);
translate([0,0,-1]) cylinder(h=4,d=3.2,$fn=100);
@pulsar256
pulsar256 / wirejig.scad
Created May 10, 2016 18:19
Heatbed Round Wire Jig
$fn=100;
markerRadius=1;
circle(r = markerRadius);
quadrant();
mirror([1,0]) quadrant();
mirror([0,1]) quadrant();
mirror([1,0]) mirror([0,1]) quadrant();
@pulsar256
pulsar256 / bassreflexadapter.scad
Created April 30, 2016 22:42
Bassreflex Adapter vom Sacha
$fn=200;
rotate_extrude()
translate([-22.5,0,0]) union() {
translate([0,-10,0]) square([7,10]);
translate([6.5,-3.5,0]) rotate([0,0,45]) square([5,5]);
intersection() {
circle(10, center=true);
square(20);
};
};
@pulsar256
pulsar256 / stm32f0_synth_case.scad
Last active April 30, 2016 10:58
semi-parametric 3d printed case for a 50x50 PCB
$fn=100;
// Enclosure for
// http://blog.kehribar.me/build/2015/12/06/polyphonic-fm-synthesizer-with-stm32f031.html
case(drawPart=0); // 0=box, 1=lid, 2==both
module case (
wall=1.5, // wall thickness
@pulsar256
pulsar256 / dynv6_v4only.sh
Last active January 11, 2022 09:58 — forked from corny/dynv6.sh
Update script for dynv6.com to set your IPv4 address
#!/bin/sh -e
# based on https://gist.github.com/corny/7a07f5ac901844bd20c9
hostname=$1
device=$2
v4_file=$HOME/.${hostname}.dynv6.addr4
[ -e $v4_file ] && old=`cat $v4_file`
@pulsar256
pulsar256 / vibration_tester.ino
Created July 11, 2015 11:13
Vibration Tester
#include "U8glib.h"
#include <Wire.h>
#define TWI_FREQ 400000L
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);
const int MPU=0x68; // I2C address of the MPU-6050
int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ;
@pulsar256
pulsar256 / pageTokenGen.js
Created May 21, 2015 17:17
Generator for pageTokens for the Youtube API
// workaround for https://code.google.com/p/gdata-issues/issues/detail?id=7163
var d0 = "AEIMQUYcgkosw048";
var d1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var d2 = d1;
var d1c = 0;
var d2c = 0;
var overflowSuffix = "Q";
var direction = "AA";
var d2OverflowCounter = 0;
@pulsar256
pulsar256 / render_scale.py
Created February 8, 2015 22:43
render_scale.py - Inkscape 0.91 compatible version
#!/usr/bin/env python
# coding=utf-8
'''
Copyright (C)
2009 Sascha Poczihoski, [email protected]
original author
2013 Roger Jeurissen, [email protected]
dangling labels and inside/outside scale features
@pulsar256
pulsar256 / ssd1306_init.c
Last active April 24, 2025 16:53
SSD 1306 Init Sequence
/**
* according to http://www.adafruit.com/datasheets/UG-2864HSWEG01.pdf Chapter 4.4 Page 15
*/
void ssd1306Init(void)
{
i2c_OLED_send_cmd(0xAE); // Set display OFF
i2c_OLED_send_cmd(0xD4); // Set Display Clock Divide Ratio / OSC Frequency
i2c_OLED_send_cmd(0x80); // Display Clock Divide Ratio / OSC Frequency