Skip to content

Instantly share code, notes, and snippets.

@SammysHP
SammysHP / gist:3377742
Created August 17, 2012 10:17
c:geo OutOfMemoryError with OSM and large images in listings
...
I/ActivityManager( 234): Starting: Intent { cmp=cgeo.geocaching/.CachePopup (has extras) } from pid 4429
...
I/ActivityManager( 234): Displayed cgeo.geocaching/.CachePopup: +1s116ms
...
I/ActivityManager( 234): Starting: Intent { cmp=cgeo.geocaching/.CacheDetailActivity (has extras) } from pid 4429
...
I/ActivityManager( 234): Displayed cgeo.geocaching/.CacheDetailActivity: +840ms
...
E/cgeo ( 4429): cgData.loadCaches([GC296RQ]) failed
<?php
class StringUtils {
const SHORTEN_NONE = 1;
const SHORTEN_SIMPLIFIED = 2;
const SHORTEN_ELLIPSIS = 4;
private function __construct() {}
/**
@SammysHP
SammysHP / .vimrc
Created April 17, 2013 17:56
.vimrc
" Remove ALL autocommands for the current group.
:autocmd!
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" Start pathogen
call pathogen#infect()
@SammysHP
SammysHP / gist:5496817
Created May 1, 2013 17:35
awesome, set client as slave
--------------------------------------------------------------------------------
-- Set the client as slave: put it at the end of other windows.
-- Backport from git (fa1ca807)
-- @param c The window to set as slave.
--------------------------------------------------------------------------------
function setslave(c)
local cls = capi.client.get(c.screen)
for k, v in pairs(cls) do
c:swap(v)
end
@SammysHP
SammysHP / gist:5611986
Created May 20, 2013 12:41
Vim logo in ascii art
.
##############..... ##############
##############......##############
##########..........##########
##########........##########
##########.......##########
##########.....##########..
##########....##########.....
..##########..##########.........
....##########.#########.............
@SammysHP
SammysHP / gist:7106317
Created October 22, 2013 19:06
My .bashrc
##
## /home/sammyshp/.bashrc.d/00-bash-environment.sh
##
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
sammyshp:/usr/lib/firefox/dictionaries$ ll
insgesamt 4,7M
-rw-r--r-- 1 root root 19K 7. Jun 2012 de_AT.aff
-rw-r--r-- 1 root root 1,1M 7. Jun 2012 de_AT.dic
lrwxrwxrwx 1 root root 9 7. Jun 2012 de_BE.aff -> de_DE.aff
lrwxrwxrwx 1 root root 9 7. Jun 2012 de_BE.dic -> de_DE.dic
-rw-r--r-- 1 root root 19K 7. Jun 2012 de_CH.aff
-rw-r--r-- 1 root root 1,1M 7. Jun 2012 de_CH.dic
-rw-r--r-- 1 root root 19K 7. Jun 2012 de_DE.aff
-rw-r--r-- 1 root root 1,1M 7. Jun 2012 de_DE.dic
set gui=none
set complete=l
set defsearch=g
set titlestring=Firefox
set status+=ssl
set yankencodedurl
command nsp :noscript popup
nnoremap ü :noscript popup<CR>
@SammysHP
SammysHP / PKGBUILD
Last active January 2, 2016 22:39
pdfpc-git
# Maintainer: David Vilar <davvil@gmail.com>
pkgname=pdfpc-git
pkgver=20140111
pkgrel=1
pkgdesc="A presenter console with multi-monitor support for PDF files"
arch=('i686' 'x86_64')
url="http://davvil.github.com/pdfpc"
license=('GPL')
depends=('gtk2' 'poppler-glib' 'librsvg' 'libgee06')
@SammysHP
SammysHP / gist:49ea36cbc2a4dc9de943
Created June 29, 2014 07:46
Example WPA2 Enterprise configuration
Description='Example WPA2 Enterprise configuration'
Interface=wlp3s0
Connection=wireless
Security=wpa-configsection
IP=dhcp
WPAConfigSection=(
'ssid="SSID"'
'key_mgmt=WPA-EAP'
'proto=RSN'
'pairwise=CCMP'