Skip to content

Instantly share code, notes, and snippets.

View jautero's full-sized avatar
🙉

Juha Autero jautero

🙉
View GitHub Profile
@jautero
jautero / usbid
Created January 24, 2020 01:46
Miscellaneous scripts
#!/bin/sh
BEFOREFILE=before
AFTERFILE=after
lsusb >$BEFOREFILE
echo -n "Plug or unbluck device and press enter:"
read foo
lsusb >$AFTERFILE
diff $BEFOREFILE $AFTERFILE
rm $BEFOREFILE $AFTERFILE
@jautero
jautero / keybase.md
Created January 23, 2019 04:03
My keybase identity

Keybase proof

I hereby claim:

  • I am jautero on github.
  • I am jautero (https://keybase.io/jautero) on keybase.
  • I have a public key ASADFVe5XG89MhXsaFazoulL-nqxjufOfLDiznmDpOa2_wo

To claim this, I am signing this object:

1 x 3D-Prima HIPS Filament - 3mm - 1 kg spool - Black
ID: 20373
EUR 19,90
-------------------------------------------------------------
1 x 3D-Prima TPE Flexible Filament - 3mm - 1 kg spool - Green
ID: 20418
EUR 19,90
-------------------------------------------------------------
@jautero
jautero / dmesg
Created May 13, 2017 14:38
raspberry pi dmesg
[ 3.928145] usb 1-1.3: new full-speed USB device number 5 using dwc_otg
[ 4.018156] usb 1-1.3: device descriptor read/64, error -32
[ 4.208159] usb 1-1.3: device descriptor read/64, error -32
[ 4.408171] usb 1-1.3: new full-speed USB device number 6 using dwc_otg
[ 4.518116] usb 1-1.3: device descriptor read/64, error -32
[ 4.708075] usb 1-1.3: device descriptor read/64, error -32
[ 4.897959] usb 1-1.3: new full-speed USB device number 7 using dwc_otg
[ 5.317852] usb 1-1.3: device not accepting address 7, error -32
[ 5.417948] usb 1-1.3: new full-speed USB device number 8 using dwc_otg
[ 5.837878] usb 1-1.3: device not accepting address 8, error -32
function resolveAfter2Seconds(x) {
return new Promise(resolve => {
setTimeout(() => {
resolve(x);
}, 2000);
});
}
async function f1() {
var x = await resolveAfter2Seconds(10);

Karkkiautomaatin ohjeet

by harald

Hintojen asetus

  • Käännä vipukytkin automaatin sisällä ohjelmointiasentoon (pppp)
  • Enter
  • valitse rivi (+/-)
  • Enter
  • valitse hinta (+/-)
@jautero
jautero / groot.c
Created August 8, 2014 23:33
I am Groot.
#include <stdio.h>
#include <stdio.h>
char *groot="I am Groot. ";
void grootstream(FILE *stream)
{
int count=0;
int len=strlen(groot);
FOO=42
BAR=$(FOO)
BAR2:=$(FOO)
FOO=37
test:
echo "$(BAR)"
echo "$(BAR2)"
@jautero
jautero / gist:9110592
Last active August 29, 2015 13:56
Simple save command code.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#DEFINE BUFSIZE 100
#DEFINE UNCODECMD "uncore %s %s core.%d"
/* Save program state as executable. Name of saved file is savename, returns 0 on success. */
int save(char *savename)
{
@jautero
jautero / gist:5289888
Created April 2, 2013 04:13
Simple iOS app log file generator.
#!/bin/sh
logmessage=""
git log >git.log
if grep -i implemented git.log >/dev/null 2>&1; then
logmessage="improvements"
fi
if grep -i fixed git.log >/dev/null 2>&1; then
[ -n "$logmessage" ] && logmessage="$logmessage and "
logmessage="${logmessage}bug fixes"
fi