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
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done && | |
sudo apt-get update && | |
sudo apt-get install ca-certificates curl gnupg && | |
sudo install -m 0755 -d /etc/apt/keyrings && | |
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg && | |
sudo chmod a+r /etc/apt/keyrings/docker.gpg && | |
echo \ | |
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ | |
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ | |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
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
#include "stdafx.h" | |
#include <iostream> | |
#include <time.h> | |
using namespace std; | |
#include "mpi.h" | |
#pragma comment(lib, "msmpi.lib") | |
void main(int argc, char *argv[]) |
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
// This code creates an array as count as our processes count and send every value of array to coresponding process and prints it in process... | |
#include "stdafx.h" | |
#include <iostream> | |
#include <time.h> | |
using namespace std; | |
#include "mpi.h" | |
#pragma comment(lib, "msmpi.lib") |
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
<?php | |
function file_get_contents_curl( $url ) { | |
$ch = curl_init(); | |
curl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE ); | |
curl_setopt( $ch, CURLOPT_HEADER, 0 ); | |
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); | |
curl_setopt( $ch, CURLOPT_URL, $url ); |
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
<?php | |
public function index() | |
{ | |
$start = '1992-5-7 11:25:17'; | |
var_dump($this->times(20 , 'Year' , $start , false)); | |
} | |
function times($number , $type = 'Day' , $start = null , $floor = true) | |
{ |
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
<?php | |
public function index() | |
{ | |
var_dump($this->last_days(5)); | |
} | |
function last_days($number) | |
{ | |
$days = []; |
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
<?php | |
// Search $title in Google search engine | |
public function google($title) | |
{ | |
$keyword = urlencode($title); | |
$url = "https://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=$keyword"; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_REFERER, 'HTTP://YOURSITE.COM'); |