- Mount timemachine volume from Finder.
- Unlock Target Machine's Backup sparsebundle.
sudo chflags -R nouchg /Volumes/{TimeMachine Volume Name}/{Target Machine's Name}.sparsebundle
- Attach sparsebundle then Listing Backup Volume.
hdiutil attach -nomount -noverify -noautofsck /Volumes/{TimeMachine Volume Name}/{Target Machine's Name}.sparsebundle
- Repair backup volume.
fsck_hfs -drfy /dev/disk2s2
- Detach backup sparsebundle.
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
// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement | |
// for using the mouse displacement for calculating the amount of camera movement and panning code. | |
using UnityEngine; | |
using System.Collections; | |
public class MoveCamera : MonoBehaviour | |
{ | |
// | |
// VARIABLES |
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
var path = require('path'); | |
var fs = require('fs'); | |
var yargs = require('yargs').argv; | |
var gulp = require('gulp'); | |
var less = require('gulp-less'); | |
var header = require('gulp-header'); | |
var tap = require('gulp-tap'); | |
var nano = require('gulp-cssnano'); | |
var postcss = require('gulp-postcss'); | |
var autoprefixer = require('autoprefixer'); |
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
# 1. Create Disk Image | |
# ref: | |
# FileSystem type: https://support.apple.com/en-us/HT202784 | |
cd Desktop | |
hdiutil create -size 512g -fs "Journaled HFS+" -volname "TimeMachine" -type SPARSEBUNDLE -nospotlight -verbose volume_nas_timemachine.sparsebundle | |
# 2. Move the Disk Image File to Windows SMB Share Folder | |
# 3. Mount the Disk Image through Network | |
# 4. Enable Time Machine Not Support Network Volumes | |
defaults write com.apple.systempreferences TMShowUnsupportdNetworkVolumes 1 | |
# 5. Add Volume to Time Machine |
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
echo "Welcome, "$(whoami) | |
login_notice_id="" # admin's telegram id | |
login_notice_username=$(whoami) | |
login_notice_token="" # telegram bot token | |
curl --silent --data "chat_id=${login_notice_id}&text=${login_notice_username}&parse_mode=HTML&disable_web_page_preview=true" -o /dev/null https://api.telegram.org/bot$(login_notice_token)/sendMessage | |
printf "\n" |
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
{ | |
"name": "general-gulp", | |
"version": "0.0.0", | |
"description": "StoneMoe's front-end workflow", | |
"main": "gulpfile.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "StoneMoe", | |
"devDependencies": { |
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
var gulp = require('gulp'); | |
var browserSync = require('browser-sync'); | |
var less = require('gulp-less'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var minifyCSS = require('gulp-minify-css'); | |
var notify = require('gulp-notify'); | |
var gutil = require('gulp-util'); | |
var cp = require('child_process'); | |
var path = require('path'); | |
var uglify = require('gulp-uglify'); |
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
# Mongodb get collection key names | |
mr = db.runCommand({ | |
"mapreduce" : "input_collection_name_here", | |
"map" : function() { | |
for (var key in this) { emit(key, null); } | |
}, | |
"reduce" : function(key, stuff) { return null; }, | |
"out": "input_collection_name_here" + "_keys" | |
}); |
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
#Download 4.9-rc7 kernel | |
wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.9-rc7/linux-headers-4.9.0-040900rc7_4.9.0-040900rc7.201611271731_all.deb | |
wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.9-rc7/linux-headers-4.9.0-040900rc7-generic_4.9.0-040900rc7.201611271731_amd64.deb | |
wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.9-rc7/linux-image-4.9.0-040900rc7-generic_4.9.0-040900rc7.201611271731_amd64.deb | |
#Install kernel | |
sudo dpkg -i 'linux-headers-4.9*.deb' 'linux-image-4.9*.deb' |
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
export LS_OPTIONS='--color=auto' | |
eval "`dircolors`" | |
alias ls='ls $LS_OPTIONS' | |
alias ll='ls $LS_OPTIONS -l' | |
alias l='ls $LS_OPTIONS -lA' |
OlderNewer