Skip to content

Instantly share code, notes, and snippets.

Avatar

Dāvis davispuh

View GitHub Profile
View PKGBUILD.patch
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,21 +13,21 @@ source=('attica::git+git://anongit.kde.org/attica')
md5sums=('SKIP')
pkgver() {
- cd ${srcdir}/attica
+ cd "${srcdir}/attica"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
@davispuh
davispuh / switch-nvidia.service
Last active Aug 29, 2015
Switch to NVIDIA module
View switch-nvidia.service
[Unit]
Description=Nvidia Switch
DefaultDependencies=no
After=plymouth-quit.service plymouth-quit-wait.service
Before=display-manager.service
[Service]
ExecStart=/bin/switch-modules.sh nvidia
Type=oneshot
KillMode=none
View vlc.log
execve("/usr/sbin/vlc", ["vlc"], [/* 21 vars */]) = 0
brk(0) = 0x246d000
open("/usr/lib/tls/x86_64/libdlfaker.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls/x86_64", 0x7ffd43baaca0) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libdlfaker.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls", 0x7ffd43baaca0) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/libdlfaker.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64", 0x7ffd43baaca0) = -1 ENOENT (No such file or directory)
open("/usr/lib/libdlfaker.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\7\0\0\0\0\0\0"..., 832) = 832
View vlc.map
0000000000400000 12K r-x-- vlc
0000000000602000 4K r---- vlc
0000000000603000 4K rw--- vlc
00000000017ed000 1720K rw--- [ anon ]
00007efcfff12000 3048K rw-s- [ shmid=0x3a18020 ]
00007efd00212000 44K r-x-- libnss_files-2.22.so
00007efd0021d000 2044K ----- libnss_files-2.22.so
00007efd0041c000 4K r---- libnss_files-2.22.so
00007efd0041d000 4K rw--- libnss_files-2.22.so
00007efd0041e000 24K rw--- [ anon ]
@davispuh
davispuh / log.txt
Created Feb 3, 2013
TribalWars Android app log
View log.txt
I/ActivityManager( 387): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=air.com.innogames.staemme cmp=air.com.innogames.staemme/.AppEntry bnds=[200,585][360,785]} from pid 21966
D/dalvikvm(32436): Late-enabling CheckJNI
I/ActivityManager( 387): Start proc air.com.innogames.staemme for activity air.com.innogames.staemme/.AppEntry: pid=32436 uid=10116 gids={50116, 3003, 1028}
I/StartupTime1(32436): :1359930694984
D/dalvikvm(32436): Trying to load lib /data/app-lib/air.com.innogames.staemme-1/libCore.so 0x420c4438
D/dalvikvm(32436): Added shared lib /data/app-lib/air.com.innogames.staemme-1/libCore.so 0x420c4438
D/libEGL (32436): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
D/libEGL (32436): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
D/libEGL (32436): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
D/OpenGLRenderer(32436): Enabling debug mode 0
@davispuh
davispuh / text.txt
Last active Dec 12, 2015
parsing text...
View text.txt
1.23% somestring specialstring specialstring
|
--- specialstring
|
|--12.34%-- specialstring
| specialstring
| |
| |--12.34%-- specialstring
| | specialstring
| | |
@davispuh
davispuh / array.rb
Last active Dec 15, 2015
Equally distribute several array elements across single array. (Ruby)
View array.rb
#!/usr/bin/env ruby
require 'pp'
a = []
a << [:a, :c, :e]
a << [:b, :f, :g, :h, :i, :j]
a << [:d]
# element coefficients
@davispuh
davispuh / TimezoneAbbr_To_Offsets.yaml
Last active Dec 21, 2015
Timezone abbreviations to UTC offsets
View TimezoneAbbr_To_Offsets.yaml
ACST:
- -14400
ACT:
- -18000
ADDT:
- -7200
ADMT:
- 9320
ADT:
- -10800
@davispuh
davispuh / Ruby2.0
Last active Dec 21, 2015
Ruby 2.0, ENV incorrect encoding.
View Ruby2.0
N:\Projects>SET test=testing åáâäãā
N:\Projects>SET åáâäãā=testing åáâäãā
N:\Projects>ruby -v
ruby 2.0.0p247 (2013-06-27) [x64-mingw32]
N:\Projects>chcp 775
Active code page: 775
@davispuh
davispuh / test.rb
Created Aug 27, 2013
Test for Ruby ENV encoding bug
View test.rb
#!/usr/bin/env ruby
#encoding: utf-8
text = "testing åáâäãā"
test_env = ENV["test"]
test2_env = ENV["åáâäãā"]
puts "="*20
puts text.to_s
puts text.encoding
You can’t perform that action at this time.