Skip to content

Instantly share code, notes, and snippets.

1. # create new .py file with code found below
2. # install ollama
3. # install model you want “ollama run mistral”
4. conda create -n autogen python=3.11
5. conda activate autogen
6. which python
7. python -m pip install pyautogen
7. ollama run mistral
8. ollama run codellama
9. # open new terminal
@faraz891
faraz891 / .gitlab-ci.yml
Created January 31, 2023 14:59 — forked from superjose/.gitlab-ci.yml
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/
# GitLab uses docker in the background, so we need to specify the
# image versions. This is useful because we're freely to use
# multiple node versions to work with it. They come from the docker
# repo.
# Uses NodeJS V 9.4.0
image: node:9.4.0
# And to cache them as well.
@faraz891
faraz891 / git.migrate
Created December 4, 2022 10:59 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@faraz891
faraz891 / App.css
Created October 30, 2022 12:37 — forked from adrianhajdin/App.css
Movie App
@import url("https://fonts.googleapis.com/css?family=Roboto+Slab:100,300,400,700");
@import url("https://fonts.googleapis.com/css?family=Raleway:300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i");
* {
margin: 0;
border: 0;
box-sizing: border-box;
}
:root {
@faraz891
faraz891 / myscript.sh
Created August 27, 2022 11:30 — forked from bradtraversy/myscript.sh
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@faraz891
faraz891 / Jenkinsfile
Created March 10, 2022 07:44 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
@faraz891
faraz891 / Jenkinsfile
Created March 10, 2022 07:38 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
# Source: https://gist.github.com/801c99d6acc5a1e68bcee2591fac90eb
####################
# Creating Cluster #
####################
# Docker for Desktop: https://gist.github.com/33fd661da626a167687ecb4267700588
# minikube: https://gist.github.com/e7ad0cc633831147d2dbcd4fe2a97a74
# GKE: https://gist.github.com/a260c0812459a57b46b9ea807a26173e
# EKS: https://gist.github.com/073edd549bc0c4d9bda6b4b7bd6bed99
# Source: https://gist.github.com/9b80db17492cee756871228d739da463
########################
# Installing Istio CLI #
########################
# Go to https://github.com/istio/istio/releases
# Pick a release
# Download and unpack the release, and move it to a directory set in the `PATH`

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database