Skip to content

Instantly share code, notes, and snippets.

@xim
xim / bashrc.append
Last active December 20, 2015 11:29
Vim function for your .bashrc. Turns "vim file1:42 file2:1337" into "/usr/bin/vim file1 file2 -S (script that moves the cursor to the correct line)"
# vim file:34 otherfile:1337 -> Open files at respective lines. And in tabs!
vim() {
declare -a args
let fcount=0
hit_dashdash=
for arg in "$@" ;do
if [[ "$arg" =~ ^- && ! "$hit_dashdash" ]] ;then
args+=("$arg")
[[ "$arg" = "--" ]] && hit_dashdash=1
continue
// ==UserScript==
// @name Facebook width adjustment
// @namespace https://gist.github.com/xim
// @description Make stuff wider on FB
// @include https://www.facebook.com/*
// @version 4
// @grant GM_addStyle
// @downloadURL https://gist.githubusercontent.com/xim/6bef9b52ab831b981909/raw/fbwidth.user.js
// ==/UserScript==
@xim
xim / mangastream-banner.user.js
Created September 4, 2014 08:45
Manga stream remove ad banners
// ==UserScript==
// @name Manga Stream remove ad banners
// @namespace https://gist.github.com/xim
// @description Removes and collapses right side ad on MangaStream, readms.com
// @include http://readms.com/*
// @version 1
// @grant none
// ==/UserScript==
var el = document.getElementById('reader-sky');
@xim
xim / mangareader-zoom.user.js
Created September 4, 2014 08:47
Mangareader zoom in as default
// ==UserScript==
// @name mangareader zoom in as default
// @namespace https://gist.github.com/xim
// @description Zooms in on manga pages by default at mangareader.net
// @include http://www.mangareader.net/*
// @version 1
// @grant none
// ==/UserScript==
document.getElementById('img').removeAttribute('width');
#!/bin/bash
# (C) 2008 Canonical Ltd.
# Author: Martin Pitt <martin.pitt@ubuntu.com>
# License: GPL v2 or later
# modified by David D Lowe and Thomas Detoux
# Debian 7 support by pixline <pixline@gmail.com>
# It NEEDS /bin/bash, dash won't work (sed issues).
#
# Setup user and temporary home directory for guest session.
#include "grabberdialog.h"
#include <QDebug>
#include <QGuiApplication>
#include <QLabel>
#include <QPixmap>
#include <QPushButton>
#include <QScreen>
#include <QVBoxLayout>
#include <QWindow>
@xim
xim / README.md
Last active November 4, 2015 18:08
QTBUG-49238

This code reproduces QTBUG-49238.

@xim
xim / activityNotifier.h
Last active October 4, 2016 08:19
Minimal program to reproduce hanging qt apps
#ifndef ACTIVITY_NOTIFIER_H
#define ACTIVITY_NOTIFIER_H
void setIsActive(bool);
#endif
@xim
xim / facebook-sponsored-content-remover.user.js
Last active January 1, 2018 19:06
Facebook sponsored content remover
// ==UserScript==
// @name Facebook remove all sponsored content
// @namespace https://gist.github.com/xim
// @description Removes all sponsored content.
// @include https://www.facebook.com/*
// @version 6
// @downloadURL https://gist.githubusercontent.com/xim/ca63b8f8053517fc460b0b67508ed125/raw/facebook-sponsored-content-remover.user.js
// @grant none
// ==/UserScript==
@xim
xim / .gitignore
Created March 16, 2018 20:35 — forked from anonymous/autohide-test.pro
autohide-test
*.user
Makefile*
.qmake.stash
release
debug
*.swp
*~