Monthly Archives: May 2014

PHP and CURL

1234567891011121314151617181920212223242526function browse($url, $postData = null) {     $fields = ”;     if(is_array($postData) && sizeof($postData) >= 1){         $fields = http_build_query($postData);     }     $ch = curl_init();     curl_setopt($ch, CURLOPT_URL, $url);     … Continue reading

Posted in PHP, Web Development | Comments Off on PHP and CURL

How to Share Directories Between Linux and Windows Systems

Sharing files and directories between Linux and Windows systems can be challenging, but with the right tools and configuration, it’s straightforward. This guide covers both directions: making a Linux directory accessible from Windows, and accessing Windows shared directories from Linux. … Continue reading

Posted in Linux, Operating System, Windows 7 | Comments Off on How to Share Directories Between Linux and Windows Systems

Choosing the default network card (NIC) that should access the Internet

When a machine has more than one Network Interface Card (NIC) — say a Wi-Fi adapter and an Ethernet port, or a physical NIC alongside a Virtual Private Network (VPN) adapter — Windows has to decide which one to send … Continue reading

Posted in Operating System, Windows 7 | Tagged , | Comments Off on Choosing the default network card (NIC) that should access the Internet

Getting the current filename using bash

123456789101112131415$ cat ./testfilename.sh #!/bin/bash fullfile=`basename $0` filename=$(basename "$fullfile") echo "filename:"$filename extension="${filename##*.}" echo "extension:"$extension justfilename="${filename%.*}" echo "justfilename:"$justfilename $ ./testfilename.sh filename:testfilename.sh extension:sh justfilename:testfilename

Posted in Linux, Operating System | Comments Off on Getting the current filename using bash