Skip to content

Instantly share code, notes, and snippets.

View vain's full-sized avatar

vain

View GitHub Profile
Program received signal SIGSEGV, Segmentation fault.
0xb7ef7410 in emit_dqt () from /usr/lib/libjpeg.so.8
(gdb) bt
#0 0xb7ef7410 in emit_dqt () from /usr/lib/libjpeg.so.8
#1 0xb7ef7e1a in write_tables_only () from /usr/lib/libjpeg.so.8
#2 0xb7ef00d7 in jpeg_write_tables () from /usr/lib/libjpeg.so.8
#3 0xb7f40b45 in TIFFjpeg_write_tables () from /usr/lib/libtiff.so.3
#4 0xb7f40ee3 in JPEGSetupEncode () from /usr/lib/libtiff.so.3
#5 0xb7f57f0e in TIFFWriteScanline () from /usr/lib/libtiff.so.3
#6 0x080a6cac in xsane_save_tiff_page (tiffile=0x82067b0, page=0, pages=0,
#!/bin/bash
# a) Compare existing language resources.
# b) Check if some of the keys in the reference language resources are
# not used.
# c) Try to find all keys in the code and check if they're present in
# the reference language resources.
# Launch this script from the root directory of FluxBB.
/*
<?xml version='1.0' standalone='yes' ?>
<!-- xml header for scripts & plugin manager -->
<script>
<name>CameraLookAt</name>
<author>TroY</author>
<version>0.1</version>
<date>2010-07-11</date>
<description>
Set a camera's view direction. Simply select your camera and the
#!/bin/bash
# Capture a series of images to be used in a time-lapse movie.
# Based on http://demaya.de/wp/2010/08/mit-ffmpeg-zeitraffervideos-erstellen/
# Default settings, parse command line arguments.
sleeptime='1'
defaultduration='30'
stopdate=$(( $(date +%s) + defaultduration ))
capsdir='/tmp/caps'
#!/bin/bash
# Based on the "Shell image viewer" by Andreas Schönfelder:
# https://bbs.archlinux.org/viewtopic.php?id=106089
# Defaults.
doublexres="yes"
colors="$(tput colors)"
size="$(($(tput cols) - 2))x$(($(tput lines) - 2))"
Hey,
du kannst auch explizit das Terminal nochmal öffnen mit /dev/tty. Kann
zum Beispiel so aussehen:
(read -p 'Gib ein: ' -r line < /dev/tty; echo "$line") < ~/.bashrc
Stdin ist eigentlich umgeleitet aus der ~/.bashrc, aber trotzdem kommst
du zur Abfrage und kannst auch etwas eingeben. :)
@vain
vain / bmenu.sh
Created February 12, 2011 20:30
Bash-Menü-Beispiel für Nobuddy
#!/bin/bash
# Mit den Cursor-Tasten bedienbares Menü.
# Hilfsfunktion: Ist ein Item im Array enthalten?
# Siehe auch:
# http://forum.ubuntuusers.de/topic/contains-mit-bash-implementieren/
contains()
{
@vain
vain / gma3150-backlight.sh
Created April 28, 2011 19:37
Control the backlight of an Intel GMA 3150.
#!/bin/bash
current=$(sudo setpci -s 00:02.0 F4.B)
current=$((0x$current))
if [[ "$1" == "up" ]]
then
((current+=0x10))
else
((current-=0x10))
@vain
vain / .vimrc
Created June 24, 2011 14:39
Momentane .vimrc
" -------------
" Jetzt nötig mit "richtigem" Vim-Package bei Arch (2009-09-14):
syntax enable
filetype plugin indent on
set hls
set incsearch
set showcmd
if !exists(":DiffOrig")
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
@vain
vain / gist:1073680
Created July 9, 2011 15:45
Simple adblock for luakit
--------------------
-- Simple adblock --
--------------------
-- Basically a simplified version of:
-- https://github.com/quigybo/luakit/blob/d19c3014d0bc5603bf5f6eae5cf689a95d3eb97d/lib/adblock.lua
local table = table
local ipairs = ipairs
local string = string