Skip to content

Instantly share code, notes, and snippets.

@andreaseger
andreaseger / clearFileInput.js
Created July 25, 2011 14:22
handling file inputs via javascript
function clearFileInput( id )
{
var elem = document.getElementById( id );
elem.parentNode.innerHTML = elem.parentNode.innerHTML;
}
@andreaseger
andreaseger / gist:1169423
Created August 24, 2011 22:14
Unixbench Hosteurope 8/25/11
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: lvps--------------.dedicated.hosteurope.de: GNU/Linux
OS: GNU/Linux -- 2.6.18-028stab092.1 -- #1 SMP Wed Jul 20 19:47:12 MSD 2011
Machine: x86_64 (unknown)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Xeon(R) CPU X5670 @ 2.93GHz (5852.2 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
23:42:56 up 14 days, 20:32, 2 users, load average: 0.37, 1.68, 1.29; runlevel
@andreaseger
andreaseger / gist:1169475
Created August 24, 2011 22:38
Unixbench server4you 8/15/11
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: euve1579: GNU/Linux
OS: GNU/Linux -- 2.6.18-028stab089.1 -- #1 SMP Thu Apr 14 13:46:04 MSD 2011
Machine: x86_64 (unknown)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Xeon(R) CPU E5520 @ 2.27GHz (4522.0 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 1: Intel(R) Xeon(R) CPU E5520 @ 2.27GHz (4521.3 bogomips)
@andreaseger
andreaseger / gist:1169497
Created August 24, 2011 22:47
Unixbench Hosteurope 8/25/11 - no file copy
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: lvps------------.dedicated.hosteurope.de: GNU/Linux
OS: GNU/Linux -- 2.6.18-028stab092.1 -- #1 SMP Wed Jul 20 19:47:12 MSD 2011
Machine: x86_64 (unknown)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Xeon(R) CPU X5670 @ 2.93GHz (5852.2 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
00:18:21 up 14 days, 21:08, 2 users, load average: 0.01, 0.81, 1.21; runlevel
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: lvps--------------.dedicated.hosteurope.de: GNU/Linux
OS: GNU/Linux -- 2.6.18-028stab092.1 -- #1 SMP Wed Jul 20 19:47:12 MSD 2011
Machine: x86_64 (unknown)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Xeon(R) CPU X5670 @ 2.93GHz (5852.2 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
23:42:56 up 14 days, 20:32, 2 users, load average: 0.37, 1.68, 1.29; runlevel
@andreaseger
andreaseger / gist:1169645
Created August 25, 2011 00:16
bench - compiling rubinius inkl a complete testrun
Host Europe vServer L 4.0
====
Ubuntu 10.04.3 LTS
ree-1.8.7.2011.03 (rvm)
master
rake 460.40s user 52.71s system 79% cpu 10:47.61 total
2.0.0.pre (only changed to that branch and ran ./configure and rake again)
rake 344.60s user 51.94s system 73% cpu 8:56.89 total
@andreaseger
andreaseger / gist:1192827
Created September 4, 2011 13:06
smartctl -d ata -a /dev/sda
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 119 092 006 Pre-fail Always - 219200885
3 Spin_Up_Time 0x0003 098 098 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 097 097 020 Old_age Always - 3390
5 Reallocated_Sector_Ct 0x0033 099 099 036 Pre-fail Always - 21
7 Seek_Error_Rate 0x000f 081 060 030 Pre-fail Always - 156518076
9 Power_On_Hours 0x0032 094 094 000 Old_age Always - 5820
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
@andreaseger
andreaseger / config-initializers-resque.rb
Created September 6, 2011 14:17
carrierwave resque background image processing foo
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
rails_env = ENV['RAILS_ENV'] || 'development'
resque_config = YAML.load_file(rails_root + '/config/resque.yml')
Resque.redis = resque_config[rails_env]
#secure the admin view of resque
Resque::Server.use(Rack::Auth::Basic) do |user, password|
password == "secret"
end
@andreaseger
andreaseger / palindrome.txt
Created January 5, 2012 13:28
therubygame Challenge #4 Benchmark
FourscoreandsevenyearsagoourfaathersbroughtforthonthiscontainentanewnationconceivedinzLibertyanddedicatedtothepropositionthatallmenarecreatedequalNowweareengagedinagreahtcivilwartestingwhetherthatnaptionoranynartionsoconceivedandsodedicatedcanlongendureWeareqmetonagreatbattlefiemldoftzhatwarWehavecometodedicpateaportionofthatfieldasafinalrestingplaceforthosewhoheregavetheirlivesthatthatnationmightliveItisaltogetherfangandproperthatweshoulddothisButinalargersensewecannotdedicatewecannotconsecratewecannothallowthisgroundThebravelmenlivinganddeadwhostruggledherehaveconsecrateditfaraboveourpoorponwertoaddordetractTgheworldadswfilllittlenotlenorlongrememberwhatwesayherebutitcanneverforgetwhattheydidhereItisforusthelivingrathertobededicatedheretotheulnfinishedworkwhichtheywhofoughtherehavethusfarsonoblyadvancedItisratherforustobeherededicatedtothegreattdafskremainingbeforeusthatfromthesehonoreddeadwetakeincreaseddevotiontothatcauseforwhichtheygavethelastpfullmeasureofdevotionthatweherehighlyresolvethatthesedeadshal
@andreaseger
andreaseger / Hardware.md
Created July 8, 2012 01:48
Embedded Systems SS2012

Hardware

Prozessoren (allgemein)

Man unterscheidend folgende Arten von Prozessoren

  • Mikroprozessor
    • General Purpose CPU
    • Kerne von PCs oder Workstation, Servers
  • Mikrocontroller
  • Mikroprozessor ABER mit internen Speicher (RAM/ROM) und zusätzlicher Peripherie (on-chip)