Skip to content

Instantly share code, notes, and snippets.

Avatar

Dāvis davispuh

View GitHub Profile
@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 / 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
@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 / Ruby1.9
Created Aug 27, 2013
Ruby 1.9, ENV incorrect encoding.
View Ruby1.9
N:\Projects>SET test=testing åáâäãā
N:\Projects>SET åáâäãā=testing åáâäãā
N:\Projects>ruby -v
ruby 1.9.3p448 (2013-06-27) [i386-mingw32]
N:\Projects>chcp 775
Active code page: 775
@davispuh
davispuh / steam_console_params.txt
Last active Oct 23, 2020
Steam client parameters, consoles commands and variables
View steam_console_params.txt
-480p - Run tenfoot in 480p rather than 1080p
-720p - Run tenfoot in 720p rather than 1080p
-accountrecovery - Perform account recovery
-all_languages - show longest loc string from any language
-bigpicture - Start in Steam Big Picture mode
-cafeapplaunch - Launch apps in a cyber cafe context
-candidates - Show libjingle candidates for local connection as they are processed
-ccsyntax - Spew details about the localized strings we load
-community - Set the community URL
-complete_install_via_http - Run installation completion over HTTP by default
View test2.rb
#!/usr/bin/env ruby
#encoding: utf-8
require 'win32/registry'
begin
Win32::Registry::HKEY_CURRENT_USER.open("SOFTWARE\doesnt_exist") do |reg|
end
rescue Win32::Registry::Error => e
message = e.message
puts message.encoding
View RubyBug
N:\Projects>ruby -v
ruby 2.0.0p247 (2013-06-27) [x64-mingw32]
N:\Projects>chcp 775
Active code page: 775
N:\Projects>ruby test2.rb
IBM775
Sistńma nevar atrast norŌdŅto failu.
"Sist\xE7ma nevar atrast nor\xE2d\xEEto failu."
You can’t perform that action at this time.