Skip to content

Instantly share code, notes, and snippets.

<?php
function minutesSplitter($minutes)
{
$daySingular = 'day';
$dayPlural = 'days';
$hourSingular = 'hour'; //Allows you to change the word used for the singularium of hour.
$hourPlural = 'hours'; //Allows you to change the word used for the plural of hour.
$minutePlural = 'minutes'; //Allows you to change the word used for the singularium of minute.
@Duckle29
Duckle29 / lcdBarGraph.ino
Last active December 16, 2015 00:09
A function for making progress bars on the arduino. Plenty of bugs to work out, but not necessarily deal breaking. Further explanation in the comments, since github doesn't allow github markdown in the description.
byte bar1[8] = {
0b10000,
0b10000,
0b10000,
0b10000,
0b10000,
0b10000,
0b10000,
0b10000
};
# Robot module configurations : general handling of movement G-codes and slicing into moves
arm_solution linear_delta # delta selection
arm_length 500.00 # this is the length of an arm from hinge to hinge
arm_radius 257.7666 # this is the horiontal distance from hinge to hinge when the effector is centered
default_feed_rate 4000 # Default rate ( mm/minute ) for G1/G2/G3 moves
default_seek_rate 4000 # Default rate ( mm/minute ) for G0 moves
mm_per_arc_segment 0.0 # Fixed length for line segments that divide arcs 0 to disable
mm_max_arc_error 0.01 # The maximum error for line segments that divide arcs 0 to disable
"""
yahoocurrency.py
A plugin that uses Yahoos YQL API to get exchange rates for currencies.
Created By:
- Dumle29 <https://github.com/Dumle29>
- Fixed by Foxlet <https://furcode.co>
Special Thanks:
- https://developer.yahoo.com/yql/guide/running-chapt.html
- Luke Rogers <https://github.com/lukeroge> For the cryptocurrency plugin that this is based on
License:
@Duckle29
Duckle29 / schematic.svg
Created February 24, 2017 01:14
stepperdriver board
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Duckle29
Duckle29 / board.svg
Created February 24, 2017 01:24
gist thing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Duckle29
Duckle29 / beer.c
Last active July 23, 2017 14:38
beer linked list project
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "beer.h"
static int g_nNumberOfBeers=0; /* Made static so it only can be accessed here */
/* g_ is for "global" */
@Duckle29
Duckle29 / rename_gerbers.py
Last active October 7, 2017 19:48
A python script for renaming kicad gerbers to whatever extension you want, and making a zip of them.
#!/usr/bin/python3
from os import walk
from os import getcwd
from os.path import isfile
from os.path import splitext
from os import rename
import zipfile
import re
@Duckle29
Duckle29 / constraints.ucf
Last active November 7, 2017 01:07
A VHDL project that does something I can't remember with a 4 digit multiplexed 7seg display
CONFIG PROHIBIT=P144;
CONFIG PROHIBIT=P69;
CONFIG PROHIBIT=P60;
NET avr_rst LOC = "P139" | IOSTANDARD=LVTTL;
NET CLK LOC="P94" | IOSTANDARD=LVTTL;
TIMESPEC TS_Period_1 = PERIOD "CLK" 31.25 ns HIGH 50%;
NET switches(7) LOC = "P39" | IOSTANDARD=LVTTL;
NET switches(6) LOC = "P48" | IOSTANDARD=LVTTL;

#test