Skip to content

Instantly share code, notes, and snippets.

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

Sajid Khan SajidK25

🏠
Working from home
View GitHub Profile
@SajidK25
SajidK25 / 01_elastic_beanstalk_install_packages.config
Created August 15, 2023 17:00 — forked from hanhdt/01_elastic_beanstalk_install_packages.config
Setup additional linux packages on AWS Elastic Beanstalk that need to build Rails 5
# Setup linux packages
option_settings:
- option_name: BUNDLE_DISABLE_SHARED_GEMS
value: "1"
- option_name: BUNDLE_PATH
value: "vendor/bundle"
packages:
yum:
curl: []
from sqlite3 import connect
from flask import Flask, jsonify, request
from flask_restful import Api, Resource
from pymongo import MongoClient
import bcrypt
import numpy
import tensorflow as tf
import requests
import subprocess
import json

Step:1

Remove existing containers:

cd delalight_site/
./server_down.sh
sudo rm -r data/postgres/

Step:2

@SajidK25
SajidK25 / gist:e42b54c4cc6f7cd96426073d944e2d9a
Last active January 16, 2022 11:51
Multi Stage Dockerfile using sshkey
FROM ubuntu as intermidiate
RUN apt-get update
RUN apt-get install git -y
RUN mkdir /root/.ssh/ && \
chmod 700 /root/.ssh
COPY id_ed25519 /root/.ssh/id_rsa && \
chmod 600 /root/.ssh/id_rsa
@SajidK25
SajidK25 / git-pull-all
Created October 25, 2021 18:12 — forked from grimzy/git-pull-all
Git pull all remote branches
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
@SajidK25
SajidK25 / k8s-bookmarks-CKA-CKAD.html
Created September 26, 2021 05:30 — forked from Piotr1215/k8s-bookmarks-CKA-CKAD.html
K8s bookmarks for CKA, CKAD and CKS exams
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1626629115" LAST_MODIFIED="1626629462" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3>
<DL><p>
using System;
using System.Collections.Generic;
namespace DCP_8_Get_the_Numbers
{
class Program
{
static void Main(string[] args)
{
int T=int.Parse(Console.ReadLine());
def addition_function
puts "Which numbers would you like to add?"
@n1 = gets.chomp
@n2 = gets.chomp
@answer = @n1 + @n2
# @n1 + @n2 == @answer
puts "The sum is... #{@answer}"
end
def subtraction_function
@SajidK25
SajidK25 / heap.dart
Created December 13, 2018 12:14
Heap, Build a Max-heap and Convert Binary tree into a Heap using Dart programming Language
int left(int i) {
return 2 * i;
}
int right(int i) {
return 2 * i - 1;
}
int parant(int i) {
return i;
@SajidK25
SajidK25 / Stack.dart
Last active December 12, 2018 20:47
Simple Stack [LIFO] behaviour Implementation using Dart Programming Language
class Stack {
List items;
Stack(this.items);
@override
String toString() => 'List :$items';
void push(int item) {
this.items.add(item);
}