Skip to content

Instantly share code, notes, and snippets.

View RomanSaveljev's full-sized avatar

Roman Savelyev RomanSaveljev

View GitHub Profile
@RomanSaveljev
RomanSaveljev / README.md
Created October 23, 2018 12:11
Embedded development board stackable cradle design

Delivery

  • 3D-model files suitable for viewing with free software
  • Rendered JPEG pictures of:
    • Overall design view
    • Crosssections with the board placed inside
    • Crossections of three stacked cradles

Description

@RomanSaveljev
RomanSaveljev / log.txt
Created January 17, 2018 11:19
terraform bug
2018/01/17 13:18:29 [INFO] Terraform version: 0.11.2 a6008b8a48a749c7c167453b9cf55ffd572b9a5d
2018/01/17 13:18:29 [INFO] Go runtime version: go1.9.1
2018/01/17 13:18:29 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply", "-auto-approve=true"}
2018/01/17 13:18:29 [DEBUG] Attempting to open CLI config file: /Users/romsav01/.terraformrc
2018/01/17 13:18:29 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/01/17 13:18:29 [INFO] CLI command args: []string{"apply", "-auto-approve=true"}
2018/01/17 13:18:29 [INFO] command: empty terraform config, returning nil
2018/01/17 13:18:29 [DEBUG] command: no data state file found for backend config
2018/01/17 13:18:29 [DEBUG] New state was assigned lineage "e7e1aa7d-efe9-452c-af4b-da1b49f9dea4"
2018/01/17 13:18:29 [INFO] command: backend initialized: <nil>
@RomanSaveljev
RomanSaveljev / file-missing.bats
Last active April 28, 2016 15:50
Docker bug report additional stuff
#!sh
dockerfile() {
cat <<EOF
FROM debian:8
RUN echo 123 >/a && printf abc >/b
RUN echo 456 >/a && echo def >>/b
EOF
}
subj
@RomanSaveljev
RomanSaveljev / nfs-locking.md
Last active November 25, 2015 12:33
Exploring NFS file locking

Pre-requisites

  • NFSv4
  • Have all_squash in /etc/exports, like so:
/opt/vmlocks 10.0.1.38(rw,sync,all_squash) 10.0.1.244(rw,sync,all_squash)

Testing

@RomanSaveljev
RomanSaveljev / bug.groovy
Created November 24, 2015 21:18
Groovy bug
class A {
A() {
func()
}
void func() {
}
}
void func() {
def t = false
@RomanSaveljev
RomanSaveljev / bug.groovy
Created November 17, 2015 08:53
Throws exception - reported to ASF JIRA
/**
* Created by romasave on 11/17/15.
*/
class Main {
static abstract class Inner {
abstract int findA()
int doSomething() {
findA()
}
@RomanSaveljev
RomanSaveljev / INSTALL_STM32CUBEMX_LINUX.md
Created September 16, 2015 18:39
How to install STM32CubeMX in Linux

The Eclipse plug-in did not really work for me and the IDE kept crashing. Instead I have resorted to installing stanadalone executable:

  • Download the code generator
  • Unzip it somewhere
  • java -jar SetupSTM32CubeMX-4.10.0.exe -console
  • Answer every clumsy query
  • If installed under default path, launch it as: java -jar /usr/local/STMicroelectronics/STM32Cube/STM32CubeMX/STM32CubeMX.exe
@RomanSaveljev
RomanSaveljev / try_rpc.go
Last active November 28, 2022 11:49
Demonstrate Go RPC connection over simple pipes (http://play.golang.org/p/4BZQbM9lNN)
package main
import (
"io"
"log"
"net/rpc"
)
type pipePair struct {
reader *io.PipeReader
@RomanSaveljev
RomanSaveljev / gist:5568090
Created May 13, 2013 12:48
Generate Java class, which overrides all public methods of the ancestor and prints them as a code with empty bodies
private static String EXAMPLE_PARAMETER_NAMES = "abcdefghijklmnopqrstuvwxyz";
private void dumpMethods(Class<?> cl)
{
System.out.println("// Methods from " + cl.getCanonicalName());
Method[] methods = cl.getMethods();
for (int i = 0; i < methods.length; i++ )
{
Method m = methods[i];
if (Modifier.isPublic(m.getModifiers()) || Modifier.isProtected(m.getModifiers()))
{