- All kubernetes nodes: set SELINUX to permissive mode
$ vi /etc/selinux/config
SELINUX=permissive
$ setenforce 0
<?php | |
// Simple HTTP static file server using Swoole | |
$host = $argv[1] ?? '127.0.0.1'; | |
$port = $argv[2] ?? 9501; | |
$http = new swoole_http_server($host, $port); | |
// The usage of enable_static_handler seems to produce errors | |
// $http->set([ |
// Person.class | |
//------------------------- | |
class Person { | |
private String name; | |
public Person(String name) { | |
this.name = name; | |
} | |
# using: | |
# for set proxy: | |
# $ setproxy 127.0.0.1 8118 | |
# for unset: | |
# $ unsetproxy | |
function setproxy() { | |
export {http,https,ftp,HTTP,HTTPS}_proxy=http://$1:$2 | |
export no_proxy="localhost,127.0.0.1,master.cafecluster" | |
echo "Proxy variable(http,https,ftp) set to $1:$2" |
include $(TOPDIR)/rules.mk | |
PKG_NAME:=sniproxy | |
PKG_VERSION:=0.6.0 | |
PKG_RELEASE:=1 | |
PKG_SOURCE_URL:=https://github.com/dlundquist/sniproxy/archive/ | |
PKG_SOURCE:=$(PKG_VERSION).tar.gz | |
PKG_MD5SUM:=bcfb5d1efe045b8b356a4229f2339f02 |
If you are facing an error like that on new MacOS version. | |
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun | |
It means that you need to install XCode command line, open a Terminal and run this command: | |
$ xcode-select --install | |
Note: | |
If you want to download and install Command Line tools manually, it can be downloaded from: https://developer.apple.com/download/more/ |
/** | |
* Open https://app.snapp.ir | |
* Login with your credentials | |
* Copy and pasting this code in developer tools console | |
* Waiting... :) | |
*/ | |
(async function () { | |
function sleep(ms = 0) { | |
return new Promise(r => setTimeout(r, ms)); | |
} |
// # Usage | |
// | |
// Save this file and replace username and password on the last line of the file with | |
// your Snapp username and password then run the following commands: | |
// | |
// yarn init && yarn add request | |
// node SnappTotalPriceCalculator.js | |
// | |
const request = require('request'); |