Skip to content

Instantly share code, notes, and snippets.

View ranqiangjun's full-sized avatar
🏠
Working from home

Qiangjun Ran ranqiangjun

🏠
Working from home
View GitHub Profile
@ranqiangjun
ranqiangjun / my_sacrifice.md
Created March 26, 2017 00:11
The motherf*cking way the get Oracle access in PHP5 over Ubuntu
@ranqiangjun
ranqiangjun / vpnguide.md
Last active January 7, 2017 03:01
Setting up a private OpenVPN server [Linux users only]

Setting up a private OpenVPN server [Linux users only]

Contribution setup instructions

Fork DrupalConsole

Fork your own copy of the DrupalConsole repository to your account

Clone

Get a copy of your recently cloned version of console in your machine.

$ git clone [email protected]:[your-git-user-here]/DrupalConsole.git
#!/bin/bash
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.node.pkg.bom \
| while read i; do
sudo rm /usr/local/${i}
done
sudo rm -rf /usr/local/lib/node \
/usr/local/lib/node_modules \
/var/db/receipts/org.nodejs.*
@ranqiangjun
ranqiangjun / render_menu.php
Created January 13, 2016 07:58 — forked from eugene-ilyin/render_menu.php
Render menu programmatically in Drupal 7
// One level menu.
$menu = menu_tree('main-menu');
$menu_items = render($menu);
// Menu with many levels.
menu_tree_all_data('main-menu');
$menu = menu_build_tree('main-menu');
$menu_items = render(menu_tree_output($menu));