Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Võ Ngọc Minh minhvn

🏠
Working from home
Block or report user

Report or block minhvn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@minhvn
minhvn / settings.php
Created May 5, 2019 — forked from adamkudrna/settings.php
Drupal 7 disable cache in settings.php
View settings.php
$conf['cache'] = 0; // Page cache
$conf['page_cache_maximum_age'] = 0; // External cache TTL
$conf['preprocess_css'] = FALSE; // Optimize css
$conf['preprocess_js'] = FALSE; // Optimize javascript
$conf['views_skip_cache'] = TRUE; // Views caching
@minhvn
minhvn / generate-ssh-key.sh
Created Apr 21, 2019 — forked from grenade/generate-ssh-key.sh
Correct file permissions for ssh keys and config.
View generate-ssh-key.sh
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@minhvn
minhvn / dc_emw.php
Created Dec 4, 2018 — forked from BBGuy/dc_emw.php
Working with Drupal commerce entities using entity_metadata_wrapper. Just a bunch of exampled copied from the web or added by me. will keep adding over time. now more then just commerce entities
View dc_emw.php
<?php
// Basics
// Get a value.
$value = $wrapper->field_x->value();
// If the field is a reference field you will get the field object
// To get the wrapper back use:
$wrapper_b = $wrapper->field_ref;
// To set a value.
View Compile_Dash_on_Ubuntu_14_04
Assuming the username of the Ubuntu user is "ubuntu".
Preparation
-----------
```
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libevent-dev
View curl.php
<?php
class cURL {
var $headers;
var $user_agent;
var $compression;
var $cookie_file;
var $proxy;
function cURL($cookies=TRUE,$cookie='cookies.txt',$compression='gzip',$proxy='') {
$this->headers[] = 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg';
$this->headers[] = 'Connection: Keep-Alive';
You can’t perform that action at this time.