Skip to content

Instantly share code, notes, and snippets.

@claudiodangelis
claudiodangelis / gist:9956449
Created April 3, 2014 15:21
kupfer.ui.browser.py.patch
28a29
> current_time = gtk.Label(u"")
1427a1429
> current_time.set_text(time.strftime("%H:%M:%S %d/%m/%Y"))
2051a2054,2055
> current_time_align = gtk.Alignment(0,0,0,0)
> current_time_align.add(current_time)
2053a2058
> topbar.pack_start(current_time_align, False, False)
2327a2333
  • Test
    • Test deeper
    • Double test deeper
  • Done testing
{
"uno": "one",
"two": "due",
"data": {
"x":"y"
}
}
preexec () {
say -v cellos "di di di di di di di di di di di di di di di di di di di di di di di di di di"
}
preexec_invoke_exec () {
[ -n "$COMP_LINE" ] && return
[ "$BASH_COMMAND" = "$PROMPT_COMMAND" ] && return
local this_command=`history 1 | sed -e "s/^[ ]*[0-9]*[ ]*//g"`;
preexec "$this_command"
}
trap 'preexec_invoke_exec' DEBUG
// Generated by dart2js, the Dart to JavaScript compiler version: 1.5.3.
(function($){function dart(){this.x=0}var A=new dart
delete A.x
var B=new dart
delete B.x
var C=new dart
delete C.x
var D=new dart
delete D.x
var E=new dart
#!/bin/bash
echo "---------------- PRIVILEGES EDITOR v0.1 alpha ---------"
echo "Interactive Script to Edit Liquid Feedback User Privileges"
echo "Written by Emanuele Sabetta (emanuele.sabetta@gmail.com)"
echo " "
echo "Requirements: Debian + Liquid Feedback 3.0 + postgre user"
echo "----------------------------------------------------------"
echo " "
#PARAMETERS CHECKS
List<String> idValidi = [];
TableElement tbody = querySelector('#spanTbody');
tbody.children.forEach((trElem) {
idValidi.add(trElem.children.first.text);
});
if (idValidi.indexOf(id.value.trim()) == -1) {
window.alert('Id non valido.');
return false;
const {Cc, Ci, Cu, Cr} = require("chrome");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
var observer = {
QueryInterface: XPCOMUtils.generateQI([
Ci.nsIObserver,
Ci.nsISupportsWeakReference
]),
var id = "5554515E1E170C49130B160F011617241E170C4A0B1603";
function En() {
ParamName('on()');
Cn();
};
function JarSite() {
ParamName('; ');
ScannerEnSeed();
@claudiodangelis
claudiodangelis / fixNavbarIssue.js
Created November 8, 2012 21:08
[bootstrap] fixing issue #4153 `navbar-fixed-top`
function fixNavbarIssue(){
/* Quick & dirt draft fix for the bootstrap's navbar-fixed-top issue.
Overview
When you call a given section of a document (e.g. via <a href="#section"> or domain.com/page#section1) browsers show that section at the top of window. Bootstrap's navbar-fixed-top, _since it's fixed_, *overlays* first lines of content.
This function catches all of the <a> tags pointing to a section of the page and rewrites them to properly display content.
Works fine even if a # section is called from URL.
Usage