Skip to content

Instantly share code, notes, and snippets.

View pvmchau's full-sized avatar

Chau Viet Minh Pham pvmchau

View GitHub Profile
@pvmchau
pvmchau / DrupalLearningContent.md
Created August 29, 2012 04:13
Drupal Learning Content

TABLE OF LEARNING CONTENT

  1. Chapter 1: Developing for Drupal 7 (Day 1)
    1. Introducing Drupal (for developers) (Day 1)
      1. Technologies that drive Drupal (Day 1)
        1. PHP
        2. Databases and MySQL
        3. HTML, CSS, and JavaScript
        4. Other technologies
        5. The web server
  2. The Operating System
@pvmchau
pvmchau / README.md
Created August 29, 2012 04:18 — forked from mbostock/.block
Epicyclic Gearing

From Wikipedia: Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Built with D3.js.

@pvmchau
pvmchau / ssqueue.info
Created August 30, 2012 12:06
Show image to Node queue Adminstrator page.
name = Ssqueue
description = Add node image to Node queue list.
core = 6.x
package = Vietcoop
dependencies[] = nodequeue
dependencies[] = imagecache
@pvmchau
pvmchau / bot_metion.module
Created September 4, 2012 07:36
Bot IRC Mention Module
<?php
/**
* Listen for conversation directed at, or about, the bot.
*
* @param $data
* The regular $data object prepared by the IRC library.
* @param $from_query
* Boolean; whether this was a queried request.
*/
function bot_mention_irc_msg_channel($data, $from_query = FALSE) {
Task
1. (why doesn’t it let you update logo from back end, and it only changes in member’s area?)– it will be dynamic – plz fix it
 Ok. 5ms with D7.
2. About Us page needs a left sidebar
a. “Schedule a free consultation” with “Take a Tour” directly underneath.- so these two are going to be placed on the left sidebar.
 Block About Us sẽ thể hiện ntn, gồm những thông tin gì?
3. Text needs to pop more (maybe titles can be bold, and different color
 Ok. 10ms.
#!/bin/sh
# Configuration:
DRUPAL_ROOT=/home/langgo/demo/langgo
DRUPAL_DIR=$DRUPAL_ROOT/sites/langgo
DB_BACKUP_FILE="https://raw.github.com/gist/5f39454c80939a29d425/f2045d53d15d41f2f8cfbc8570dfdb243667fb76/test.sql"
DRUSH_MAKE_FILE="https://raw.github.com/gist/b84fd6235b58779398c5/3324cbb4faa4d3c39a3af6b26ea7cf418c9ab00f/test.make"
ROOT_USER_NAME="admin"
ROOT_USER_PASS="admin"
DB_NAME="langgo_db"
#!/bin/sh
# Configuration:
DRUPAL_ROOT="$SITES_ROOT/$SITE_NAME_RESTORE"
DRUPAL_DIR="$SITES_ROOT/sites/$SITE_NAME_RESTORE"
GIT_REMOTE_DB="https://raw.github.com/gist/5f39454c80939a29d425/f2045d53d15d41f2f8cfbc8570dfdb243667fb76/test.sql"
DRUSH_MAKE_FILE="https://raw.github.com/gist/b84fd6235b58779398c5/3324cbb4faa4d3c39a3af6b26ea7cf418c9ab00f/test.make"
DB_URL="mysql://root:root@localhost/langgo_db_1;mysql://root:root@localhost/langgo_db_2"
ROOT_USER_NAME="root"
ROOT_USER_PASS="root"
#!/bin/sh
# Configuration:
PATH_CONFIG="$HOME/vietcoop"
FILE_ARG="$1"
#check file config
if [ ! -f "$PATH_CONFIG/$FILE_ARG" ]
then
echo -e "Not found file config at '$PATH_CONFIG/$FILE_ARG'"
exit
#config sites directory
SITES_ROOT="/usr/share/nginx/www"
#config database connect. Notice if multi database connect then default is a name of first connect.
DB_URL="mysql://root:root@localhost/drupal7;mysql://root:root@localhost/drupal7_2"
#setup remote for git
GIT_REMOTE_DB="https://github.com/tuongduy/backup_db.git" #link remote repository for database
GIT_REMOTE_FILES="https://github.com/tuongduy/backup_files.git" #link remote repository for files
#config for backup
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* Pure-PHP PKCS#1 (v2.1) compliant implementation of RSA.
*
* PHP versions 4 and 5
*
* Here's an example of how to encrypt and decrypt text with this library:
* <code>