Ning Ma blog

my technology tips

Sass what is different between @include and @extend

For my understanding, extend not allowed customization, and include allowed. @extend

@include

using underscore to verify if a variable is undefined or null

Example of if a variable is undefined

Example of if a variable is null function test() { var foo = null; console.log(_.isNull(foo)); // true, var foo = 3; console.log(_.isNull(foo)); // false, }

Install Dropbox from the command line on Cenots

Cloud storage is everywhere in today’s multi-device environment, where people want to access content across multiple devices wherever they go. Dropbox is the most widely used cloud storage service thanks to its elegant UI and flawless multi-platform compatibility. The popularity of Dropbox has led to a flurry of official or unofficial Dropbox clients that are […]

CentOS setup ssh key for bitbucket

1. Create a new ssh key, you need enter your key name and password

2. Start the ssh-agent and load your keys replace id_ras to your key name

3. Copy your key from ~/.ssh/yourKeyName.pub

4. Login bitbucket avatar > Settings > SSH keys. insert your key from step 2 5. Change your […]

Common iptables rules

# Allow outgoing traffic and disallow any passthroughs iptables -P INPUT DROP iptables -P OUTPUT ACCEPT iptables -P FORWARD DROP # Allow traffic already established to continue iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT # Allow ssh, ftp and web services iptables -A INPUT -p tcp –dport ssh -i eth0 -j ACCEPT iptables […]

Install Virtualmin and Webmin on CentOS by 4 commands

Then access panel by https://your ip address:10000/

How to use bitbucket on Centos

1. Install git

2. Clone file from the bitbucket

3. Commit a file

*add all new files

4. Push to bitbucket

5.Push only changed files

6. Get git repos name

or

7. get repo content to the local (overwrite)

8. get repo content and merge […]

Centos install VPN server by 3 commands

Step 0 – Login to your server via SSH. You better login as root. Step 1 – Now issue this first command syntax:

example: Step 2 – Now also type this command and hit Enter

example: Step 3 – The final command, issue this and wait (the output a little bit long):

[…]

How to Add a User and Grant Root Privileges on CentOS 6.5

Pre-Flight Check These instructions are intended specifically for adding a user on CentOS 6.5. I’ll be working from a Liquid Web Core Managed CentOS 6.5 server, and I’ll be logged in as root. Step 1: Add the User It’s just one simple command to add a user. In this case, we’re adding a user called […]

install hhvm by Centos yum

Previous Posts