Skip to content

Instantly share code, notes, and snippets.

rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.
-dmenu Start in dmenu mode.
-display [string] X server to contact.
${DISPLAY}
-h,-help This help message.
@johnbeard
johnbeard / docset.md
Last active October 17, 2018 16:41
KiCad docset

Some notes, as this needs a bit of thought before it can be added to anything.

  • Modify the Doxyfile
GENERATE_DOCSET = YES
DOCSET_FEEDNAME = "KiCad PCB EDA Suite"
DOCSET_BUNDLE_ID = org.kicad-pcb.kicad
DISABLE_INDEX = YES
GENERATE_TREEVIEW = NO
@johnbeard
johnbeard / README
Created February 26, 2015 18:00
CMake custom command problem
Initial
@johnbeard
johnbeard / gist:9968d9647b4d48412a22
Created December 6, 2014 14:55
Move exact patch
diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt
index 152b1ab..3fde247 100644
--- a/bitmaps_png/CMakeLists.txt
+++ b/bitmaps_png/CMakeLists.txt
@@ -216,6 +216,9 @@ set( BMAPS_MID
drag_track_segment
drc_off
drc
+ duplicate_line
+ duplicate_pad
@johnbeard
johnbeard / SetupEclipse.adoc
Last active October 26, 2019 07:48
Setting up Kicad in Eclipse

This assumes building on Linux, but in theory it would work elsewhere.

  1. Build your Kicad somewhere. I tend to put it outside of the source directory.

  2. Create a new C/C++ "Makefile project from existing code", select your code directory (not your build directory)

    1. Set the toolchain as required (I used Linux GCC)

    2. When you finish, the indexer will start to run after a few seconds. Stop this before it tries to index boost - this always hangs for me.

  3. If your build directory is not under the source directory, create a new linked folder under the project (New > Folder > Select "linked folder"). I called it "Build", but you might have several.

  4. Open the Project Properties > C/C++ General > Paths and Symbols

    1. Add relevant directories as source directories and remove the default top-level one. This prevents Eclipse spending ages looking around in boost, trying to index it and so on. You can also do this with a filter, but I find that more effort.

@johnbeard
johnbeard / .bashrc.kicad
Last active August 29, 2015 14:06
Building Kicad
# Normal cmake config
localKicad=~/local/kicad
localKicadPython=$localKicad/usr/lib/python2.7/dist-packages/
alias cmake.kicad="cmake -DMAINTAIN_PNGS=ON -DCMAKE_BUILD_TYPE=Debug -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON -DPYTHON_DEST=$localKicadPython -DCMAKE_INSTALL_PREFIX=~/local/kicad -DCMAKE_VERBOSE_MAKEFILE=OFF -DCMAKE_CXX_COMPILER=/usr/bin/ccache -DCMAKE_CXX_COMPILER_ARG1=g++ $1"
# Environment variables for a local kicad installation
export PYTHONPATH=$PYTHONPATH:$localKicadPython
export PATH=$PATH:$localKicad/bin
@johnbeard
johnbeard / odt_md.py
Last active August 29, 2015 14:06
ODT to MD processor
import os
import re
import zipfile
import subprocess
import base64
import md5
def get_image_data_from_odt(odt):