Skip to content

Instantly share code, notes, and snippets.

View homiedopie's full-sized avatar
🎯
Focusing

Michael Mantos homiedopie

🎯
Focusing
View GitHub Profile
@homiedopie
homiedopie / prompt.txt
Created June 2, 2025 17:18 — forked from omenking/prompt.txt
Prompt Example for Lovable GPTPrompt
# Role/Profession
Frontend Developer
# Project Description
## Project Brief
We are building a japanese langauge learning web-app which serves the following purposes:
- A portal to launch study activities
@homiedopie
homiedopie / async_function.js
Created August 9, 2019 12:36 — forked from thonly/async_function.js
Async/Await "Polyfill"
async = generator => {
const g = generator();
(function next(value) {
const n = g.next(value);
if (n.done) return;
n.value.then(next);
}());
}
git tag -am "annotation goes here" tagname_goes_here # cut a tag
git tag -d tagname_goes_here # burn it
git tag -am "annotation goes here" tagname_goes_here # cut another tag
git push --tags # push tags to remote
git push origin :refs/tags/tagname_goes_here # delete tag from remote

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

Steps:

  1. Open VirtualBox
  2. Right-click your VM, then click Settings
  3. Go to Shared Folders section
  4. Add a new shared folder
  5. On Add Share prompt, select the Folder Path in your host that you want to be accessible inside your VM.
@homiedopie
homiedopie / build-php.sh
Created July 8, 2019 15:33 — forked from alkavan/build-php.sh
Compile PHP (on CentOS)
#!/bin/bash
# This is my compile command
# works good for me with PHP 5.3/5.4
# You might need this packages too (CentOS 5/6 tested)
#sudo yum install libxml2-devel.x86_64
#sudo yum install httpd-devel.x86_64
#sudo yum install openssl-devel.x86_64
@homiedopie
homiedopie / php-threads.md
Created June 20, 2019 15:15
Install pthreads on Centos 7

INSTALL WEBSTATIC REPO FOR CENTOS/RED HAT 7:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

INSTALL COMPILER PACKAGES:

yum --nogp install -y --enablerepo=webtatic-testing gcc gcc-c++ make openssl-devel linux-headers git

BECOM SUDO USER:

sudo -s

INSTALL WEBSTATIC REPO FOR CENTOS/RED HAT 7:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
@homiedopie
homiedopie / token-generator.js
Created April 21, 2019 12:33 — forked from ziluvatar/token-generator.js
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');
@homiedopie
homiedopie / docker-cheat-sheat.md
Created March 18, 2019 04:22 — forked from dwilkie/docker-cheat-sheat.md
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@homiedopie
homiedopie / example-consumer-1.js
Created February 19, 2019 07:36 — forked from martinkuba/example-consumer-1.js
New Relic Node Agent - message instrumentation examples
// This example shows using custom instrumentation function.
// The kafka module is instrumented in a central place, separately from the app
// that uses it.
const newrelic = require('newrelic')
const instrumentKafkaClient = require('./kafka-client-instrumentation')
// register instrumentation for the kafka client module
newrelic.instrumentMessages('./mock-kafka-client', instrumentKafkaClient,
function handleError(err) {
// this is called when the instrumentation itself errors