- perform system update
- if you do it later it will ask for all kind of permissions to override various config files
- change password for root
- default password is user
###Fix trackpad sudo apt-get install git
| #!/bin/bash -l | |
| # A git hook script to find and fix trailing whitespace | |
| # in your commits. Bypass it with the --no-verify option | |
| # to git-commit | |
| # | |
| .git/hooks/pre-commit-master-no-no | |
| if [[ $? == 1 ]] | |
| then |
| #base on http://ariejan.net/2011/09/24/rspec-speed-up-by-tweaking-ruby-garbage-collection | |
| class DeferredGarbageCollection | |
| MEM_FREE_FOR_GC_THRESHOLD = (ENV['MEM_FREE_FOR_GC_THRESHOLD'] || 500).to_f | |
| @@last_gc_run = Time.now | |
| def self.start | |
| GC.disable if MEM_FREE_FOR_GC_THRESHOLD > 0 | |
| end |
| <!-- | |
| 1. /System/Library/LaunchDaemons/nginx.plist | |
| 2. to load: sudo launchctl load -F /System/Library/LaunchDaemons/nginx.plist | |
| 3. to unload: sudo launchctl unload /System/Library/LaunchDaemons/nginx.plist | |
| --> | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> |
| [Dialer Defaults] | |
| Init1 = ATZ | |
| Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 | |
| Phone = #777 | |
| ISDN = 0 | |
| Password = yourpassword | |
| Username = XXX-XXX-XXXX | |
| Modem = /dev/ttyUSB1 | |
| Baud = 921600 | |
| Stupid Mode = on |
| """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " update ack command to be able to search through the gem files | |
| :autocmd BufEnter * call SetCurrentGemHome() | |
| function! SetCurrentGemHome() | |
| call UpdateGemPath() | |
| :command! -nargs=* AckGems execute 'Ack' <q-args> $GEM_PATH | |
| endfunction | |
| function! UpdateGemPath() | |
| let $GEM_PREFIX=system("rbenv prefix") |
In order to use asset pipeline available for static error pages (like 404.html), a few steps are required
Move static pages from /public into /app/assets
(eg: public/422.html → app/assets/html/422.html.erb)
Add html directory to the asset pipeline
Update exceptions middleware to understand assets with digests
| klazz = SoftwareMember | |
| klazz .connection.execute("ALTER TABLE #{klazz .table_name} AUTO_INCREMENT = 1000") |
| #statuc | |
| adb shell dumpsys activity b | |
| # dynamic | |
| adb shell dumpsys package |