Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Clunis orospakr

View GitHub Profile
View gist:3941372
eth0 Link encap:Ethernet HWaddr 00:21:86:98:c7:b9
inet addr:10.10.5.20 Bcast:10.10.5.255 Mask:255.255.255.0
inet6 addr: 2001:4830:116e:1:221:86ff:fe98:c7b9/64 Scope:Global
inet6 addr: fe80::221:86ff:fe98:c7b9/64 Scope:Link
inet6 addr: 2001:4830:116e:1:7df2:c235:b5ef:4860/64 Scope:Global
inet6 addr: 2001:4830:116e:1:1d55:96ba:3c80:fbb0/64 Scope:Global
inet6 addr: 2001:4830:116e:1:9421:8834:86ff:2650/64 Scope:Global
inet6 addr: 2001:4830:116e:1:c51c:d9f5:8c08:f7d2/64 Scope:Global
inet6 addr: 2001:4830:116e:1:10be:5426:4fc3:3ebe/64 Scope:Global
inet6 addr: 2001:4830:116e:1:7867:71e:a26:9552/64 Scope:Global
View gist:4350859
data Paragraph = String
readParagraphs :: String -> [Paragraph]
readParagraphs file = lines file
View gist:4364251
splitBy :: (a -> Bool) -> [a] -> [[a]]
splitBy _ [] = []
splitBy predicate list = [left] ++ splitBy predicate remaining
where (left, remaining) = break predicate list
-- example:
-- splitBy (==20) [0, 1, 2, 3, 4, 67, 20, 5, 6, 9, 20, 100, 200]
-- should produce:
-- [[0, 1, 2, 3, 4, 67], [20, 5, 6, 9], [20, 100, 200]]
-- instead produces:
@orospakr
orospakr / gist:4570870
Created Jan 19, 2013
Railties 4.0 beta test failure.
View gist:4570870
1) Failure:
test_generation_runs_bundle_install_with_full_and_mountable(PluginNewGeneratorTest) [test/generators/plugin_new_generator_test.rb:125]:
Expected file "/home/orospakr/code/others/rails/railties/test/fixtures/tmp/bukkits/Gemfile.lock" to exist, but does not
65 tests, 375 assertions, 1 failures, 0 errors, 0 skips
rake aborted!
View gist:4946609
[~]$ echo $GOPATH
/home/orospakr/code/mine/go
[~]$ go get github.com/reusee/gtk-go
package github.com/reusee/gtk-go: mkdir /usr/lib/go/src/pkg/github.com: permission denied
View gist:5007612
[~/code/others/gnome-shell]$ grep -rn initBox . [3b07488]
./js/ui/panel.js:1124: _initBox: function(elements, box) {
View gist:5018247
/usr/lib/mono/4.0/Microsoft.Common.targets: warning : Found a conflict between : 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' reference.
/usr/lib/mono/4.0/Microsoft.Common.targets: warning : Reference 'Xwt, Version=0.1.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' not resolved
/usr/lib/mono/4.0/Microsoft.Common.targets: warning : Found a conflict between : 'Mono.Addins, Version=0.6.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' and 'Mono.Addins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'. Using 'Mono.Addins, Version=0.6.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' reference.
/usr/lib/mono/4.0/Microsoft.Common.targets: warning : Found a conflict between : 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and 'mscorlib, Version=2.0.0.0, Cu
View gist:5032623
[~]$ sudo pacman -Sy nvidia
[sudo] password for orospakr:
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
resolving dependencies...
looking for inter-conflicts...
:: nvidia-utils and libgl are in conflict. Remove libgl? [y/N] y
View gist:5074365
[~]$ sudo pacman -R nouveau-dri libgl
[sudo] password for orospakr:
[~]$
[~]$
[~]$
[~]$ sudo pacman -R nouveau-dri l
[~]$ sudo pacman -S nvidia
[sudo] password for orospakr:
resolving dependencies...
looking for inter-conflicts...
@orospakr
orospakr / gist:5079495
Created Mar 4, 2013
Updated PKGBUILD for c2hs 0.16.4 that depends on the haskell-language-c-03.
View gist:5079495
# custom variables
_hkgname=c2hs
_licensefile=COPYING
# PKGBUILD options/directives
pkgname=c2hs
pkgver=0.16.4
pkgrel=22
pkgdesc="C->Haskell FFI tool that gives some cross-language type safety"
url="http://www.cse.unsw.edu.au/~chak/haskell/c2hs/"