cd /opt/bitnami/apache2/htdocs
sudo git clone https://github.com/elminson/gc_lamp_laravel.git todo
cd todo
sudo composer install
{ | |
"ask": 182.28, | |
"askSize": 11, | |
"averageDailyVolume10Day": 50579500, | |
"averageDailyVolume3Month": 54123437, | |
"bid": 182.32, | |
"bidSize": 9, | |
"bookValue": 4.793, | |
"currency": "USD", | |
"dividendDate": { |
[ | |
{ | |
"assetProfile": { | |
"address1": "One Apple Park Way", | |
"city": "Cupertino", | |
"state": "CA", | |
"zip": "95014", | |
"country": "United States", | |
"phone": "408 996 1010", | |
"website": "https:\/\/www.apple.com", |
#!/bin/bash
# Get the current branch name
current_branch=$(git rev-parse --abbrev-ref HEAD)
# Skip execution if the branch is 'beta' or 'dev'
if [[ $current_branch == "master" ]] || [[ $current_branch == "beta" ]] || [[ $current_branch == "dev" ]]; then
<?php | |
enum Grade: string | |
{ | |
case PASS = 'pass'; | |
case FAIL = 'fail'; | |
case A = 'A'; | |
case F = 'F'; | |
case INVALID = 'Invalid grade!\n'; |
import os | |
import requests | |
# Update a File if is older than X minutes | |
def update_old_file(remote_url, local_file, max_expiration_time = 10): | |
st = os.stat(dir_path + save_as_file) | |
mtime = st.st_mtime | |
file_age = (time.time() - mtime) / 60 |
First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:
sudo lsof | grep LISTEN
If you do happen to have any process with something like this *:http (LISTEN)
, you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)
ps <pid of that process>
If you don't see MAMP, you are in good hands, I have just the thing for you:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class MY_Session extends CI_Session{ | |
private $sess_use_redis = TRUE; | |
private $redis = ''; | |
public function __construct($params = array()) { | |
//parent::__construct(); | |
$this->CI =& get_instance(); |
<?php | |
class courseGrade | |
{ | |
public function grade($currentGrade) | |
{ | |
if (!is_integer($currentGrade)) { | |
return "Invalid Data"; |
function getWaterState($degrees) | |
{ | |
$stateMessage = 'This is liquid water'; | |
if ($degrees < 0) { | |
$stateMessage = 'This is solid ice'; | |
} | |
if ($degrees > 100) { |