Skip to content

Instantly share code, notes, and snippets.

View manpages's full-sized avatar

Jonn Mostovoy manpages

View GitHub Profile
>>> This driver now uses SNA as the default acceleration method. You can
still fall back to UXA if you run into trouble. To do so, save a file
with the following content as /etc/X11/xorg.conf.d/20-intel.conf :
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "uxa"
EndSection
@manpages
manpages / tsj5.txt
Created August 3, 2013 09:34
tsj5, lyrics
The Lyrics
May 23, 2012 at 8:04pm
ELECTRIC CRAYONS
Lyrics: Thomas Bratlie
In the weary daylight
@manpages
manpages / gruforss.sh
Last active December 18, 2015 19:49
RSS script by grufo from Arch Linux forums.
#!/bin/bash
if [ ! -n "$FEED_BOOKMARKS" ]; then export FEED_BOOKMARKS=$HOME/.feed_bookmarks; fi
if [ ! -d "$FEED_BOOKMARKS" ]; then mkdir -p $FEED_BOOKMARKS; fi
feed() {
if [ ! -d $FEED_BOOKMARKS ]; then mkdir $FEED_BOOKMARKS; fi
if [ ! -n "$1" ]; then
echo -e "\\n \\e[04mUsage\\e[00m\\n\\n \\e[01;37m\$ feed \\e[01;31m<url>\\e[00m \\e[01;31m<new bookmark?>\\e[00m\\n\\n \\e[04mSee also\\e[00m\\n\\n \\e[01;37m\$ deef\\e[00m\\n"
return 1;
@manpages
manpages / gg.md
Last active December 18, 2015 04:58
Gentle Giant

manpages about gentle giant

Q: Wow, you're serious about GG, aren't you. (queelis, last.fm)

A: Yeah, I even have just started a gist with faq covering my Gentle Giant addiction not to repeat myself — https://gist.github.com/manpages/5728901

Q: What are your fav [Gentle Giant] albums? (anaon, last.fm)

A: Hehe, it's a haaard question :D Historically, my favorite album was "Three Friends" and favorite song was "Funny Ways" because those were album and song (respectively) that forced me into listening more and more of GG. Later on I realized that possibly my favorite album as whole is "The Power and The Glory" because of how awesomely interconnected "Proclamation" and "Validectory" are and overall musical intensity. Nowadays, I tend to enjoy "Octopus" the most because of "A Cry For Everyone", "Knots" and "Think Of Me With Kindness". Those aren't the most intense or even complex songs by Gentle Giant, but lately I feel urge to listen to those over and over again. But I would say that the album that brings

@manpages
manpages / watchclock.sh
Created May 18, 2013 09:17
Watch clock
#!/bin/bash
## Example: watchclock.sh "Canada/Pacific"
TZ=$1 || "Europe/Riga"
watch 'echo "${TZ}: `date +\"%F %R (%Z)\"`" |figlet'
@manpages
manpages / docs.erl.iex.out
Created May 18, 2013 09:07
Result of printing huge data structure with what appears to be width overflow.
This file has been truncated, but you can view the full file.
Warning: could not run smart terminal, falling back to dumb one
Interactive Elixir (0.8.3.dev) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> { :ok,
[ [ modules: [ { ExDoc.ModuleNode,
Application.Behaviour,
"Application.Behaviour",
"This module is a convenience to define application module callbacks.\n\nIn Erlang/OTP, an application is a component that can be started\nand stopped as a unit, and which can be re-used in other systems\nas well.\n\nThe first step to achieve this is to define an application specification.\nFor example, if your application is named `:my_app`, an app specification\nshould exist at `ebin/my_app.app`. This file is usually defined by\nbuild tools like Mix.\n\nThen, with the app specification in hands, we must also define an\napplication module callback that controls how to start and stop\nsuch applications. This module is about defining such callbacks.\n\nThere are two callbacks required to
@manpages
manpages / self_sign.sh
Created May 18, 2013 00:31
Generate self-signed certificate.
echo "Everytime it asks for passphrase type in the same passphrase. Enjoy."
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr;cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
echo "Done! server.crt -- certificate; server.key -- key. Script by RumuPuRE"
@manpages
manpages / highlight_bug.ex
Created May 12, 2013 12:28
Elixir syntax highlighting bug at Github
defmodlue HiglhightBug do
def omai do
[ foo: %w(bar baz),
bar: true ]
end
end
@manpages
manpages / iex.out.part
Last active December 17, 2015 05:38
Benchmarking Erlang term inspection implementations on large and deep tuple with textual definition worth 5 MB.
# Benchmarking Erlang term inspection implementations on large and deep tuple with textual definition worth 5 MB.
iex(8)> t.(fn() -> inspect(v(7)) end)
10316896
iex(9)> t.(fn() -> inspectrf(v(7)) end)
53297954
iex(10)> t.(fn() -> inspectrf(v(7), [pretty: false]) end)
10705875
iex(11)> t.(fn() -> :io.format('~p', [v(7)]) end)
372286
@manpages
manpages / iex.out
Last active December 17, 2015 05:29
Sad story of Fred and Wilda
iex(1)> defmodule Guards do
...(1)> def love(x, y) when x == 'fred' or y == 'wilda', do: "Fred and Wilda don't love anyone"
...(1)> def love(x, y), do: x ++ 'loves' ++ y
...(1)> end
{:module,Guards,<<70,79,82,49,0,0,7,180,66,69,65,77,65,116,111,109,0,0,0,106,0,0,0,11,13,69,108,105,120,105,114,45,71,117,97,114,100,115,8,95,95,105,110,102,111,95,95,4,100,111,...>>,{:love,2}}
iex(2)> Guards.love 'fred', 'mary'
"Fred and Wilda don't love anyone"