Skip to content

Instantly share code, notes, and snippets.

@persianyagami
persianyagami / node-and-npm-in-30-seconds.sh
Created December 16, 2020 07:23 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@persianyagami
persianyagami / clearRAM.sh
Created December 16, 2020 07:09 — forked from pklaus/clearRAM.sh
A Script to Clear Cached RAM on Linux
#!/bin/bash
## Bash Script to clear cached memory on (Ubuntu/Debian) Linux
## By Philipp Klaus
## see <http://blog.philippklaus.de/2011/02/clear-cached-memory-on-ubuntu/>
if [ "$(whoami)" != "root" ]
then
echo "You have to run this script as Superuser!"
exit 1
fi
@persianyagami
persianyagami / README.md
Created December 15, 2020 22:05 — forked from Tynael/README.md
How to use npx to run gist based scripts
@persianyagami
persianyagami / kali.sh
Created December 15, 2020 15:23 — forked from KenMacD/kali.sh
Kali Sources
cat >/etc/apt/sources.list.d/kali.list <<EOF
deb http://http.kali.org/kali kali main contrib non-free
deb-src http://http.kali.org/kali kali main contrib non-free
deb http://security.kali.org/kali-security kali/updates main contrib non-free
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
EOF
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6
sudo apt-get update
@persianyagami
persianyagami / nullarbor-install-ubuntu1404.sh
Created December 14, 2020 18:09 — forked from stephenturner/nullarbor-install-ubuntu1404.sh
Nullarbor+dependencies installation script for a fresh Ubuntu 14.04 instance.
#!/bin/bash
# Nullarbor+dependencies installation script for a fresh Ubuntu 14.04 instance.
################################################################################
## Conveniences
################################################################################
# Some essential aliases
@persianyagami
persianyagami / Dockerfile
Created December 14, 2020 18:09 — forked from ecliptik/Dockerfile
Executable Perl Docker Container
#This Dockerfile uses a Multi-Stage Build: https://docs.docker.com/develop/develop-images/multistage-build/
FROM debian:stable-slim AS base
LABEL maintainer="Micheal Waltz <dockerfiles@ecliptik.com>"
# Environment
ENV DEBIAN_FRONTEND=noninteractive \
LANG=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
LANGUAGE=en_US.UTF-8
@persianyagami
persianyagami / build-erlang.sh
Created December 14, 2020 03:10 — forked from bryanhunter/build-erlang.sh
This script will install dependencies and then build and install erlang using kerl on Ubuntu
#!/bin/bash
# This script will install dependencies then build and install erlang using kerl
# Pull this file down, make it executable and run it with sudo
#
# wget https://gist.githubusercontent.com/bryanhunter/adbd9c8d9fb2f6366eee/raw/build-erlang.sh
# chmod u+x build-erlang.sh
# sudo ./build-erlang.sh
#
# Version: 17.1
@persianyagami
persianyagami / install_lamp_ubuntu.sh
Created December 13, 2020 22:47 — forked from ankurk91/install_lamp_ubuntu.sh
Ubuntu 20 - PHP development (php 7.4, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 20.04 dev Server
# Run like - bash install_lamp.sh
# Script should auto terminate on errors
echo -e "\e[96m Adding PPA \e[39m"
sudo add-apt-repository -y ppa:ondrej/apache2
@persianyagami
persianyagami / install_lamp_ubuntu.sh
Created December 13, 2020 22:47 — forked from ankurk91/install_lamp_ubuntu.sh
Ubuntu 20 - PHP development (php 7.4, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 20.04 dev Server
# Run like - bash install_lamp.sh
# Script should auto terminate on errors
echo -e "\e[96m Adding PPA \e[39m"
sudo add-apt-repository -y ppa:ondrej/apache2
@persianyagami
persianyagami / Install_Qt.md
Created November 26, 2020 01:32 — forked from raulqf/Install_Qt.md
How to install Qt libraries on Linux from source code

How to install Qt on Linux from source code

One of the best option is to use the run package offered by Qt to install the libraries and its IDE (Qt Creator). Nevertheless However, when you want to compile it for a sever, where no GUI is required, you must be then interested in how to compile from source and discover some of the configuration options you have to disable some GUI modules among others and get lightest weight libraries.

First of all download the tar.xz file from Qt. You can also go to the archive and select the best that fulfill your requirement. Right now I am going on with the newest version up to the moment v5.9.3.

Create a directory and uncompress the downloaded file:

  $ mkdir temp

$ cd temp