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
alias cd=chdir /d $* | |
alias cp=xcopy /H $* | |
alias ls=dir | |
alias mv=move $* | |
alias rm=rmdir $* |
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
mongodump --uri "mongodb://[adminUser]:[password]@127.0.0.1:27017/[dbName]?authSource=admin" -o [path out e.g. M:\backup] |
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
#!/bin/bash | |
## | |
# File: | |
# nginx_modsite | |
# Description: | |
# Provides a basic script to automate enabling and disabling websites found | |
# in the default configuration directories: | |
# /etc/nginx/sites-available and /etc/nginx/sites-enabled | |
# For easy access to this script, copy it into the directory: |
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
enable_proxy() { | |
export http_proxy="127.0.0.1:1080" | |
export https_proxy="127.0.0.1:1080" | |
} | |
disable_proxy() { | |
unset http_proxy | |
unset https_proxy | |
} |
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
# 开启yarn global | |
# 添加到 ~/.bashrc 最后 | |
# add yarn global | |
export PATH=$PATH:$HOME/.yarn/bin |
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
# .bashrc | |
mcross() { | |
export http_proxy=http://127.0.0.1:1080; | |
export https_proxy=http://127.0.0.1:1080; | |
} | |
mback() { | |
unset http_proxy; | |
unset https_proxy; |
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
#!/bin/sh | |
# MIT License | |
# Copyright (c) 2017 Xiaomajia Alliance | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
[Unit] | |
Description=Mount Parallel Desktop Shared Folder to workspace as a non-root user (uid=1000) | |
[Service] | |
ExecStart=/bin/bash /workspace/pMountSF.sh | |
[Install] | |
WantedBy=multi-user.target |
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
$output = "./awesomeLibLaptop.txt" | |
Get-CimInstance -ClassName Win32_Desktop -ComputerName . >> $output | |
Get-CimInstance -ClassName Win32_Desktop -ComputerName . >> $output | |
Get-CimInstance -ClassName Win32_BIOS -ComputerName . >> $output | |
Get-CimInstance -ClassName Win32_Processor -ComputerName . >> $output | |
Get-CimInstance -ClassName Win32_ComputerSystem >> $output | |
Get-CimInstance -ClassName Win32_OperatingSystem -ComputerName . >> $output | |
Get-CimInstance -ClassName Win32_LogicalDisk >> $output | |
Get-CimInstance -ClassName Win32_LogonSession >> $output |
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
sleep 5 | |
sfs=`ls /media` | |
for folder in ${sfs[@]}; do name=${folder#*sf_}; mkdir -p /workspace/$name; mount -t vboxsf -o uid=1000,gid=1000 $name /workspace/$name; done | |
# usage | |
# - Create shared folders from virtualbox interface. No need to auto-mount | |
OlderNewer