This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install to $HOME/.ramdisk | |
# initramdisk.sh - make a ramdisk, the default size is 6GB. | |
# syncramdisk.sh - sync files of ramdisk to disk, when logout. | |
# makeRamDiskWhenRestart.sh - make Hook, LoginHook and LogoutHook. LoginHook for initramdisk.sh, LogoutHook for syncramdisk.sh. | |
# moveXcodeCacheToRamDisk.sh - run shell above, then move xcode cache folder to ramdisk. | |
# ---------------- initramdisk.sh ------------------ | |
#!/usr/bin/env sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2014 skyfish.jy@gmail.com | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |