Skip to content

Instantly share code, notes, and snippets.

View yszheda's full-sized avatar

Shuai YUAN yszheda

View GitHub Profile
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
# usage: ruby import.rb my-blog.xml
# my-blog.xml is a file from Settings -> Basic -> Export in blogger.
data = File.read ARGV[0]
@yszheda
yszheda / gitdiff-svnpatch.sh
Created December 8, 2015 12:32 — forked from katta/gitdiff-svnpatch.sh
Converts git diff to svn patch format
git diff --no-prefix | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" --ignore-space-at-eol > changes.patch
@yszheda
yszheda / 修复系统权限错误.txt
Created February 17, 2016 02:43 — forked from syxc/修复系统权限错误.txt
sudo chmod 777 / 惨剧修复简单步骤
sudo chmod 777 /
sudo chmod 777 -R /
Linux下以上命令的危害性,试过的人都会觉得可怕,有些人遇到这种情况,第一反应是没救了,其实,你要愿意花功夫去折腾,还是有办法滴!
下面理了下怎么折腾:
道具:
A、B两台电脑,假设都装着Ubuntu 12.04版本的系统,都能ssh、root(平时装Linux的时候这两个最好都弄好了,以备不时之需)。
情景:
现假设「A」是那台悲剧的执行过「sudo chmod 777 /」的电脑,什么效果,就不说了,反正不是什么好事,如果好奇,一试便知!