Skip to content

Instantly share code, notes, and snippets.

View hellotunmbi's full-sized avatar

Olutunmbi Banto hellotunmbi

View GitHub Profile
@hellotunmbi
hellotunmbi / learning_resources.md
Last active May 31, 2017 13:28 — forked from nathansmith/web-design-development-learning-resources.md
Resources for learning web design & front-end development
@hellotunmbi
hellotunmbi / gist:68c7735443c92034b3961f78eba7c3e4
Last active June 15, 2022 12:12
add-engine-for-ng-deployment-to-heroku
"engines": {
"node": "16.15.0",
"npm": "8.5.5"
}
//Install express server
const express = require('express');
const path = require('path');
const app = express();
// Serve only the static files form the dist directory
app.use(express.static(__dirname + '/dist/<name-of-app>'));
app.get('/*', function(req,res) {
{
"name": "demo-deploy",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "node server.js",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
@hellotunmbi
hellotunmbi / mongo_on_mac_yosemite_10.10.4.md
Created November 3, 2017 10:25 — forked from isramv/mongo_on_mac_yosemite_10.10.4.md
How to install mongodb on Mac Yosemite 10.10.4

how to install Mongo db on Mac Yosemite 10.10.4

I will be following the official documentation here but they take some things for granted, many users could get frustrated and confused that's why I created this gist.

I have downloaded the mongo files in my root user directory for example: /Users/israel/mongodb therefore if you want to do the same first enter cd in your terminal.

then enter pwd command in your terminal and you should be able to se something similar to /Users/<yourmacuser>

If the previous is correct you may want to proceed and open the terminal then download the tar:

#!/bin/bash
hostname=$(hostname -s)
cd ~/Library/Application\ Support/com.bohemiancoding.sketch3/
rm .license && touch .license && echo '{"meta":{"generated_at":"'$(date)'","sign":"==","device_name":"'$hostname "("$(id -un)')"},"payload":{"status":"ok","application":"sketch3","type":"license","udid":"c2d8c1dd037f919d57124de1037eeb22efad6bd1","expiration":"9999999999"}}' >> .license
echo '127.0.0.1 backend.bohemiancoding.com' | sudo tee -a /etc/hosts
Options -Indexes
Options +FollowSymLinks
# Set the default file for indexes
DirectoryIndex index.php
<IfModule mod_rewrite.c>
# activate URL rewriting
RewriteEngine on
@hellotunmbi
hellotunmbi / gist:dc37dde31933b95cf0f5e185cc69df6b
Created February 4, 2018 03:39
React Native: Unable to load script from assets index.android.bundle
1. (in project directory) mkdir android/app/src/main/assets
2. react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
3. adb reverse tcp:8081 tcp:8081
4. react-native run-android
You can automate the above steps by placing them in scripts part of package.json like this:
"android-linux": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && react-native run-android"
@hellotunmbi
hellotunmbi / write-to-firebase.js
Created April 1, 2018 13:27 — forked from magician11/write-to-firebase.js
Writing data to Firebase from Node.js
const admin = require('firebase-admin');
admin.initializeApp({
credential: admin.credential.cert('./movies-387bf-firebase-adminsdk-4hoi8-c52699119b.json'),
databaseURL: 'https://movies-387bf.firebaseio.com',
});
// Get a database reference to our blog
const db = admin.database();
@hellotunmbi
hellotunmbi / app.js
Created April 13, 2018 03:06 — forked from jochasinga/app.js
Node/Socket.io server code for syncing data from Firebase
var Firebase = require("firebase");
var express = require("express");
// Create HTTP Server
var app = express();
var server = require("http").createServer(app);
// Attach Socket.io server
var io = require("socket.io")(server);
// Indicate port 3000 as host
var port = process.env.PORT || 3000;