This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; based on http://emacsredux.com/blog/2013/04/03/delete-file-and-buffer/ | |
(defun delete-file-and-buffer () | |
"Kill the current buffer and deletes the file it is visiting." | |
(interactive) | |
(let ((filename (buffer-file-name))) | |
(if filename | |
(if (y-or-n-p (concat "Do you really want to delete file " filename " ?")) | |
(progn | |
(delete-file filename) | |
(message "Deleted file %s." filename) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place in : /usr/share/X11/xorg.conf.d/ | |
Section "InputClass" | |
Identifier "Marble Mouse" | |
MatchProduct "Logitech USB Trackball" | |
Option "EmulateWheel" "true" | |
Option "EmulateWheelButton" "9" | |
Option "XAxisMapping" "6 7" | |
Option "YAxisMapping" "4 5" | |
Option "Emulate3Buttons" "true" | |
EndSection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# replace the EXTENSION_UUID with your extension/applet/desklet name | |
# replace the APPLET with other types if you are not working with an applet | |
dbus-send --session --dest=org.Cinnamon.LookingGlass --type=method_call /org/Cinnamon/LookingGlass org.Cinnamon.LookingGlass.ReloadExtension string:'EXTENSION_UUID' string:'APPLET' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Export All STL | |
# | |
# This is a small FreeCAD script to export all visible parts in STL | |
# mesh format. Files will be named as "documentname_partlabel.stl". | |
# | |
import FreeCAD | |
import os.path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# | |
# This is a script to create a KiCad symbol from STM32Cube pinout csv | |
# file. | |
# | |
import csv | |
from collections import defaultdict | |
import re | |
import pprint | |
from operator import itemgetter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name unfix-all-the-toolbars | |
// @description Removes "position: fixed" style from elements, unfixing "toolbars" and the such. | |
// @namespace https://hasanyavuz.ozderya.net | |
// @include * | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is an experimental FreeCAD macro that will export current scene | |
# as X3D file. Only the visible objects that can be converted to mesh | |
# will be exported with their color. | |
# | |
import FreeCAD | |
import FreeCADGui | |
import xml.etree.ElementTree as et | |
from PySide.QtGui import QFileDialog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# | |
# This script will re-annotate board companents according to their x,y | |
# positions and back-annotate those changes to schematic files. | |
# | |
# Make sure you have backups of all your files! | |
# | |
# Forked from https://github.com/cculpepper/kicad-python/blob/master/examples/pcbannotate.py | |
# | |
# You should run the script from inside pcbnew script console. After |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cadquery as cq | |
from Helpers import show | |
BS = cq.selectors.BoxSelector | |
# PARAMETERS | |
mount_holes = True | |
# mold size | |
mw = 40 | |
mh = 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- ***************************** | |
* Qwt Widget Library | |
* Copyright (C) 1997 Josef Wilgen | |
* Copyright (C) 2002 Uwe Rathmann | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the Qwt License, Version 1.0 | |
*****************************************************************************/ | |
// vim: expandtab |
NewerOlder