Skip to content

Instantly share code, notes, and snippets.

xmeng1 /
Last active Jan 24, 2017
Linux commands
# kill 443 VMWARE
sudo fuser -k -n tcp 443
# start the nginx service
sudo systemctl start nginx.service
# alias startup="sudo sh ~/Dropbox/Deepnet/2_Linux/"
echo "alias startup='sudo sh ~/Dropbox/Deepnet/2_Linux/'" >> ~/.bashrc
source ~/.bashrc
View voice.xml
<?xml version="1.0" encoding="UTF-8"?>
<Say voice="alice" >Hello, {{Name}}.Your one time password is {{Code}}</Say>
xmeng1 /
Last active Feb 22, 2017
Linux command configuration record
# cope date to clipboard which can be used for ctrl+v
date | xclip -selection clipboard
# filter port
sudo netstat -nlp | grep 443
# start/stop/restart service
sudo systemctl start nginx.service
sudo systemctl restart nginx.service
sudo systemctl stop nginx.service
sudo systemctl status nginx.service
xmeng1 / input.html
Created Feb 20, 2017
angular material 2
View input.html
<md-input-container dividerColor="accent" class="input-container" floatPlaceholder="Test">
<span md-prefix>$&nbsp;</span>
<span md-suffix>.00</span>
<input mdInput name="value" ngModel placeholder="amount" align="end" >
xmeng1 / dynamicl_control_DOM_by_event.ts
Created Feb 23, 2017
dynamicl_control_DOM_by_event According to debug find that we can get the element by click event and so on.
View dynamicl_control_DOM_by_event.ts
setCssDynamical($event) {
$event.source.trigger.nativeElement.childNodes[0].setAttribute("style", "font-size: 20px;font-weight: bold")
//let elt = document.getElementsByClassName("mat-select-placeholder").item(0);
//elt.setAttribute("style", "font-size: 20px;font-weight: bold");
xmeng1 /
Created Jun 8, 2017 — forked from welshstew/
sublime text 3 install
SHORTCUT="[Desktop Entry]
Name=Sublime Text 3
Comment=Edit text files
xmeng1 / webcrawler.js
Created Jul 26, 2017 — forked from antivanov/webcrawler.js
Simple PhantomJS-based web crawler library
View webcrawler.js
//PhantomJS based web crawler Anton Ivanov 2012
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler"
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist
(function(host) {
function Crawler() {
this.visitedURLs = {};
xmeng1 /
Created Aug 3, 2017 — forked from tpai/
use both Tor and Privoxy with Mac OSX

1. install

brew install tor
brew install privoxy

2. copy and modify config file

xmeng1 / [FEDORA] gitkraken
Created Oct 11, 2017 — forked from aelkz/[FEDORA] gitkraken
How to install gitkraken on Fedora 25 + launcher icon
View [FEDORA] gitkraken
# Download GitKraken
# copy the downloaded file into /opt directory
cp gitkraken-amd64.tar.gz /opt/gitkraken
cd /opt
xmeng1 /
Created Oct 31, 2017
Git Sync with Upstream
git remote add upstream git://
git fetch upstream
git pull upstream master