Skip to content

Instantly share code, notes, and snippets.

View wewoor's full-sized avatar
🎯
Focusing

Ziv wewoor

🎯
Focusing
View GitHub Profile
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active June 4, 2025 15:33
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

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:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@npearce
npearce / install-docker.md
Last active May 21, 2025 14:32
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

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/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@zubaer-ahammed
zubaer-ahammed / Reset MySQL Root Password in Mac OS.md
Last active April 18, 2025 08:52
Reset MySQL Root Password in Mac OS

Reset mysql root password in Mac OS:

First Stop MySQL:

  1. Go to: 'System Preferences' >> 'MySQL' and stop MySQL

OR,

  1. sudo /usr/local/mysql/support-files/mysql.server start
  2. sudo /usr/local/mysql/support-files/mysql.server stop
@azarus
azarus / gulptask.js
Last active March 7, 2022 20:31
Gulp Task to transform Typescript path imports into relative paths using the tsconfig
// 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))
@tduarte
tduarte / publish-ghpages.md
Last active June 6, 2025 08:54
If you need to force push an subtree
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
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 5, 2025 09:28
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@staltz
staltz / introrx.md
Last active June 6, 2025 03:30
The introduction to Reactive Programming you've been missing
@frontEnd-fucker
frontEnd-fucker / gulpfile.js
Created May 23, 2014 02:55
gulp配置文件
// 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语句
@cobyism
cobyism / gh-pages-deploy.md
Last active May 20, 2025 01:15
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

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.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).