Skip to content

Instantly share code, notes, and snippets.

View ashecret's full-sized avatar

Ashraful Alam ashecret

View GitHub Profile
@ashecret
ashecret / installing_composer_with_brew.md
Last active September 19, 2017 15:09
How to install PHP and Composer on a Mac with Homebrew

Install PHP an Composer

  • brew update
  • brew tap homebrew/dupes
  • brew tap homebrew/php
  • brew install php56
  • brew install composer

You can replace 56 with your preferred version, i.e. php71

@ashecret
ashecret / nginx-ssl-config
Created July 4, 2017 19:24 — forked from apollolm/nginx-ssl-config
Nginx Configuration with multiple port apps on same domain, with SSL.
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}
@ashecret
ashecret / pickRandomComment.js
Created May 24, 2017 22:53 — forked from learncodeacademy/pickRandomComment.js
YouTube Random Comment Selector
const axios = require("axios");
const key = "AIzaSyB9e-dHIvdxxrbmorjYHWipwBKq7LJBhNk"
function getComments(pageToken, allItems = {}) {
const params = {
key,
videoId: "a4haLJdDRmc",
part: "snippet",
maxResults: 100,
pageToken,
@ashecret
ashecret / gist:1250381d27fdc94466db971cf7bb903a
Created November 3, 2016 14:55 — forked from hatch2/gist:3681758
use json_encode & json_decode at old php
<?php
//JSON.php -> http://pear.php.net/package/Services_JSON/
require_once 'JSON.php';
if ( !function_exists('json_decode') ){
function json_decode($content, $assoc=false){
if ( $assoc ){
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);