Skip to content

Instantly share code, notes, and snippets.

View punyaruchal's full-sized avatar
🏠
Working from home

Punya Ruchal punyaruchal

🏠
Working from home
View GitHub Profile
dependencies:
module:
- file
id: migrate_csv_articles_images
label: 'Migrate Images for the articles from the csv file'
migration_group: null
source:
constants:
source_base_path: '/Library/WebServer/Documents/drupal/modules/custom/migrate_csv/assets/pictures'
uri_file: 'public://images/pictures/'
ID Name Email Password First Name Last Name Roles
1 Joe [email protected] joe123 Joe B administrator
2 rakesh [email protected] 123rakesh Rakesh James authenticated,administrator
3 jack [email protected] jack Jack David editor
4 DD [email protected] dd@123 D D authenticated,administrator,editor
id: migrate_csv_articles
label: 'Migrate articles from the csv file'
source:
plugin: csv
# Full path to the file.
path: 'modules/custom/migrate_csv/assets/csv/articles.csv'
delimiter: ','
enclosure: '"'
header_row_count: 1
keys:
id: User_with_multiple_roles
class: null
field_plugin_method: null
cck_plugin_method: null
migration_tags: null
migration_group: null
label: 'User migration from CSV test'
source:
plugin: csv
path: /Users/rakeshjames/Sites/migrationdemo/csv/demouser_migrate_multipleRoles.csv
ID name email firstname lastname Status roles Password
1 rakesh [email protected] Rakesh James 1 administrator,migrationuser rakesh@123
2 james [email protected] James Rakesh 1 authenticated james@123
3 dummy [email protected] Dummy User 1 migrationuser,administrator dummy@123
@punyaruchal
punyaruchal / installing-drush-on-your-mac.md
Last active July 12, 2018 11:34
Installing Drush specific version on your mac

Download and unpack Drush in a local folder

  • /Users/myusername/drush
(I like to keep my apps together, so I put my drush directory in /Users/myusername/drush)
  • get drush from here: GitHub repo

https://github.com/drush-ops/drush

@punyaruchal
punyaruchal / cloudSettings
Created January 18, 2019 09:20
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-01-18T09:19:56.862Z","extensionVersion":"v3.2.4"}
@punyaruchal
punyaruchal / ubuntu-Bash-home-directory-windows10.md
Last active May 25, 2021 12:15
Ubuntu Bash Home directory in Windows 10

Ubuntu Bash shell home directory in Windows 10 (and Your Windows System Drive in Bash)

C:\Users\punya\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\rootfs\home\punya

Copy the code line into run address bar

%userprofile%\AppData\Local\Packages\
@punyaruchal
punyaruchal / linux-terminal-commands.md
Created May 25, 2021 12:14
Useful terminal commands and shortcuts (Linux::Ubuntu)

Useful terminal commands and shortcuts (Linux::Ubuntu)

Commands

  • sudo apt-get install <pkg name> install package
  • sudo apt-get remove <pkg name> remove package
  • apt list | grep <txt to search> search currently installed packages
  • xkill kill an unresponsive window w. mouse
  • touch to create file, mkdir to create dir
  • rm to delete file, rmdir to delete dir
@punyaruchal
punyaruchal / git-bash-aliases-functions.md
Created May 25, 2021 12:46
Git Bash Aliases and Functions

Git Command-Line Shortcuts

A lot of my time is spent in Terminal and a majority of it is spent typing Git commands. I created a set of keyboard shortcuts with Bash aliases and functions to speed up my workflow and save me hundreds of keystrokes every day.

Git Bash Aliases and Functions

Git allows you to set aliases but they’re limited and only save you a few keystrokes (i.e. instead of git checkout you can type git co, but you still have to type git). Since Bash is Terminal’s default command-line interpreter, you can also set Bash aliases to reduce your keystrokes even further.

Here’s my list of Git Bash aliases and functions. To use them as your own, just add them to the file you store your aliases/functions. (i.e. ~/.bash_profile or ~/.bashrc)