Archives for Programming
Encryption / Decryption between PHP/Python
I need to share some data between PHP and Python in a secure way, this is what i found on the internet, a library to encrypt/decrypt data working both...
Datadog – PHP – Adding client IP to your trace
When i use Datadog to collect tracer/span in our PHP , i realize that Datadog library does not collect the client IP address. I don’t know what the reason...
Puppeteer – URL Sequence (steps) monitor
With puppeteer, we normally visit a website, that website has a form for us to submit the data. In the api world, there is no form for us to...
PHP : HTTP Post with Curl
A sample function to use curl post data. $data=array() $data=array(); $data=”hello world”; $data=”hello user”; curl_post($url,$data) function curl_post($url,$fields) { //open connection $ch = curl_init(); //set the url, number of POST...
ntc – tempalates :cisco_ios_show_mac-address-table.template
#add this line in Type 3 - ^${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+${DESTINATION_PORT} -> Record Value DESTINATION_ADDRESS (\w+.\w+.\w+) Value TYPE (\w+) Value VLAN (\w+) Value DESTINATION_PORT (\S+) Start ^Destination\s+Address\s+Address\s+Type\s+VLAN\s+Destination\s+Port -> TYPE1 ^\s+vlan\s+mac address\s+type\s+learn\s+age\s+ports ->...
Perl: Diamon operator: <> , $_, the default variable
The Diamond operator is almost exclusively used in a while-loop. It allows us to iterate over the rows in all the files given on the command line. Diamond –...
Route 53: Apex domain quick fix
apex, bare domain ( domain without www) and should point to the same IP. In amazon load balance or some of the cloud solution, they do not provide...
git: fatal: index-pack failed
I recently had to clone a very large repository through SSH, every time i did i got this error Cloning into 'large-repository'... remote: Counting objects: 20248, done. remote:...
How to tell git which private key to use?
Environment variable GIT_SSH_COMMAND: From Git version , you can use the environment variable GIT_SSH_COMMAND like this: GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_example" git clone example Note that -i can sometimes be overridden...