Skip to content

Instantly share code, notes, and snippets.

View nevrome's full-sized avatar
🛠️

Clemens Schmid nevrome

🛠️
View GitHub Profile
@finalfantasia
finalfantasia / fix_gtk_warnings_issues_with_adobe_reader_32_bit_on_64_bit_linux
Created August 21, 2013 06:32
Fixes to some Gtk+ warnings/issues with 32-bit Adobe Reader 9 on 64-bit versions of Linux. These warnings will be shown when the 32-bit Acrobat Reader 9 is launched from within terminals via the 32-bit binary (acroread) on 64-bit versions of Linux. The root cause is the lack of necessary 32-bit (i386) packages on 64-bit versions of Linux. These …
WARNING: Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap":
FIX: sudo aptitude install gtk2-engines-pixbuf:i386
WARNING: Gtk-Message: Failed to load module "canberra-gtk-module"
FIX: sudo aptitude install libcanberra-gtk-module:i386
WARNING: Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita"
FIX: sudo aptitude install gnome-themes-standard:i386
@hanshoglund
hanshoglund / pad.hs
Last active February 12, 2021 16:21
Haskell String pad
padR :: Int -> String -> String
padR n s
| length s < n = s ++ replicate (n - length s) ' '
| otherwise = s
@nassimhaddad
nassimhaddad / non-ascii.R
Created January 26, 2013 18:13
remove non-ascii characters
# remove non-ascii characters
df$text <- gsub("[^\x20-\x7E]", "", df$text)
@dmjio
dmjio / Stats.hs
Last active November 7, 2020 21:14
Mean, Standard Deviation, Variance in Haskell
module Main where
import Control.Applicative
{- Result = (Mean = 0.34, St. Dev = 0.115, Variance = 0.005) -}
main :: IO ()
main = interact stats
where
length' = fromIntegral . length
stats d = show (avg, stdDev, variance)
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 24, 2025 05:26
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@msimpson
msimpson / cfire
Created July 21, 2011 10:51
Curses based ASCII art fire animation.
#!/usr/bin/python
import curses, random
screen = curses.initscr()
width = screen.getmaxyx()[1]
height = screen.getmaxyx()[0]
size = width*height
char = [" ", ".", ":", "^", "*", "x", "s", "S", "#", "$"]
b = []