- 更新
2021-05-23
- 作者
@voluntas
- バージョン
2021.1
- URL
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
# Single Command, runs 2 calls to gdbus to get the currently active Window from Gnome 3.x | |
# Escaped so you can copy and paste into terminal directly | |
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval global.get_window_actors\(\)[`gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval global.get_window_actors\(\).findIndex\(a\=\>a.meta_window.has_focus\(\)===true\) | cut -d"'" -f 2`].get_meta_window\(\).get_wm_class\(\) | cut -d'"' -f 2 | |
# Unescaped version, will not run | |
# Broken down into 2 commands. | |
# Call to Gnome to get the array location of the active Application | |
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m \ |
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
require 'pathname' | |
require 'fileutils' | |
LOG_PATH = Pathname('/tmp/vimbench.log') | |
RE = /(\d+\.\d+)\s*\d+\.\d+:\s*--- N?VIM STARTED ---/ | |
N = 10 | |
def prepare | |
FileUtils.rm LOG_PATH if LOG_PATH.exist? |
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/perl | |
# | |
# Written in 2017 by Kazuho Oku | |
# | |
# To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. | |
# You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | |
# | |
use strict; | |
use warnings; |
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
// Google Analytic | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-54138102-1', 'auto'); | |
ga('send', 'pageview'); | |
// Disqus Comment | |
var disqus_shortname = "riespandi"; |
NOTE: This is outdated. Check the comments below for more up-to-date forks of this gist.
Improved YARD CHEATSHEET http://yardoc.org
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.
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
1 #! /bin/bash | |
2 #set -x | |
3 | |
4 if [[ $1 == 'R' ]]; then | |
5 wmctrl -s $(wmctrl -d | grep \* | awk '{print $1+1}') | |
6 fi | |
7 if [[ $1 == 'L' ]]; then | |
8 CURRENT=$(wmctrl -d | grep \* | awk '{print $1}') | |
9 if [[ $CURRENT == 0 ]]; then | |
10 wmctrl -s 0 |
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
Open a Terminal and try the next commands : | |
dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:1 | |
Luna : Workspace Overview ( keep Enter pressed ), Freya : Multitasking View | |
dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:2 | |
Terminal maximizes | |
dbus-send --session --dest=org.pantheon.gala --print-reply /org/pantheon/gala org.pantheon.gala.PerformAction int32:3 | |
Terminal minimizes |
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
#!/bin/bash | |
get_window_paths() | |
{ | |
qdbus org.ayatana.bamf /org/ayatana/bamf/matcher org.ayatana.bamf.matcher.WindowPaths | |
} | |
get_running_apps() | |
{ | |
qdbus org.ayatana.bamf /org/ayatana/bamf/matcher org.ayatana.bamf.matcher.RunningApplications |