Skip to content

Instantly share code, notes, and snippets.

View iberianpig's full-sized avatar

Kohei Yamada iberianpig

View GitHub Profile
@rbreaves
rbreaves / WaylandUbuntu19.10-AppTitle
Last active February 7, 2024 12:02
Grab wmclass name or Window Name/Title under Wayland with Gnome 3.x
# 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 \
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?
@voluntas
voluntas / loadtest.rst
Last active April 3, 2024 03:25
負荷試験コトハジメ
@Samffy
Samffy / xps13.md
Last active December 28, 2022 22:37
Dell XPS 13 9360 : Ubuntu Wifi disconnection

I encounter wifi disonnection problem on a Dell XPS 13 9360. Here is the solution I used to fix this bad behavior.

Which wifi card version is installed ?

lspci | grep -i net

3a:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)

@kazuho
kazuho / git-blame-pr.pl
Last active June 28, 2022 07:15
git-blame by PR #
#! /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;
@Showfom
Showfom / Analyticus
Created September 10, 2017 12:47
InstantClick with Google Analytic Integration
// 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";
@phansch
phansch / yardoc_cheatsheet.md
Last active March 1, 2024 18:17 — forked from chetan/yardoc_cheatsheet.md
Improved YARD cheatsheet
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
@AnderRasoVazquez
AnderRasoVazquez / comands.sh
Last active October 9, 2020 11:36
[Terminal Commands To Initiate Gala Windows And Workspaces Actions in elementary OS] #elementaryos #bash #shell
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
@SergKolo
SergKolo / qdbus_windows.sh
Created April 24, 2016 03:19
listing apps and their windows with qdbus
#!/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