Skip to content

Instantly share code, notes, and snippets.

View sbose78's full-sized avatar
🎯
Focusing

Shoubhik Bose sbose78

🎯
Focusing
View GitHub Profile
@sbose78
sbose78 / views.py
Created September 9, 2012 20:02
Uploading files in Django using pymongo
import os
import gridfs
from django.http import HttpResponse
from pymongo.connection import Connection
from django.shortcuts import get_object_or_404, render_to_response
from django.http import HttpResponseRedirect, HttpResponse
from django.template import Context, RequestContext,loader
from bson.object import ObjectId
#uploading form including image/file
@sbose78
sbose78 / update-version-package.sh
Last active April 11, 2024 19:36
Pre-commit hook to update package.json
#!/bin/bash
set -e
update_version(){
if [[ "$DONT_BUMP_VERSION" -ne "1" ]]
then
echo " Bumping version.. "
else
echo "Version will not be bumped since variable DONT_BUMP_VERSION is set."
exit 0
apiVersion: argoproj.io/v1beta1
kind: ArgoCD
metadata:
name: developer-argocd
spec:
server:
autoscale:
enabled: false
grpc:
ingress:
# TODO: Apply the right annotations/labels to mark this a 'hook'
# TODO: Update the kubectl command to use values from the values.yaml
apiVersion: batch/v1
kind: Job
metadata:
name: "apply-tekton-config"
spec:
template:
metadata:
apiVersion: tekton.dev/v1alpha1
kind: ClusterTask
metadata:
name: buildah
spec:
inputs:
params:
- name: BUILDER_IMAGE
description: The location of the buildah builder image.
default: quay.io/buildah/stable:v1.11.0
@sbose78
sbose78 / build.yaml
Created February 6, 2020 13:58
otavio's build & buildstrategy
---
kind: BuildStrategy
APIVersion: io.build.dev.redhat/v1alpha1
name: s2i
spec:
run: false
steps:
- name: s2i
image: registry.redhat.io/ocp_tools/s2i:latest
workingDir: /workspace/git
apiversion: v1
generated: 2019-12-18T11:51:00.34758-05:00
entries:
acs-engine-autoscaler:
- metadata:
name: acs-engine-autoscaler
home: ""
sources: []
version: ""
description: ""
apiVersion: devconsole.openshift.io/v1alpha1
kind: GitSourceAnalysis
metadata:
name: node2-gitsource-analysis
spec:
gitSourceRef:
name: node2-gitsource
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: applications.developer.openshift.io
spec:
group: developer.openshift.io
names:
apiVersion: build.knative.dev/v1alpha1
kind: Build
metadata:
name: component-wit-build
spec:
source:
git:
url: https://github.com/fabric8-services/fabric8-wit
revision: master
steps: