#include <stdio.h> | |
#include <stdlib.h> // atoll | |
#include <stdint.h> // uint64_t | |
#include <inttypes.h> // PRIu64 | |
static const char *humanSize(uint64_t bytes) | |
{ | |
char *suffix[] = {"B", "KB", "MB", "GB", "TB"}; | |
char length = sizeof(suffix) / sizeof(suffix[0]); |
Setting up p4merge
as diff and merge tool on Windows. Tried for Git version 1.8.4.msysgit.0
.
Two alternatives are explained: using the command line, and directly editing the config file.
Being the installation path "C:Program Files\Perforce\p4merge.exe"
, just run:
$ git config --global diff.tool p4merge
The configuration file /proc/sys/kernel/core_pattern
defines the default behaviour when a crash occurs.
If it contains a single word such as core
, a core dump will be generated on the current directory with that name.
If the first character of its content is |
, then the core file will be piped to a process, such as Apport (|/usr/share/apport/apport %p %s %c
).
To enable core dumps for your current terminal session ignoring the default action:
ulimit -c unlimited
# C++ needed to compile node | |
# sudo apt-get -y install build-essential | |
cd /tmp | |
wget --no-verbose http://nodejs.org/dist/node-latest.tar.gz | |
tar zxf node-latest.tar.gz | |
cd node-v* | |
./configure && make && sudo make install |
#!/usr/bin/env bash | |
# File name | |
readonly PROGNAME=$(basename $0) | |
# File name, without the extension | |
readonly PROGBASENAME=${PROGNAME%.*} | |
# File directory | |
readonly PROGDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | |
# Arguments | |
readonly ARGS="$@" |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export HISTCONTROL=ignorespace | |
# http://unix.stackexchange.com/a/81699 | |
alias wanip='dig +short myip.opendns.com @resolver1.opendns.com' | |
# http://stackoverflow.com/a/13322549 | |
alias lanip="ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'" |
Add your user to www-data
group.
sudo adduser USERNAME www-data
Then, change recursively the ownership of /var/www
to your username.
sudo chown USERNAME:www-data -R /var/www
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<link href="lib/bootstrap.css" rel="stylesheet"> | |
<script type="text/javascript" src="lib/jquery.js"></script> | |
<script type="text/javascript" src="lib/bootstrap.js"></script> | |
</head> |