Skip to content

Instantly share code, notes, and snippets.

View poode's full-sized avatar
:octocat:
Focusing

Abdulazeem Mouneer poode

:octocat:
Focusing
View GitHub Profile
@poode
poode / Deploy your developed app on Okteto.txt
Last active August 5, 2022 23:43
Deploy your developed app on Okteto (on free plan)
1- We will follow Okteto CLI normal installation from their documentation
2- Create a file and call it k8s.yaml (follow documentation if you need a more specific use case)
3- if you have secrets you need to use locally this command below
```kubectl get secret <secret name> --output=yaml```
4- Then use the Okteto command to get your namespace for your application
```okteto context list```
5- The secret YAML has a namespace called default (or any name), you have to change it with what okteto command gave you in step 4
6- Add the secret YAML in the k8s file normally after "---"
7- Remove any ingress step in your YAML and only keep the service
8- Use the below command to deploy
@poode
poode / fekra-assessment-compressWord
Last active December 22, 2021 10:29
fekra-assessment
function compressWord(word, k) {
let count = 1
let tempWord = ''
for(let i = 0; i < word.length; i++){
for(let j = i + 1; j < word.length; j++){
if(word[i] === word[j]) count++
if(count === k){
count = 1
tempWord = word.slice(0, j +1 - k) + word.slice(j + 1)
console.log(tempWord)
@poode
poode / host-react-app-on-apache-server.md
Created May 21, 2020 16:12 — forked from ywwwtseng/host-react-app-on-apache-server.md
Host react application on Apache server

Host react application on Apache server

Step 1 : Create your app

$ npm install -g create-react-app 
$ create-react-app my-app

Step 2 : Build it for production

@poode
poode / api.js
Created March 22, 2020 14:02 — forked from chatman-media/api.js
final-fb-passport
const express = require('express');
const passport = require('passport');
const router = express.Router();
const { fbAuth, fbCb } = require('../lib/facebook');
router.get('/oauth/:id/facebook', fbAuth);
router.get('/oauth/:id/facebook', fbAuth());
module.exports = router;
@poode
poode / postman-deb.sh
Created March 16, 2020 23:15 — forked from SanderTheDragon/postman-deb.sh
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
ls Postman*.tar.gz > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Removing old Postman tarballs"
rm -f $(ls Postman*.tar.gz)
fi
curlExists=$(command -v curl)
@poode
poode / Install MSOffice on Ubuntu.md
Created March 12, 2020 10:36 — forked from raelgc/Install MSOffice on Ubuntu.md
Install MSOffice on Ubuntu

Install Microsoft Office 2010 on Ubuntu

Requirements

We'll install MSOffice using the PlayOnLinux wizard. Additionally, MSOffice requires samba and winbind to properly work.

So, if not installed, install them:

sudo apt-get install playonlinux samba winbind
@poode
poode / Install MSOffice on Ubuntu.md
Created March 12, 2020 10:36 — forked from raelgc/Install MSOffice on Ubuntu.md
Install MSOffice on Ubuntu

Install Microsoft Office 2010 on Ubuntu

Requirements

We'll install MSOffice using the PlayOnLinux wizard. Additionally, MSOffice requires samba and winbind to properly work.

So, if not installed, install them:

sudo apt-get install playonlinux samba winbind
const events = require('events');
const eventsEmitter = new events.EventEmitter();
let eventName = 'greeting';
class Publisher {
constructor(){
}
publishMessage(){
let message = ‘hi there’;
eventsEmitter.emit(eventName, message);
const express = require('express');
const app = express();
// Application
app.get('/', function(req, res) {
if (process.env.NODE_ENV === 'development') {
for (var key in require.cache) {
delete require.cache[key];
}
}
@poode
poode / s3.js
Created June 28, 2019 13:39
S3 USage
const AWS = require('aws-sdk');
const s3 = new AWS.S3();
const BUCKET_NAME = 'packet name';
const IAM_USER_KEY = 'key';
const IAM_USER_SECRET = 'secret';
// Bucket names must be unique across all S3 users
/**