Skip to content

Instantly share code, notes, and snippets.

# Project: RAG System for GitLab & AWS CI/CD
# Step 1: Clone the Repository
mkdir -p rag-gitlab-aws && cd rag-gitlab-aws
echo "# Store environment variables" > .env
cat <<EOL > .env
GITLAB_TOKEN=your-gitlab-token
GITLAB_PROJECT_ID=your-project-id
EOL
@a4sh3u
a4sh3u / gptapp.txt
Created May 21, 2023 08:03
GPT-4 - How does it work, and how do I build apps with it? - CS50 Tech Talk
you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you you and wear your helmet that also on future or after 1pm outside. All right, over to you, Ted. A lot. Hey everybody, it's great to be here. I think we've got a really good talk for you today. Sills going to provide some research grounding into how it all works, what's going inside, the brain of GPT as well as other language models. And then I'll show you some examples that we're seeing on the ground of how people are building apps and what apps tend to work in the real world. So our perspective is we're building AWS for AI apps. So we get to talk to a lot of the makers who are building and deploying their apps. And through that, see both the experimental end of the spectrum and also see what kinds of apps are getting pushed out there and turned into companies, turned into side projects. We did a cool hackathon yesterday. Many thanks to Neiman,
@a4sh3u
a4sh3u / Jenkinsfile.groovy
Created June 3, 2019 14:55 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@a4sh3u
a4sh3u / bitbucket_cleanup.sh
Last active December 27, 2018 15:58
bitbucket_cleanup.sh
#!/usr/bin/env bash
#set -x
MAIN_URL='https://bitbucket.smava.de/rest/api/1.0/projects'
CURL_GET_CMD="curl -s -H 'X-Atlassian-Token: no-check' -u${bitbucket_user}:${bitbucket_password}"
PROJECTS=$(${CURL_GET_CMD} "${MAIN_URL}" | jq .values[].key | sed 's/"//g')
echo "PROJECT GIT-REPO PULL-REQUEST-TITLE LAST-UPDATED-DATE" > /tmp/decline_prlist
echo "PROJECT GIT-REPO PULL-REQUEST-TITLE LAST-UPDATED-DATE" > /tmp/delete_prlist
echo "PROJECT GIT-REPO BRANCH-NAME LAST-UPDATED-DATE" > /tmp/delete_branchlist
audited 241 packages in 1.578s
found 1 low severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
body-parser deprecated undefined extended: provide extended option node_modules/hubot/src/robot.js:445:21
[Tue Dec 18 2018 15:31:35 GMT+0000 (Coordinated Universal Time)] DEBUG Loading adapter google-hangouts-chat
[Tue Dec 18 2018 15:31:36 GMT+0000 (Coordinated Universal Time)] INFO Connecting to Pub/Sub subscription - projects/hubot-hangout-project/subscriptions/myhubotsubscription
[Tue Dec 18 2018 15:31:36 GMT+0000 (Coordinated Universal Time)] INFO Hangouts Chat adapter initialized successfully
[Tue Dec 18 2018 15:31:36 GMT+0000 (Coordinated Universal Time)] DEBUG Loading scripts from /home/hubot/scripts
[Tue Dec 18 2018 15:31:36 GMT+0000 (Coordinated Universal Time)] DEBUG Parsing help for /home/hubot/scripts/example.coffee
[Tue Dec 18 2018 15:31:36 GMT+0000 (Coordinated Universal Time)] DEBUG Loading scripts from /home/hubot/src/scripts
@a4sh3u
a4sh3u / git_squash.sh
Created August 13, 2018 15:02
Git Squash
# Reset the current branch to the commit just before the last 12:
git reset --hard HEAD~12
# HEAD@{1} is where the branch was just before the previous command.
# This command sets the state of the index to be as it would just
# after a merge from that commit:
git merge --squash HEAD@{1}
# Commit those squashed changes. The commit message will be helpfully
# prepopulated with the commit messages of all the squashed commits:
@a4sh3u
a4sh3u / stats.sh
Created July 18, 2018 16:35
stats
#!/usr/bin/env bash
echo "CPU `LC_ALL=C top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1}'`% RAM `free -m | awk '/Mem:/ { printf("%3.1f%%", $3/$2*100) }'` HDD `df -h / | awk '/\// {print $(NF-1)}'`"
@a4sh3u
a4sh3u / parhttp.py
Created July 2, 2018 15:14 — forked from hoffrocket/parhttp.py
Python parallel http requests using multiprocessing
#!/usr/bin/env python
from multiprocessing import Process, Pool
import time
import urllib2
def millis():
return int(round(time.time() * 1000))
def http_get(url):
@a4sh3u
a4sh3u / Jenkinsfile
Created June 21, 2018 13:09
Jenkinsfile
#!groovy
node("docker-light") {
stage "Verify author"
def power_users = ["ktf", "dberzano"]
def deployable_branches = ["master"]
echo "Changeset from " + env.CHANGE_AUTHOR
if (power_users.contains(env.CHANGE_AUTHOR)) {
echo "PR comes from power user. Testing"
@a4sh3u
a4sh3u / Jenkinsfile
Created June 21, 2018 08:28 — forked from bvis/Jenkinsfile
Jenkin pipeline definition example to be integrated with Docker Swarm cluster in our CI/CD environment
pipeline {
agent { node { label 'swarm-ci' } }
environment {
TEST_PREFIX = "test-IMAGE"
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}"
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}"
REGISTRY_ADDRESS = "my.registry.address.com"
SLACK_CHANNEL = "#deployment-notifications"