Skip to content

Instantly share code, notes, and snippets.

View srijan's full-sized avatar

Srijan Choudhary srijan

View GitHub Profile
@srijan
srijan / download_artifact.sh
Last active February 10, 2024 04:17
Script to download a file from GCS bucket
#!/bin/bash
# Download artifact from GCS bucket
set -e
echo -e "====> Run \`gcloud auth print-access-token\` on a system where you've setup gcloud to get access token\n"
read -r -p "Enter access token: " StorageAccessToken
read -r -p "Enter GCS artifact URL: " ArtifactURL
if [[ "${ArtifactURL:0:33}" == "https://console.cloud.google.com/" ]]; then
@srijan
srijan / theme.puml
Last active October 16, 2020 06:43
!define BLACK #363D5D
!define RED #F6363F
!define PINK #F6216E
!define MAGENTA #A54FBD
!define GREEN #37A77C
!define YELLOW #F97A00
!define BLUE #1E98F2
!define CYAN #25AFCA
!define WHITE #FFFFFF
@srijan
srijan / docker_setup.yml
Last active February 10, 2024 04:17
Install docker and docker-compose using ansible https://srijan.ch/install-docker-and-docker-compose-using-ansible
---
- name: Install packages using apt
apt:
name:
- apt-transport-https
- ca-certificates
- curl
- gnupg2
- software-properties-common
state: present

Keybase proof

I hereby claim:

  • I am srijan on github.
  • I am srijan (https://keybase.io/srijan) on keybase.
  • I have a public key whose fingerprint is 8AA7 807A 24E4 86E3 B9E5 C3E6 EF0A 2393 6B5F 8EF0

To claim this, I am signing this object:

Verifying I am +srijan on my passcard. https://onename.com/srijan
@srijan
srijan / myapp.conf
Created March 4, 2015 20:32
Nginx conf for uwsgi
upstream myapp {
least_conn;
server unix:///var/run/uwsgi_myapp0.sock;
server unix:///var/run/uwsgi_myapp1.sock;
server unix:///var/run/uwsgi_myapp2.sock;
server unix:///var/run/uwsgi_myapp3.sock;
server unix:///var/run/uwsgi_myapp4.sock;
}
server {
@srijan
srijan / supervisord.conf
Created March 4, 2015 20:22
Supervisor conf for starting uwsgi
[unix_http_server]
file=/var/run/supervisor/supervisor.sock
[supervisord]
logfile=/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=/var/run/supervisor/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false ; (start in foreground if true;default false)
@srijan
srijan / rootaufs
Created September 23, 2014 09:18
rootaufs
#!/bin/sh
# Copyright 2008 Nicholas A. Schembri State College PA USA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@srijan
srijan / tmux.conf
Created July 23, 2014 10:49
Tmux config file
unbind C-b
set -g prefix ^A
bind a send-prefix
# Bind appropriate commands similar to screen.
unbind ^X
bind ^X lock-server
unbind x
bind x lock-server
# screen ^C c
unbind ^C
; init.el
; Remove GUI extras
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
; Add line numbers
(global-linum-mode 1)