This file contains hidden or 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 | |
# Check whether there are child zsh processes to pull cwd from | |
# Sets $BEST_PID to the PID of the deepest zsh process | |
# | |
# Usage: checkchildren <PID> | |
function checkchildren() { | |
if [[ $# -eq 1 ]]; then | |
psdata=(`ps ho pid,comm --ppid=$1`) | |
if [[ ${#psdata[@]} -ge 2 ]]; then |
This file contains hidden or 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
------------PUT THIS SOMEWHERE BEFORE YOUR awful.rules.rules TABLE------------- | |
-- Callback which restricts window properties to certain values | |
-- Use with caution, some programs could get stuck in an infinite loop | |
local function restrict(props) | |
return function(c) | |
for property, value in pairs(props) do | |
c:connect_signal("property::" .. property, function(c, state) | |
if state ~= value then | |
c[property] = value | |
end |
This file contains hidden or 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
class PipeExampleModule : public Module { | |
... | |
union { | |
struct pipe_results pr; | |
struct pipe_results2 pr2; | |
struct pipe_results3 pr3; | |
} results[NUMBER_PIPES]; | |
... | |
// Nothing needed in constructor or destructor | |
... |
This file contains hidden or 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 | |
############################ | |
# SSH Connection Script v3.0 | |
# Jeff Heidel 2012 | |
# Ian Thompson 2014 | |
############################ | |
## |