Skip to content

Instantly share code, notes, and snippets.

@kden416
kden416 / toggle-terminal.sh
Created January 23, 2022 18:13 — forked from zidizei/toggle-terminal.sh
Toggle your GNOME Terminal window with a keyboard shortcut under Linux.
#!/bin/bash
function toggle_terminal () {
Terminal_Window_ID=`xdotool search --all --onlyvisible --classname gnome-terminal`
# echo $Terminal_Window_ID
if [[ -z "$Terminal_Window_ID" ]]
then
@kden416
kden416 / gist:3f8a32f7e33620934f967f00ae55e505
Created August 29, 2018 14:52 — forked from pazdera/gist:1098129
Singleton example in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example of Singleton design pattern
# Copyright (C) 2011 Radek Pazdera
# This program 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 the License, or
# (at your option) any later version.