Skip to content

Instantly share code, notes, and snippets.

@tomasfejfar
tomasfejfar / gist:5c92333b60143f189a69e8a9cde55811
Created May 29, 2017 19:44
Convert PDF to text file using tesseract and imagemagick in cygwin
Required cygwin packages:
* tesseract-ocr
* ghostscript
* imagemagick
usr/bin/convert.exe -density 400 input.pdf -depth 8 output.tiff
tesseract -l eng -psm 1 output.tiff output_textfile
@kovrov
kovrov / spinner_effect.qml
Created July 22, 2014 07:21
SpinnerEffect.qml
import QtQuick 2.2
import QtQuick.Window 2.2
Window {
color: "gray"
NumberAnimation {
target: fx
property: "angle"; from: Math.PI * 2; to: 0
@elpuri
elpuri / Button.qml
Created December 28, 2010 19:36
A button component in QML
import Qt 4.7
BorderImage {
id: buttonbase
signal clicked
property int hitboxExtension : 20
property alias text : label.text
property bool pressed: hitbox.pressed && hitbox.containsMouse
import QtQuick 2.4
Column {
width: parent.width
height: parent.height
property alias model: columnRepeater.model
Repeater {
id: columnRepeater
@Brainiarc7
Brainiarc7 / prime-select PKGBUILD for Arch Linux
Last active November 11, 2018 15:16
Enable NVIDIA PRIME's selector on Arch Linux
# Maintainer: Dennis E. Mungai <dmngaie@gmail.com>
pkgname=nvidia-prime
pkgver=0.7
pkgrel=1
pkgdesc="Tools to enable NVIDIA's Prime."
url="https://launchpad.net/ubuntu/+source/nvidia-prime"
arch=('x86_64' 'i686')
license=('GPLv3')
depends=('lightdm' 'bbswitch' 'python' 'bash')
optdepends=('nvidia' 'lightdm-gtk3-greeter')
@bhepple
bhepple / i3-move-resize.py
Last active November 17, 2018 09:15
i3-move-resize.py
#!/usr/bin/python3
# lives at: https://gist.github.com/bhepple/5c43e83e945a42297ba6433ee8ba88ce
# derived from: https://github.com/benkaiser/i3-wm-config
# $0 x y width height (-1 for unchanged)
import subprocess
import sys
import json
@penk
penk / material-design.qml
Last active January 19, 2019 22:36
Material Design inspired style in QML
import QtQuick 2.0
import QtGraphicalEffects 1.0
Rectangle {
id: root
color: '#EEEEEE'
width: 960
height: 768
Item {
{ ...}:
{
#...
nixpkgs.overlays = [
(import ./overlay.nix)
];
#...
@nogajun
nogajun / fonts.conf
Created August 21, 2016 02:23
fontconfig
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<include ignore_missing="yes" prefix="xdg">fontconfig/msfonts.conf</include>
<match target="font">
<edit mode="assign" name="rgba"><const>rgb</const></edit>
<edit mode="assign" name="hinting"><bool>false</bool></edit>
<edit mode="assign" name="hintstyle"><const>hintnone</const></edit>
<edit mode="assign" name="antialias"><bool>true</bool></edit>
@40
40 / propertyalias.qml
Created November 9, 2012 07:26
passing data between qml pages - propertyalias.qml
import bb.cascades 1.0
Page {
property alias label5 : label5
Container {
layout: DockLayout {}
Label {
id: label5
text: "Hello World"
}