Skip to content

Instantly share code, notes, and snippets.

@vinzent
vinzent / gist:f4b39419254529d75936
Created January 7, 2015 13:35
apache http https redirect vhost conf
<VirtualHost *:80>
ServerName phabricator.my.domain
## Vhost docroot
DocumentRoot "/opt/phacility/phabricator/webroot"
<Directory "/opt/phacility/phabricator/webroot">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
;;; phabricator.el --- Phabricator/Arcanist helpers for Emacs.
;; Author: Andrew Tulloch
;; URL: https://github.com/ajtulloch/phabricator.el
;; Version: 0.1
;; Created: 2014-09-11
;; Keywords: phabricator, arcanist, diffusion
;; Package-Requires: ((emacs "24.1") (ido "0.1") (projectile "0.1") (dash "0.1"))
;; This file is NOT part of GNU Emacs.
@shamil
shamil / mount_qcow2.md
Last active May 3, 2024 06:35
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
from __future__ import division
import Part
import math as mt
from FreeCAD import Base
from FreeCAD import Gui
def PerfSheet(L,H,W,R,Type="circle", s=1/5):
HoleSK=App.ActiveDocument.addObject('Sketcher::SketchObject','SheetPerforationHoles')
HoleSK.Placement = App.Placement(App.Vector(0.000000,0.000000,0.000000),App.Rotation(0.000000,0.000000,0.000000,1.000000))
@felipeborges
felipeborges / WebkitSample.js
Last active February 22, 2024 20:56
JavaScript (Gjs)(GTK3) Webkit Sample. Run: "gjs WebkitSample.js"
// Updated in August 2022
imports.gi.versions.Gtk = '3.0';
const { Gtk, GObject, WebKit2: WebKit } = imports.gi;
Gtk.init(null);
const WebBrowser = GObject.registerClass(
class WebBrowser extends Gtk.Application {
@zeffii
zeffii / how_to_sanitize_a_blend.py
Created March 26, 2012 11:08
how_to_sanitize_a_blend
import bpy
#unselect everything
# <insert code here, this can vary depending on your situation>
# bpy.ops.object.select_all()
# gather list of items of interest.
candidate_list = [item.name for item in bpy.data.objects if item.type == "MESH"]
# select them only.