Skip to content

Instantly share code, notes, and snippets.

View SouzaRM's full-sized avatar

Rogerio M. Souza SouzaRM

  • Brazil - Porto Seguro-BA
View GitHub Profile
@mfilej
mfilej / gmail-user-styles.css
Created January 29, 2009 11:26
GMail userstyles
/* hide the google bar */
body {
margin-top: -25px !important;
margin-bottom: 20px;
height: 100%;
}
/* but leave the settings link */
a[href="https://mail.google.com/mail/#settings"] {
position: absolute !important;
javascript:(function(){
//inspired by http://userscripts.org/scripts/show/8924
var s = document.createElement('script');
s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js');
if(typeof jQuery=='undefined') document.getElementsByTagName('head')[0].appendChild(s);
(function() {
if(typeof jQuery=='undefined') setTimeout(arguments.callee, 100)
else{
jQuery("*").one("click",function(event){
//http://snippets.dzone.com/posts/show/4349
@hugs
hugs / selenium-examples.py
Created February 16, 2011 19:40
Example code for using the Selenium 2 Python bindings.
# To install the Python client library:
# pip install -U selenium
# Import the Selenium 2 namespace (aka "webdriver")
from selenium import webdriver
# iPhone
driver = webdriver.Remote(browser_name="iphone", command_executor='http://172.24.101.36:3001/hub')
# Android
@teglsbo
teglsbo / AutoHotkey.ahk
Created October 2, 2011 08:21
My AutoHotkey-keyboard shortcut script
;
;My hotkeys (NTJ)
;
;Remap back/forward browser buttons to Windows keys
;*SC16A down::Send, {LWINDOWN}
;*SC169 down::Send, {APPSKEY down}
;*SC16A up::Send, {LWINUP}
;*SC169 up::Send, {APPSKEY up}
@joelpt
joelpt / mouse-tip.ahk
Created April 16, 2012 18:32
Mouse pointer anchored tooltip for Autohotkey
#Persistent
; update mouse tooltip position this often, in ms
; 10 ms looks the smoothest, but you may prefer a higher value
; if the CPU load is too high with 10 ms
MouseTipUpdateInterval := 10
; a usage example
Tip("This is an example mousetip.")
@egomesbrandao
egomesbrandao / PowershellRunnerHiddenConsole.vbs
Created July 13, 2012 13:12
VBScript para executar um script Powershell sem abrir a janela console
Dim objShell
Set objShell = CreateObject("WScript.Shell")
strCMD = "powershell -sta -noProfile -NonInteractive -nologo -command " & Chr(34) & "C:\Script.ps1" & Chr(34)
objShell.Run strCMD,0
'Fonte: http://www.leporelo.eu/blog.aspx?id=run-scheduled-tasks-with-winform-gui-in-powershell
@zachbrowne
zachbrowne / instructions.txt
Created November 1, 2012 19:29
Install Ubuntu Desktop With NoMachine FreeNX on Ubuntu Server 12.04
This is a method to using your Ubuntu 12.04 server without the Unity desktop on a very fast remote desktop program. This is by far the best method to managing your Ubuntu server if you like GUI.
apt-get install --no-install-recommends ubuntu-desktop
apt-get --yes purge unity unity-2d unity-2d-places unity-2d-panel unity-2d-spread
apt-get --yes purge unity-asset-pool unity-services unity-lens-* unity-scope-*
apt-get --yes purge liboverlay-scrollbar*
apt-get --yes purge appmenu-gtk appmenu-gtk3 appmenu-qt
apt-get --yes purge firefox-globalmenu thunderbird-globalmenu
apt-get --yes purge unity-2d-common unity-common
apt-get --yes purge libunity-misc4 libunity-core-5*
@ctavan
ctavan / gist:4482825
Last active February 18, 2019 16:09
Init-script for optionally starting multiple redis instances on the same host running Ubunut/Debian. Highly inspired by the memcached init script that comes with the Ubuntu package. This is useful since redis is single-threaded.
#! /bin/bash
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
@fredr
fredr / bookmarklet-runner.js
Last active June 14, 2024 17:28
A bookmarklet that will inject an external script in the browser. (minify, uri encode and add to the href prefixed with "javascript:" in your bookmark)
(function() {
var script = document.createElement('script');
script.async = 1;
script.src = '<url to script>';
document.getElementsByTagName('body')[0].appendChild(script);
})();
@danharper
danharper / background.js
Last active June 29, 2024 19:32
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});