Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define SIZE 10
int main(int argc, char *argv[])
{
// Expected result:
@hainp2604
hainp2604 / gist:ed81608bc6a74ed585c1
Last active August 29, 2015 14:07
Nginx PHP config template
server {
listen 80;
server_name domain;
root /home/www/ten-thu-muc;
index index.php index.html index.htm;
access_log /var/log/nginx/domain.access.log;
error_log /var/log/nginx/domain.error.log;
location / {
@hainp2604
hainp2604 / Deployment key
Last active August 29, 2015 14:07
Memo deployment key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDE9SIlETnAQHrBlsvq6xNhZ/uPed8weX0yws91rQQNwhK0v58svq420xEkGBjJm9KfqsnNF4xfIREOBSnqQDV6w23tZPEKQoOMd7cIM+JJJ2MMmYzooqo6AbvCMe2PoHEGwB2HMyacxcENK2VZ8WySb89pyJ4xsua2d96d4cD+hvLkNO1zKYzd5LYjzxqBIKNHE7+tTnBVU3h20VfQv/3KCGwwoIT5uuHzS8mqSoLbF6AlURsuobqJSamTr54oHBoef553Ug/0CmvZOFUZyvn9f/fCmFTMj36kNdpwT3ma5RaBGhK0vgeA6lTPUXT+Ca8I4C6ThrFk8UGT+yE/ygLP www-data@debian
@hainp2604
hainp2604 / pubkey
Created October 6, 2014 20:22
Pubkey
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDjdDlTeR3qXSSvSVEjkAthAqIKgxbsJfPfmmDFgO/uDnm5BCNCZ+Iu2hv0mWOwiCcE2w1KIQH6qE5ae5X69dEg3++VTi7GD36wZ458McGA57z95AFZByiBZVAE70v9Hqx6faACGZ+bhWgW/lGHBeb73YVqBK6z1qYhr4glhCOGTSdG0F5+Vu1qh5t2gEIhnRypXAJPZLks46oFZxaEIdQA3dlvd+dES55v//H7njhu3KYOr3x8YzECRK3boWCBj+sYWa6agw8cBmwzX5C+p077gLCG37isaSr/YaKhdsKDf5V3vyWRZAMMHl9DN6/mMiJmj99L4SC2Uxuzl5lkUxj [email protected]
@hainp2604
hainp2604 / gist:412f96e36d0943a7058c
Last active August 29, 2015 14:17
Server config
# Nginx config
passenger_root /home/deployer/.rvm/gems/ruby-2.1.3/gems/passenger-4.0.53;
#passenger_ruby /usr/bin/ruby;
passenger_max_pool_size 70;
passenger_min_instances 1;
passenger_max_requests 20; # A workaround if apps are mem-leaking
passenger_pool_idle_time 300;
passenger_max_instances_per_app 30;
passenger_pre_start http://service.memo.edu.vn/;