Skip to content

Instantly share code, notes, and snippets.

View beothorn's full-sized avatar

Beothorn beothorn

View GitHub Profile
@beothorn
beothorn / toogle-panels
Created May 30, 2011 17:28
Toogle panels on gnome2
#!/bin/bash
panelList=$(gconftool-2 --all-dirs "/apps/panel/toplevels")
for panel in $panelList
do
state=$(gconftool-2 --get "$panel/auto_hide")
if [ $state = "true" ]; then
gconftool-2 --set "$panel/unhide_delay" --type integer "0"
gconftool-2 --set "$panel/auto_hide" --type bool "false"
@beothorn
beothorn / toogle-compiz
Created May 30, 2011 17:30
Toogle compiz on off
#!/bin/sh
if pidof compiz; then
metacity --replace&
else
compiz --replace&
fi
@beothorn
beothorn / somaextrato.js
Created October 1, 2011 05:10
soma extrato
var indexes = {date:0,description:3,valueSign:6,value:5,balance:7};
var sums = new Array();
function allMonthsSummed(){
console.log("allMonthsSummed");
var divMenuAno = document.getElementById('TRNnoprint03');
var values = document.createElement("textarea");
values.style.width = "100%";
values.style.height = "25em";
for(var i in sums)
@beothorn
beothorn / gist:6685234
Created September 24, 2013 14:02
Linux system information mega dump
echo "#################################Temperature"
sensors
echo "#################################Space available"
df -h
echo "#################################Processes"
ps aux
echo "#################################Processes system usage"
top -b -n 1
echo "#################################List open files"
lsof -i
<html>
<body>
<h1>Search results for searchTerm:</h1>
<div class="result">
<span class="result-title">First result</span>
<span class="result-content">First result content</span>
</div>
<div class="result">
<span class="result-title">Second result</span>
<span class="result-content">Second result content</span>
public class SearchResultPage {
public String header;//this field will contain the page header
}
import webGrude.annotations.Page;
import webGrude.annotations.Selector;
public class PrintExampleSearchResults {
@Page("http://www.example.com/{0}")
public static class SearchResultPage {
@Selector("h1") public String header;
}
public class SearchResult{
public String resultTitle;
public String resultContent;
}
import webGrude.annotations.Page;
import webGrude.annotations.Selector;
import java.util.List;
public class PrintExampleSearchResults {
@Selector("")
public static class SearchResult{
@Selector(".result-title") public String resultTitle;
package webGrude;
import webGrude.annotations.Page;
import webGrude.annotations.Selector;
import java.util.List;
public class PirateBayExample {
@Page("http://thepiratebay.se/search/{0}/0/7/0")