Top N things you should do after installing or upgrading to your new Fedora 36 workstation.
Using Homebrew, Homebrew-PHP and the RVM-like brew-php-switcher you can easily switch between multiple installed versions of PHP on your OS X machine (Mavericks 10.9 to El-Capitan 10.11).
xcode-select --install # install the command line tools, if missing
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew update && brew doctor
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
function convertMiliseconds(miliseconds, format) { | |
var days, hours, minutes, seconds, total_hours, total_minutes, total_seconds; | |
total_seconds = parseInt(Math.floor(miliseconds / 1000)); | |
total_minutes = parseInt(Math.floor(total_seconds / 60)); | |
total_hours = parseInt(Math.floor(total_minutes / 60)); | |
days = parseInt(Math.floor(total_hours / 24)); | |
seconds = parseInt(total_seconds % 60); | |
minutes = parseInt(total_minutes % 60); |
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
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
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 | |
$username = "your_username"; | |
$password = "your_pass"; | |
$url = 'your_stp_server_url'; | |
// Make our connection | |
$connection = ssh2_connect($url); | |
// Authenticate |
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
(function() { | |
var script, | |
scripts = document.getElementsByTagName('script')[0]; | |
function load(url) { | |
script = document.createElement('script'); | |
script.async = true; | |
script.src = url; | |
scripts.parentNode.insertBefore(script, scripts); |
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 | |
/** | |
* FTP with Implicit SSL/TLS Class | |
* | |
* Simple wrapper for cURL functions to transfer an ASCII file over FTP with implicit SSL/TLS | |
* | |
* @category Class | |
* @author Max Rice | |
* @since 1.0 | |
*/ |