Skip to content

Instantly share code, notes, and snippets.

@devlifeX
devlifeX / xdebug
Last active March 12, 2017 23:06 — forked from kramarama/xdebug
install xdebug on centos
http://xdebug.org/install.php#configure-php
http://blog.jetbrains.com/phpstorm/2013/08/debugger-configuration-validation-with-phpstorm/
on CentOS:
1. You need to install PHP’s devel package for PHP commands execution
yum install php-devel
yum install php-pear
2. Next install GCC and GCC C++ compilers to compile Xdebug extension yourself.
yum install gcc gcc-c++ autoconf automake
@devlifeX
devlifeX / seeder_couchdb.js
Last active April 29, 2017 23:02
create curl seed for couchdb
/**
1- Copy these code in your console (chrome) and hit Enter key
2- Copy the result from the console and paste in your terminal
3- enjoy ;)
*/
let obj = [{
"id": 1,
"first_name": "Sherlocke",
"last_name": "Benneyworth",
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@devlifeX
devlifeX / install-php7.txt
Last active August 19, 2017 10:29
Install php 7 on debian 8
#https://www.cyberciti.biz/faq/installing-php-7-on-debian-linux-8-jessie-wheezy-using-apt-get/
#Package list
dpkg --list | grep php | awk '/^ii/{ print $2}'
#Uninstall
x="$(dpkg --list | grep php | awk '/^ii/{ print $2}')"
sudo apt-get -y --purge remove $x
#Add source list
@devlifeX
devlifeX / nodejs.txt
Last active November 25, 2017 15:22
install nodejs && npm version 9,8 on gnu/linux debian base
Version 9:
$ curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
Version 8:
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ npm install -g npm@latest
$ echo "alias node='nodejs'" >> ~/.bashrc
$ source ~/.bashrc
@devlifeX
devlifeX / shecan.sh
Last active December 14, 2019 09:43
shecan DNS Changer
#!/bin/bash
sudo sed -i -e 's/nameserver/\#/g' /etc/resolv.conf
sudo sh -c 'echo "nameserver 178.22.122.100" >> /etc/resolv.conf'
sudo sh -c 'echo "nameserver 185.51.200.2" >> /etc/resolv.conf'
echo done!
@devlifeX
devlifeX / telegram-installer.sh
Created May 15, 2019 20:56 — forked from javiersantos/telegram-installer.sh
Install Telegram for Deskop (Linux)
#!/bin/bash
echo "============================================="
echo "== Telegram Script Installer v 0.1 =="
echo "== =="
echo "== by Jalcaldea =="
echo "============================================="
echo "Downloading necesary files..."
@devlifeX
devlifeX / dante_setup.sh
Created June 16, 2019 05:54 — forked from gpchelkin/dante_setup.sh
How To Setup SOCKS5 Proxy Server for (not only) Telegram using Dante on Ubuntu 16.04 / 18.04
### NOT A SCRIPT, JUST A REFERENCE!
# install dante-server
sudo apt update
sudo apt install dante-server
# or download latest dante-server deb for Ubuntu, works for 16.04 and 18.04:
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/dante/dante-server_1.4.2+dfsg-2build1_amd64.deb
# or older version:
wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb
@devlifeX
devlifeX / docker-installer.sh
Last active September 18, 2021 00:50
Docker Installer - ubuntu 64bit
sudo apt-get update
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
echo "official GPG key"
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
@devlifeX
devlifeX / import.php
Created October 8, 2020 05:40
Import wordpress taxonomy, You can aslo override exported taxonomy
<?php
class Import_Taxonomy
{
private $options = [];
public function __construct($options)
{
if (
isset($_GET['task']) &&
$_GET['task'] === "import"