This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
padR :: Int -> String -> String | |
padR n s | |
| length s < n = s ++ replicate (n - length s) ' ' | |
| otherwise = s | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove non-ascii characters | |
df$text <- gsub("[^\x20-\x7E]", "", df$text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 = [] |
NewerOlder