Skip to content

Instantly share code, notes, and snippets.

Kimmo Brunfeldt kimmobrunfeldt

View GitHub Profile
View gist:a44000dd2d81d2bc361331bafc0a4c79
ssh pi@x.x.x.x
export DISPLAY=:0
chromium-browser --noerrdialogs --kiosk 'https://google.com' --incognito
View blur-test.sh
curl -o test.jpg https://images.unsplash.com/photo-1519606247872-0440aae9b827?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&dl=jude-infantini-574421-unsplash.jpg&s=09862427d88b5ae5cb409700be593adc
convert test.jpg -blur 5 -resize 1000x output.jpg
convert test.jpg -resize 1000x -blur 5 output2.jpg
# open output.jpg && open output2.jpg
View userCore1.js
const { query } = require('../util/pg')
/*
Usage:
function handler(req) {
const id = req.params.id
const core = new UserCore(req.logger)
return core.getUser(id)
}
View stream-wat2.js
#!/usr/bin/env node
const fs = require('fs');
if (!process.argv[2]) {
console.error('Incorrect parameters');
console.error('Usage: ./analytics.js <json-file>');
process.exit(2);
}
View stream-wat.js
#!/usr/bin/env node
const fs = require('fs');
if (!process.argv[2]) {
console.error('Incorrect parameters');
console.error('Usage: ./analytics.js <json-file>');
process.exit(2);
}
@kimmobrunfeldt
kimmobrunfeldt / spectre.c
Created Jan 4, 2018 — forked from ErikAugust/spectre.c
Spectre example code
View spectre.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
View joi-probs.js
const Joi = require('joi');
const payload = [{
type: 'book',
author: 'Herman Melville',
},
{
type: 'periodical',
volume: 1,
}, {
View user-data-inlined.json
{
"name": "Kimmo",
"telegramChannels": [{ "name": "coodiryhmä" }, { "name": "TRESekoilu" }]
}
View toolbox.md
View postgres.md
You can’t perform that action at this time.