Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.
NOTE: This logic can be extended to more than two accounts also. :)
The setup can be done in 5 easy steps:
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
// Gulp Task | |
gulp.task("compile:source", function(done) { | |
gutil.log(gutil.colors.yellow("[Typescript]"), gutil.colors.magenta('Transpiling Source')); | |
var tsProject = ts.createProject('tsconfig.json', { | |
typescript: require('typescript'), | |
}); | |
gulp.src("source/**/*") | |
.pipe(tsProject()) | |
.pipe(tsimport(tsProject.config.compilerOptions)) |
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// include gulp | |
var gulp = require('gulp'); | |
// include plug-ins | |
var changed = require('gulp-changed'); // 该插件的输出为新增加或修改过的文件 | |
var imagemin = require('gulp-imagemin'); // 该插件用来压缩图片 | |
var concat = require('gulp-concat'); // 该插件用来合并文件 | |
var stripDebug = require('gulp-strip-debug'); // 该插件用来去掉console和debugger语句 |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).