cd
mkdir ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys
sh -c 'echo "ssh-rsa ... sample@example.com" >> ~/.ssh/authorized_keys'
chmod 600 ~/.ssh/authorized_keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Start a new pool named 'www'. | |
[www] | |
; The address on which to accept FastCGI requests. | |
; Valid syntaxes are: | |
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on | |
; a specific port; | |
; 'port' - to listen on a TCP socket to all addresses on a | |
; specific port; | |
; '/path/to/unix/socket' - to listen on a unix socket. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# repository | |
cd /tmp | |
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
rpm -Uvh epel-release-6-8.noarch.rpm | |
# system update | |
yum -y update | |
yum -y groupinstall "Development Tools" | |
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide | |
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel | |
mkdir ~/ffmpeg_sources | |
cd ~/ffmpeg_sources | |
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz | |
tar xzvf yasm-1.2.0.tar.gz | |
cd yasm-1.2.0 |
Downloading a tar.gz file and extracting it after the download completes might consume a lot of disk space and time.
It is possible to write tar.gz
file directly as input to tar
command and untar it to directory directly from remote url.
wget -qO- your_link_here | tar -xvz -C /target/directory
# Create the folder to mount drive
sudo mkdir /mnt/storage
# Set user/group perms to write
chown -R pi:pi /mnt/storage
# find the driver properties
sudo blkid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sysctl -w kern.maxfiles=75000 | |
sudo sysctl -w kern.maxfilesperproc=75000 | |
ulimit -S -n 75000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mustafa Turan | |
# coded at 30.11.2015 with NO LICENSE | |
# Feel free to use/modify/distribute/reimplement | |
# node.rb | |
class Node | |
attr_accessor :node_ref | |
attr_reader :val | |
def initialize(node_ref, val) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BUCKETNAME="your_s3_bucket" | |
LOGDIR="/opt/nginx/logs" | |
LOGDATE=$(date +"%Y%m%d") | |
LOGFILES=( "access" "ssl-access" ) | |
BOT_LOGFILES=( "bots-access" "bots-ssl-access" ) | |
echo "Moving access logs to dated logs.." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget https://github.com/protocolbuffers/protobuf/archive/v3.7.0rc2.tar.gz | |
tar -zxvf protobuf-3.7.0rc2.tar.gz | |
cd protobuf-3.7.0rc2 | |
./autogen.sh | |
./configure | |
make | |
make install |