Skip to content

Instantly share code, notes, and snippets.


Valorad the Oneiroseeker valorad

View GitHub Profile
valorad / linwcmd.cmd
Created March 17, 2017 06:57
Linuxified Windows Command Prompt
View linwcmd.cmd
alias cd=chdir /d $*
alias cp=xcopy /H $*
alias ls=dir
alias mv=move $*
alias rm=rmdir $*
valorad / mongoDump.bat
Last active September 21, 2019 22:33
Mongo 豪华小命令
View mongoDump.bat
mongodump --uri "mongodb://[adminUser]:[password]@[dbName]?authSource=admin" -o [path out e.g. M:\backup]
valorad / nginx_modsite
Created March 31, 2017 04:49
Nginx enable/disable site config by Ghassen Telmoudi from
View nginx_modsite
# 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:
valorad /
Created April 12, 2017 10:15
linux command line tools use proxy
enable_proxy() {
export http_proxy=""
export https_proxy=""
disable_proxy() {
unset http_proxy
unset https_proxy
valorad /
Last active January 22, 2018 12:09
安装yarn的正确姿势(有版本管理器如nvm存在时) How to install Yarn when node is under version management (such as nvm)
# 开启yarn global
# 添加到 ~/.bashrc 最后
# add yarn global
export PATH=$PATH:$HOME/.yarn/bin
valorad /
Created October 22, 2017 02:21
magical crossover
# .bashrc
mcross() {
export http_proxy=;
export https_proxy=;
mback() {
unset http_proxy;
unset https_proxy;
valorad / 40_custom
Created November 25, 2017 04:41
Grub ultimate bootality
View 40_custom
# 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
valorad / pMountSF.service
Last active April 16, 2018 08:05
Mount Parallel Desktop Shared Folder to workspace as a non-root user (uid=1000)
View pMountSF.service
Description=Mount Parallel Desktop Shared Folder to workspace as a non-root user (uid=1000)
ExecStart=/bin/bash /workspace/
valorad / pcProbe.ps1
Created November 3, 2018 23:53
Probe Windows PC Info
View pcProbe.ps1
$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
valorad /
Last active January 22, 2019 02:18
Mount Virtual Box Shared Folder to workspace as a non-root user (uid=1000, gid=1000)
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