This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use Net::SSH2; | |
my $alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
sub brute { | |
my $cmd = shift; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple Makefile for building LaTeX PDF with xelatex | |
VCF = contacts.vcf | |
TEX = contacts.tex | |
PDF = contacts.pdf | |
PL = vcf2latex.pl | |
all: $(PDF) | |
$(TEX): $(VCF) $(PL) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Tic tac toe in C. */ | |
#include <stdio.h> | |
#define P printf | |
enum { X = 'X', O = 'O', N = '\0', C = 'C' }; | |
static char ck(char b[9]) { | |
int i, w[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 3, 6, | |
1, 4, 7, 2, 5, 8, 0, 4, 8, 2, 4, 6}; | |
for (i = 0; i < 24; i += 3) { | |
if (b[w[i + 0]] == X && b[w[i + 1]] == X && b[w[i + 2]] == X) return X; | |
if (b[w[i + 0]] == O && b[w[i + 1]] == O && b[w[i + 2]] == O) return O; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* cwrx.c - ncurses morse decoder for Linux | |
* | |
* Copyright (c) 2011 - 2025 Jakob Flierl <[email protected]> | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( pcb2gcode 1.3.0 ) | |
( Gcode for LinuxCNC ) | |
G94 ( Millimeters per minute feed rate. ) | |
G21 ( Units == Millimeters. ) | |
G90 ( Absolute coordinates. ) | |
S10000 ( RPM spindle speed. ) | |
G64 P0.00333 ( set maximum deviation from commanded toolpath ) | |
F600.00000 ( Feedrate. ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# | |
# submit an ngc file to a running LinuxCNC / Machinekit instance | |
# | |
# used as a filter for https://github.com/stewartoallen/grid-print | |
# | |
import sys | |
from shutil import copyfile | |
import linuxcnc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2016 Jakob Flierl (jakob.flierl "at" gmail.com) | |
* | |
* ngc-hole is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* ngc-hole is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Sends HAL signals to the given MQTT broker host. | |
# | |
# usage: hal2mqtt.py [hostname] | |
# | |
# Video demo at https://www.youtube.com/watch?v=uFbr7xBjItE | |
# | |
# sudo apt-get install mosquitto mosquitto-clients python-mosquitto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Download, build and install https://github.com/stv0g/calcelestial | |
# | |
# Basic calcelestial usage examples with the at command: | |
# | |
# # make a beep at sunrise in Berlin | |
# | |
# sudo apt -y install at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Record a webcam's video and audio stream defined by the $V and $A variables | |
# to ~/Desktop/webcam-$timestamp.mkv with cvlc and PulseAudio. | |
# | |
# Required tools: | |
# | |
# sudo apt -y install v4l-utils uvcdynctrl pulseaudio-utils vlc-nox | |
# | |
# Webcams tested: |
NewerOlder