Skip to content

Instantly share code, notes, and snippets.

@Mikulas
Mikulas / config.neon
Created August 22, 2012 08:23
Nette user login for Adminer Editor
common:
parameters:
adminer_editor:
role: moderator
database:
host: localhost
dbname: yourDbName
user: yourDbUser
password: yourDbOass
@Mikulas
Mikulas / gist:2551307
Created April 29, 2012 15:31
Jerry Coffin's ReadProcessMemory virtual query example
#include <iostream>
#include <vector>
#include <string>
#include <windows.h>
#include <algorithm>
#include <iterator>
template <class InIter1, class InIter2, class OutIter>
void find_all(unsigned char *base, InIter1 buf_start, InIter1 buf_end, InIter2 pat_start, InIter2 pat_end, OutIter res) {
for (InIter1 pos = buf_start;
@Mikulas
Mikulas / main.go
Created December 27, 2021 23:53
fitbod to hevy import export sync
package main
import (
"bytes"
"encoding/csv"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
@Mikulas
Mikulas / config.yaml
Created August 18, 2017 14:19
frp kubernetes config
apiVersion: v1
kind: Namespace
metadata:
name: frp
---
apiVersion: v1
kind: LimitRange
metadata:
@Mikulas
Mikulas / countdown-card.js
Created April 26, 2020 20:47
Home Assistant Lovelace Countdown for Alexa Timer
class CountdownCard extends HTMLElement {
set hass(hass) {
if (!this.content) {
const card = document.createElement('ha-card');
card.header = 'Timer';
this.content = document.createElement('div');
this.content.style.padding = '0 16px 16px';
card.appendChild(this.content);
this.appendChild(card);
}
@Mikulas
Mikulas / convert.go
Created November 25, 2022 12:50
Convert Lion's Eye Plain Text into Moxfield compatible deckstats.net CSV
package main
import (
"fmt"
"github.com/tushar2708/altcsv"
"log"
"os"
"strconv"
"strings"
)
@Mikulas
Mikulas / Dockerfile
Last active March 11, 2022 12:34
Docker image PHP 7.1 alpine with extensions
FROM php:7.1-fpm-alpine
RUN apk add --update \
autoconf \
g++ \
libtool \
make \
&& docker-php-ext-install mbstring \
&& docker-php-ext-install mysqli \
@Mikulas
Mikulas / .gitignore
Last active December 23, 2021 05:31
abcd</script>alert('ok');</script> ‮abcd</script>alert('ok');</script>
*.*
@Mikulas
Mikulas / config.py
Last active January 18, 2020 01:52
import bpy
# https://blender.stackexchange.com/questions/5281/blender-sets-compute-device-cuda-but-doesnt-use-it-for-actual-render-on-ec2
bpy.context.user_preferences.addons['cycles'].preferences.compute_device_type = 'CUDA'
bpy.context.user_preferences.addons['cycles'].preferences.devices[0].use = True
bpy.context.scene.cycles.device = 'GPU'
bpy.data.scenes["Scene"].render.filepath = "/tmp/output.png"
bpy.ops.render.render(write_still=True)
sudo yum -y install freetype freetype-devel libpng-devel
sudo yum -y install mesa-libGLU-devel
sudo yum -y install libX11-devel mesa-libGL-devel perl-Time-HiRes
# Insert any url for Linux 64 bit blender
# https://builder.blender.org/download/
wget 'https://builder.blender.org/download/blender-2.78-81d7ff84769-linux-glibc219-x86_64.tar.bz2'
tar -jxvf blender*.tar.bz2