Thursday, December 25, 2014

mac os x /private temp virtual memory

Use RAM disk or HDD for temporary files

If you have enough RAM, you can dedicate (typically around 256 to 512 MB) of RAM to a RAM disk. RAM disk is a virtual disk that only resides in memory, so is suitable for storing data that need to live only until you shut down your computer. Temporary files are ideal for this. You can create a RAM disk during the boot time and redirect all the temporary files there. To do that, create a file named “MoveTempFoldersToRamDisk.sh” in your home directory and put the following content in:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
#!/bin/bash
 
# +----------------------------------------------------------------------+
# | |
# | Set up Mac OS X to store temporary files in RAM rather than on disk.|
# | |
# | By Philipp Klaus |
# | |
# | Originally by Ricardo Gameiro |
# | Changes by Daniel Jenkins |
# | |
# | |
# +----------------------------------------------------------------------+
 
cd /System/Library/StartupItems
sudo mkdir RamFS
sudo chown -R root:wheel RamFS
sudo chmod -R u+rwX,g+rX,o+rX RamFS
cat << "EOF" | sudo tee RamFS/RamFS > /dev/null
#!/bin/sh
# Create a RAM disk with same perms as mountpoint
 
RAMDisk() {
mntpt=$1
rdsize=$(($2*1024*1024/512))
echo "Creating RamFS for $mntpt"
# Create the RAM disk.
dev=`hdik -drivekey system-image=yes -nomount ram://$rdsize`
# Successfull creation...
if [ $? -eq 0 ] ; then
# Create HFS on the RAM volume.
newfs_hfs $dev
# Store permissions from old mount point.
eval `/usr/bin/stat -s $mntpt`
# Mount the RAM disk to the target mount point.
mount -t hfs -o union -o nobrowse $dev $mntpt
# Restore permissions like they were on old volume.
chown $st_uid:$st_gid $mntpt
chmod $st_mode $mntpt
fi
}
 
# Test for arguments.
if [ -z $1 ]; then
echo "Usage: $0 [start|stop|restart] "
exit 1
fi
 
# Source the common setup functions for startup scripts
test -r /etc/rc.common || exit 1
. /etc/rc.common
 
StartService () {
ConsoleMessage "Starting RamFS disks..."
RAMDisk /private/tmp 256
RAMDisk /var/run 64
#RAMDisk /var/db 1024
#mkdir -m 1777 /var/db/mds
}
StopService () {
ConsoleMessage "Stopping RamFS disks, nothing will be done here..."
# diskutil unmount /private/tmp /private/var/run
# diskutil unmount /private/var/run
}
 
RestartService () {
ConsoleMessage "Restarting RamFS disks, nothing will be done here..."
}
 
RunService "$1"
EOF
sudo chmod u+x,g+x,o+x RamFS/RamFS
 
 
cat << EOF | sudo tee RamFS/StartupParameters.plist > /dev/null
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>Description</key>
<string>RamFS Disks Manager</string>
<key>OrderPreference</key>
<string>Early</string>
<key>Provides</key>
<array>
<string>RamFS</string>
</array>
<key>Uses</key>
<array>
<string>Disks</string>
</array>
</dict>
</plist>
EOF
Now, run the following in the Terminal:
chmod 755 ~/MoveTempFoldersToRamDisk.sh
~/MoveTempFoldersToRamDisk.sh
This creates two RAM disks on startup – one 256MB large for /private/tmp (command “RAMDisk /private/tmp 256″ in the middle of the above script) and another one 64MB large for /var/run. You can now delete ~/MoveTempFoldersToRamDisk.sh from your computer.
For the changes to take effect, you have to restart.
If you decide to undo this tweak in the future, you can do it simply by deleting /System/Library/StartupItems/RamFS directory from your Mac. E.g. by executing the following command in the Terminal:
sudo rm -rf /System/Library/StartupItems/RamFS
Again, restart is needed for this to take effect.
There are some small drawbacks to applying this tweak:
  • After applying it it takes a few seconds (2-3 on my machine) to shut down
  • It lowers the size of RAM usable for applications
If you are bothered by the above and have HDD in your Mac as well, you can consider moving the temporary files to HDD instead of the RAM disk. The steps are similar to moving the user home directories. E.g. to move /private/tmp, execute the following in the Terminal:
sudo ditto /private/tmp /Volumes/your_hdd_name/private/tmp
sudo rm -rf /private/tmp
sudo ln -s /Volumes/your_hdd_name/private/tmp /private/tmp

linkthing.com

Monday, December 01, 2014

DISM clean WinSxS

Use the /StartComponentCleanup parameter

  1. Using the /StartComponentCleanup parameter of Dism.exe on a running version of Windows 8.1 gives you similar results to running the StartComponentCleanup task in Task Scheduler, except previous versions of updated components will be immediately deleted (without a 30 day grace period) and you will not have a 1-hour timeout limitation.
    From an elevated command prompt, type the following:
    Dism.exe /online /Cleanup-Image /StartComponentCleanup

Sunday, November 30, 2014

free software computer

Yeeloong Notebook
\


\ Loongson processor inside with MIPS architecture

\ GNU/Linux OS and free free software

\ Rich interface and excellent design

\ Low power consumption





Main Features:
1) The world's first fully free software. All system source files(BIOS, kernel, drivers etc.) are free software, no close firmware needed.

2) High performance. Tests show that our platform is among the best performance for 9"-10.1"ultra mobile laptops.

3) Low power. Peak power ~12Watt for SSD version.

4) Low cost. We provide very competitive price.

5) High quality. This product is designed and produced by Quanta Computer, the No.1 notebook OEM factory.

6) Rich expandability: optional HDD/wifi/camera, internal USB connector for expansion of GPS/Bluetooth etc.

Specifications:

Model
8101B
8089B
8089D
Processor
Loongson 2F, 800-900MHz
Chipset
Northbridge: integrated in CPU
Southbridge: AMD CS5536
Graphics
 SMI712
Storage
Memory
DDRⅡ 1G
Hard Drive 
SATA 160G
SSD 8G
Panel
Screen size
10.1"
8.9"
Resolution
1024×600
Camera
300K pixel
Input Device
Keyboard, touchpad
Network
Rtl8139, 10/100Mbps+ Rtl8187B(wifi)
Operation System
 GNU/Linux
Interface
type
USB ports
3×USB2.0
2×USB2.0
Audio/Video
Speaker, Microphone, VGA
Card Reader
SD/MMC/MS 3 in 1
Battery
3-Cell
Dimension
L *H * T = 255*188*250(mm)
Weight
1.1Kg



Friday, November 28, 2014

Saturday, November 22, 2014

Tuesday, November 18, 2014

I Origins

Soundtrack listing
Orígenes (2014) Poster

 (2014)

Soundtracks

Who Are You
Written by Adrian Sherwood and Burnell Anderson
Performed by African Head Charge
Courtesy of On-U Sound Records & Music Ltd.
La Traviata: Act 1: Un Di, Felice, Eterea (Alfredo, Violetta)
Composed by Francesco Maria Piave and Giuseppe Verdi
Performed by Slovak Radio Symphony Orchestra
Courtesy of Naxos of America, Inc
Driverless Car
Performed by Fall on Your Sword
Written by Will Bates
Published by Fall On Your Sword (ASCAP)
Motion Picture Soundtrack
Written by Thomas Yorke, Philip Selway, Edward O'Brien, Colin Greenwood and Jonathan Greenwood
Performed by Radiohead
Courtesy of Parlophone Label Group UK
By arrangement with Warner Music Group Film & TV licensing
Dust It Off
Written by Olivia Bouyssou-Merilahti & Dan Levy
Performed by The Dø
Courtesy of Six Degrees Records
By Arrangement with Downtown Music Services
Eternally Yours
Written by Mat Andasun (PRS)
Published by In-spired Sound (BMI)
Courtesy of Warner/Chappell Production Music
Motion Picture Soundtrack
Written by Thomas Yorke, Philip Selway, Edward O'Brien, Colin Greenwood and Jonathan Greenwood
Performed by Radiohead
Courtesy of Parlophone Label Group UK
By arrangement with Warner Music Group Film & TV licensing
Beautiful Dreamer
Written by Stephen Foster
Performed by Brit Marling
Waltz in C Minor
Composed by Phaedon Papadopoulos
Performed by Phaedon Papadopoulos
Courtesy of Naya Playa Publishing (ASCAP)