Skip to content

Instantly share code, notes, and snippets.

@suvozy
Last active February 27, 2016 22:50
Show Gist options
  • Save suvozy/0c598073f7eb0f26cb99 to your computer and use it in GitHub Desktop.
Save suvozy/0c598073f7eb0f26cb99 to your computer and use it in GitHub Desktop.
Mac

Remove __MACOSX file from .zip

zip -d /Users/suvozit/Desktop/php-sample/Archive.zip "__MACOSX*"

Show / Hide hidden files on Mac OS X

To show hidden files on your mac launch Terminal and enter these commands:

defaults write com.apple.Finder AppleShowAllFiles TRUE

Now you need to relaunch Finder by killing it in order for the changes to take effect:

killall Finder

To reverse this change and go back to hidden files:

defaults write com.apple.Finder AppleShowAllFiles FALSE

and

killall Finder

OR

defaults write com.apple.Finder AppleShowAllFiles NO

Clean folder

cd /folder
rm -rf .* *

Running PHP Codeigniter

https://ellislab.com/codeigniter/user-guide/general/cli.html#why

cd /Applications/XAMPP/xamppfiles/htdocs/log-pixel/
php index.php tools message "John Smith"

or

/Applications/XAMPP/xamppfiles/bin/php index.php tools message "John Smith"

for example.com/index.php/tools/message/to

Resume broken downloads

curl -OC - http://example.com/files/big-ones/big-arse-file.zip

Jonathan-MBP:Downloads jonathan$ curl -OC - http://www.website.com/files/big-ones/big-arse-file.zip
** Resuming transfer from byte position 46259985  
%  Total  %  Received % Xferd  Average Speed   Time    Time     Time   Current
 
                               Dload  Upload  Total   Spent     Left   Speed 
42 90.7M  42 0.01M    0     0  61007      0  0:06:31  0:06:31 --:--:-- 61340

or

wget --continue http://example.com/files/big-ones/big-arse-file.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment