Skip to content

Instantly share code, notes, and snippets.

View thapakazi's full-sized avatar
💭
🐧 🗡️ 💻

Milan Thapa thapakazi

💭
🐧 🗡️ 💻
View GitHub Profile
$ grep error /var/log/syslog
Sep 20 15:54:26 Xen kernel: [ 71.932010] EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro
Sep 20 15:54:30 Xen xapi: [error|Xen|0 thread_zero|Registering SR plugins D:e82ade389516|sm_exec] Not scanning /var/lib/xcp/sm for SM backends: directory does not exist
Sep 20 15:54:26 Xen xapi: [error|Xen|309||xapi] Unexpected exception in message hook. Exception='INTERNAL_ERROR: [ Subprocess exitted with unexpected code 1; stdout = [ ]; stderr = [ pool:other-config:mail-destination not specified#012 ] ]'
Sep 20 15:55:09 Xen tapdisk[2366]: tapdisk-log: closing after 0 errors
Sep 20 15:55:32 Xen tapdisk[2980]: tapdisk-log: closing after 0 errors
Sep 20 15:57:34 Xen tapdisk[3690]: tapdisk-log: closing after 0 errors
Sep 20 15:58:10 Xen tapdisk[4292]: tapdisk-log: closing after 0 errors
Sep 20 15:58:46 Xen tapdisk[5012]: tapdisk-log: closing after 0 errors
@thapakazi
thapakazi / -
Created October 25, 2013 10:19
To capture the screen
ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -qscale 0 /tmp/out.mpg
@thapakazi
thapakazi / gist:7208790
Last active December 26, 2015 20:29
⚔Moodle Installation with xampp in Mac
→ first download the xampp from http://www.apachefriends.org/en/xampp-macosx.html#849
$ wget -c http://www.apachefriends.org/download.php?xampp-osx-1.8.2-2-installer.dmg
→ install it
$ hdiutil mount xampp-osx-version-number.dmg
$ cd /Volumes/xampp_mounted_directroy
$ sudo cp -Rv xampp_app_file.app /Application
don't forget to detatch the mounted volume
@thapakazi
thapakazi / a.rb
Last active December 26, 2015 20:59
Splat Array Example
#try this in scratchpad
function func (obj /*, *args*/) {
var star_args = Array.prototype.slice.call (arguments, func.length);
/* now star_args[0] is the first undeclared argument */
for (i=0;i<star_args.length;i++){
alert(star_args[i]);
}
alert(y);
//function to process http request
httpRequest = function(message, path, action, options, callback) {
return message.http("" + BASEURL + "/" + path).query(options)[action]()(function(err, res, body) {
return callback(err, res, body);
});
};
//function call
httpRequest(msg, 'getDrink', 'post', {
@thapakazi
thapakazi / -
Last active December 30, 2015 22:28
GIT- http://gitready.com/
MYSQL-http://www.efytimes.com/e1/fullnews.asp?edid=123323
@thapakazi
thapakazi / pt-table-checksum.md
Last active December 31, 2015 19:39
Working with percona-toolkits
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.2.210
Master_User: replica
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000012
Read_Master_Log_Pos: 100087
Relay_Log_File: mysqld-relay-bin.000010

Getting started

Installing your doc directory