Skip to content

Instantly share code, notes, and snippets.

View pilinux's full-sized avatar

mahir pilinux

View GitHub Profile

Keybase proof

I hereby claim:

  • I am pilinux on github.
  • I am pilinux (https://keybase.io/pilinux) on keybase.
  • I have a public key ASCFDXaih7saw1LyTW1vG-j_mfsBBcMxeHFHGETdtoxYcQo

To claim this, I am signing this object:

@pilinux
pilinux / Cloudflared_Setup
Last active November 19, 2018 12:24
OpenVPN + Pi-hole Firewall and Resolver + Upstream Public DNS Setup on a Dedicated/Cloud Server
Download link: https://developers.cloudflare.com/argo-tunnel/downloads/
For Raspberry Pi
================
- Install Pi-hole with lighttpd
- $ curl https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz | sudo tar xzC /usr/local/bin
- Test:
$ sudo su
@pilinux
pilinux / how-to-install-java-on-raspbian.md
Last active July 9, 2018 07:33 — forked from ribasco/how-to-install-java-on-raspbian.md
How to install the latest java version in Raspbian (Stretch)

Introduction

The default version of java provided in the latest raspbian images are outdated, so we are going to install from the ppa:webupd8team/java repository instead. Please note that add-apt-repository ppa:webupd8team/java will not work, so we will need to add the repository manually.

Installation

  1. Create the gpg key file and paste the following lines of text below
nano key.txt
@pilinux
pilinux / install_ruby_on_rails.sh
Last active June 1, 2018 17:11
Install ruby and rails - simplest procedure for Ubuntu OS
#!/bin/bash
sudo apt install build-essential ruby liblzma-dev patch ruby-dev zlib1g-dev libsqlite3-dev nodejs
sudo gem update --system
sudo gem install bundler
sudo gem install nokogiri -v 1.8.2
sudo gem install rails -v 5.2.0
sudo gem install sqlite3 -v 1.3.13
sudo gem install execjs
# To create an app inside a directory,
@pilinux
pilinux / gitlab.conf
Created June 1, 2018 08:08 — forked from sameersbn/gitlab.conf
Nginx reverse proxy configuration for GitLab
upstream gitlab {
server 172.17.42.1:10080 fail_timeout=0;
}
# let gitlab deal with the redirection
server {
listen 80;
server_name git.example.com;
server_tokens off;
root /dev/null;
@pilinux
pilinux / self-signed-certificate-with-custom-ca.md
Created January 26, 2018 15:02 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@pilinux
pilinux / automake1_15.sh
Last active October 19, 2017 07:08
Install automake 1.15
#!/bin/bash
# run as root only
if [ $EUID -ne 0 ]
then
echo -e "\e[1;39m[ \e[31mError\e[39m ] need root access to run this script\e[0;39m"
exit 1
fi
function install_automake() {
@pilinux
pilinux / uap.sh
Last active October 19, 2018 11:10
Ubuntu - Apache2 - Php7.2 with mbstring + pear + libapache2-mod + curl + cgi
####
# For Ubuntu 18.04
#
# Add the following repos at /etc/apt/sources.list:
# deb http://archive.ubuntu.com/ubuntu bionic main multiverse restricted universe
# deb http://archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe
# deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe
# and remove the default repos.
####
@pilinux
pilinux / README-Template.md
Created July 2, 2017 00:39 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

##########
# Arithmetic operation
(5 + 2 * 3 + (3 - 1) / 2 + 9) % 2
Out[1]: 1
2**2 # power
Out[2]: 4
4**0.5 # square root