Skip to content

Instantly share code, notes, and snippets.

@vunb
vunb / stuns
Last active August 29, 2015 14:08 — forked from yetithefoot/stuns
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@vunb
vunb / mysql-import.sql
Created October 25, 2014 18:24
Import mysql Database
mysql -u username -p databasename < filename.sql
@vunb
vunb / start.js
Last active May 3, 2018 07:22
Run node.js application in production mode
#!/bin/sh
#set enviroment before start script
NODE_ENV=production forever start ./bin/node.js
#Reference
#https://stackoverflow.com/questions/22312671/node-js-setting-environment-variables
#https://stackoverflow.com/questions/9396953/how-can-i-run-node-js-express-in-production-mode-via-sudo
@vunb
vunb / Running on IE
Created May 12, 2014 18:27
Tìm hiểu Angular.js
Q: angularjs này không chạy dc trên IE, có cách nào khắc phục lỗi này không
A: Với IE bạn đổi hết các directive thành class. Ví dụ ng-model='rikky'
thành class="ng-model:rikky;"
@vunb
vunb / syntaxHighliter
Last active August 29, 2015 14:00
Wordpress: Hướng dẫn cấu hình language cho syntaxHighliter
http://en.support.wordpress.com/code/posting-source-code/
To accomplish the above, just wrap your code in these tags:
[code language="css"]
your code here
[/code]
The language (or lang) parameter controls how the code is syntax highlighted. The following languages are supported:
actionscript3
@vunb
vunb / npm
Last active August 29, 2015 13:57
Node.js
#For convenience, user should be able to change node_modules directory location via
npm config set root DIR.
#Check npm_modules
npm bin -g
#Or
npm root -g
@vunb
vunb / Ubuntu
Created March 21, 2014 06:58
How do I install development tools for 12.10?
sudo apt-get install linux-headers-$(uname -r) build-essential
@vunb
vunb / updatePassword.sql
Last active August 29, 2015 13:56
Change and Update WordPress URLS in Database When Site is Moved to new Host
use wp_yourdb;
SELECT ID, user_login, user_pass FROM wp_users;
UPDATE wp_users SET user_pass = MD5('new_password') WHERE ID=1 LIMIT 1;
-- REF: http://www.wpexplorer.com/reset-wordpress-password-using-mysql/
@vunb
vunb / dep windows 7
Created February 14, 2014 08:55
Turn on or off DEP or Data Execution Prevention
Here is a very simple way to turn off DEP
- Go to START
- Type in CMD but do NOT press enter.
- Right click the CMD.exe icon and run as Administrator - verify your command prompt says Windows\System32>
- Enter this command exactly as shown
@vunb
vunb / find-apache-username.php
Last active August 29, 2015 13:56
In order to find out what user your instance of apache is running as, create a test script with the following content: <?php echo(exec("whoami")); ?>
<?php echo(exec("whoami")); ?>
// # chown -R apache_username: wordpress_folder