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
pacmd list-sinks | grep -oPz "index: \K\d+(?=\n^\tname: <`pactl stat | grep -oP "Default Sink: \K.+"`>)" |
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/python | |
# Toggles headset connection | |
import dbus | |
from dbus.mainloop.glib import DBusGMainLoop | |
# change this to your device name | |
device_to_connect = "BlueBuds X" | |
dbus_loop = DBusGMainLoop() |
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
# | |
# 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
;; 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
# Doxyfile 1.8.8 | |
# This file describes the settings to be used by the documentation system | |
# doxygen (www.doxygen.org) for a project. | |
# | |
# All text after a double hash (##) is considered a comment and is placed in | |
# front of the TAG it is preceding. | |
# | |
# All text after a single hash (#) is considered a comment and will be ignored. | |
# The format is: |
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/python | |
# | |
# Example of exporting a cadquery object to STEP using FreeCAD | |
# | |
# `FreeCAD` python module doesn't allow working with colors. For this | |
# we need the `FreeCADGui` module and to be able to access to objects | |
# `ViewObject` property. We are going to initialize FreeCADGui like | |
# usual, but instead of actually showing the window we will hide | |
# it. Note that We won't ever start the main loop at all. | |
# |
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/python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright © 2015 Hasan Yavuz Özderya | |
# | |
# This file is part of ecad-3d-model-generator. | |
# | |
# ecad-3d-model-generator is free software: you can redistribute it | |
# and/or modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation, either version 3 of |
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== | |
OlderNewer