Skip to content

Instantly share code, notes, and snippets.

@heitzmann
heitzmann / config.py
Created January 31, 2019 11:22
Qtile configuration
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import subprocess
import platform
from libqtile.config import Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
import custom
@jvalrog
jvalrog / scratchpad
Created November 6, 2018 19:44
An i3-like scratchpad using xdotool
#!/bin/sh
#
# SCRATCHPAD
#
# An i3-like scratchpad using xdotool.
#
# Example:
# ~$ scratchpad htop-pad urxvt -T htop-pad -e htop
#
# Explanation:
@dannote
dannote / final-cut-pro-trial-reset.swift
Last active May 8, 2024 03:08
Final Cut Pro X trial reset
#!/usr/bin/swift
import Foundation
let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath)
let data = try! NSData(contentsOf: path) as Data
let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary
let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary
for (key, value) in mutableDictionary {
@veysby
veysby / activemq.txt
Last active April 20, 2020 10:08
Activemq: check health status using REST API
$curl http://localhost:8161/api/jolokia/read/org.apache.activemq:type=Broker,brokerName=localhost,service=Health
{"timestamp":1449776947,"status":200,"request":{"mbean":"org.apache.activemq:brokerName=localhost,service=Health,type=Broker","type":"read"},"value":{"CurrentStatus":"Good"}}
@datalyze-solutions
datalyze-solutions / tiling.py
Created September 26, 2014 11:56
simple python window tiling script with wmctrl
#!/usr/bin/python
import time
start = time.time()
import os, sys
def setWindow(posX, posY, sizeX, sizeY):
values = {
'gravity': 0,
@michail-nikolaev
michail-nikolaev / gist:3840973
Created October 5, 2012 16:55
JPA - Tree structure with automatic order and tested operations for it
@Entity
public class TreeCategory extends IdentifiableEntity {
....
@ManyToOne(optional = true)
@JoinColumn(name = "parent_id", referencedColumnName = "id")
public TreeCategory getParent() {
return parent;
}