Skip to content

Instantly share code, notes, and snippets.

View jimi008's full-sized avatar
🏠
Working from home

Jamil Ahmed jimi008

🏠
Working from home
View GitHub Profile
@jimi008
jimi008 / Jenkins.sh
Created June 11, 2024 11:39
Jenkins Shell script to deploy React / NodeJs application on Oracle remote staging server using Kubernetes
#!/bin/bash
# Ensure BUILD_NUMBER is a string
BUILD_NUMBER="Build_$BUILD_NUMBER"
# Use SSH credentials to connect to a remote server
eval $(ssh-agent)
ssh-add $oracle_Instance_Key_file
# SSH into Minikube machine and run the deployment commands
apiVersion: apps/v1
kind: Deployment
metadata:
name: firstdeploy
labels:
name: firstdeploy
annotations:
kubernetes.io/change-cause: "first deployment"
spec:
replicas: 10
@jimi008
jimi008 / Install PHP Redis Client on ec2 aws
Created September 14, 2023 14:30 — forked from vikramacharya/Install PHP Redis Client on ec2 aws
Install PHP Redis Client on ec2 aws
##### ec2-user #######
sudo yum update -y
sudo yum install -y httpd24
sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
sudo service httpd start
sudo service httpd restart
sudo chkconfig httpd on
chkconfig --list httpd
sudo usermod -a -G apache ec2-user
groups
@jimi008
jimi008 / nav.js
Last active May 17, 2022 08:01 — forked from luboskmetko/nav.js
let el = document.querySelector('.nav');
el.className += ' is-open'; //space needed between classes
const children = Array.from(el.querySelectorAll('li')); //.map require an array
const textContents = children.map(child => child.textContent);
console.log(textContents); // should log an array of strings
@jimi008
jimi008 / teaser.scss
Last active February 11, 2022 12:05 — forked from luboskmetko/teaser.scss
.teaser {
padding: 2em;
.learn-more {
border: 1px solid $color-border;
}
svg {
width: 16px;
}
&--small {
@jimi008
jimi008 / udacimak commands.txt
Last active January 24, 2022 06:06
How to Use udacimak
##See: https://github.com/udacimak/udacimak/wiki/How-to-Use
1-
udacimak settoken YOUR_UDACITY_AUTH_TOKEN
## For settoken YOUR_UDACITY_AUTH_TOKEN see https://github.com/udacimak/udacimak/wiki/How-to-Use
2-
udacimak download ud065
@jimi008
jimi008 / DSND-Quizzes.py
Created January 16, 2022 17:19 — forked from jkarakas/DSND-Quizzes.py
DSND-Quizzes created by jkarakas - https://repl.it/@jkarakas/DSND-Quizzes
# DSND - Lesson 2 - Quiz 8 / 2
# Let's say that we have a line whose equation is y = -0.6x + 4. For the point (x,y) = (-5, 3), apply the square trick to get the new equation for the line, using a learning rate of alpha = 0.01alpha=0.01.
# Report your answer in the form y = w_1x + w_2, substituting appropriate values for w_1 and w_2.
a = 0.01
w1 = -0.6
w2 = 4
p = -5
@jimi008
jimi008 / facebook.class.php
Last active March 17, 2021 14:52
The Grid Facebook Class
<?php
/**
* @package The_Grid
* @author Themeone <themeone.master@gmail.com>
* @copyright 2015 Themeone
*/
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
@jimi008
jimi008 / wp-config-debug.php
Created January 11, 2021 12:52 — forked from jrfnl/wp-config-debug.php
Code to add to wp-config.php to enhance information available for debugging.
<?php
/**
* == About this Gist ==
*
* Code to add to wp-config.php to enhance information available for debugging.
*
* You would typically add this code below the database, language and salt settings
*
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists).
*
@jimi008
jimi008 / test.sql
Created September 30, 2020 16:59
Davie's Burgers Subway Ad
SELECT *
FROM orders
LIMIT 10;
-- id, user_id, order_date, restaurant_id, item_name, special_instructions
--2
SELECT DISTINCT order_date
FROM orders